@textadventures/squiffy-packager 6.0.0-beta.1 → 6.0.0-beta.3

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.
package/dist/packager.js CHANGED
@@ -28,10 +28,8 @@ var w = Uint8Array, L = Uint16Array, he = Int32Array, ue = new w([
28
28
  5,
29
29
  5,
30
30
  0,
31
- /* unused */
32
31
  0,
33
32
  0,
34
- /* impossible */
35
33
  0
36
34
  ]), pe = new w([
37
35
  0,
@@ -64,58 +62,67 @@ var w = Uint8Array, L = Uint16Array, he = Int32Array, ue = new w([
64
62
  12,
65
63
  13,
66
64
  13,
67
- /* unused */
68
65
  0,
69
66
  0
70
- ]), ye = new w([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), we = function(e, t) {
71
- for (var s = new L(31), n = 0; n < 31; ++n)
72
- s[n] = t += 1 << e[n - 1];
73
- for (var r = new he(s[30]), n = 1; n < 30; ++n)
74
- for (var i = s[n]; i < s[n + 1]; ++i)
75
- r[i] = i - s[n] << 5 | n;
76
- return { b: s, r };
77
- }, Ce = we(ue, 2), Re = Ce.b, ie = Ce.r;
78
- Re[28] = 258, ie[258] = 28;
79
- var Me = we(pe, 0), ve = Me.r, oe = new L(32768);
67
+ ]), ye = new w([
68
+ 16,
69
+ 17,
70
+ 18,
71
+ 0,
72
+ 8,
73
+ 7,
74
+ 9,
75
+ 6,
76
+ 10,
77
+ 5,
78
+ 11,
79
+ 4,
80
+ 12,
81
+ 3,
82
+ 13,
83
+ 2,
84
+ 14,
85
+ 1,
86
+ 15
87
+ ]), we = function(e, t) {
88
+ for (var r = new L(31), s = 0; s < 31; ++s) r[s] = t += 1 << e[s - 1];
89
+ for (var i = new he(r[30]), s = 1; s < 30; ++s) for (var n = r[s]; n < r[s + 1]; ++n) i[n] = n - r[s] << 5 | s;
90
+ return {
91
+ b: r,
92
+ r: i
93
+ };
94
+ }, Te = we(ue, 2), Oe = Te.b, ie = Te.r;
95
+ Oe[28] = 258, ie[258] = 28;
96
+ var Ce = we(pe, 0), ut = Ce.b, ve = Ce.r, oe = new L(32768);
80
97
  for (var y = 0; y < 32768; ++y) {
81
98
  var z = (y & 43690) >> 1 | (y & 21845) << 1;
82
99
  z = (z & 52428) >> 2 | (z & 13107) << 2, z = (z & 61680) >> 4 | (z & 3855) << 4, oe[y] = ((z & 65280) >> 8 | (z & 255) << 8) >> 1;
83
100
  }
84
- var K = (function(e, t, s) {
85
- for (var n = e.length, r = 0, i = new L(t); r < n; ++r)
86
- e[r] && ++i[e[r] - 1];
101
+ var J = (function(e, t, r) {
102
+ for (var s = e.length, i = 0, n = new L(t); i < s; ++i) e[i] && ++n[e[i] - 1];
87
103
  var a = new L(t);
88
- for (r = 1; r < t; ++r)
89
- a[r] = a[r - 1] + i[r - 1] << 1;
90
- var h;
91
- if (s) {
92
- h = new L(1 << t);
93
- var l = 15 - t;
94
- for (r = 0; r < n; ++r)
95
- if (e[r])
96
- for (var d = r << 4 | e[r], o = t - e[r], c = a[e[r] - 1]++ << o, g = c | (1 << o) - 1; c <= g; ++c)
97
- h[oe[c] >> l] = d;
104
+ for (i = 1; i < t; ++i) a[i] = a[i - 1] + n[i - 1] << 1;
105
+ var l;
106
+ if (r) {
107
+ l = new L(1 << t);
108
+ var p = 15 - t;
109
+ for (i = 0; i < s; ++i) if (e[i])
110
+ for (var c = i << 4 | e[i], o = t - e[i], h = a[e[i] - 1]++ << o, g = h | (1 << o) - 1; h <= g; ++h) l[oe[h] >> p] = c;
98
111
  } else
99
- for (h = new L(n), r = 0; r < n; ++r)
100
- e[r] && (h[r] = oe[a[e[r] - 1]++] >> 15 - e[r]);
101
- return h;
102
- }), U = new w(288);
103
- for (var y = 0; y < 144; ++y)
104
- U[y] = 8;
105
- for (var y = 144; y < 256; ++y)
106
- U[y] = 9;
107
- for (var y = 256; y < 280; ++y)
108
- U[y] = 7;
109
- for (var y = 280; y < 288; ++y)
110
- U[y] = 8;
112
+ for (l = new L(s), i = 0; i < s; ++i) e[i] && (l[i] = oe[a[e[i] - 1]++] >> 15 - e[i]);
113
+ return l;
114
+ }), V = new w(288);
115
+ for (var y = 0; y < 144; ++y) V[y] = 8;
116
+ for (var y = 144; y < 256; ++y) V[y] = 9;
117
+ for (var y = 256; y < 280; ++y) V[y] = 7;
118
+ for (var y = 280; y < 288; ++y) V[y] = 8;
111
119
  var Q = new w(32);
112
- for (var y = 0; y < 32; ++y)
113
- Q[y] = 5;
114
- var Ie = /* @__PURE__ */ K(U, 9, 0), Ne = /* @__PURE__ */ K(Q, 5, 0), Te = function(e) {
120
+ for (var y = 0; y < 32; ++y) Q[y] = 5;
121
+ var Ne = /* @__PURE__ */ J(V, 9, 0), Ie = /* @__PURE__ */ J(Q, 5, 0), Ee = function(e) {
115
122
  return (e + 7) / 8 | 0;
116
- }, Ee = function(e, t, s) {
117
- return (s == null || s > e.length) && (s = e.length), new w(e.subarray(t, s));
118
- }, Be = [
123
+ }, Ae = function(e, t, r) {
124
+ return (t == null || t < 0) && (t = 0), (r == null || r > e.length) && (r = e.length), new w(e.subarray(t, r));
125
+ }, Me = [
119
126
  "unexpected EOF",
120
127
  "invalid block type",
121
128
  "invalid length/literal",
@@ -130,301 +137,309 @@ var Ie = /* @__PURE__ */ K(U, 9, 0), Ne = /* @__PURE__ */ K(Q, 5, 0), Te = funct
130
137
  "filename too long",
131
138
  "stream finishing",
132
139
  "invalid zip data"
133
- // determined by unknown compression method
134
- ], Z = function(e, t, s) {
135
- var n = new Error(t || Be[e]);
136
- if (n.code = e, Error.captureStackTrace && Error.captureStackTrace(n, Z), !s)
137
- throw n;
138
- return n;
139
- }, H = function(e, t, s) {
140
- s <<= t & 7;
141
- var n = t / 8 | 0;
142
- e[n] |= s, e[n + 1] |= s >> 8;
143
- }, G = function(e, t, s) {
144
- s <<= t & 7;
145
- var n = t / 8 | 0;
146
- e[n] |= s, e[n + 1] |= s >> 8, e[n + 2] |= s >> 16;
147
- }, re = function(e, t) {
148
- for (var s = [], n = 0; n < e.length; ++n)
149
- e[n] && s.push({ s: n, f: e[n] });
150
- var r = s.length, i = s.slice();
151
- if (!r)
152
- return { t: Pe, l: 0 };
153
- if (r == 1) {
154
- var a = new w(s[0].s + 1);
155
- return a[s[0].s] = 1, { t: a, l: 1 };
140
+ ], K = function(e, t, r) {
141
+ var s = new Error(t || Me[e]);
142
+ if (s.code = e, Error.captureStackTrace && Error.captureStackTrace(s, K), !r) throw s;
143
+ return s;
144
+ }, q = function(e, t, r) {
145
+ r <<= t & 7;
146
+ var s = t / 8 | 0;
147
+ e[s] |= r, e[s + 1] |= r >> 8;
148
+ }, G = function(e, t, r) {
149
+ r <<= t & 7;
150
+ var s = t / 8 | 0;
151
+ e[s] |= r, e[s + 1] |= r >> 8, e[s + 2] |= r >> 16;
152
+ }, ne = function(e, t) {
153
+ for (var r = [], s = 0; s < e.length; ++s) e[s] && r.push({
154
+ s,
155
+ f: e[s]
156
+ });
157
+ var i = r.length, n = r.slice();
158
+ if (!i) return {
159
+ t: Le,
160
+ l: 0
161
+ };
162
+ if (i == 1) {
163
+ var a = new w(r[0].s + 1);
164
+ return a[r[0].s] = 1, {
165
+ t: a,
166
+ l: 1
167
+ };
156
168
  }
157
- s.sort(function(T, E) {
158
- return T.f - E.f;
159
- }), s.push({ s: -1, f: 25001 });
160
- var h = s[0], l = s[1], d = 0, o = 1, c = 2;
161
- for (s[0] = { s: -1, f: h.f + l.f, l: h, r: l }; o != r - 1; )
162
- h = s[s[d].f < s[c].f ? d++ : c++], l = s[d != o && s[d].f < s[c].f ? d++ : c++], s[o++] = { s: -1, f: h.f + l.f, l: h, r: l };
163
- for (var g = i[0].s, n = 1; n < r; ++n)
164
- i[n].s > g && (g = i[n].s);
165
- var u = new L(g + 1), m = ae(s[o - 1], u, 0);
169
+ r.sort(function(C, E) {
170
+ return C.f - E.f;
171
+ }), r.push({
172
+ s: -1,
173
+ f: 25001
174
+ });
175
+ var l = r[0], p = r[1], c = 0, o = 1, h = 2;
176
+ for (r[0] = {
177
+ s: -1,
178
+ f: l.f + p.f,
179
+ l,
180
+ r: p
181
+ }; o != i - 1; )
182
+ l = r[r[c].f < r[h].f ? c++ : h++], p = r[c != o && r[c].f < r[h].f ? c++ : h++], r[o++] = {
183
+ s: -1,
184
+ f: l.f + p.f,
185
+ l,
186
+ r: p
187
+ };
188
+ for (var g = n[0].s, s = 1; s < i; ++s) n[s].s > g && (g = n[s].s);
189
+ var u = new L(g + 1), m = ae(r[o - 1], u, 0);
166
190
  if (m > t) {
167
- var n = 0, v = 0, C = m - t, I = 1 << C;
168
- for (i.sort(function(E, b) {
191
+ var s = 0, v = 0, T = m - t, I = 1 << T;
192
+ for (n.sort(function(E, b) {
169
193
  return u[b.s] - u[E.s] || E.f - b.f;
170
- }); n < r; ++n) {
171
- var $ = i[n].s;
194
+ }); s < i; ++s) {
195
+ var $ = n[s].s;
172
196
  if (u[$] > t)
173
197
  v += I - (1 << m - u[$]), u[$] = t;
174
- else
175
- break;
198
+ else break;
176
199
  }
177
- for (v >>= C; v > 0; ) {
178
- var N = i[n].s;
179
- u[N] < t ? v -= 1 << t - u[N]++ - 1 : ++n;
200
+ for (v >>= T; v > 0; ) {
201
+ var M = n[s].s;
202
+ u[M] < t ? v -= 1 << t - u[M]++ - 1 : ++s;
180
203
  }
181
- for (; n >= 0 && v; --n) {
182
- var _ = i[n].s;
204
+ for (; s >= 0 && v; --s) {
205
+ var _ = n[s].s;
183
206
  u[_] == t && (--u[_], ++v);
184
207
  }
185
208
  m = t;
186
209
  }
187
- return { t: new w(u), l: m };
188
- }, ae = function(e, t, s) {
189
- return e.s == -1 ? Math.max(ae(e.l, t, s + 1), ae(e.r, t, s + 1)) : t[e.s] = s;
210
+ return {
211
+ t: new w(u),
212
+ l: m
213
+ };
214
+ }, ae = function(e, t, r) {
215
+ return e.s == -1 ? Math.max(ae(e.l, t, r + 1), ae(e.r, t, r + 1)) : t[e.s] = r;
190
216
  }, be = function(e) {
191
- for (var t = e.length; t && !e[--t]; )
192
- ;
193
- for (var s = new L(++t), n = 0, r = e[0], i = 1, a = function(l) {
194
- s[n++] = l;
195
- }, h = 1; h <= t; ++h)
196
- if (e[h] == r && h != t)
197
- ++i;
198
- else {
199
- if (!r && i > 2) {
200
- for (; i > 138; i -= 138)
201
- a(32754);
202
- i > 2 && (a(i > 10 ? i - 11 << 5 | 28690 : i - 3 << 5 | 12305), i = 0);
203
- } else if (i > 3) {
204
- for (a(r), --i; i > 6; i -= 6)
205
- a(8304);
206
- i > 2 && (a(i - 3 << 5 | 8208), i = 0);
207
- }
208
- for (; i--; )
209
- a(r);
210
- i = 1, r = e[h];
217
+ for (var t = e.length; t && !e[--t]; ) ;
218
+ for (var r = new L(++t), s = 0, i = e[0], n = 1, a = function(p) {
219
+ r[s++] = p;
220
+ }, l = 1; l <= t; ++l) if (e[l] == i && l != t) ++n;
221
+ else {
222
+ if (!i && n > 2) {
223
+ for (; n > 138; n -= 138) a(32754);
224
+ n > 2 && (a(n > 10 ? n - 11 << 5 | 28690 : n - 3 << 5 | 12305), n = 0);
225
+ } else if (n > 3) {
226
+ for (a(i), --n; n > 6; n -= 6) a(8304);
227
+ n > 2 && (a(n - 3 << 5 | 8208), n = 0);
211
228
  }
212
- return { c: s.subarray(0, n), n: t };
213
- }, J = function(e, t) {
214
- for (var s = 0, n = 0; n < t.length; ++n)
215
- s += e[n] * t[n];
216
- return s;
217
- }, Ae = function(e, t, s) {
218
- var n = s.length, r = Te(t + 2);
219
- e[r] = n & 255, e[r + 1] = n >> 8, e[r + 2] = e[r] ^ 255, e[r + 3] = e[r + 1] ^ 255;
220
- for (var i = 0; i < n; ++i)
221
- e[r + i + 4] = s[i];
222
- return (r + 4 + n) * 8;
223
- }, _e = function(e, t, s, n, r, i, a, h, l, d, o) {
224
- H(t, o++, s), ++r[256];
225
- for (var c = re(r, 15), g = c.t, u = c.l, m = re(i, 15), v = m.t, C = m.l, I = be(g), $ = I.c, N = I.n, _ = be(v), T = _.c, E = _.n, b = new L(19), f = 0; f < $.length; ++f)
226
- ++b[$[f] & 31];
227
- for (var f = 0; f < T.length; ++f)
228
- ++b[T[f] & 31];
229
- for (var p = re(b, 7), A = p.t, j = p.l, P = 19; P > 4 && !A[ye[P - 1]]; --P)
230
- ;
231
- var V = d + 5 << 3, O = J(r, U) + J(i, Q) + a, R = J(r, g) + J(i, v) + a + 14 + 3 * P + J(b, A) + 2 * b[16] + 3 * b[17] + 7 * b[18];
232
- if (l >= 0 && V <= O && V <= R)
233
- return Ae(t, o, e.subarray(l, l + d));
234
- var B, k, M, F;
235
- if (H(t, o, 1 + (R < O)), o += 2, R < O) {
236
- B = K(g, u, 0), k = g, M = K(v, C, 0), F = v;
237
- var ee = K(A, j, 0);
238
- H(t, o, N - 257), H(t, o + 5, E - 1), H(t, o + 10, P - 4), o += 14;
239
- for (var f = 0; f < P; ++f)
240
- H(t, o + 3 * f, A[ye[f]]);
229
+ for (; n--; ) a(i);
230
+ n = 1, i = e[l];
231
+ }
232
+ return {
233
+ c: r.subarray(0, s),
234
+ n: t
235
+ };
236
+ }, Z = function(e, t) {
237
+ for (var r = 0, s = 0; s < t.length; ++s) r += e[s] * t[s];
238
+ return r;
239
+ }, Pe = function(e, t, r) {
240
+ var s = r.length, i = Ee(t + 2);
241
+ e[i] = s & 255, e[i + 1] = s >> 8, e[i + 2] = e[i] ^ 255, e[i + 3] = e[i + 1] ^ 255;
242
+ for (var n = 0; n < s; ++n) e[i + n + 4] = r[n];
243
+ return (i + 4 + s) * 8;
244
+ }, _e = function(e, t, r, s, i, n, a, l, p, c, o) {
245
+ q(t, o++, r), ++i[256];
246
+ for (var h = ne(i, 15), g = h.t, u = h.l, m = ne(n, 15), v = m.t, T = m.l, I = be(g), $ = I.c, M = I.n, _ = be(v), C = _.c, E = _.n, b = new L(19), f = 0; f < $.length; ++f) ++b[$[f] & 31];
247
+ for (var f = 0; f < C.length; ++f) ++b[C[f] & 31];
248
+ for (var d = ne(b, 7), A = d.t, U = d.l, P = 19; P > 4 && !A[ye[P - 1]]; --P) ;
249
+ var j = c + 5 << 3, R = Z(i, V) + Z(n, Q) + a, O = Z(i, g) + Z(n, v) + a + 14 + 3 * P + Z(b, A) + 2 * b[16] + 3 * b[17] + 7 * b[18];
250
+ if (p >= 0 && j <= R && j <= O) return Pe(t, o, e.subarray(p, p + c));
251
+ var B, k, N, F;
252
+ if (q(t, o, 1 + (O < R)), o += 2, O < R) {
253
+ B = J(g, u, 0), k = g, N = J(v, T, 0), F = v;
254
+ var ee = J(A, U, 0);
255
+ q(t, o, M - 257), q(t, o + 5, E - 1), q(t, o + 10, P - 4), o += 14;
256
+ for (var f = 0; f < P; ++f) q(t, o + 3 * f, A[ye[f]]);
241
257
  o += 3 * P;
242
- for (var D = [$, T], Y = 0; Y < 2; ++Y)
258
+ for (var D = [$, C], Y = 0; Y < 2; ++Y)
243
259
  for (var W = D[Y], f = 0; f < W.length; ++f) {
244
- var q = W[f] & 31;
245
- H(t, o, ee[q]), o += A[q], q > 15 && (H(t, o, W[f] >> 5 & 127), o += W[f] >> 12);
260
+ var H = W[f] & 31;
261
+ q(t, o, ee[H]), o += A[H], H > 15 && (q(t, o, W[f] >> 5 & 127), o += W[f] >> 12);
246
262
  }
247
- } else
248
- B = Ie, k = U, M = Ne, F = Q;
249
- for (var f = 0; f < h; ++f) {
250
- var x = n[f];
263
+ } else B = Ne, k = V, N = Ie, F = Q;
264
+ for (var f = 0; f < l; ++f) {
265
+ var x = s[f];
251
266
  if (x > 255) {
252
- var q = x >> 18 & 31;
253
- G(t, o, B[q + 257]), o += k[q + 257], q > 7 && (H(t, o, x >> 23 & 31), o += ue[q]);
267
+ var H = x >> 18 & 31;
268
+ G(t, o, B[H + 257]), o += k[H + 257], H > 7 && (q(t, o, x >> 23 & 31), o += ue[H]);
254
269
  var X = x & 31;
255
- G(t, o, M[X]), o += F[X], X > 3 && (G(t, o, x >> 5 & 8191), o += pe[X]);
256
- } else
257
- G(t, o, B[x]), o += k[x];
270
+ G(t, o, N[X]), o += F[X], X > 3 && (G(t, o, x >> 5 & 8191), o += pe[X]);
271
+ } else G(t, o, B[x]), o += k[x];
258
272
  }
259
273
  return G(t, o, B[256]), o + k[256];
260
- }, De = /* @__PURE__ */ new he([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Pe = /* @__PURE__ */ new w(0), qe = function(e, t, s, n, r, i) {
261
- var a = i.z || e.length, h = new w(n + a + 5 * (1 + Math.ceil(a / 7e3)) + r), l = h.subarray(n, h.length - r), d = i.l, o = (i.r || 0) & 7;
274
+ }, Be = /* @__PURE__ */ new he([
275
+ 65540,
276
+ 131080,
277
+ 131088,
278
+ 131104,
279
+ 262176,
280
+ 1048704,
281
+ 1048832,
282
+ 2114560,
283
+ 2117632
284
+ ]), Le = /* @__PURE__ */ new w(0), De = function(e, t, r, s, i, n) {
285
+ var a = n.z || e.length, l = new w(s + a + 5 * (1 + Math.ceil(a / 7e3)) + i), p = l.subarray(s, l.length - i), c = n.l, o = (n.r || 0) & 7;
262
286
  if (t) {
263
- o && (l[0] = i.r >> 3);
264
- for (var c = De[t - 1], g = c >> 13, u = c & 8191, m = (1 << s) - 1, v = i.p || new L(32768), C = i.h || new L(m + 1), I = Math.ceil(s / 3), $ = 2 * I, N = function(ne) {
265
- return (e[ne] ^ e[ne + 1] << I ^ e[ne + 2] << $) & m;
266
- }, _ = new he(25e3), T = new L(288), E = new L(32), b = 0, f = 0, p = i.i || 0, A = 0, j = i.w || 0, P = 0; p + 2 < a; ++p) {
267
- var V = N(p), O = p & 32767, R = C[V];
268
- if (v[O] = R, C[V] = O, j <= p) {
269
- var B = a - p;
270
- if ((b > 7e3 || A > 24576) && (B > 423 || !d)) {
271
- o = _e(e, l, 0, _, T, E, f, A, P, p - P, o), A = b = f = 0, P = p;
272
- for (var k = 0; k < 286; ++k)
273
- T[k] = 0;
274
- for (var k = 0; k < 30; ++k)
275
- E[k] = 0;
287
+ o && (p[0] = n.r >> 3);
288
+ for (var h = Be[t - 1], g = h >> 13, u = h & 8191, m = (1 << r) - 1, v = n.p || new L(32768), T = n.h || new L(m + 1), I = Math.ceil(r / 3), $ = 2 * I, M = function(re) {
289
+ return (e[re] ^ e[re + 1] << I ^ e[re + 2] << $) & m;
290
+ }, _ = new he(25e3), C = new L(288), E = new L(32), b = 0, f = 0, d = n.i || 0, A = 0, U = n.w || 0, P = 0; d + 2 < a; ++d) {
291
+ var j = M(d), R = d & 32767, O = T[j];
292
+ if (v[R] = O, T[j] = R, U <= d) {
293
+ var B = a - d;
294
+ if ((b > 7e3 || A > 24576) && (B > 423 || !c)) {
295
+ o = _e(e, p, 0, _, C, E, f, A, P, d - P, o), A = b = f = 0, P = d;
296
+ for (var k = 0; k < 286; ++k) C[k] = 0;
297
+ for (var k = 0; k < 30; ++k) E[k] = 0;
276
298
  }
277
- var M = 2, F = 0, ee = u, D = O - R & 32767;
278
- if (B > 2 && V == N(p - D))
279
- for (var Y = Math.min(g, B) - 1, W = Math.min(32767, p), q = Math.min(258, B); D <= W && --ee && O != R; ) {
280
- if (e[p + M] == e[p + M - D]) {
281
- for (var x = 0; x < q && e[p + x] == e[p + x - D]; ++x)
282
- ;
283
- if (x > M) {
284
- if (M = x, F = D, x > Y)
285
- break;
299
+ var N = 2, F = 0, ee = u, D = R - O & 32767;
300
+ if (B > 2 && j == M(d - D))
301
+ for (var Y = Math.min(g, B) - 1, W = Math.min(32767, d), H = Math.min(258, B); D <= W && --ee && R != O; ) {
302
+ if (e[d + N] == e[d + N - D]) {
303
+ for (var x = 0; x < H && e[d + x] == e[d + x - D]; ++x) ;
304
+ if (x > N) {
305
+ if (N = x, F = D, x > Y) break;
286
306
  for (var X = Math.min(D, x - 2), de = 0, k = 0; k < X; ++k) {
287
- var te = p - D + k & 32767, Oe = v[te], fe = te - Oe & 32767;
288
- fe > de && (de = fe, R = te);
307
+ var te = d - D + k & 32767, fe = te - v[te] & 32767;
308
+ fe > de && (de = fe, O = te);
289
309
  }
290
310
  }
291
311
  }
292
- O = R, R = v[O], D += O - R & 32767;
312
+ R = O, O = v[R], D += R - O & 32767;
293
313
  }
294
314
  if (F) {
295
- _[A++] = 268435456 | ie[M] << 18 | ve[F];
296
- var ge = ie[M] & 31, me = ve[F] & 31;
297
- f += ue[ge] + pe[me], ++T[257 + ge], ++E[me], j = p + M, ++b;
315
+ _[A++] = 268435456 | ie[N] << 18 | ve[F];
316
+ var ge = ie[N] & 31, me = ve[F] & 31;
317
+ f += ue[ge] + pe[me], ++C[257 + ge], ++E[me], U = d + N, ++b;
298
318
  } else
299
- _[A++] = e[p], ++T[e[p]];
319
+ _[A++] = e[d], ++C[e[d]];
300
320
  }
301
321
  }
302
- for (p = Math.max(p, j); p < a; ++p)
303
- _[A++] = e[p], ++T[e[p]];
304
- o = _e(e, l, d, _, T, E, f, A, P, p - P, o), d || (i.r = o & 7 | l[o / 8 | 0] << 3, o -= 7, i.h = C, i.p = v, i.i = p, i.w = j);
322
+ for (d = Math.max(d, U); d < a; ++d)
323
+ _[A++] = e[d], ++C[e[d]];
324
+ o = _e(e, p, c, _, C, E, f, A, P, d - P, o), c || (n.r = o & 7 | p[o / 8 | 0] << 3, o -= 7, n.h = T, n.p = v, n.i = d, n.w = U);
305
325
  } else {
306
- for (var p = i.w || 0; p < a + d; p += 65535) {
307
- var se = p + 65535;
308
- se >= a && (l[o / 8 | 0] = d, se = a), o = Ae(l, o + 1, e.subarray(p, se));
326
+ for (var d = n.w || 0; d < a + c; d += 65535) {
327
+ var se = d + 65535;
328
+ se >= a && (p[o / 8 | 0] = c, se = a), o = Pe(p, o + 1, e.subarray(d, se));
309
329
  }
310
- i.i = a;
330
+ n.i = a;
311
331
  }
312
- return Ee(h, 0, n + Te(o) + r);
332
+ return Ae(l, 0, s + Ee(o) + i);
313
333
  }, He = /* @__PURE__ */ (function() {
314
- for (var e = new Int32Array(256), t = 0; t < 256; ++t) {
315
- for (var s = t, n = 9; --n; )
316
- s = (s & 1 && -306674912) ^ s >>> 1;
317
- e[t] = s;
334
+ for (var e = /* @__PURE__ */ new Int32Array(256), t = 0; t < 256; ++t) {
335
+ for (var r = t, s = 9; --s; ) r = (r & 1 && -306674912) ^ r >>> 1;
336
+ e[t] = r;
318
337
  }
319
338
  return e;
320
- })(), Fe = function() {
339
+ })(), qe = function() {
321
340
  var e = -1;
322
341
  return {
323
342
  p: function(t) {
324
- for (var s = e, n = 0; n < t.length; ++n)
325
- s = He[s & 255 ^ t[n]] ^ s >>> 8;
326
- e = s;
343
+ for (var r = e, s = 0; s < t.length; ++s) r = He[r & 255 ^ t[s]] ^ r >>> 8;
344
+ e = r;
327
345
  },
328
346
  d: function() {
329
347
  return ~e;
330
348
  }
331
349
  };
332
- }, ze = function(e, t, s, n, r) {
333
- if (!r && (r = { l: 1 }, t.dictionary)) {
334
- var i = t.dictionary.subarray(-32768), a = new w(i.length + e.length);
335
- a.set(i), a.set(e, i.length), e = a, r.w = i.length;
350
+ }, Fe = function(e, t, r, s, i) {
351
+ if (!i && (i = { l: 1 }, t.dictionary)) {
352
+ var n = t.dictionary.subarray(-32768), a = new w(n.length + e.length);
353
+ a.set(n), a.set(e, n.length), e = a, i.w = n.length;
336
354
  }
337
- return qe(e, t.level == null ? 6 : t.level, t.mem == null ? r.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, s, n, r);
338
- }, Le = function(e, t) {
339
- var s = {};
340
- for (var n in e)
341
- s[n] = e[n];
342
- for (var n in t)
343
- s[n] = t[n];
344
- return s;
345
- }, S = function(e, t, s) {
346
- for (; s; ++t)
347
- e[t] = s, s >>>= 8;
355
+ return De(e, t.level == null ? 6 : t.level, t.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, r, s, i);
356
+ }, $e = function(e, t) {
357
+ var r = {};
358
+ for (var s in e) r[s] = e[s];
359
+ for (var s in t) r[s] = t[s];
360
+ return r;
361
+ }, S = function(e, t, r) {
362
+ for (; r; ++t) e[t] = r, r >>>= 8;
348
363
  };
349
- function Ue(e, t) {
350
- return ze(e, t || {}, 0, 0);
364
+ function ze(e, t) {
365
+ return Fe(e, t || {}, 0, 0);
351
366
  }
352
- var $e = function(e, t, s, n) {
353
- for (var r in e) {
354
- var i = e[r], a = t + r, h = n;
355
- Array.isArray(i) && (h = Le(n, i[1]), i = i[0]), i instanceof w ? s[a] = [i, h] : (s[a += "/"] = [new w(0), h], $e(i, a, s, n));
367
+ var Re = function(e, t, r, s) {
368
+ for (var i in e) {
369
+ var n = e[i], a = t + i, l = s;
370
+ Array.isArray(n) && (l = $e(s, n[1]), n = n[0]), ArrayBuffer.isView(n) ? r[a] = [n, l] : (r[a += "/"] = [new w(0), l], Re(n, a, r, s));
356
371
  }
357
- }, ke = typeof TextEncoder < "u" && /* @__PURE__ */ new TextEncoder(), je = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Ve = 0;
372
+ }, ke = typeof TextEncoder < "u" && /* @__PURE__ */ new TextEncoder(), Ve = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Ue = 0;
358
373
  try {
359
- je.decode(Pe, { stream: !0 }), Ve = 1;
374
+ Ve.decode(Le, { stream: !0 }), Ue = 1;
360
375
  } catch {
361
376
  }
362
377
  function le(e, t) {
363
- var s;
364
- if (ke)
365
- return ke.encode(e);
366
- for (var n = e.length, r = new w(e.length + (e.length >> 1)), i = 0, a = function(d) {
367
- r[i++] = d;
368
- }, s = 0; s < n; ++s) {
369
- if (i + 5 > r.length) {
370
- var h = new w(i + 8 + (n - s << 1));
371
- h.set(r), r = h;
378
+ if (t) {
379
+ for (var r = new w(e.length), s = 0; s < e.length; ++s) r[s] = e.charCodeAt(s);
380
+ return r;
381
+ }
382
+ if (ke) return ke.encode(e);
383
+ for (var i = e.length, n = new w(e.length + (e.length >> 1)), a = 0, l = function(o) {
384
+ n[a++] = o;
385
+ }, s = 0; s < i; ++s) {
386
+ if (a + 5 > n.length) {
387
+ var p = new w(a + 8 + (i - s << 1));
388
+ p.set(n), n = p;
372
389
  }
373
- var l = e.charCodeAt(s);
374
- l < 128 || t ? a(l) : l < 2048 ? (a(192 | l >> 6), a(128 | l & 63)) : l > 55295 && l < 57344 ? (l = 65536 + (l & 1047552) | e.charCodeAt(++s) & 1023, a(240 | l >> 18), a(128 | l >> 12 & 63), a(128 | l >> 6 & 63), a(128 | l & 63)) : (a(224 | l >> 12), a(128 | l >> 6 & 63), a(128 | l & 63));
390
+ var c = e.charCodeAt(s);
391
+ c < 128 || t ? l(c) : c < 2048 ? (l(192 | c >> 6), l(128 | c & 63)) : c > 55295 && c < 57344 ? (c = 65536 + (c & 1047552) | e.charCodeAt(++s) & 1023, l(240 | c >> 18), l(128 | c >> 12 & 63), l(128 | c >> 6 & 63), l(128 | c & 63)) : (l(224 | c >> 12), l(128 | c >> 6 & 63), l(128 | c & 63));
375
392
  }
376
- return Ee(r, 0, i);
393
+ return Ae(n, 0, a);
377
394
  }
378
395
  var ce = function(e) {
379
396
  var t = 0;
380
- if (e)
381
- for (var s in e) {
382
- var n = e[s].length;
383
- n > 65535 && Z(9), t += n + 4;
384
- }
397
+ if (e) for (var r in e) {
398
+ var s = e[r].length;
399
+ s > 65535 && K(9), t += s + 4;
400
+ }
385
401
  return t;
386
- }, Se = function(e, t, s, n, r, i, a, h) {
387
- var l = n.length, d = s.extra, o = h && h.length, c = ce(d);
388
- S(e, t, a != null ? 33639248 : 67324752), t += 4, a != null && (e[t++] = 20, e[t++] = s.os), e[t] = 20, t += 2, e[t++] = s.flag << 1 | (i < 0 && 8), e[t++] = r && 8, e[t++] = s.compression & 255, e[t++] = s.compression >> 8;
389
- var g = new Date(s.mtime == null ? Date.now() : s.mtime), u = g.getFullYear() - 1980;
390
- if ((u < 0 || u > 119) && Z(10), S(e, t, u << 25 | g.getMonth() + 1 << 21 | g.getDate() << 16 | g.getHours() << 11 | g.getMinutes() << 5 | g.getSeconds() >> 1), t += 4, i != -1 && (S(e, t, s.crc), S(e, t + 4, i < 0 ? -i - 2 : i), S(e, t + 8, s.size)), S(e, t + 12, l), S(e, t + 14, c), t += 16, a != null && (S(e, t, o), S(e, t + 6, s.attrs), S(e, t + 10, a), t += 14), e.set(n, t), t += l, c)
391
- for (var m in d) {
392
- var v = d[m], C = v.length;
393
- S(e, t, +m), S(e, t + 2, C), e.set(v, t + 4), t += 4 + C;
394
- }
395
- return o && (e.set(h, t), t += o), t;
396
- }, We = function(e, t, s, n, r) {
397
- S(e, t, 101010256), S(e, t + 8, s), S(e, t + 10, s), S(e, t + 12, n), S(e, t + 16, r);
402
+ }, Se = function(e, t, r, s, i, n, a, l) {
403
+ var p = s.length, c = r.extra, o = l && l.length, h = ce(c);
404
+ S(e, t, a != null ? 33639248 : 67324752), t += 4, a != null && (e[t++] = 20, e[t++] = r.os), e[t] = 20, t += 2, e[t++] = r.flag << 1 | (n < 0 && 8), e[t++] = i && 8, e[t++] = r.compression & 255, e[t++] = r.compression >> 8;
405
+ var g = new Date(r.mtime == null ? Date.now() : r.mtime), u = g.getFullYear() - 1980;
406
+ if ((u < 0 || u > 119) && K(10), S(e, t, u << 25 | g.getMonth() + 1 << 21 | g.getDate() << 16 | g.getHours() << 11 | g.getMinutes() << 5 | g.getSeconds() >> 1), t += 4, n != -1 && (S(e, t, r.crc), S(e, t + 4, n < 0 ? -n - 2 : n), S(e, t + 8, r.size)), S(e, t + 12, p), S(e, t + 14, h), t += 16, a != null && (S(e, t, o), S(e, t + 6, r.attrs), S(e, t + 10, a), t += 14), e.set(s, t), t += p, h) for (var m in c) {
407
+ var v = c[m], T = v.length;
408
+ S(e, t, +m), S(e, t + 2, T), e.set(v, t + 4), t += 4 + T;
409
+ }
410
+ return o && (e.set(l, t), t += o), t;
411
+ }, je = function(e, t, r, s, i) {
412
+ S(e, t, 101010256), S(e, t + 8, r), S(e, t + 10, r), S(e, t + 12, s), S(e, t + 16, i);
398
413
  };
399
- function Xe(e, t) {
414
+ function We(e, t) {
400
415
  t || (t = {});
401
- var s = {}, n = [];
402
- $e(e, "", s, t);
403
- var r = 0, i = 0;
404
- for (var a in s) {
405
- var h = s[a], l = h[0], d = h[1], o = d.level == 0 ? 0 : 8, c = le(a), g = c.length, u = d.comment, m = u && le(u), v = m && m.length, C = ce(d.extra);
406
- g > 65535 && Z(11);
407
- var I = o ? Ue(l, d) : l, $ = I.length, N = Fe();
408
- N.p(l), n.push(Le(d, {
409
- size: l.length,
410
- crc: N.d(),
416
+ var r = {}, s = [];
417
+ Re(e, "", r, t);
418
+ var i = 0, n = 0;
419
+ for (var a in r) {
420
+ var l = r[a], p = l[0], c = l[1], o = c.level == 0 ? 0 : 8, h = le(a), g = h.length, u = c.comment, m = u && le(u), v = m && m.length, T = ce(c.extra);
421
+ g > 65535 && K(11);
422
+ var I = o ? ze(p, c) : p, $ = I.length, M = qe();
423
+ M.p(p), s.push($e(c, {
424
+ size: p.length,
425
+ crc: M.d(),
411
426
  c: I,
412
- f: c,
427
+ f: h,
413
428
  m,
414
429
  u: g != a.length || m && u.length != v,
415
- o: r,
430
+ o: i,
416
431
  compression: o
417
- })), r += 30 + g + C + $, i += 76 + 2 * (g + C) + (v || 0) + $;
432
+ })), i += 30 + g + T + $, n += 76 + 2 * (g + T) + (v || 0) + $;
418
433
  }
419
- for (var _ = new w(i + 22), T = r, E = i - r, b = 0; b < n.length; ++b) {
420
- var c = n[b];
421
- Se(_, c.o, c, c.f, c.u, c.c.length);
422
- var f = 30 + c.f.length + ce(c.extra);
423
- _.set(c.c, c.o + f), Se(_, r, c, c.f, c.u, c.c.length, c.o, c.m), r += 16 + f + (c.m ? c.m.length : 0);
434
+ for (var _ = new w(n + 22), C = i, E = n - i, b = 0; b < s.length; ++b) {
435
+ var h = s[b];
436
+ Se(_, h.o, h, h.f, h.u, h.c.length);
437
+ var f = 30 + h.f.length + ce(h.extra);
438
+ _.set(h.c, h.o + f), Se(_, i, h, h.f, h.u, h.c.length, h.o, h.m), i += 16 + f + (h.m ? h.m.length : 0);
424
439
  }
425
- return We(_, r, n.length, E, T), _;
440
+ return je(_, i, s.length, E, C), _;
426
441
  }
427
- const xe = 'var squiffyRuntime=(function(ut){"use strict";var Mc=Object.defineProperty;var Ic=(ut,tt,Qe)=>tt in ut?Mc(ut,tt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):ut[tt]=Qe;var le=(ut,tt,Qe)=>Ic(ut,typeof tt!="symbol"?tt+"":tt,Qe);var vr;function tt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qe=tt();function Pn(s){Qe=s}var Yt={exec:()=>null};function ne(s,e=""){let t=typeof s=="string"?s:s.source,n={replace:(r,o)=>{let i=typeof o=="string"?o:o.source;return i=i.replace(Me.caret,"$1"),t=t.replace(r,i),n},getRegex:()=>new RegExp(t,e)};return n}var Me={codeRemoveIndent:/^(?: {1,4}| {0,3}\\t)/gm,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\t]?/gm,listReplaceTabs:/^\\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\] /,listReplaceTask:/^\\[[ xX]\\] +/,anyLine:/\\n.*\\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\||\\| *$/g,tableRowBlankLine:/\\n[ \\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\\s|>)/i,endPreScriptTag:/^<\\/(pre|code|kbd|script)(\\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^\'"]*[^\\s])\\s+([\'"])(.*)\\2/,unicodeAlphaNumeric:/[\\p{L}\\p{N}]/u,escapeTest:/[&<>"\']/,escapeReplace:/[&<>"\']/g,escapeTestNoEncode:/[<>"\']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,escapeReplaceNoEncode:/[<>"\']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,unescapeTest:/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig,caret:/(^|[^\\[])\\^/g,percentDecode:/%25/g,findPipe:/\\|/g,splitPipe:/ \\|/,slashPipe:/\\\\\\|/g,carriageReturn:/\\r\\n|\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\S*/,endingNewline:/\\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\\\n]*)?(?:\\\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ ][^\\\\n]*)?(?:\\\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\\`\\`\\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},Vo=/^(?:[ \\t]*(?:\\n|$))+/,Uo=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,Wo=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,Jt=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,Go=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,_r=/(?:[*+-]|\\d{1,9}[.)])/,En=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,Ln=ne(En).replace(/bull/g,_r).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/\\|table/g,"").getRegex(),Xo=ne(En).replace(/bull/g,_r).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/table/g,/ {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/).getRegex(),br=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,Yo=/^[^\\n]+/,Sr=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\])+/,Jo=ne(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace("label",Sr).replace("title",/(?:"(?:\\\\"?|[^"\\\\])*"|\'[^\'\\n]*(?:\\n[^\'\\n]+)*\\n?\'|\\([^()]*\\))/).getRegex(),Qo=ne(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/).replace(/bull/g,_r).getRegex(),_s="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",kr=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,Ko=ne("^ {0,3}(?:<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)|comment[^\\\\n]*(\\\\n+|$)|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)|<![A-Z][\\\\s\\\\S]*?(?:>\\\\n*|$)|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>\\\\n*|$)|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$)|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$)|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$))","i").replace("comment",kr).replace("tag",_s).replace("attribute",/ +[a-zA-Z:_][\\w.:-]*(?: *= *"[^"\\n]*"| *= *\'[^\'\\n]*\'| *= *[^\\s"\'=<>`]+)?/).getRegex(),An=ne(br).replace("hr",Jt).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_s).getRegex(),Zo=ne(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/).replace("paragraph",An).getRegex(),xr={blockquote:Zo,code:Uo,def:Jo,fences:Wo,heading:Go,hr:Jt,html:Ko,lheading:Ln,list:Qo,newline:Vo,paragraph:An,table:Yt,text:Yo},Rn=ne("^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)").replace("hr",Jt).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_s).getRegex(),jo={...xr,lheading:Xo,table:Rn,paragraph:ne(br).replace("hr",Jt).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("|lheading","").replace("table",Rn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_s).getRegex()},ea={...xr,html:ne(`^ *(?:comment *(?:\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)|<tag(?:"[^"]*"|\'[^\']*\'|\\\\s[^\'"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))`).replace("comment",kr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b").getRegex(),def:/^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +(["(][^\\n]+[")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:Yt,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:ne(br).replace("hr",Jt).replace("heading",` *#{1,6} *[^\n]`).replace("lheading",Ln).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ta=/^\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,sa=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,On=/^( {2,}|\\\\)\\n(?!\\s*$)/,ra=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,bs=/[\\p{P}\\p{S}]/u,wr=/[\\s\\p{P}\\p{S}]/u,Mn=/[^\\s\\p{P}\\p{S}]/u,na=ne(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wr).getRegex(),In=/(?!~)[\\p{P}\\p{S}]/u,ia=/(?!~)[\\s\\p{P}\\p{S}]/u,oa=/(?:[^\\s\\p{P}\\p{S}]|~)/u,aa=/\\[[^\\[\\]]*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)|`[^`]*?`|<(?! )[^<>]*?>/g,Nn=/^(?:\\*+(?:((?!\\*)punct)|[^\\s*]))|^_+(?:((?!_)punct)|([^\\s_]))/,la=ne(Nn,"u").replace(/punct/g,bs).getRegex(),ca=ne(Nn,"u").replace(/punct/g,In).getRegex(),Bn="^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)",ua=ne(Bn,"gu").replace(/notPunctSpace/g,Mn).replace(/punctSpace/g,wr).replace(/punct/g,bs).getRegex(),ha=ne(Bn,"gu").replace(/notPunctSpace/g,oa).replace(/punctSpace/g,ia).replace(/punct/g,In).getRegex(),pa=ne("^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Mn).replace(/punctSpace/g,wr).replace(/punct/g,bs).getRegex(),fa=ne(/\\\\(punct)/,"gu").replace(/punct/g,bs).getRegex(),da=ne(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ga=ne(kr).replace("(?:-->|$)","-->").getRegex(),ma=ne("^comment|^</[a-zA-Z][\\\\w:-]*\\\\s*>|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>").replace("comment",ga).replace("attribute",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*"[^"]*"|\\s*=\\s*\'[^\']*\'|\\s*=\\s*[^\\s"\'=<>`]+)?/).getRegex(),Ss=/(?:\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`[^`]*`|[^\\[\\]\\\\`])*?/,va=ne(/^!?\\[(label)\\]\\(\\s*(href)(?:(?:[ \\t]*(?:\\n[ \\t]*)?)(title))?\\s*\\)/).replace("label",Ss).replace("href",/<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]*/).replace("title",/"(?:\\\\"?|[^"\\\\])*"|\'(?:\\\\\'?|[^\'\\\\])*\'|\\((?:\\\\\\)?|[^)\\\\])*\\)/).getRegex(),Dn=ne(/^!?\\[(label)\\]\\[(ref)\\]/).replace("label",Ss).replace("ref",Sr).getRegex(),qn=ne(/^!?\\[(ref)\\](?:\\[\\])?/).replace("ref",Sr).getRegex(),ya=ne("reflink|nolink(?!\\\\()","g").replace("reflink",Dn).replace("nolink",qn).getRegex(),Tr={_backpedal:Yt,anyPunctuation:fa,autolink:da,blockSkip:aa,br:On,code:sa,del:Yt,emStrongLDelim:la,emStrongRDelimAst:ua,emStrongRDelimUnd:pa,escape:ta,link:va,nolink:qn,punctuation:na,reflink:Dn,reflinkSearch:ya,tag:ma,text:ra,url:Yt},_a={...Tr,link:ne(/^!?\\[(label)\\]\\((.*?)\\)/).replace("label",Ss).getRegex(),reflink:ne(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace("label",Ss).getRegex()},Cr={...Tr,emStrongRDelimAst:ha,emStrongLDelim:ca,url:ne(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_\'"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_\'"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)))/},ba={...Cr,br:ne(On).replace("{2,}","*").getRegex(),text:ne(Cr.text).replace("\\\\b_","\\\\b_| {2,}\\\\n").replace(/\\{2,\\}/g,"*").getRegex()},ks={normal:xr,gfm:jo,pedantic:ea},Qt={normal:Tr,gfm:Cr,breaks:ba,pedantic:_a},Sa={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"},Hn=s=>Sa[s];function it(s,e){if(e){if(Me.escapeTest.test(s))return s.replace(Me.escapeReplace,Hn)}else if(Me.escapeTestNoEncode.test(s))return s.replace(Me.escapeReplaceNoEncode,Hn);return s}function Fn(s){try{s=encodeURI(s).replace(Me.percentDecode,"%")}catch{return null}return s}function $n(s,e){let t=s.replace(Me.findPipe,(o,i,l)=>{let c=!1,p=i;for(;--p>=0&&l[p]==="\\\\";)c=!c;return c?"|":" |"}),n=t.split(Me.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Me.slashPipe,"|");return n}function Kt(s,e,t){let n=s.length;if(n===0)return"";let r=0;for(;r<n&&s.charAt(n-r-1)===e;)r++;return s.slice(0,n-r)}function ka(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<s.length;n++)if(s[n]==="\\\\")n++;else if(s[n]===e[0])t++;else if(s[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function zn(s,e,t,n,r){let o=e.href,i=e.title||null,l=s[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:s[0].charAt(0)==="!"?"image":"link",raw:t,href:o,title:i,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,c}function xa(s,e,t){let n=s.match(t.other.indentCodeCompensation);if(n===null)return e;let r=n[1];return e.split(`\n`).map(o=>{let i=o.match(t.other.beginningSpace);if(i===null)return o;let[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`\n`)}var xs=class{constructor(s){le(this,"options");le(this,"rules");le(this,"lexer");this.options=s||Qe}space(s){let e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){let e=this.rules.block.code.exec(s);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Kt(t,`\n`)}}}fences(s){let e=this.rules.block.fences.exec(s);if(e){let t=e[0],n=xa(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(s){let e=this.rules.block.heading.exec(s);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=Kt(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(s){let e=this.rules.block.hr.exec(s);if(e)return{type:"hr",raw:Kt(e[0],`\n`)}}blockquote(s){let e=this.rules.block.blockquote.exec(s);if(e){let t=Kt(e[0],`\n`).split(`\n`),n="",r="",o=[];for(;t.length>0;){let i=!1,l=[],c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))l.push(t[c]),i=!0;else if(!i)l.push(t[c]);else break;t=t.slice(c);let p=l.join(`\n`),f=p.replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${p}`:p,r=r?`${r}\n${f}`:f;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=g,t.length===0)break;let u=o.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let h=u,a=h.raw+`\n`+t.join(`\n`),d=this.blockquote(a);o[o.length-1]=d,n=n.substring(0,n.length-h.raw.length)+d.raw,r=r.substring(0,r.length-h.text.length)+d.text;break}else if(u?.type==="list"){let h=u,a=h.raw+`\n`+t.join(`\n`),d=this.list(a);o[o.length-1]=d,n=n.substring(0,n.length-u.raw.length)+d.raw,r=r.substring(0,r.length-h.raw.length)+d.raw,t=a.substring(o.at(-1).raw.length).split(`\n`);continue}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(s){let e=this.rules.block.list.exec(s);if(e){let t=e[1].trim(),n=t.length>1,r={type:"list",raw:"",ordered:n,start:n?+t.slice(0,-1):"",loose:!1,items:[]};t=n?`\\\\d{1,9}\\\\${t.slice(-1)}`:`\\\\${t}`,this.options.pedantic&&(t=n?t:"[*+-]");let o=this.rules.other.listItemRegex(t),i=!1;for(;s;){let c=!1,p="",f="";if(!(e=o.exec(s))||this.rules.block.hr.test(s))break;p=e[0],s=s.substring(p.length);let g=e[2].split(`\n`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),u=s.split(`\n`,1)[0],h=!g.trim(),a=0;if(this.options.pedantic?(a=2,f=g.trimStart()):h?a=e[1].length+1:(a=e[2].search(this.rules.other.nonSpaceChar),a=a>4?1:a,f=g.slice(a),a+=e[1].length),h&&this.rules.other.blankLine.test(u)&&(p+=u+`\n`,s=s.substring(u.length+1),c=!0),!c){let v=this.rules.other.nextBulletRegex(a),_=this.rules.other.hrRegex(a),S=this.rules.other.fencesBeginRegex(a),y=this.rules.other.headingBeginRegex(a),b=this.rules.other.htmlBeginRegex(a);for(;s;){let k=s.split(`\n`,1)[0],x;if(u=k,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),x=u):x=u.replace(this.rules.other.tabCharGlobal," "),S.test(u)||y.test(u)||b.test(u)||v.test(u)||_.test(u))break;if(x.search(this.rules.other.nonSpaceChar)>=a||!u.trim())f+=`\n`+x.slice(a);else{if(h||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(g)||y.test(g)||_.test(g))break;f+=`\n`+u}!h&&!u.trim()&&(h=!0),p+=k+`\n`,s=s.substring(k.length+1),g=x.slice(a)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(i=!0));let d=null,m;this.options.gfm&&(d=this.rules.other.listIsTask.exec(f),d&&(m=d[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:p,task:!!d,checked:m,loose:!1,text:f,tokens:[]}),r.raw+=p}let l=r.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){let p=r.items[c].tokens.filter(g=>g.type==="space"),f=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=f}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(s){let e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){let e=this.rules.block.def.exec(s);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(s){let e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=$n(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`\n`):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(let i of n)this.rules.other.tableAlignRight.test(i)?o.align.push("right"):this.rules.other.tableAlignCenter.test(i)?o.align.push("center"):this.rules.other.tableAlignLeft.test(i)?o.align.push("left"):o.align.push(null);for(let i=0;i<t.length;i++)o.header.push({text:t[i],tokens:this.lexer.inline(t[i]),header:!0,align:o.align[i]});for(let i of r)o.rows.push($n(i,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(s){let e=this.rules.block.lheading.exec(s);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){let e=this.rules.block.paragraph.exec(s);if(e){let t=e[1].charAt(e[1].length-1)===`\n`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(s){let e=this.rules.block.text.exec(s);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){let e=this.rules.inline.escape.exec(s);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(s){let e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){let e=this.rules.inline.link.exec(s);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let o=Kt(t.slice(0,-1),"\\\\");if((t.length-o.length)%2===0)return}else{let o=ka(e[2],"()");if(o===-2)return;if(o>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],r=o[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),zn(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(s,e){let t;if((t=this.rules.inline.reflink.exec(s))||(t=this.rules.inline.nolink.exec(s))){let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[n.toLowerCase()];if(!r){let o=t[0].charAt(0);return{type:"text",raw:o,text:o}}return zn(t,r,t[0],this.lexer,this.rules)}}emStrong(s,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(s);if(!(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!t||this.rules.inline.punctuation.exec(t))){let r=[...n[0]].length-1,o,i,l=r,c=0,p=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*s.length+r);(n=p.exec(e))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=[...o].length,n[3]||n[4]){l+=i;continue}else if((n[5]||n[6])&&r%3&&!((r+i)%3)){c+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+c);let f=[...n[0]][0].length,g=s.slice(0,r+n.index+f+i);if(Math.min(r,i)%2){let h=g.slice(1,-1);return{type:"em",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}let u=g.slice(2,-2);return{type:"strong",raw:g,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(s){let e=this.rules.inline.code.exec(s);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(s){let e=this.rules.inline.br.exec(s);if(e)return{type:"br",raw:e[0]}}del(s){let e=this.rules.inline.del.exec(s);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(s){let e=this.rules.inline.autolink.exec(s);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(s){let e;if(e=this.rules.inline.url.exec(s)){let t,n;if(e[2]==="@")t=e[0],n="mailto:"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);t=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(s){let e=this.rules.inline.text.exec(s);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},ht=class Tn{constructor(e){le(this,"tokens");le(this,"options");le(this,"state");le(this,"tokenizer");le(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Qe,this.options.tokenizer=this.options.tokenizer||new xs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Me,block:ks.normal,inline:Qt.normal};this.options.pedantic?(t.block=ks.pedantic,t.inline=Qt.pedantic):this.options.gfm&&(t.block=ks.gfm,this.options.breaks?t.inline=Qt.breaks:t.inline=Qt.gfm),this.tokenizer.rules=t}static get rules(){return{block:ks,inline:Qt}}static lex(e,t){return new Tn(t).lex(e)}static lexInline(e,t){return new Tn(t).inlineTokens(e)}lex(e){e=e.replace(Me.carriageReturn,`\n`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(Me.tabCharGlobal," ").replace(Me.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(i=>(r=i.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let i=t.at(-1);r.raw.length===1&&i!==void 0?i.raw+=`\n`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`\n`)?"":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.at(-1).src=i.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`\n`)?"":`\n`)+r.raw,i.text+=`\n`+r.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let i=1/0,l=e.slice(1),c;this.options.extensions.startBlock.forEach(p=>{c=p.call({lexer:this},l),typeof c=="number"&&c>=0&&(i=Math.min(i,c))}),i<1/0&&i>=0&&(o=e.substring(0,i+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let i=t.at(-1);n&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`\n`)?"":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r),n=o.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`\n`)?"":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let o=!1,i="";for(;e;){o||(i=""),o=!1;let l;if(this.options.extensions?.inline?.some(p=>(l=p.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let p=t.at(-1);l.type==="text"&&p?.type==="text"?(p.raw+=l.raw,p.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,n,i)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let c=e;if(this.options.extensions?.startInline){let p=1/0,f=e.slice(1),g;this.options.extensions.startInline.forEach(u=>{g=u.call({lexer:this},f),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(c=e.substring(0,p+1))}if(l=this.tokenizer.inlineText(c)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(i=l.raw.slice(-1)),o=!0;let p=t.at(-1);p?.type==="text"?(p.raw+=l.raw,p.text+=l.text):t.push(l);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},ws=class{constructor(s){le(this,"options");le(this,"parser");this.options=s||Qe}space(s){return""}code({text:s,lang:e,escaped:t}){let n=(e||"").match(Me.notSpaceStart)?.[0],r=s.replace(Me.endingNewline,"")+`\n`;return n?\'<pre><code class="language-\'+it(n)+\'">\'+(t?r:it(r,!0))+`</code></pre>\n`:"<pre><code>"+(t?r:it(r,!0))+`</code></pre>\n`}blockquote({tokens:s}){return`<blockquote>\n${this.parser.parse(s)}</blockquote>\n`}html({text:s}){return s}def(s){return""}heading({tokens:s,depth:e}){return`<h${e}>${this.parser.parseInline(s)}</h${e}>\n`}hr(s){return`<hr>\n`}list(s){let e=s.ordered,t=s.start,n="";for(let i=0;i<s.items.length;i++){let l=s.items[i];n+=this.listitem(l)}let r=e?"ol":"ul",o=e&&t!==1?\' start="\'+t+\'"\':"";return"<"+r+o+`>\n`+n+"</"+r+`>\n`}listitem(s){let e="";if(s.task){let t=this.checkbox({checked:!!s.checked});s.loose?s.tokens[0]?.type==="paragraph"?(s.tokens[0].text=t+" "+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type==="text"&&(s.tokens[0].tokens[0].text=t+" "+it(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):e+=t+" "}return e+=this.parser.parse(s.tokens,!!s.loose),`<li>${e}</li>\n`}checkbox({checked:s}){return"<input "+(s?\'checked="" \':"")+\'disabled="" type="checkbox">\'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>\n`}table(s){let e="",t="";for(let r=0;r<s.header.length;r++)t+=this.tablecell(s.header[r]);e+=this.tablerow({text:t});let n="";for(let r=0;r<s.rows.length;r++){let o=s.rows[r];t="";for(let i=0;i<o.length;i++)t+=this.tablecell(o[i]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>\n<thead>\n`+e+`</thead>\n`+n+`</table>\n`}tablerow({text:s}){return`<tr>\n${s}</tr>\n`}tablecell(s){let e=this.parser.parseInline(s.tokens),t=s.header?"th":"td";return(s.align?`<${t} align="${s.align}">`:`<${t}>`)+e+`</${t}>\n`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${it(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:t}){let n=this.parser.parseInline(t),r=Fn(s);if(r===null)return n;s=r;let o=\'<a href="\'+s+\'"\';return e&&(o+=\' title="\'+it(e)+\'"\'),o+=">"+n+"</a>",o}image({href:s,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let r=Fn(s);if(r===null)return it(t);s=r;let o=`<img src="${s}" alt="${t}"`;return e&&(o+=` title="${it(e)}"`),o+=">",o}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:it(s.text)}},Pr=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},pt=class Cn{constructor(e){le(this,"options");le(this,"renderer");le(this,"textRenderer");this.options=e||Qe,this.options.renderer=this.options.renderer||new ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pr}static parse(e,t){return new Cn(t).parse(e)}static parseInline(e,t){return new Cn(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let l=o,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=c||"";continue}}let i=o;switch(i.type){case"space":{n+=this.renderer.space(i);continue}case"hr":{n+=this.renderer.hr(i);continue}case"heading":{n+=this.renderer.heading(i);continue}case"code":{n+=this.renderer.code(i);continue}case"table":{n+=this.renderer.table(i);continue}case"blockquote":{n+=this.renderer.blockquote(i);continue}case"list":{n+=this.renderer.list(i);continue}case"html":{n+=this.renderer.html(i);continue}case"def":{n+=this.renderer.def(i);continue}case"paragraph":{n+=this.renderer.paragraph(i);continue}case"text":{let l=i,c=this.renderer.text(l);for(;r+1<e.length&&e[r+1].type==="text";)l=e[++r],c+=`\n`+this.renderer.text(l);t?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{let l=\'Token with "\'+i.type+\'" type was not found.\';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=l||"";continue}}let i=o;switch(i.type){case"escape":{n+=t.text(i);break}case"html":{n+=t.html(i);break}case"link":{n+=t.link(i);break}case"image":{n+=t.image(i);break}case"strong":{n+=t.strong(i);break}case"em":{n+=t.em(i);break}case"codespan":{n+=t.codespan(i);break}case"br":{n+=t.br(i);break}case"del":{n+=t.del(i);break}case"text":{n+=t.text(i);break}default:{let l=\'Token with "\'+i.type+\'" type was not found.\';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},Zt=(vr=class{constructor(s){le(this,"options");le(this,"block");this.options=s||Qe}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(){return this.block?ht.lex:ht.lexInline}provideParser(){return this.block?pt.parse:pt.parseInline}},le(vr,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),le(vr,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),vr),wa=class{constructor(...s){le(this,"defaults",tt());le(this,"options",this.setOptions);le(this,"parse",this.parseMarkdown(!0));le(this,"parseInline",this.parseMarkdown(!1));le(this,"Parser",pt);le(this,"Renderer",ws);le(this,"TextRenderer",Pr);le(this,"Lexer",ht);le(this,"Tokenizer",xs);le(this,"Hooks",Zt);this.use(...s)}walkTokens(s,e){let t=[];for(let n of s)switch(t=t.concat(e.call(this,n)),n.type){case"table":{let r=n;for(let o of r.header)t=t.concat(this.walkTokens(o.tokens,e));for(let o of r.rows)for(let i of o)t=t.concat(this.walkTokens(i.tokens,e));break}case"list":{let r=n;t=t.concat(this.walkTokens(r.items,e));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let i=r[o].flat(1/0);t=t.concat(this.walkTokens(i,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...s){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=e.renderers[r.name];o?e.renderers[r.name]=function(...i){let l=r.renderer.apply(this,i);return l===!1&&(l=o.apply(this,i)),l}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be \'block\' or \'inline\'");let o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){let r=this.defaults.renderer||new ws(this.defaults);for(let o in t.renderer){if(!(o in r))throw new Error(`renderer \'${o}\' does not exist`);if(["options","parser"].includes(o))continue;let i=o,l=t.renderer[i],c=r[i];r[i]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=c.apply(r,p)),f||""}}n.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new xs(this.defaults);for(let o in t.tokenizer){if(!(o in r))throw new Error(`tokenizer \'${o}\' does not exist`);if(["options","rules","lexer"].includes(o))continue;let i=o,l=t.tokenizer[i],c=r[i];r[i]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=c.apply(r,p)),f}}n.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new Zt;for(let o in t.hooks){if(!(o in r))throw new Error(`hook \'${o}\' does not exist`);if(["options","block"].includes(o))continue;let i=o,l=t.hooks[i],c=r[i];Zt.passThroughHooks.has(o)?r[i]=p=>{if(this.defaults.async&&Zt.passThroughHooksRespectAsync.has(o))return Promise.resolve(l.call(r,p)).then(g=>c.call(r,g));let f=l.call(r,p);return c.call(r,f)}:r[i]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=c.apply(r,p)),f}}n.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,o=t.walkTokens;n.walkTokens=function(i){let l=[];return l.push(o.call(this,i)),r&&(l=l.concat(r.call(this,i))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return ht.lex(s,e??this.defaults)}parser(s,e){return pt.parse(s,e??this.defaults)}parseMarkdown(s){return(e,t)=>{let n={...t},r={...this.defaults,...n},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=s);let i=r.hooks?r.hooks.provideLexer():s?ht.lex:ht.lexInline,l=r.hooks?r.hooks.provideParser():s?pt.parse:pt.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(e):e).then(c=>i(c,r)).then(c=>r.hooks?r.hooks.processAllTokens(c):c).then(c=>r.walkTokens?Promise.all(this.walkTokens(c,r.walkTokens)).then(()=>c):c).then(c=>l(c,r)).then(c=>r.hooks?r.hooks.postprocess(c):c).catch(o);try{r.hooks&&(e=r.hooks.preprocess(e));let c=i(e,r);r.hooks&&(c=r.hooks.processAllTokens(c)),r.walkTokens&&this.walkTokens(c,r.walkTokens);let p=l(c,r);return r.hooks&&(p=r.hooks.postprocess(p)),p}catch(c){return o(c)}}}onError(s,e){return t=>{if(t.message+=`\nPlease report this to https://github.com/markedjs/marked.`,s){let n="<p>An error occurred:</p><pre>"+it(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},Et=new wa;function oe(s,e){return Et.parse(s,e)}oe.options=oe.setOptions=function(s){return Et.setOptions(s),oe.defaults=Et.defaults,Pn(oe.defaults),oe},oe.getDefaults=tt,oe.defaults=Qe,oe.use=function(...s){return Et.use(...s),oe.defaults=Et.defaults,Pn(oe.defaults),oe},oe.walkTokens=function(s,e){return Et.walkTokens(s,e)},oe.parseInline=Et.parseInline,oe.Parser=pt,oe.parser=pt.parse,oe.Renderer=ws,oe.TextRenderer=Pr,oe.Lexer=ht,oe.lexer=ht.lex,oe.Tokenizer=xs,oe.Hooks=Zt,oe.parse=oe,oe.options,oe.setOptions,oe.use,oe.walkTokens;var Er=oe.parseInline,Lr=oe;pt.parse,ht.lex;function Ta(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ts={exports:{}},Cs={exports:{}},st={},He={},Vn;function Fe(){if(Vn)return He;Vn=1,He.__esModule=!0,He.extend=r,He.indexOf=c,He.escapeExpression=p,He.isEmpty=f,He.createFrame=g,He.blockParams=u,He.appendContextPath=h;var s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;","=":"&#x3D;"},e=/[&<>"\'`=]/g,t=/[&<>"\'`=]/;function n(a){return s[a]}function r(a){for(var d=1;d<arguments.length;d++)for(var m in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],m)&&(a[m]=arguments[d][m]);return a}var o=Object.prototype.toString;He.toString=o;var i=function(d){return typeof d=="function"};i(/x/)&&(He.isFunction=i=function(a){return typeof a=="function"&&o.call(a)==="[object Function]"}),He.isFunction=i;var l=Array.isArray||function(a){return a&&typeof a=="object"?o.call(a)==="[object Array]":!1};He.isArray=l;function c(a,d){for(var m=0,v=a.length;m<v;m++)if(a[m]===d)return m;return-1}function p(a){if(typeof a!="string"){if(a&&a.toHTML)return a.toHTML();if(a==null)return"";if(!a)return a+"";a=""+a}return t.test(a)?a.replace(e,n):a}function f(a){return!a&&a!==0?!0:!!(l(a)&&a.length===0)}function g(a){var d=r({},a);return d._parent=a,d}function u(a,d){return a.path=d,a}function h(a,d){return(a?a+".":"")+d}return He}var Ps={exports:{}},Un;function rt(){return Un||(Un=1,(function(s,e){e.__esModule=!0;var t=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function n(r,o){var i=o&&o.loc,l=void 0,c=void 0,p=void 0,f=void 0;i&&(l=i.start.line,c=i.end.line,p=i.start.column,f=i.end.column,r+=" - "+l+":"+p);for(var g=Error.prototype.constructor.call(this,r),u=0;u<t.length;u++)this[t[u]]=g[t[u]];Error.captureStackTrace&&Error.captureStackTrace(this,n);try{i&&(this.lineNumber=l,this.endLineNumber=c,Object.defineProperty?(Object.defineProperty(this,"column",{value:p,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:f,enumerable:!0})):(this.column=p,this.endColumn=f))}catch{}}n.prototype=new Error,e.default=n,s.exports=e.default})(Ps,Ps.exports)),Ps.exports}var jt={},Es={exports:{}},Wn;function Ca(){return Wn||(Wn=1,(function(s,e){e.__esModule=!0;var t=Fe();e.default=function(n){n.registerHelper("blockHelperMissing",function(r,o){var i=o.inverse,l=o.fn;if(r===!0)return l(this);if(r===!1||r==null)return i(this);if(t.isArray(r))return r.length>0?(o.ids&&(o.ids=[o.name]),n.helpers.each(r,o)):i(this);if(o.data&&o.ids){var c=t.createFrame(o.data);c.contextPath=t.appendContextPath(o.data.contextPath,o.name),o={data:c}}return l(r,o)})},s.exports=e.default})(Es,Es.exports)),Es.exports}var Ls={exports:{}},Gn;function Pa(){return Gn||(Gn=1,(function(s,e){e.__esModule=!0;function t(i){return i&&i.__esModule?i:{default:i}}var n=Fe(),r=rt(),o=t(r);e.default=function(i){i.registerHelper("each",function(l,c){if(!c)throw new o.default("Must pass iterator to #each");var p=c.fn,f=c.inverse,g=0,u="",h=void 0,a=void 0;c.data&&c.ids&&(a=n.appendContextPath(c.data.contextPath,c.ids[0])+"."),n.isFunction(l)&&(l=l.call(this)),c.data&&(h=n.createFrame(c.data));function d(y,b,k){h&&(h.key=y,h.index=b,h.first=b===0,h.last=!!k,a&&(h.contextPath=a+y)),u=u+p(l[y],{data:h,blockParams:n.blockParams([l[y],y],[a+y,null])})}if(l&&typeof l=="object")if(n.isArray(l))for(var m=l.length;g<m;g++)g in l&&d(g,g,g===l.length-1);else if(typeof Symbol=="function"&&l[Symbol.iterator]){for(var v=[],_=l[Symbol.iterator](),S=_.next();!S.done;S=_.next())v.push(S.value);l=v;for(var m=l.length;g<m;g++)d(g,g,g===l.length-1)}else(function(){var y=void 0;Object.keys(l).forEach(function(b){y!==void 0&&d(y,g-1),y=b,g++}),y!==void 0&&d(y,g-1,!0)})();return g===0&&(u=f(this)),u})},s.exports=e.default})(Ls,Ls.exports)),Ls.exports}var As={exports:{}},Xn;function Ea(){return Xn||(Xn=1,(function(s,e){e.__esModule=!0;function t(o){return o&&o.__esModule?o:{default:o}}var n=rt(),r=t(n);e.default=function(o){o.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new r.default(\'Missing helper: "\'+arguments[arguments.length-1].name+\'"\')})},s.exports=e.default})(As,As.exports)),As.exports}var Rs={exports:{}},Yn;function La(){return Yn||(Yn=1,(function(s,e){e.__esModule=!0;function t(i){return i&&i.__esModule?i:{default:i}}var n=Fe(),r=rt(),o=t(r);e.default=function(i){i.registerHelper("if",function(l,c){if(arguments.length!=2)throw new o.default("#if requires exactly one argument");return n.isFunction(l)&&(l=l.call(this)),!c.hash.includeZero&&!l||n.isEmpty(l)?c.inverse(this):c.fn(this)}),i.registerHelper("unless",function(l,c){if(arguments.length!=2)throw new o.default("#unless requires exactly one argument");return i.helpers.if.call(this,l,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},s.exports=e.default})(Rs,Rs.exports)),Rs.exports}var Os={exports:{}},Jn;function Aa(){return Jn||(Jn=1,(function(s,e){e.__esModule=!0,e.default=function(t){t.registerHelper("log",function(){for(var n=[void 0],r=arguments[arguments.length-1],o=0;o<arguments.length-1;o++)n.push(arguments[o]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),n[0]=i,t.log.apply(t,n)})},s.exports=e.default})(Os,Os.exports)),Os.exports}var Ms={exports:{}},Qn;function Ra(){return Qn||(Qn=1,(function(s,e){e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",function(n,r,o){return n&&o.lookupProperty(n,r)})},s.exports=e.default})(Ms,Ms.exports)),Ms.exports}var Is={exports:{}},Kn;function Oa(){return Kn||(Kn=1,(function(s,e){e.__esModule=!0;function t(i){return i&&i.__esModule?i:{default:i}}var n=Fe(),r=rt(),o=t(r);e.default=function(i){i.registerHelper("with",function(l,c){if(arguments.length!=2)throw new o.default("#with requires exactly one argument");n.isFunction(l)&&(l=l.call(this));var p=c.fn;if(n.isEmpty(l))return c.inverse(this);var f=c.data;return c.data&&c.ids&&(f=n.createFrame(c.data),f.contextPath=n.appendContextPath(c.data.contextPath,c.ids[0])),p(l,{data:f,blockParams:n.blockParams([l],[f&&f.contextPath])})})},s.exports=e.default})(Is,Is.exports)),Is.exports}var Zn;function jn(){if(Zn)return jt;Zn=1,jt.__esModule=!0,jt.registerDefaultHelpers=d,jt.moveHelperToHooks=m;function s(v){return v&&v.__esModule?v:{default:v}}var e=Ca(),t=s(e),n=Pa(),r=s(n),o=Ea(),i=s(o),l=La(),c=s(l),p=Aa(),f=s(p),g=Ra(),u=s(g),h=Oa(),a=s(h);function d(v){t.default(v),r.default(v),i.default(v),c.default(v),f.default(v),u.default(v),a.default(v)}function m(v,_,S){v.helpers[_]&&(v.hooks[_]=v.helpers[_],S||delete v.helpers[_])}return jt}var Ns={},Bs={exports:{}},ei;function Ma(){return ei||(ei=1,(function(s,e){e.__esModule=!0;var t=Fe();e.default=function(n){n.registerDecorator("inline",function(r,o,i,l){var c=r;return o.partials||(o.partials={},c=function(p,f){var g=i.partials;i.partials=t.extend({},g,o.partials);var u=r(p,f);return i.partials=g,u}),o.partials[l.args[0]]=l.fn,c})},s.exports=e.default})(Bs,Bs.exports)),Bs.exports}var ti;function Ia(){if(ti)return Ns;ti=1,Ns.__esModule=!0,Ns.registerDefaultDecorators=n;function s(r){return r&&r.__esModule?r:{default:r}}var e=Ma(),t=s(e);function n(r){t.default(r)}return Ns}var Ds={exports:{}},si;function ri(){return si||(si=1,(function(s,e){e.__esModule=!0;var t=Fe(),n={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(o){if(typeof o=="string"){var i=t.indexOf(n.methodMap,o.toLowerCase());i>=0?o=i:o=parseInt(o,10)}return o},log:function(o){if(o=n.lookupLevel(o),typeof console<"u"&&n.lookupLevel(n.level)<=o){var i=n.methodMap[o];console[i]||(i="log");for(var l=arguments.length,c=Array(l>1?l-1:0),p=1;p<l;p++)c[p-1]=arguments[p];console[i].apply(console,c)}}};e.default=n,s.exports=e.default})(Ds,Ds.exports)),Ds.exports}var Bt={},qs={},ni;function Na(){if(ni)return qs;ni=1,qs.__esModule=!0,qs.createNewLookupObject=e;var s=Fe();function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return s.extend.apply(void 0,[Object.create(null)].concat(n))}return qs}var ii;function oi(){if(ii)return Bt;ii=1,Bt.__esModule=!0,Bt.createProtoAccessControl=o,Bt.resultIsAllowed=i,Bt.resetLoggedProperties=p;function s(f){return f&&f.__esModule?f:{default:f}}var e=Na(),t=ri(),n=s(t),r=Object.create(null);function o(f){var g=Object.create(null);g.constructor=!1,g.__defineGetter__=!1,g.__defineSetter__=!1,g.__lookupGetter__=!1;var u=Object.create(null);return u.__proto__=!1,{properties:{whitelist:e.createNewLookupObject(u,f.allowedProtoProperties),defaultValue:f.allowProtoPropertiesByDefault},methods:{whitelist:e.createNewLookupObject(g,f.allowedProtoMethods),defaultValue:f.allowProtoMethodsByDefault}}}function i(f,g,u){return l(typeof f=="function"?g.methods:g.properties,u)}function l(f,g){return f.whitelist[g]!==void 0?f.whitelist[g]===!0:f.defaultValue!==void 0?f.defaultValue:(c(g),!1)}function c(f){r[f]!==!0&&(r[f]=!0,n.default.log("error",\'Handlebars: Access has been denied to resolve the property "\'+f+`" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function p(){Object.keys(r).forEach(function(f){delete r[f]})}return Bt}var ai;function Ar(){if(ai)return st;ai=1,st.__esModule=!0,st.HandlebarsEnvironment=a;function s(m){return m&&m.__esModule?m:{default:m}}var e=Fe(),t=rt(),n=s(t),r=jn(),o=Ia(),i=ri(),l=s(i),c=oi(),p="4.7.8";st.VERSION=p;var f=8;st.COMPILER_REVISION=f;var g=7;st.LAST_COMPATIBLE_COMPILER_REVISION=g;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};st.REVISION_CHANGES=u;var h="[object Object]";function a(m,v,_){this.helpers=m||{},this.partials=v||{},this.decorators=_||{},r.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}a.prototype={constructor:a,logger:l.default,log:l.default.log,registerHelper:function(v,_){if(e.toString.call(v)===h){if(_)throw new n.default("Arg not supported with multiple helpers");e.extend(this.helpers,v)}else this.helpers[v]=_},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,_){if(e.toString.call(v)===h)e.extend(this.partials,v);else{if(typeof _>"u")throw new n.default(\'Attempting to register a partial called "\'+v+\'" as undefined\');this.partials[v]=_}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,_){if(e.toString.call(v)===h){if(_)throw new n.default("Arg not supported with multiple decorators");e.extend(this.decorators,v)}else this.decorators[v]=_},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var d=l.default.log;return st.log=d,st.createFrame=e.createFrame,st.logger=l.default,st}var Hs={exports:{}},li;function Ba(){return li||(li=1,(function(s,e){e.__esModule=!0;function t(n){this.string=n}t.prototype.toString=t.prototype.toHTML=function(){return""+this.string},e.default=t,s.exports=e.default})(Hs,Hs.exports)),Hs.exports}var ft={},Fs={},ci;function Da(){if(ci)return Fs;ci=1,Fs.__esModule=!0,Fs.wrapHelper=s;function s(e,t){if(typeof e!="function")return e;var n=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),e.apply(this,arguments)};return n}return Fs}var ui;function qa(){if(ui)return ft;ui=1,ft.__esModule=!0,ft.checkRevision=f,ft.template=g,ft.wrapProgram=u,ft.resolvePartial=h,ft.invokePartial=a,ft.noop=d;function s(y){return y&&y.__esModule?y:{default:y}}function e(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var k in y)Object.prototype.hasOwnProperty.call(y,k)&&(b[k]=y[k]);return b.default=y,b}var t=Fe(),n=e(t),r=rt(),o=s(r),i=Ar(),l=jn(),c=Da(),p=oi();function f(y){var b=y&&y[0]||1,k=i.COMPILER_REVISION;if(!(b>=i.LAST_COMPATIBLE_COMPILER_REVISION&&b<=i.COMPILER_REVISION))if(b<i.LAST_COMPATIBLE_COMPILER_REVISION){var x=i.REVISION_CHANGES[k],C=i.REVISION_CHANGES[b];throw new o.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+x+") or downgrade your runtime to an older version ("+C+").")}else throw new o.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+y[1]+").")}function g(y,b){if(!b)throw new o.default("No environment passed to template");if(!y||!y.main)throw new o.default("Unknown template object: "+typeof y);y.main.decorator=y.main_d,b.VM.checkRevision(y.compiler);var k=y.compiler&&y.compiler[0]===7;function x(P,w,E){E.hash&&(w=n.extend({},w,E.hash),E.ids&&(E.ids[0]=!0)),P=b.VM.resolvePartial.call(this,P,w,E);var L=n.extend({},E,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),M=b.VM.invokePartial.call(this,P,w,L);if(M==null&&b.compile&&(E.partials[E.name]=b.compile(P,y.compilerOptions,b),M=E.partials[E.name](w,L)),M!=null){if(E.indent){for(var q=M.split(`\n`),$=0,U=q.length;$<U&&!(!q[$]&&$+1===U);$++)q[$]=E.indent+q[$];M=q.join(`\n`)}return M}else throw new o.default("The partial "+E.name+" could not be compiled when running in runtime-only mode")}var C={strict:function(w,E,L){if(!w||!(E in w))throw new o.default(\'"\'+E+\'" not defined in \'+w,{loc:L});return C.lookupProperty(w,E)},lookupProperty:function(w,E){var L=w[E];if(L==null||Object.prototype.hasOwnProperty.call(w,E)||p.resultIsAllowed(L,C.protoAccessControl,E))return L},lookup:function(w,E){for(var L=w.length,M=0;M<L;M++){var q=w[M]&&C.lookupProperty(w[M],E);if(q!=null)return w[M][E]}},lambda:function(w,E){return typeof w=="function"?w.call(E):w},escapeExpression:n.escapeExpression,invokePartial:x,fn:function(w){var E=y[w];return E.decorator=y[w+"_d"],E},programs:[],program:function(w,E,L,M,q){var $=this.programs[w],U=this.fn(w);return E||q||M||L?$=u(this,w,U,E,L,M,q):$||($=this.programs[w]=u(this,w,U)),$},data:function(w,E){for(;w&&E--;)w=w._parent;return w},mergeIfNeeded:function(w,E){var L=w||E;return w&&E&&w!==E&&(L=n.extend({},E,w)),L},nullContext:Object.seal({}),noop:b.VM.noop,compilerInfo:y.compiler};function O(P){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],E=w.data;O._setup(w),!w.partial&&y.useData&&(E=m(P,E));var L=void 0,M=y.useBlockParams?[]:void 0;y.useDepths&&(w.depths?L=P!=w.depths[0]?[P].concat(w.depths):w.depths:L=[P]);function q($){return""+y.main(C,$,C.helpers,C.partials,E,M,L)}return q=v(y.main,q,C,w.depths||[],E,M),q(P,w)}return O.isTop=!0,O._setup=function(P){if(P.partial)C.protoAccessControl=P.protoAccessControl,C.helpers=P.helpers,C.partials=P.partials,C.decorators=P.decorators,C.hooks=P.hooks;else{var w=n.extend({},b.helpers,P.helpers);_(w,C),C.helpers=w,y.usePartial&&(C.partials=C.mergeIfNeeded(P.partials,b.partials)),(y.usePartial||y.useDecorators)&&(C.decorators=n.extend({},b.decorators,P.decorators)),C.hooks={},C.protoAccessControl=p.createProtoAccessControl(P);var E=P.allowCallsToHelperMissing||k;l.moveHelperToHooks(C,"helperMissing",E),l.moveHelperToHooks(C,"blockHelperMissing",E)}},O._child=function(P,w,E,L){if(y.useBlockParams&&!E)throw new o.default("must pass block params");if(y.useDepths&&!L)throw new o.default("must pass parent depths");return u(C,P,y[P],w,0,E,L)},O}function u(y,b,k,x,C,O,P){function w(E){var L=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],M=P;return P&&E!=P[0]&&!(E===y.nullContext&&P[0]===null)&&(M=[E].concat(P)),k(y,E,y.helpers,y.partials,L.data||x,O&&[L.blockParams].concat(O),M)}return w=v(k,w,y,P,x,O),w.program=b,w.depth=P?P.length:0,w.blockParams=C||0,w}function h(y,b,k){return y?!y.call&&!k.name&&(k.name=y,y=k.partials[y]):k.name==="@partial-block"?y=k.data["partial-block"]:y=k.partials[k.name],y}function a(y,b,k){var x=k.data&&k.data["partial-block"];k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var C=void 0;if(k.fn&&k.fn!==d&&(function(){k.data=i.createFrame(k.data);var O=k.fn;C=k.data["partial-block"]=function(w){var E=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return E.data=i.createFrame(E.data),E.data["partial-block"]=x,O(w,E)},O.partials&&(k.partials=n.extend({},k.partials,O.partials))})(),y===void 0&&C&&(y=C),y===void 0)throw new o.default("The partial "+k.name+" could not be found");if(y instanceof Function)return y(b,k)}function d(){return""}function m(y,b){return(!b||!("root"in b))&&(b=b?i.createFrame(b):{},b.root=y),b}function v(y,b,k,x,C,O){if(y.decorator){var P={};b=y.decorator(b,P,k,x&&x[0],C,O,x),n.extend(b,P)}return b}function _(y,b){Object.keys(y).forEach(function(k){var x=y[k];y[k]=S(x,b)})}function S(y,b){var k=b.lookupProperty;return c.wrapHelper(y,function(x){return n.extend({lookupProperty:k},x)})}return ft}var $s={exports:{}},hi;function pi(){return hi||(hi=1,(function(s,e){e.__esModule=!0,e.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var n=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=n),t}},s.exports=e.default})($s,$s.exports)),$s.exports}var fi;function Ha(){return fi||(fi=1,(function(s,e){e.__esModule=!0;function t(_){return _&&_.__esModule?_:{default:_}}function n(_){if(_&&_.__esModule)return _;var S={};if(_!=null)for(var y in _)Object.prototype.hasOwnProperty.call(_,y)&&(S[y]=_[y]);return S.default=_,S}var r=Ar(),o=n(r),i=Ba(),l=t(i),c=rt(),p=t(c),f=Fe(),g=n(f),u=qa(),h=n(u),a=pi(),d=t(a);function m(){var _=new o.HandlebarsEnvironment;return g.extend(_,o),_.SafeString=l.default,_.Exception=p.default,_.Utils=g,_.escapeExpression=g.escapeExpression,_.VM=h,_.template=function(S){return h.template(S,_)},_}var v=m();v.create=m,d.default(v),v.default=v,e.default=v,s.exports=e.default})(Cs,Cs.exports)),Cs.exports}var zs={exports:{}},di;function gi(){return di||(di=1,(function(s,e){e.__esModule=!0;var t={helpers:{helperExpression:function(r){return r.type==="SubExpression"||(r.type==="MustacheStatement"||r.type==="BlockStatement")&&!!(r.params&&r.params.length||r.hash)},scopedId:function(r){return/^\\.|this\\b/.test(r.original)},simpleId:function(r){return r.parts.length===1&&!t.helpers.scopedId(r)&&!r.depth}}};e.default=t,s.exports=e.default})(zs,zs.exports)),zs.exports}var Dt={},Vs={exports:{}},mi;function Fa(){return mi||(mi=1,(function(s,e){e.__esModule=!0;var t=(function(){var n={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(l,c,p,f,g,u,h){var a=u.length-1;switch(g){case 1:return u[a-1];case 2:this.$=f.prepareProgram(u[a]);break;case 3:this.$=u[a];break;case 4:this.$=u[a];break;case 5:this.$=u[a];break;case 6:this.$=u[a];break;case 7:this.$=u[a];break;case 8:this.$=u[a];break;case 9:this.$={type:"CommentStatement",value:f.stripComment(u[a]),strip:f.stripFlags(u[a],u[a]),loc:f.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[a],value:u[a],loc:f.locInfo(this._$)};break;case 11:this.$=f.prepareRawBlock(u[a-2],u[a-1],u[a],this._$);break;case 12:this.$={path:u[a-3],params:u[a-2],hash:u[a-1]};break;case 13:this.$=f.prepareBlock(u[a-3],u[a-2],u[a-1],u[a],!1,this._$);break;case 14:this.$=f.prepareBlock(u[a-3],u[a-2],u[a-1],u[a],!0,this._$);break;case 15:this.$={open:u[a-5],path:u[a-4],params:u[a-3],hash:u[a-2],blockParams:u[a-1],strip:f.stripFlags(u[a-5],u[a])};break;case 16:this.$={path:u[a-4],params:u[a-3],hash:u[a-2],blockParams:u[a-1],strip:f.stripFlags(u[a-5],u[a])};break;case 17:this.$={path:u[a-4],params:u[a-3],hash:u[a-2],blockParams:u[a-1],strip:f.stripFlags(u[a-5],u[a])};break;case 18:this.$={strip:f.stripFlags(u[a-1],u[a-1]),program:u[a]};break;case 19:var d=f.prepareBlock(u[a-2],u[a-1],u[a],u[a],!1,this._$),m=f.prepareProgram([d],u[a-1].loc);m.chained=!0,this.$={strip:u[a-2].strip,program:m,chain:!0};break;case 20:this.$=u[a];break;case 21:this.$={path:u[a-1],strip:f.stripFlags(u[a-2],u[a])};break;case 22:this.$=f.prepareMustache(u[a-3],u[a-2],u[a-1],u[a-4],f.stripFlags(u[a-4],u[a]),this._$);break;case 23:this.$=f.prepareMustache(u[a-3],u[a-2],u[a-1],u[a-4],f.stripFlags(u[a-4],u[a]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[a-3],params:u[a-2],hash:u[a-1],indent:"",strip:f.stripFlags(u[a-4],u[a]),loc:f.locInfo(this._$)};break;case 25:this.$=f.preparePartialBlock(u[a-2],u[a-1],u[a],this._$);break;case 26:this.$={path:u[a-3],params:u[a-2],hash:u[a-1],strip:f.stripFlags(u[a-4],u[a])};break;case 27:this.$=u[a];break;case 28:this.$=u[a];break;case 29:this.$={type:"SubExpression",path:u[a-3],params:u[a-2],hash:u[a-1],loc:f.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[a],loc:f.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:f.id(u[a-2]),value:u[a],loc:f.locInfo(this._$)};break;case 32:this.$=f.id(u[a-1]);break;case 33:this.$=u[a];break;case 34:this.$=u[a];break;case 35:this.$={type:"StringLiteral",value:u[a],original:u[a],loc:f.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[a]),original:Number(u[a]),loc:f.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[a]==="true",original:u[a]==="true",loc:f.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:f.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:f.locInfo(this._$)};break;case 40:this.$=u[a];break;case 41:this.$=u[a];break;case 42:this.$=f.preparePath(!0,u[a],this._$);break;case 43:this.$=f.preparePath(!1,u[a],this._$);break;case 44:u[a-2].push({part:f.id(u[a]),original:u[a],separator:u[a-1]}),this.$=u[a-2];break;case 45:this.$=[{part:f.id(u[a]),original:u[a]}];break;case 46:this.$=[];break;case 47:u[a-1].push(u[a]);break;case 48:this.$=[];break;case 49:u[a-1].push(u[a]);break;case 50:this.$=[];break;case 51:u[a-1].push(u[a]);break;case 58:this.$=[];break;case 59:u[a-1].push(u[a]);break;case 64:this.$=[];break;case 65:u[a-1].push(u[a]);break;case 70:this.$=[];break;case 71:u[a-1].push(u[a]);break;case 78:this.$=[];break;case 79:u[a-1].push(u[a]);break;case 82:this.$=[];break;case 83:u[a-1].push(u[a]);break;case 86:this.$=[];break;case 87:u[a-1].push(u[a]);break;case 90:this.$=[];break;case 91:u[a-1].push(u[a]);break;case 94:this.$=[];break;case 95:u[a-1].push(u[a]);break;case 98:this.$=[u[a]];break;case 99:u[a-1].push(u[a]);break;case 100:this.$=[u[a]];break;case 101:u[a-1].push(u[a]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(l,c){throw new Error(l)},parse:function(l){var c=this,p=[0],f=[null],g=[],u=this.table,h="",a=0,d=0;this.lexer.setInput(l),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var m=this.lexer.yylloc;g.push(m);var v=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function _(){var L;return L=c.lexer.lex()||1,typeof L!="number"&&(L=c.symbols_[L]||L),L}for(var S,y,b,k,x={},C,O,P,w;;){if(y=p[p.length-1],this.defaultActions[y]?b=this.defaultActions[y]:((S===null||typeof S>"u")&&(S=_()),b=u[y]&&u[y][S]),typeof b>"u"||!b.length||!b[0]){var E="";{w=[];for(C in u[y])this.terminals_[C]&&C>2&&w.push("\'"+this.terminals_[C]+"\'");this.lexer.showPosition?E="Parse error on line "+(a+1)+`:\n`+this.lexer.showPosition()+`\nExpecting `+w.join(", ")+", got \'"+(this.terminals_[S]||S)+"\'":E="Parse error on line "+(a+1)+": Unexpected "+(S==1?"end of input":"\'"+(this.terminals_[S]||S)+"\'"),this.parseError(E,{text:this.lexer.match,token:this.terminals_[S]||S,line:this.lexer.yylineno,loc:m,expected:w})}}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+S);switch(b[0]){case 1:p.push(S),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),p.push(b[1]),S=null,d=this.lexer.yyleng,h=this.lexer.yytext,a=this.lexer.yylineno,m=this.lexer.yylloc;break;case 2:if(O=this.productions_[b[1]][1],x.$=f[f.length-O],x._$={first_line:g[g.length-(O||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(O||1)].first_column,last_column:g[g.length-1].last_column},v&&(x._$.range=[g[g.length-(O||1)].range[0],g[g.length-1].range[1]]),k=this.performAction.call(x,h,d,a,this.yy,b[1],f,g),typeof k<"u")return k;O&&(p=p.slice(0,-1*O*2),f=f.slice(0,-1*O),g=g.slice(0,-1*O)),p.push(this.productions_[b[1]][0]),f.push(x.$),g.push(x._$),P=u[p[p.length-2]][p[p.length-1]],p.push(P);break;case 3:return!0}}return!0}},r=(function(){var i={EOF:1,parseError:function(c,p){if(this.yy.parser)this.yy.parser.parseError(c,p);else throw new Error(c)},setInput:function(c){return this._input=c,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var p=c.match(/(?:\\r\\n?|\\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},unput:function(c){var p=c.length,f=c.split(/(?:\\r\\n?|\\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p-1),this.offset-=p;var g=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===g.length?this.yylloc.first_column:0)+g[g.length-f.length].length-f[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-p]),this},more:function(){return this._more=!0,this},less:function(c){this.unput(this.match.slice(c))},pastInput:function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\\n/g,"")},upcomingInput:function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\\n/g,"")},showPosition:function(){var c=this.pastInput(),p=new Array(c.length+1).join("-");return c+this.upcomingInput()+`\n`+p+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,p,f,g,u;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),a=0;a<h.length&&(f=this._input.match(this.rules[h[a]]),!(f&&(!p||f[0].length>p[0].length)&&(p=f,g=a,!this.options.flex)));a++);return p?(u=p[0].match(/(?:\\r\\n?|\\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],c=this.performAction.call(this,this.yy,this,h[g],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var c=this.next();return typeof c<"u"?c:this.lex()},begin:function(c){this.conditionStack.push(c)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(c){this.begin(c)}};return i.options={},i.performAction=function(c,p,f,g){function u(h,a){return p.yytext=p.yytext.substring(h,p.yyleng-a+h)}switch(f){case 0:if(p.yytext.slice(-2)==="\\\\\\\\"?(u(0,1),this.begin("mu")):p.yytext.slice(-1)==="\\\\"?(u(0,1),this.begin("emu")):this.begin("mu"),p.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(p.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return p.yytext=u(1,2).replace(/\\\\"/g,\'"\'),80;case 32:return p.yytext=u(1,2).replace(/\\\\\'/g,"\'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return p.yytext=p.yytext.replace(/\\\\([\\\\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},i.rules=[/^(?:[^\\x00]*?(?=(\\{\\{)))/,/^(?:[^\\x00]+)/,/^(?:[^\\x00]{2,}?(?=(\\{\\{|\\\\\\{\\{|\\\\\\\\\\{\\{|$)))/,/^(?:\\{\\{\\{\\{(?=[^/]))/,/^(?:\\{\\{\\{\\{\\/[^\\s!"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=[=}\\s\\/.])\\}\\}\\}\\})/,/^(?:[^\\x00]+?(?=(\\{\\{\\{\\{)))/,/^(?:[\\s\\S]*?--(~)?\\}\\})/,/^(?:\\()/,/^(?:\\))/,/^(?:\\{\\{\\{\\{)/,/^(?:\\}\\}\\}\\})/,/^(?:\\{\\{(~)?>)/,/^(?:\\{\\{(~)?#>)/,/^(?:\\{\\{(~)?#\\*?)/,/^(?:\\{\\{(~)?\\/)/,/^(?:\\{\\{(~)?\\^\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\s*else\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\^)/,/^(?:\\{\\{(~)?\\s*else\\b)/,/^(?:\\{\\{(~)?\\{)/,/^(?:\\{\\{(~)?&)/,/^(?:\\{\\{(~)?!--)/,/^(?:\\{\\{(~)?![\\s\\S]*?\\}\\})/,/^(?:\\{\\{(~)?\\*?)/,/^(?:=)/,/^(?:\\.\\.)/,/^(?:\\.(?=([=~}\\s\\/.)|])))/,/^(?:[\\/.])/,/^(?:\\s+)/,/^(?:\\}(~)?\\}\\})/,/^(?:(~)?\\}\\})/,/^(?:"(\\\\["]|[^"])*")/,/^(?:\'(\\\\[\']|[^\'])*\')/,/^(?:@)/,/^(?:true(?=([~}\\s)])))/,/^(?:false(?=([~}\\s)])))/,/^(?:undefined(?=([~}\\s)])))/,/^(?:null(?=([~}\\s)])))/,/^(?:-?[0-9]+(?:\\.[0-9]+)?(?=([~}\\s)])))/,/^(?:as\\s+\\|)/,/^(?:\\|)/,/^(?:([^\\s!"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=([=~}\\s\\/.)|]))))/,/^(?:\\[(\\\\\\]|[^\\]])*\\])/,/^(?:.)/,/^(?:$)/],i.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},i})();n.lexer=r;function o(){this.yy={}}return o.prototype=n,n.Parser=o,new o})();e.default=t,s.exports=e.default})(Vs,Vs.exports)),Vs.exports}var Us={exports:{}},Ws={exports:{}},vi;function yi(){return vi||(vi=1,(function(s,e){e.__esModule=!0;function t(p){return p&&p.__esModule?p:{default:p}}var n=rt(),r=t(n);function o(){this.parents=[]}o.prototype={constructor:o,mutating:!1,acceptKey:function(f,g){var u=this.accept(f[g]);if(this.mutating){if(u&&!o.prototype[u.type])throw new r.default(\'Unexpected node type "\'+u.type+\'" found when accepting \'+g+" on "+f.type);f[g]=u}},acceptRequired:function(f,g){if(this.acceptKey(f,g),!f[g])throw new r.default(f.type+" requires "+g)},acceptArray:function(f){for(var g=0,u=f.length;g<u;g++)this.acceptKey(f,g),f[g]||(f.splice(g,1),g--,u--)},accept:function(f){if(f){if(!this[f.type])throw new r.default("Unknown type: "+f.type,f);this.current&&this.parents.unshift(this.current),this.current=f;var g=this[f.type](f);if(this.current=this.parents.shift(),!this.mutating||g)return g;if(g!==!1)return f}},Program:function(f){this.acceptArray(f.body)},MustacheStatement:i,Decorator:i,BlockStatement:l,DecoratorBlock:l,PartialStatement:c,PartialBlockStatement:function(f){c.call(this,f),this.acceptKey(f,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:i,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(f){this.acceptArray(f.pairs)},HashPair:function(f){this.acceptRequired(f,"value")}};function i(p){this.acceptRequired(p,"path"),this.acceptArray(p.params),this.acceptKey(p,"hash")}function l(p){i.call(this,p),this.acceptKey(p,"program"),this.acceptKey(p,"inverse")}function c(p){this.acceptRequired(p,"name"),this.acceptArray(p.params),this.acceptKey(p,"hash")}e.default=o,s.exports=e.default})(Ws,Ws.exports)),Ws.exports}var _i;function $a(){return _i||(_i=1,(function(s,e){e.__esModule=!0;function t(f){return f&&f.__esModule?f:{default:f}}var n=yi(),r=t(n);function o(){var f=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=f}o.prototype=new r.default,o.prototype.Program=function(f){var g=!this.options.ignoreStandalone,u=!this.isRootSeen;this.isRootSeen=!0;for(var h=f.body,a=0,d=h.length;a<d;a++){var m=h[a],v=this.accept(m);if(v){var _=i(h,a,u),S=l(h,a,u),y=v.openStandalone&&_,b=v.closeStandalone&&S,k=v.inlineStandalone&&_&&S;v.close&&c(h,a,!0),v.open&&p(h,a,!0),g&&k&&(c(h,a),p(h,a)&&m.type==="PartialStatement"&&(m.indent=/([ \\t]+$)/.exec(h[a-1].original)[1])),g&&y&&(c((m.program||m.inverse).body),p(h,a)),g&&b&&(c(h,a),p((m.inverse||m.program).body))}}return f},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(f){this.accept(f.program),this.accept(f.inverse);var g=f.program||f.inverse,u=f.program&&f.inverse,h=u,a=u;if(u&&u.chained)for(h=u.body[0].program;a.chained;)a=a.body[a.body.length-1].program;var d={open:f.openStrip.open,close:f.closeStrip.close,openStandalone:l(g.body),closeStandalone:i((h||g).body)};if(f.openStrip.close&&c(g.body,null,!0),u){var m=f.inverseStrip;m.open&&p(g.body,null,!0),m.close&&c(h.body,null,!0),f.closeStrip.open&&p(a.body,null,!0),!this.options.ignoreStandalone&&i(g.body)&&l(h.body)&&(p(g.body),c(h.body))}else f.closeStrip.open&&p(g.body,null,!0);return d},o.prototype.Decorator=o.prototype.MustacheStatement=function(f){return f.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(f){var g=f.strip||{};return{inlineStandalone:!0,open:g.open,close:g.close}};function i(f,g,u){g===void 0&&(g=f.length);var h=f[g-1],a=f[g-2];if(!h)return u;if(h.type==="ContentStatement")return(a||!u?/\\r?\\n\\s*?$/:/(^|\\r?\\n)\\s*?$/).test(h.original)}function l(f,g,u){g===void 0&&(g=-1);var h=f[g+1],a=f[g+2];if(!h)return u;if(h.type==="ContentStatement")return(a||!u?/^\\s*?\\r?\\n/:/^\\s*?(\\r?\\n|$)/).test(h.original)}function c(f,g,u){var h=f[g==null?0:g+1];if(!(!h||h.type!=="ContentStatement"||!u&&h.rightStripped)){var a=h.value;h.value=h.value.replace(u?/^\\s+/:/^[ \\t]*\\r?\\n?/,""),h.rightStripped=h.value!==a}}function p(f,g,u){var h=f[g==null?f.length-1:g-1];if(!(!h||h.type!=="ContentStatement"||!u&&h.leftStripped)){var a=h.value;return h.value=h.value.replace(u?/\\s+$/:/[ \\t]+$/,""),h.leftStripped=h.value!==a,h.leftStripped}}e.default=o,s.exports=e.default})(Us,Us.exports)),Us.exports}var We={},bi;function za(){if(bi)return We;bi=1,We.__esModule=!0,We.SourceLocation=r,We.id=o,We.stripFlags=i,We.stripComment=l,We.preparePath=c,We.prepareMustache=p,We.prepareRawBlock=f,We.prepareBlock=g,We.prepareProgram=u,We.preparePartialBlock=h;function s(a){return a&&a.__esModule?a:{default:a}}var e=rt(),t=s(e);function n(a,d){if(d=d.path?d.path.original:d,a.path.original!==d){var m={loc:a.path.loc};throw new t.default(a.path.original+" doesn\'t match "+d,m)}}function r(a,d){this.source=a,this.start={line:d.first_line,column:d.first_column},this.end={line:d.last_line,column:d.last_column}}function o(a){return/^\\[.*\\]$/.test(a)?a.substring(1,a.length-1):a}function i(a,d){return{open:a.charAt(2)==="~",close:d.charAt(d.length-3)==="~"}}function l(a){return a.replace(/^\\{\\{~?!-?-?/,"").replace(/-?-?~?\\}\\}$/,"")}function c(a,d,m){m=this.locInfo(m);for(var v=a?"@":"",_=[],S=0,y=0,b=d.length;y<b;y++){var k=d[y].part,x=d[y].original!==k;if(v+=(d[y].separator||"")+k,!x&&(k===".."||k==="."||k==="this")){if(_.length>0)throw new t.default("Invalid path: "+v,{loc:m});k===".."&&S++}else _.push(k)}return{type:"PathExpression",data:a,depth:S,parts:_,original:v,loc:m}}function p(a,d,m,v,_,S){var y=v.charAt(3)||v.charAt(2),b=y!=="{"&&y!=="&",k=/\\*/.test(v);return{type:k?"Decorator":"MustacheStatement",path:a,params:d,hash:m,escaped:b,strip:_,loc:this.locInfo(S)}}function f(a,d,m,v){n(a,m),v=this.locInfo(v);var _={type:"Program",body:d,strip:{},loc:v};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:_,openStrip:{},inverseStrip:{},closeStrip:{},loc:v}}function g(a,d,m,v,_,S){v&&v.path&&n(a,v);var y=/\\*/.test(a.open);d.blockParams=a.blockParams;var b=void 0,k=void 0;if(m){if(y)throw new t.default("Unexpected inverse block on decorator",m);m.chain&&(m.program.body[0].closeStrip=v.strip),k=m.strip,b=m.program}return _&&(_=b,b=d,d=_),{type:y?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:d,inverse:b,openStrip:a.strip,inverseStrip:k,closeStrip:v&&v.strip,loc:this.locInfo(S)}}function u(a,d){if(!d&&a.length){var m=a[0].loc,v=a[a.length-1].loc;m&&v&&(d={source:m.source,start:{line:m.start.line,column:m.start.column},end:{line:v.end.line,column:v.end.column}})}return{type:"Program",body:a,strip:{},loc:d}}function h(a,d,m,v){return n(a,m),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:d,openStrip:a.strip,closeStrip:m&&m.strip,loc:this.locInfo(v)}}return We}var Si;function Va(){if(Si)return Dt;Si=1,Dt.__esModule=!0,Dt.parseWithoutProcessing=f,Dt.parse=g;function s(u){if(u&&u.__esModule)return u;var h={};if(u!=null)for(var a in u)Object.prototype.hasOwnProperty.call(u,a)&&(h[a]=u[a]);return h.default=u,h}function e(u){return u&&u.__esModule?u:{default:u}}var t=Fa(),n=e(t),r=$a(),o=e(r),i=za(),l=s(i),c=Fe();Dt.parser=n.default;var p={};c.extend(p,l);function f(u,h){if(u.type==="Program")return u;n.default.yy=p,p.locInfo=function(d){return new p.SourceLocation(h&&h.srcName,d)};var a=n.default.parse(u);return a}function g(u,h){var a=f(u,h),d=new o.default(h);return d.accept(a)}return Dt}var qt={},ki;function Ua(){if(ki)return qt;ki=1,qt.__esModule=!0,qt.Compiler=l,qt.precompile=c,qt.compile=p;function s(u){return u&&u.__esModule?u:{default:u}}var e=rt(),t=s(e),n=Fe(),r=gi(),o=s(r),i=[].slice;function l(){}l.prototype={compiler:l,equals:function(h){var a=this.opcodes.length;if(h.opcodes.length!==a)return!1;for(var d=0;d<a;d++){var m=this.opcodes[d],v=h.opcodes[d];if(m.opcode!==v.opcode||!f(m.args,v.args))return!1}a=this.children.length;for(var d=0;d<a;d++)if(!this.children[d].equals(h.children[d]))return!1;return!0},guid:0,compile:function(h,a){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=a,this.stringParams=a.stringParams,this.trackIds=a.trackIds,a.blockParams=a.blockParams||[],a.knownHelpers=n.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},a.knownHelpers),this.accept(h)},compileProgram:function(h){var a=new this.compiler,d=a.compile(h,this.options),m=this.guid++;return this.usePartial=this.usePartial||d.usePartial,this.children[m]=d,this.useDepths=this.useDepths||d.useDepths,m},accept:function(h){if(!this[h.type])throw new t.default("Unknown type: "+h.type,h);this.sourceNode.unshift(h);var a=this[h.type](h);return this.sourceNode.shift(),a},Program:function(h){this.options.blockParams.unshift(h.blockParams);for(var a=h.body,d=a.length,m=0;m<d;m++)this.accept(a[m]);return this.options.blockParams.shift(),this.isSimple=d===1,this.blockParams=h.blockParams?h.blockParams.length:0,this},BlockStatement:function(h){g(h);var a=h.program,d=h.inverse;a=a&&this.compileProgram(a),d=d&&this.compileProgram(d);var m=this.classifySexpr(h);m==="helper"?this.helperSexpr(h,a,d):m==="simple"?(this.simpleSexpr(h),this.opcode("pushProgram",a),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue",h.path.original)):(this.ambiguousSexpr(h,a,d),this.opcode("pushProgram",a),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(h){var a=h.program&&this.compileProgram(h.program),d=this.setupFullMustacheParams(h,a,void 0),m=h.path;this.useDecorators=!0,this.opcode("registerDecorator",d.length,m.original)},PartialStatement:function(h){this.usePartial=!0;var a=h.program;a&&(a=this.compileProgram(h.program));var d=h.params;if(d.length>1)throw new t.default("Unsupported number of partial arguments: "+d.length,h);d.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):d.push({type:"PathExpression",parts:[],depth:0}));var m=h.name.original,v=h.name.type==="SubExpression";v&&this.accept(h.name),this.setupFullMustacheParams(h,a,void 0,!0);var _=h.indent||"";this.options.preventIndent&&_&&(this.opcode("appendContent",_),_=""),this.opcode("invokePartial",v,m,_),this.opcode("append")},PartialBlockStatement:function(h){this.PartialStatement(h)},MustacheStatement:function(h){this.SubExpression(h),h.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(h){this.DecoratorBlock(h)},ContentStatement:function(h){h.value&&this.opcode("appendContent",h.value)},CommentStatement:function(){},SubExpression:function(h){g(h);var a=this.classifySexpr(h);a==="simple"?this.simpleSexpr(h):a==="helper"?this.helperSexpr(h):this.ambiguousSexpr(h)},ambiguousSexpr:function(h,a,d){var m=h.path,v=m.parts[0],_=a!=null||d!=null;this.opcode("getContext",m.depth),this.opcode("pushProgram",a),this.opcode("pushProgram",d),m.strict=!0,this.accept(m),this.opcode("invokeAmbiguous",v,_)},simpleSexpr:function(h){var a=h.path;a.strict=!0,this.accept(a),this.opcode("resolvePossibleLambda")},helperSexpr:function(h,a,d){var m=this.setupFullMustacheParams(h,a,d),v=h.path,_=v.parts[0];if(this.options.knownHelpers[_])this.opcode("invokeKnownHelper",m.length,_);else{if(this.options.knownHelpersOnly)throw new t.default("You specified knownHelpersOnly, but used the unknown helper "+_,h);v.strict=!0,v.falsy=!0,this.accept(v),this.opcode("invokeHelper",m.length,v.original,o.default.helpers.simpleId(v))}},PathExpression:function(h){this.addDepth(h.depth),this.opcode("getContext",h.depth);var a=h.parts[0],d=o.default.helpers.scopedId(h),m=!h.depth&&!d&&this.blockParamIndex(a);m?this.opcode("lookupBlockParam",m,h.parts):a?h.data?(this.options.data=!0,this.opcode("lookupData",h.depth,h.parts,h.strict)):this.opcode("lookupOnContext",h.parts,h.falsy,h.strict,d):this.opcode("pushContext")},StringLiteral:function(h){this.opcode("pushString",h.value)},NumberLiteral:function(h){this.opcode("pushLiteral",h.value)},BooleanLiteral:function(h){this.opcode("pushLiteral",h.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(h){var a=h.pairs,d=0,m=a.length;for(this.opcode("pushHash");d<m;d++)this.pushParam(a[d].value);for(;d--;)this.opcode("assignToHash",a[d].key);this.opcode("popHash")},opcode:function(h){this.opcodes.push({opcode:h,args:i.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(h){h&&(this.useDepths=!0)},classifySexpr:function(h){var a=o.default.helpers.simpleId(h.path),d=a&&!!this.blockParamIndex(h.path.parts[0]),m=!d&&o.default.helpers.helperExpression(h),v=!d&&(m||a);if(v&&!m){var _=h.path.parts[0],S=this.options;S.knownHelpers[_]?m=!0:S.knownHelpersOnly&&(v=!1)}return m?"helper":v?"ambiguous":"simple"},pushParams:function(h){for(var a=0,d=h.length;a<d;a++)this.pushParam(h[a])},pushParam:function(h){var a=h.value!=null?h.value:h.original||"";if(this.stringParams)a.replace&&(a=a.replace(/^(\\.?\\.\\/)*/g,"").replace(/\\//g,".")),h.depth&&this.addDepth(h.depth),this.opcode("getContext",h.depth||0),this.opcode("pushStringParam",a,h.type),h.type==="SubExpression"&&this.accept(h);else{if(this.trackIds){var d=void 0;if(h.parts&&!o.default.helpers.scopedId(h)&&!h.depth&&(d=this.blockParamIndex(h.parts[0])),d){var m=h.parts.slice(1).join(".");this.opcode("pushId","BlockParam",d,m)}else a=h.original||a,a.replace&&(a=a.replace(/^this(?:\\.|$)/,"").replace(/^\\.\\//,"").replace(/^\\.$/,"")),this.opcode("pushId",h.type,a)}this.accept(h)}},setupFullMustacheParams:function(h,a,d,m){var v=h.params;return this.pushParams(v),this.opcode("pushProgram",a),this.opcode("pushProgram",d),h.hash?this.accept(h.hash):this.opcode("emptyHash",m),v},blockParamIndex:function(h){for(var a=0,d=this.options.blockParams.length;a<d;a++){var m=this.options.blockParams[a],v=m&&n.indexOf(m,h);if(m&&v>=0)return[a,v]}}};function c(u,h,a){if(u==null||typeof u!="string"&&u.type!=="Program")throw new t.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+u);h=h||{},"data"in h||(h.data=!0),h.compat&&(h.useDepths=!0);var d=a.parse(u,h),m=new a.Compiler().compile(d,h);return new a.JavaScriptCompiler().compile(m,h)}function p(u,h,a){if(h===void 0&&(h={}),u==null||typeof u!="string"&&u.type!=="Program")throw new t.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+u);h=n.extend({},h),"data"in h||(h.data=!0),h.compat&&(h.useDepths=!0);var d=void 0;function m(){var _=a.parse(u,h),S=new a.Compiler().compile(_,h),y=new a.JavaScriptCompiler().compile(S,h,void 0,!0);return a.template(y)}function v(_,S){return d||(d=m()),d.call(this,_,S)}return v._setup=function(_){return d||(d=m()),d._setup(_)},v._child=function(_,S,y,b){return d||(d=m()),d._child(_,S,y,b)},v}function f(u,h){if(u===h)return!0;if(n.isArray(u)&&n.isArray(h)&&u.length===h.length){for(var a=0;a<u.length;a++)if(!f(u[a],h[a]))return!1;return!0}}function g(u){if(!u.path.parts){var h=u.path;u.path={type:"PathExpression",data:!1,depth:0,parts:[h.original+""],original:h.original+"",loc:h.loc}}}return qt}var Gs={exports:{}},Xs={exports:{}},es={},Rr={},Ys={},Js={},xi;function Wa(){if(xi)return Js;xi=1;var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Js.encode=function(e){if(0<=e&&e<s.length)return s[e];throw new TypeError("Must be between 0 and 63: "+e)},Js.decode=function(e){var t=65,n=90,r=97,o=122,i=48,l=57,c=43,p=47,f=26,g=52;return t<=e&&e<=n?e-t:r<=e&&e<=o?e-r+f:i<=e&&e<=l?e-i+g:e==c?62:e==p?63:-1},Js}var wi;function Ti(){if(wi)return Ys;wi=1;var s=Wa(),e=5,t=1<<e,n=t-1,r=t;function o(l){return l<0?(-l<<1)+1:(l<<1)+0}function i(l){var c=(l&1)===1,p=l>>1;return c?-p:p}return Ys.encode=function(c){var p="",f,g=o(c);do f=g&n,g>>>=e,g>0&&(f|=r),p+=s.encode(f);while(g>0);return p},Ys.decode=function(c,p,f){var g=c.length,u=0,h=0,a,d;do{if(p>=g)throw new Error("Expected more digits in base 64 VLQ value.");if(d=s.decode(c.charCodeAt(p++)),d===-1)throw new Error("Invalid base64 digit: "+c.charAt(p-1));a=!!(d&r),d&=n,u=u+(d<<h),h+=e}while(a);f.value=i(u),f.rest=p},Ys}var Or={},Ci;function ts(){return Ci||(Ci=1,(function(s){function e(y,b,k){if(b in y)return y[b];if(arguments.length===3)return k;throw new Error(\'"\'+b+\'" is a required argument.\')}s.getArg=e;var t=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,n=/^data:.+\\,.+$/;function r(y){var b=y.match(t);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}s.urlParse=r;function o(y){var b="";return y.scheme&&(b+=y.scheme+":"),b+="//",y.auth&&(b+=y.auth+"@"),y.host&&(b+=y.host),y.port&&(b+=":"+y.port),y.path&&(b+=y.path),b}s.urlGenerate=o;function i(y){var b=y,k=r(y);if(k){if(!k.path)return y;b=k.path}for(var x=s.isAbsolute(b),C=b.split(/\\/+/),O,P=0,w=C.length-1;w>=0;w--)O=C[w],O==="."?C.splice(w,1):O===".."?P++:P>0&&(O===""?(C.splice(w+1,P),P=0):(C.splice(w,2),P--));return b=C.join("/"),b===""&&(b=x?"/":"."),k?(k.path=b,o(k)):b}s.normalize=i;function l(y,b){y===""&&(y="."),b===""&&(b=".");var k=r(b),x=r(y);if(x&&(y=x.path||"/"),k&&!k.scheme)return x&&(k.scheme=x.scheme),o(k);if(k||b.match(n))return b;if(x&&!x.host&&!x.path)return x.host=b,o(x);var C=b.charAt(0)==="/"?b:i(y.replace(/\\/+$/,"")+"/"+b);return x?(x.path=C,o(x)):C}s.join=l,s.isAbsolute=function(y){return y.charAt(0)==="/"||t.test(y)};function c(y,b){y===""&&(y="."),y=y.replace(/\\/$/,"");for(var k=0;b.indexOf(y+"/")!==0;){var x=y.lastIndexOf("/");if(x<0||(y=y.slice(0,x),y.match(/^([^\\/]+:\\/)?\\/*$/)))return b;++k}return Array(k+1).join("../")+b.substr(y.length+1)}s.relative=c;var p=(function(){var y=Object.create(null);return!("__proto__"in y)})();function f(y){return y}function g(y){return h(y)?"$"+y:y}s.toSetString=p?f:g;function u(y){return h(y)?y.slice(1):y}s.fromSetString=p?f:u;function h(y){if(!y)return!1;var b=y.length;if(b<9||y.charCodeAt(b-1)!==95||y.charCodeAt(b-2)!==95||y.charCodeAt(b-3)!==111||y.charCodeAt(b-4)!==116||y.charCodeAt(b-5)!==111||y.charCodeAt(b-6)!==114||y.charCodeAt(b-7)!==112||y.charCodeAt(b-8)!==95||y.charCodeAt(b-9)!==95)return!1;for(var k=b-10;k>=0;k--)if(y.charCodeAt(k)!==36)return!1;return!0}function a(y,b,k){var x=m(y.source,b.source);return x!==0||(x=y.originalLine-b.originalLine,x!==0)||(x=y.originalColumn-b.originalColumn,x!==0||k)||(x=y.generatedColumn-b.generatedColumn,x!==0)||(x=y.generatedLine-b.generatedLine,x!==0)?x:m(y.name,b.name)}s.compareByOriginalPositions=a;function d(y,b,k){var x=y.generatedLine-b.generatedLine;return x!==0||(x=y.generatedColumn-b.generatedColumn,x!==0||k)||(x=m(y.source,b.source),x!==0)||(x=y.originalLine-b.originalLine,x!==0)||(x=y.originalColumn-b.originalColumn,x!==0)?x:m(y.name,b.name)}s.compareByGeneratedPositionsDeflated=d;function m(y,b){return y===b?0:y===null?1:b===null?-1:y>b?1:-1}function v(y,b){var k=y.generatedLine-b.generatedLine;return k!==0||(k=y.generatedColumn-b.generatedColumn,k!==0)||(k=m(y.source,b.source),k!==0)||(k=y.originalLine-b.originalLine,k!==0)||(k=y.originalColumn-b.originalColumn,k!==0)?k:m(y.name,b.name)}s.compareByGeneratedPositionsInflated=v;function _(y){return JSON.parse(y.replace(/^\\)]}\'[^\\n]*\\n/,""))}s.parseSourceMapInput=_;function S(y,b,k){if(b=b||"",y&&(y[y.length-1]!=="/"&&b[0]!=="/"&&(y+="/"),b=y+b),k){var x=r(k);if(!x)throw new Error("sourceMapURL could not be parsed");if(x.path){var C=x.path.lastIndexOf("/");C>=0&&(x.path=x.path.substring(0,C+1))}b=l(o(x),b)}return i(b)}s.computeSourceURL=S})(Or)),Or}var Mr={},Pi;function Ei(){if(Pi)return Mr;Pi=1;var s=ts(),e=Object.prototype.hasOwnProperty,t=typeof Map<"u";function n(){this._array=[],this._set=t?new Map:Object.create(null)}return n.fromArray=function(o,i){for(var l=new n,c=0,p=o.length;c<p;c++)l.add(o[c],i);return l},n.prototype.size=function(){return t?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(o,i){var l=t?o:s.toSetString(o),c=t?this.has(o):e.call(this._set,l),p=this._array.length;(!c||i)&&this._array.push(o),c||(t?this._set.set(o,p):this._set[l]=p)},n.prototype.has=function(o){if(t)return this._set.has(o);var i=s.toSetString(o);return e.call(this._set,i)},n.prototype.indexOf=function(o){if(t){var i=this._set.get(o);if(i>=0)return i}else{var l=s.toSetString(o);if(e.call(this._set,l))return this._set[l]}throw new Error(\'"\'+o+\'" is not in the set.\')},n.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},n.prototype.toArray=function(){return this._array.slice()},Mr.ArraySet=n,Mr}var Ir={},Li;function Ga(){if(Li)return Ir;Li=1;var s=ts();function e(n,r){var o=n.generatedLine,i=r.generatedLine,l=n.generatedColumn,c=r.generatedColumn;return i>o||i==o&&c>=l||s.compareByGeneratedPositionsInflated(n,r)<=0}function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(r,o){this._array.forEach(r,o)},t.prototype.add=function(r){e(this._last,r)?(this._last=r,this._array.push(r)):(this._sorted=!1,this._array.push(r))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Ir.MappingList=t,Ir}var Ai;function Ri(){if(Ai)return Rr;Ai=1;var s=Ti(),e=ts(),t=Ei().ArraySet,n=Ga().MappingList;function r(o){o||(o={}),this._file=e.getArg(o,"file",null),this._sourceRoot=e.getArg(o,"sourceRoot",null),this._skipValidation=e.getArg(o,"skipValidation",!1),this._sources=new t,this._names=new t,this._mappings=new n,this._sourcesContents=null}return r.prototype._version=3,r.fromSourceMap=function(i){var l=i.sourceRoot,c=new r({file:i.file,sourceRoot:l});return i.eachMapping(function(p){var f={generated:{line:p.generatedLine,column:p.generatedColumn}};p.source!=null&&(f.source=p.source,l!=null&&(f.source=e.relative(l,f.source)),f.original={line:p.originalLine,column:p.originalColumn},p.name!=null&&(f.name=p.name)),c.addMapping(f)}),i.sources.forEach(function(p){var f=p;l!==null&&(f=e.relative(l,p)),c._sources.has(f)||c._sources.add(f);var g=i.sourceContentFor(p);g!=null&&c.setSourceContent(p,g)}),c},r.prototype.addMapping=function(i){var l=e.getArg(i,"generated"),c=e.getArg(i,"original",null),p=e.getArg(i,"source",null),f=e.getArg(i,"name",null);this._skipValidation||this._validateMapping(l,c,p,f),p!=null&&(p=String(p),this._sources.has(p)||this._sources.add(p)),f!=null&&(f=String(f),this._names.has(f)||this._names.add(f)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:c!=null&&c.line,originalColumn:c!=null&&c.column,source:p,name:f})},r.prototype.setSourceContent=function(i,l){var c=i;this._sourceRoot!=null&&(c=e.relative(this._sourceRoot,c)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(c)]=l):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(c)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(i,l,c){var p=l;if(l==null){if(i.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.`);p=i.file}var f=this._sourceRoot;f!=null&&(p=e.relative(f,p));var g=new t,u=new t;this._mappings.unsortedForEach(function(h){if(h.source===p&&h.originalLine!=null){var a=i.originalPositionFor({line:h.originalLine,column:h.originalColumn});a.source!=null&&(h.source=a.source,c!=null&&(h.source=e.join(c,h.source)),f!=null&&(h.source=e.relative(f,h.source)),h.originalLine=a.line,h.originalColumn=a.column,a.name!=null&&(h.name=a.name))}var d=h.source;d!=null&&!g.has(d)&&g.add(d);var m=h.name;m!=null&&!u.has(m)&&u.add(m)},this),this._sources=g,this._names=u,i.sources.forEach(function(h){var a=i.sourceContentFor(h);a!=null&&(c!=null&&(h=e.join(c,h)),f!=null&&(h=e.relative(f,h)),this.setSourceContent(h,a))},this)},r.prototype._validateMapping=function(i,l,c,p){if(l&&typeof l.line!="number"&&typeof l.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(i&&"line"in i&&"column"in i&&i.line>0&&i.column>=0&&!l&&!c&&!p)){if(i&&"line"in i&&"column"in i&&l&&"line"in l&&"column"in l&&i.line>0&&i.column>=0&&l.line>0&&l.column>=0&&c)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:i,source:c,original:l,name:p}))}},r.prototype._serializeMappings=function(){for(var i=0,l=1,c=0,p=0,f=0,g=0,u="",h,a,d,m,v=this._mappings.toArray(),_=0,S=v.length;_<S;_++){if(a=v[_],h="",a.generatedLine!==l)for(i=0;a.generatedLine!==l;)h+=";",l++;else if(_>0){if(!e.compareByGeneratedPositionsInflated(a,v[_-1]))continue;h+=","}h+=s.encode(a.generatedColumn-i),i=a.generatedColumn,a.source!=null&&(m=this._sources.indexOf(a.source),h+=s.encode(m-g),g=m,h+=s.encode(a.originalLine-1-p),p=a.originalLine-1,h+=s.encode(a.originalColumn-c),c=a.originalColumn,a.name!=null&&(d=this._names.indexOf(a.name),h+=s.encode(d-f),f=d)),u+=h}return u},r.prototype._generateSourcesContent=function(i,l){return i.map(function(c){if(!this._sourcesContents)return null;l!=null&&(c=e.relative(l,c));var p=e.toSetString(c);return Object.prototype.hasOwnProperty.call(this._sourcesContents,p)?this._sourcesContents[p]:null},this)},r.prototype.toJSON=function(){var i={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(i.file=this._file),this._sourceRoot!=null&&(i.sourceRoot=this._sourceRoot),this._sourcesContents&&(i.sourcesContent=this._generateSourcesContent(i.sources,i.sourceRoot)),i},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},Rr.SourceMapGenerator=r,Rr}var ss={},Nr={},Oi;function Xa(){return Oi||(Oi=1,(function(s){s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2;function e(t,n,r,o,i,l){var c=Math.floor((n-t)/2)+t,p=i(r,o[c],!0);return p===0?c:p>0?n-c>1?e(c,n,r,o,i,l):l==s.LEAST_UPPER_BOUND?n<o.length?n:-1:c:c-t>1?e(t,c,r,o,i,l):l==s.LEAST_UPPER_BOUND?c:t<0?-1:t}s.search=function(n,r,o,i){if(r.length===0)return-1;var l=e(-1,r.length,n,r,o,i||s.GREATEST_LOWER_BOUND);if(l<0)return-1;for(;l-1>=0&&o(r[l],r[l-1],!0)===0;)--l;return l}})(Nr)),Nr}var Br={},Mi;function Ya(){if(Mi)return Br;Mi=1;function s(n,r,o){var i=n[r];n[r]=n[o],n[o]=i}function e(n,r){return Math.round(n+Math.random()*(r-n))}function t(n,r,o,i){if(o<i){var l=e(o,i),c=o-1;s(n,l,i);for(var p=n[i],f=o;f<i;f++)r(n[f],p)<=0&&(c+=1,s(n,c,f));s(n,c+1,f);var g=c+1;t(n,r,o,g-1),t(n,r,g+1,i)}}return Br.quickSort=function(n,r){t(n,r,0,n.length-1)},Br}var Ii;function Ja(){if(Ii)return ss;Ii=1;var s=ts(),e=Xa(),t=Ei().ArraySet,n=Ti(),r=Ya().quickSort;function o(p,f){var g=p;return typeof p=="string"&&(g=s.parseSourceMapInput(p)),g.sections!=null?new c(g,f):new i(g,f)}o.fromSourceMap=function(p,f){return i.fromSourceMap(p,f)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(f,g){var u=f.charAt(g);return u===";"||u===","},o.prototype._parseMappings=function(f,g){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(f,g,u){var h=g||null,a=u||o.GENERATED_ORDER,d;switch(a){case o.GENERATED_ORDER:d=this._generatedMappings;break;case o.ORIGINAL_ORDER:d=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var m=this.sourceRoot;d.map(function(v){var _=v.source===null?null:this._sources.at(v.source);return _=s.computeSourceURL(m,_,this._sourceMapURL),{source:_,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:this._names.at(v.name)}},this).forEach(f,h)},o.prototype.allGeneratedPositionsFor=function(f){var g=s.getArg(f,"line"),u={source:s.getArg(f,"source"),originalLine:g,originalColumn:s.getArg(f,"column",0)};if(u.source=this._findSourceIndex(u.source),u.source<0)return[];var h=[],a=this._findMapping(u,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,e.LEAST_UPPER_BOUND);if(a>=0){var d=this._originalMappings[a];if(f.column===void 0)for(var m=d.originalLine;d&&d.originalLine===m;)h.push({line:s.getArg(d,"generatedLine",null),column:s.getArg(d,"generatedColumn",null),lastColumn:s.getArg(d,"lastGeneratedColumn",null)}),d=this._originalMappings[++a];else for(var v=d.originalColumn;d&&d.originalLine===g&&d.originalColumn==v;)h.push({line:s.getArg(d,"generatedLine",null),column:s.getArg(d,"generatedColumn",null),lastColumn:s.getArg(d,"lastGeneratedColumn",null)}),d=this._originalMappings[++a]}return h},ss.SourceMapConsumer=o;function i(p,f){var g=p;typeof p=="string"&&(g=s.parseSourceMapInput(p));var u=s.getArg(g,"version"),h=s.getArg(g,"sources"),a=s.getArg(g,"names",[]),d=s.getArg(g,"sourceRoot",null),m=s.getArg(g,"sourcesContent",null),v=s.getArg(g,"mappings"),_=s.getArg(g,"file",null);if(u!=this._version)throw new Error("Unsupported version: "+u);d&&(d=s.normalize(d)),h=h.map(String).map(s.normalize).map(function(S){return d&&s.isAbsolute(d)&&s.isAbsolute(S)?s.relative(d,S):S}),this._names=t.fromArray(a.map(String),!0),this._sources=t.fromArray(h,!0),this._absoluteSources=this._sources.toArray().map(function(S){return s.computeSourceURL(d,S,f)}),this.sourceRoot=d,this.sourcesContent=m,this._mappings=v,this._sourceMapURL=f,this.file=_}i.prototype=Object.create(o.prototype),i.prototype.consumer=o,i.prototype._findSourceIndex=function(p){var f=p;if(this.sourceRoot!=null&&(f=s.relative(this.sourceRoot,f)),this._sources.has(f))return this._sources.indexOf(f);var g;for(g=0;g<this._absoluteSources.length;++g)if(this._absoluteSources[g]==p)return g;return-1},i.fromSourceMap=function(f,g){var u=Object.create(i.prototype),h=u._names=t.fromArray(f._names.toArray(),!0),a=u._sources=t.fromArray(f._sources.toArray(),!0);u.sourceRoot=f._sourceRoot,u.sourcesContent=f._generateSourcesContent(u._sources.toArray(),u.sourceRoot),u.file=f._file,u._sourceMapURL=g,u._absoluteSources=u._sources.toArray().map(function(k){return s.computeSourceURL(u.sourceRoot,k,g)});for(var d=f._mappings.toArray().slice(),m=u.__generatedMappings=[],v=u.__originalMappings=[],_=0,S=d.length;_<S;_++){var y=d[_],b=new l;b.generatedLine=y.generatedLine,b.generatedColumn=y.generatedColumn,y.source&&(b.source=a.indexOf(y.source),b.originalLine=y.originalLine,b.originalColumn=y.originalColumn,y.name&&(b.name=h.indexOf(y.name)),v.push(b)),m.push(b)}return r(u.__originalMappings,s.compareByOriginalPositions),u},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}i.prototype._parseMappings=function(f,g){for(var u=1,h=0,a=0,d=0,m=0,v=0,_=f.length,S=0,y={},b={},k=[],x=[],C,O,P,w,E;S<_;)if(f.charAt(S)===";")u++,S++,h=0;else if(f.charAt(S)===",")S++;else{for(C=new l,C.generatedLine=u,w=S;w<_&&!this._charIsMappingSeparator(f,w);w++);if(O=f.slice(S,w),P=y[O],P)S+=O.length;else{for(P=[];S<w;)n.decode(f,S,b),E=b.value,S=b.rest,P.push(E);if(P.length===2)throw new Error("Found a source, but no line and column");if(P.length===3)throw new Error("Found a source and line, but no column");y[O]=P}C.generatedColumn=h+P[0],h=C.generatedColumn,P.length>1&&(C.source=m+P[1],m+=P[1],C.originalLine=a+P[2],a=C.originalLine,C.originalLine+=1,C.originalColumn=d+P[3],d=C.originalColumn,P.length>4&&(C.name=v+P[4],v+=P[4])),x.push(C),typeof C.originalLine=="number"&&k.push(C)}r(x,s.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,r(k,s.compareByOriginalPositions),this.__originalMappings=k},i.prototype._findMapping=function(f,g,u,h,a,d){if(f[u]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+f[u]);if(f[h]<0)throw new TypeError("Column must be greater than or equal to 0, got "+f[h]);return e.search(f,g,a,d)},i.prototype.computeColumnSpans=function(){for(var f=0;f<this._generatedMappings.length;++f){var g=this._generatedMappings[f];if(f+1<this._generatedMappings.length){var u=this._generatedMappings[f+1];if(g.generatedLine===u.generatedLine){g.lastGeneratedColumn=u.generatedColumn-1;continue}}g.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(f){var g={generatedLine:s.getArg(f,"line"),generatedColumn:s.getArg(f,"column")},u=this._findMapping(g,this._generatedMappings,"generatedLine","generatedColumn",s.compareByGeneratedPositionsDeflated,s.getArg(f,"bias",o.GREATEST_LOWER_BOUND));if(u>=0){var h=this._generatedMappings[u];if(h.generatedLine===g.generatedLine){var a=s.getArg(h,"source",null);a!==null&&(a=this._sources.at(a),a=s.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var d=s.getArg(h,"name",null);return d!==null&&(d=this._names.at(d)),{source:a,line:s.getArg(h,"originalLine",null),column:s.getArg(h,"originalColumn",null),name:d}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(f){return f==null}):!1},i.prototype.sourceContentFor=function(f,g){if(!this.sourcesContent)return null;var u=this._findSourceIndex(f);if(u>=0)return this.sourcesContent[u];var h=f;this.sourceRoot!=null&&(h=s.relative(this.sourceRoot,h));var a;if(this.sourceRoot!=null&&(a=s.urlParse(this.sourceRoot))){var d=h.replace(/^file:\\/\\//,"");if(a.scheme=="file"&&this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)];if((!a.path||a.path=="/")&&this._sources.has("/"+h))return this.sourcesContent[this._sources.indexOf("/"+h)]}if(g)return null;throw new Error(\'"\'+h+\'" is not in the SourceMap.\')},i.prototype.generatedPositionFor=function(f){var g=s.getArg(f,"source");if(g=this._findSourceIndex(g),g<0)return{line:null,column:null,lastColumn:null};var u={source:g,originalLine:s.getArg(f,"line"),originalColumn:s.getArg(f,"column")},h=this._findMapping(u,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,s.getArg(f,"bias",o.GREATEST_LOWER_BOUND));if(h>=0){var a=this._originalMappings[h];if(a.source===u.source)return{line:s.getArg(a,"generatedLine",null),column:s.getArg(a,"generatedColumn",null),lastColumn:s.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},ss.BasicSourceMapConsumer=i;function c(p,f){var g=p;typeof p=="string"&&(g=s.parseSourceMapInput(p));var u=s.getArg(g,"version"),h=s.getArg(g,"sections");if(u!=this._version)throw new Error("Unsupported version: "+u);this._sources=new t,this._names=new t;var a={line:-1,column:0};this._sections=h.map(function(d){if(d.url)throw new Error("Support for url field in sections not implemented.");var m=s.getArg(d,"offset"),v=s.getArg(m,"line"),_=s.getArg(m,"column");if(v<a.line||v===a.line&&_<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=m,{generatedOffset:{generatedLine:v+1,generatedColumn:_+1},consumer:new o(s.getArg(d,"map"),f)}})}return c.prototype=Object.create(o.prototype),c.prototype.constructor=o,c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){for(var p=[],f=0;f<this._sections.length;f++)for(var g=0;g<this._sections[f].consumer.sources.length;g++)p.push(this._sections[f].consumer.sources[g]);return p}}),c.prototype.originalPositionFor=function(f){var g={generatedLine:s.getArg(f,"line"),generatedColumn:s.getArg(f,"column")},u=e.search(g,this._sections,function(a,d){var m=a.generatedLine-d.generatedOffset.generatedLine;return m||a.generatedColumn-d.generatedOffset.generatedColumn}),h=this._sections[u];return h?h.consumer.originalPositionFor({line:g.generatedLine-(h.generatedOffset.generatedLine-1),column:g.generatedColumn-(h.generatedOffset.generatedLine===g.generatedLine?h.generatedOffset.generatedColumn-1:0),bias:f.bias}):{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(f){return f.consumer.hasContentsOfAllSources()})},c.prototype.sourceContentFor=function(f,g){for(var u=0;u<this._sections.length;u++){var h=this._sections[u],a=h.consumer.sourceContentFor(f,!0);if(a)return a}if(g)return null;throw new Error(\'"\'+f+\'" is not in the SourceMap.\')},c.prototype.generatedPositionFor=function(f){for(var g=0;g<this._sections.length;g++){var u=this._sections[g];if(u.consumer._findSourceIndex(s.getArg(f,"source"))!==-1){var h=u.consumer.generatedPositionFor(f);if(h){var a={line:h.line+(u.generatedOffset.generatedLine-1),column:h.column+(u.generatedOffset.generatedLine===h.line?u.generatedOffset.generatedColumn-1:0)};return a}}}return{line:null,column:null}},c.prototype._parseMappings=function(f,g){this.__generatedMappings=[],this.__originalMappings=[];for(var u=0;u<this._sections.length;u++)for(var h=this._sections[u],a=h.consumer._generatedMappings,d=0;d<a.length;d++){var m=a[d],v=h.consumer._sources.at(m.source);v=s.computeSourceURL(h.consumer.sourceRoot,v,this._sourceMapURL),this._sources.add(v),v=this._sources.indexOf(v);var _=null;m.name&&(_=h.consumer._names.at(m.name),this._names.add(_),_=this._names.indexOf(_));var S={source:v,generatedLine:m.generatedLine+(h.generatedOffset.generatedLine-1),generatedColumn:m.generatedColumn+(h.generatedOffset.generatedLine===m.generatedLine?h.generatedOffset.generatedColumn-1:0),originalLine:m.originalLine,originalColumn:m.originalColumn,name:_};this.__generatedMappings.push(S),typeof S.originalLine=="number"&&this.__originalMappings.push(S)}r(this.__generatedMappings,s.compareByGeneratedPositionsDeflated),r(this.__originalMappings,s.compareByOriginalPositions)},ss.IndexedSourceMapConsumer=c,ss}var Dr={},Ni;function Qa(){if(Ni)return Dr;Ni=1;var s=Ri().SourceMapGenerator,e=ts(),t=/(\\r?\\n)/,n=10,r="$$$isSourceNode$$$";function o(i,l,c,p,f){this.children=[],this.sourceContents={},this.line=i??null,this.column=l??null,this.source=c??null,this.name=f??null,this[r]=!0,p!=null&&this.add(p)}return o.fromStringWithSourceMap=function(l,c,p){var f=new o,g=l.split(t),u=0,h=function(){var _=y(),S=y()||"";return _+S;function y(){return u<g.length?g[u++]:void 0}},a=1,d=0,m=null;return c.eachMapping(function(_){if(m!==null)if(a<_.generatedLine)v(m,h()),a++,d=0;else{var S=g[u]||"",y=S.substr(0,_.generatedColumn-d);g[u]=S.substr(_.generatedColumn-d),d=_.generatedColumn,v(m,y),m=_;return}for(;a<_.generatedLine;)f.add(h()),a++;if(d<_.generatedColumn){var S=g[u]||"";f.add(S.substr(0,_.generatedColumn)),g[u]=S.substr(_.generatedColumn),d=_.generatedColumn}m=_},this),u<g.length&&(m&&v(m,h()),f.add(g.splice(u).join(""))),c.sources.forEach(function(_){var S=c.sourceContentFor(_);S!=null&&(p!=null&&(_=e.join(p,_)),f.setSourceContent(_,S))}),f;function v(_,S){if(_===null||_.source===void 0)f.add(S);else{var y=p?e.join(p,_.source):_.source;f.add(new o(_.originalLine,_.originalColumn,y,S,_.name))}}},o.prototype.add=function(l){if(Array.isArray(l))l.forEach(function(c){this.add(c)},this);else if(l[r]||typeof l=="string")l&&this.children.push(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},o.prototype.prepend=function(l){if(Array.isArray(l))for(var c=l.length-1;c>=0;c--)this.prepend(l[c]);else if(l[r]||typeof l=="string")this.children.unshift(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},o.prototype.walk=function(l){for(var c,p=0,f=this.children.length;p<f;p++)c=this.children[p],c[r]?c.walk(l):c!==""&&l(c,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(l){var c,p,f=this.children.length;if(f>0){for(c=[],p=0;p<f-1;p++)c.push(this.children[p]),c.push(l);c.push(this.children[p]),this.children=c}return this},o.prototype.replaceRight=function(l,c){var p=this.children[this.children.length-1];return p[r]?p.replaceRight(l,c):typeof p=="string"?this.children[this.children.length-1]=p.replace(l,c):this.children.push("".replace(l,c)),this},o.prototype.setSourceContent=function(l,c){this.sourceContents[e.toSetString(l)]=c},o.prototype.walkSourceContents=function(l){for(var c=0,p=this.children.length;c<p;c++)this.children[c][r]&&this.children[c].walkSourceContents(l);for(var f=Object.keys(this.sourceContents),c=0,p=f.length;c<p;c++)l(e.fromSetString(f[c]),this.sourceContents[f[c]])},o.prototype.toString=function(){var l="";return this.walk(function(c){l+=c}),l},o.prototype.toStringWithSourceMap=function(l){var c={code:"",line:1,column:0},p=new s(l),f=!1,g=null,u=null,h=null,a=null;return this.walk(function(d,m){c.code+=d,m.source!==null&&m.line!==null&&m.column!==null?((g!==m.source||u!==m.line||h!==m.column||a!==m.name)&&p.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:c.line,column:c.column},name:m.name}),g=m.source,u=m.line,h=m.column,a=m.name,f=!0):f&&(p.addMapping({generated:{line:c.line,column:c.column}}),g=null,f=!1);for(var v=0,_=d.length;v<_;v++)d.charCodeAt(v)===n?(c.line++,c.column=0,v+1===_?(g=null,f=!1):f&&p.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:c.line,column:c.column},name:m.name})):c.column++}),this.walkSourceContents(function(d,m){p.setSourceContent(d,m)}),{code:c.code,map:p}},Dr.SourceNode=o,Dr}var Bi;function Ka(){return Bi||(Bi=1,es.SourceMapGenerator=Ri().SourceMapGenerator,es.SourceMapConsumer=Ja().SourceMapConsumer,es.SourceNode=Qa().SourceNode),es}var Di;function Za(){return Di||(Di=1,(function(s,e){e.__esModule=!0;var t=Fe(),n=void 0;try{var r=Ka();n=r.SourceNode}catch{}n||(n=function(l,c,p,f){this.src="",f&&this.add(f)},n.prototype={add:function(c){t.isArray(c)&&(c=c.join("")),this.src+=c},prepend:function(c){t.isArray(c)&&(c=c.join("")),this.src=c+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function o(l,c,p){if(t.isArray(l)){for(var f=[],g=0,u=l.length;g<u;g++)f.push(c.wrap(l[g],p));return f}else if(typeof l=="boolean"||typeof l=="number")return l+"";return l}function i(l){this.srcFile=l,this.source=[]}i.prototype={isEmpty:function(){return!this.source.length},prepend:function(c,p){this.source.unshift(this.wrap(c,p))},push:function(c,p){this.source.push(this.wrap(c,p))},merge:function(){var c=this.empty();return this.each(function(p){c.add([" ",p,`\n`])}),c},each:function(c){for(var p=0,f=this.source.length;p<f;p++)c(this.source[p])},empty:function(){var c=this.currentLocation||{start:{}};return new n(c.start.line,c.start.column,this.srcFile)},wrap:function(c){var p=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return c instanceof n?c:(c=o(c,this,p),new n(p.start.line,p.start.column,this.srcFile,c))},functionCall:function(c,p,f){return f=this.generateList(f),this.wrap([c,p?"."+p+"(":"(",f,")"])},quotedString:function(c){return\'"\'+(c+"").replace(/\\\\/g,"\\\\\\\\").replace(/"/g,\'\\\\"\').replace(/\\n/g,"\\\\n").replace(/\\r/g,"\\\\r").replace(/\\u2028/g,"\\\\u2028").replace(/\\u2029/g,"\\\\u2029")+\'"\'},objectLiteral:function(c){var p=this,f=[];Object.keys(c).forEach(function(u){var h=o(c[u],p);h!=="undefined"&&f.push([p.quotedString(u),":",h])});var g=this.generateList(f);return g.prepend("{"),g.add("}"),g},generateList:function(c){for(var p=this.empty(),f=0,g=c.length;f<g;f++)f&&p.add(","),p.add(o(c[f],this));return p},generateArray:function(c){var p=this.generateList(c);return p.prepend("["),p.add("]"),p}},e.default=i,s.exports=e.default})(Xs,Xs.exports)),Xs.exports}var qi;function ja(){return qi||(qi=1,(function(s,e){e.__esModule=!0;function t(u){return u&&u.__esModule?u:{default:u}}var n=Ar(),r=rt(),o=t(r),i=Fe(),l=Za(),c=t(l);function p(u){this.value=u}function f(){}f.prototype={nameLookup:function(h,a){return this.internalNameLookup(h,a)},depthedLookup:function(h){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(h),")"]},compilerInfo:function(){var h=n.COMPILER_REVISION,a=n.REVISION_CHANGES[h];return[h,a]},appendToBuffer:function(h,a,d){return i.isArray(h)||(h=[h]),h=this.source.wrap(h,a),this.environment.isSimple?["return ",h,";"]:d?["buffer += ",h,";"]:(h.appendToBuffer=!0,h)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(h,a){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",h,",",JSON.stringify(a),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(h,a,d,m){this.environment=h,this.options=a,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!m,this.name=this.environment.name,this.isChild=!!d,this.context=d||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(h,a),this.useDepths=this.useDepths||h.useDepths||h.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||h.useBlockParams;var v=h.opcodes,_=void 0,S=void 0,y=void 0,b=void 0;for(y=0,b=v.length;y<b;y++)_=v[y],this.source.currentLocation=_.loc,S=S||_.loc,this[_.opcode].apply(this,_.args);if(this.source.currentLocation=S,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new o.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;\n`]),this.decorators.push("return fn;"),m?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {\n`),this.decorators.push(`}\n`),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(m);if(this.isChild)return k;var x={compiler:this.compilerInfo(),main:k};this.decorators&&(x.main_d=this.decorators,x.useDecorators=!0);var C=this.context,O=C.programs,P=C.decorators;for(y=0,b=O.length;y<b;y++)O[y]&&(x[y]=O[y],P[y]&&(x[y+"_d"]=P[y],x.useDecorators=!0));return this.environment.usePartial&&(x.usePartial=!0),this.options.data&&(x.useData=!0),this.useDepths&&(x.useDepths=!0),this.useBlockParams&&(x.useBlockParams=!0),this.options.compat&&(x.compat=!0),m?x.compilerOptions=this.options:(x.compiler=JSON.stringify(x.compiler),this.source.currentLocation={start:{line:1,column:0}},x=this.objectLiteral(x),a.srcName?(x=x.toStringWithSourceMap({file:a.destName}),x.map=x.map&&x.map.toString()):x=x.toString()),x},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(h){var a=this,d="",m=this.stackVars.concat(this.registers.list);m.length>0&&(d+=", "+m.join(", "));var v=0;Object.keys(this.aliases).forEach(function(y){var b=a.aliases[y];b.children&&b.referenceCount>1&&(d+=", alias"+ ++v+"="+y,b.children[0]="alias"+v)}),this.lookupPropertyFunctionIsUsed&&(d+=", "+this.lookupPropertyFunctionVarDeclaration());var _=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&_.push("blockParams"),this.useDepths&&_.push("depths");var S=this.mergeSource(d);return h?(_.push(S),Function.apply(this,_)):this.source.wrap(["function(",_.join(","),`) {\n `,S,"}"])},mergeSource:function(h){var a=this.environment.isSimple,d=!this.forceBuffer,m=void 0,v=void 0,_=void 0,S=void 0;return this.source.each(function(y){y.appendToBuffer?(_?y.prepend(" + "):_=y,S=y):(_&&(v?_.prepend("buffer += "):m=!0,S.add(";"),_=S=void 0),v=!0,a||(d=!1))}),d?_?(_.prepend("return "),S.add(";")):v||this.source.push(\'return "";\'):(h+=", buffer = "+(m?"":this.initializeBuffer()),_?(_.prepend("return buffer + "),S.add(";")):this.source.push("return buffer;")),h&&this.source.prepend("var "+h.substring(2)+(m?"":`;\n`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n `.trim()},blockValue:function(h){var a=this.aliasable("container.hooks.blockHelperMissing"),d=[this.contextName(0)];this.setupHelperArgs(h,0,d);var m=this.popStack();d.splice(1,0,m),this.push(this.source.functionCall(a,"call",d))},ambiguousBlockValue:function(){var h=this.aliasable("container.hooks.blockHelperMissing"),a=[this.contextName(0)];this.setupHelperArgs("",0,a,!0),this.flushInline();var d=this.topStack();a.splice(1,0,d),this.pushSource(["if (!",this.lastHelper,") { ",d," = ",this.source.functionCall(h,"call",a),"}"])},appendContent:function(h){this.pendingContent?h=this.pendingContent+h:this.pendingLocation=this.source.currentLocation,this.pendingContent=h},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,\' : ""\']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var h=this.popStack();this.pushSource(["if (",h," != null) { ",this.appendToBuffer(h,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("\'\'",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(h){this.lastContext=h},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(h,a,d,m){var v=0;!m&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(h[v++])):this.pushContext(),this.resolvePath("context",h,v,a,d)},lookupBlockParam:function(h,a){this.useBlockParams=!0,this.push(["blockParams[",h[0],"][",h[1],"]"]),this.resolvePath("context",a,1)},lookupData:function(h,a,d){h?this.pushStackLiteral("container.data(data, "+h+")"):this.pushStackLiteral("data"),this.resolvePath("data",a,0,!0,d)},resolvePath:function(h,a,d,m,v){var _=this;if(this.options.strict||this.options.assumeObjects){this.push(g(this.options.strict&&v,this,a,d,h));return}for(var S=a.length;d<S;d++)this.replaceStack(function(y){var b=_.nameLookup(y,a[d],h);return m?[" && ",b]:[" != null ? ",b," : ",y]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(h,a){this.pushContext(),this.pushString(a),a!=="SubExpression"&&(typeof h=="string"?this.pushString(h):this.pushStackLiteral(h))},emptyHash:function(h){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(h?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var h=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(h.ids)),this.stringParams&&(this.push(this.objectLiteral(h.contexts)),this.push(this.objectLiteral(h.types))),this.push(this.objectLiteral(h.values))},pushString:function(h){this.pushStackLiteral(this.quotedString(h))},pushLiteral:function(h){this.pushStackLiteral(h)},pushProgram:function(h){h!=null?this.pushStackLiteral(this.programExpression(h)):this.pushStackLiteral(null)},registerDecorator:function(h,a){var d=this.nameLookup("decorators",a,"decorator"),m=this.setupHelperArgs(a,h);this.decorators.push(["fn = ",this.decorators.functionCall(d,"",["fn","props","container",m])," || fn;"])},invokeHelper:function(h,a,d){var m=this.popStack(),v=this.setupHelper(h,a),_=[];d&&_.push(v.name),_.push(m),this.options.strict||_.push(this.aliasable("container.hooks.helperMissing"));var S=["(",this.itemsSeparatedBy(_,"||"),")"],y=this.source.functionCall(S,"call",v.callParams);this.push(y)},itemsSeparatedBy:function(h,a){var d=[];d.push(h[0]);for(var m=1;m<h.length;m++)d.push(a,h[m]);return d},invokeKnownHelper:function(h,a){var d=this.setupHelper(h,a);this.push(this.source.functionCall(d.name,"call",d.callParams))},invokeAmbiguous:function(h,a){this.useRegister("helper");var d=this.popStack();this.emptyHash();var m=this.setupHelper(0,h,a),v=this.lastHelper=this.nameLookup("helpers",h,"helper"),_=["(","(helper = ",v," || ",d,")"];this.options.strict||(_[0]="(helper = ",_.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",_,m.paramsInit?["),(",m.paramsInit]:[],"),","(typeof helper === ",this.aliasable(\'"function"\')," ? ",this.source.functionCall("helper","call",m.callParams)," : helper))"])},invokePartial:function(h,a,d){var m=[],v=this.setupParams(a,1,m);h&&(a=this.popStack(),delete v.name),d&&(v.indent=JSON.stringify(d)),v.helpers="helpers",v.partials="partials",v.decorators="container.decorators",h?m.unshift(a):m.unshift(this.nameLookup("partials",a,"partial")),this.options.compat&&(v.depths="depths"),v=this.objectLiteral(v),m.push(v),this.push(this.source.functionCall("container.invokePartial","",m))},assignToHash:function(h){var a=this.popStack(),d=void 0,m=void 0,v=void 0;this.trackIds&&(v=this.popStack()),this.stringParams&&(m=this.popStack(),d=this.popStack());var _=this.hash;d&&(_.contexts[h]=d),m&&(_.types[h]=m),v&&(_.ids[h]=v),_.values[h]=a},pushId:function(h,a,d){h==="BlockParam"?this.pushStackLiteral("blockParams["+a[0]+"].path["+a[1]+"]"+(d?" + "+JSON.stringify("."+d):"")):h==="PathExpression"?this.pushString(a):h==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:f,compileChildren:function(h,a){for(var d=h.children,m=void 0,v=void 0,_=0,S=d.length;_<S;_++){m=d[_],v=new this.compiler;var y=this.matchExistingProgram(m);if(y==null){this.context.programs.push("");var b=this.context.programs.length;m.index=b,m.name="program"+b,this.context.programs[b]=v.compile(m,a,this.context,!this.precompile),this.context.decorators[b]=v.decorators,this.context.environments[b]=m,this.useDepths=this.useDepths||v.useDepths,this.useBlockParams=this.useBlockParams||v.useBlockParams,m.useDepths=this.useDepths,m.useBlockParams=this.useBlockParams}else m.index=y.index,m.name="program"+y.index,this.useDepths=this.useDepths||y.useDepths,this.useBlockParams=this.useBlockParams||y.useBlockParams}},matchExistingProgram:function(h){for(var a=0,d=this.context.environments.length;a<d;a++){var m=this.context.environments[a];if(m&&m.equals(h))return m}},programExpression:function(h){var a=this.environment.children[h],d=[a.index,"data",a.blockParams];return(this.useBlockParams||this.useDepths)&&d.push("blockParams"),this.useDepths&&d.push("depths"),"container.program("+d.join(", ")+")"},useRegister:function(h){this.registers[h]||(this.registers[h]=!0,this.registers.list.push(h))},push:function(h){return h instanceof p||(h=this.source.wrap(h)),this.inlineStack.push(h),h},pushStackLiteral:function(h){this.push(new p(h))},pushSource:function(h){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),h&&this.source.push(h)},replaceStack:function(h){var a=["("],d=void 0,m=void 0,v=void 0;if(!this.isInline())throw new o.default("replaceStack on non-inline");var _=this.popStack(!0);if(_ instanceof p)d=[_.value],a=["(",d],v=!0;else{m=!0;var S=this.incrStack();a=["((",this.push(S)," = ",_,")"],d=this.topStack()}var y=h.call(this,d);v||this.popStack(),m&&this.stackSlot--,this.push(a.concat(y,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var h=this.inlineStack;this.inlineStack=[];for(var a=0,d=h.length;a<d;a++){var m=h[a];if(m instanceof p)this.compileStack.push(m);else{var v=this.incrStack();this.pushSource([v," = ",m,";"]),this.compileStack.push(v)}}},isInline:function(){return this.inlineStack.length},popStack:function(h){var a=this.isInline(),d=(a?this.inlineStack:this.compileStack).pop();if(!h&&d instanceof p)return d.value;if(!a){if(!this.stackSlot)throw new o.default("Invalid stack pop");this.stackSlot--}return d},topStack:function(){var h=this.isInline()?this.inlineStack:this.compileStack,a=h[h.length-1];return a instanceof p?a.value:a},contextName:function(h){return this.useDepths&&h?"depths["+h+"]":"depth"+h},quotedString:function(h){return this.source.quotedString(h)},objectLiteral:function(h){return this.source.objectLiteral(h)},aliasable:function(h){var a=this.aliases[h];return a?(a.referenceCount++,a):(a=this.aliases[h]=this.source.wrap(h),a.aliasable=!0,a.referenceCount=1,a)},setupHelper:function(h,a,d){var m=[],v=this.setupHelperArgs(a,h,m,d),_=this.nameLookup("helpers",a,"helper"),S=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:m,paramsInit:v,name:_,callParams:[S].concat(m)}},setupParams:function(h,a,d){var m={},v=[],_=[],S=[],y=!d,b=void 0;y&&(d=[]),m.name=this.quotedString(h),m.hash=this.popStack(),this.trackIds&&(m.hashIds=this.popStack()),this.stringParams&&(m.hashTypes=this.popStack(),m.hashContexts=this.popStack());var k=this.popStack(),x=this.popStack();(x||k)&&(m.fn=x||"container.noop",m.inverse=k||"container.noop");for(var C=a;C--;)b=this.popStack(),d[C]=b,this.trackIds&&(S[C]=this.popStack()),this.stringParams&&(_[C]=this.popStack(),v[C]=this.popStack());return y&&(m.args=this.source.generateArray(d)),this.trackIds&&(m.ids=this.source.generateArray(S)),this.stringParams&&(m.types=this.source.generateArray(_),m.contexts=this.source.generateArray(v)),this.options.data&&(m.data="data"),this.useBlockParams&&(m.blockParams="blockParams"),m},setupHelperArgs:function(h,a,d,m){var v=this.setupParams(h,a,d);return v.loc=JSON.stringify(this.source.currentLocation),v=this.objectLiteral(v),m?(this.useRegister("options"),d.push("options"),["options=",v]):d?(d.push(v),""):v}},(function(){for(var u="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),h=f.RESERVED_WORDS={},a=0,d=u.length;a<d;a++)h[u[a]]=!0})(),f.isValidJavaScriptVariableName=function(u){return!f.RESERVED_WORDS[u]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(u)};function g(u,h,a,d,m){var v=h.popStack(),_=a.length;for(u&&_--;d<_;d++)v=h.nameLookup(v,a[d],m);return u?[h.aliasable("container.strict"),"(",v,", ",h.quotedString(a[d]),", ",JSON.stringify(h.source.currentLocation)," )"]:v}e.default=f,s.exports=e.default})(Gs,Gs.exports)),Gs.exports}var Hi;function el(){return Hi||(Hi=1,(function(s,e){e.__esModule=!0;function t(_){return _&&_.__esModule?_:{default:_}}var n=Ha(),r=t(n),o=gi(),i=t(o),l=Va(),c=Ua(),p=ja(),f=t(p),g=yi(),u=t(g),h=pi(),a=t(h),d=r.default.create;function m(){var _=d();return _.compile=function(S,y){return c.compile(S,y,_)},_.precompile=function(S,y){return c.precompile(S,y,_)},_.AST=i.default,_.Compiler=c.Compiler,_.JavaScriptCompiler=f.default,_.Parser=l.parser,_.parse=l.parse,_.parseWithoutProcessing=l.parseWithoutProcessing,_}var v=m();v.create=m,a.default(v),v.Visitor=u.default,v.default=v,e.default=v,s.exports=e.default})(Ts,Ts.exports)),Ts.exports}var tl=el();const $e=Ta(tl);class sl{constructor(e,t,n){this.story=e,this.state=t,this.getCurrentSection=n,this.handlebars=$e.create(),this.handlebars.registerHelper("embed",i=>{const l=this.getCurrentSection();if(l.passages&&i in l.passages)return new $e.SafeString(this.process(l.passages[i].text||"",!0));if(i in this.story.sections)return new $e.SafeString(this.process(this.story.sections[i].text||"",!0))}),this.handlebars.registerHelper("seen",i=>this.state.getSeen(i)),this.handlebars.registerHelper("get",i=>this.state.get(i)),this.handlebars.registerHelper("at",i=>{const l=this.state.get("_section");return Array.isArray(i)?i.includes(l):l===i});const r=i=>i&&typeof i=="object"&&typeof i.toString=="function"&&!Array.isArray(i)?i.toString():i;this.handlebars.registerHelper("set",(i,l)=>(this.state.set(i,r(l)),"")),this.handlebars.registerHelper("unset",i=>(this.state.set(i,!1),"")),this.handlebars.registerHelper("inc",(i,l)=>{const c=typeof l=="number"?l:1,p=this.state.get(i)||0;return this.state.set(i,p+c),""}),this.handlebars.registerHelper("dec",(i,l)=>{const c=typeof l=="number"?l:1,p=this.state.get(i)||0;return this.state.set(i,p-c),""}),this.handlebars.registerHelper("and",(...i)=>i.slice(0,-1).every(Boolean)),this.handlebars.registerHelper("or",(...i)=>i.slice(0,-1).some(Boolean)),this.handlebars.registerHelper("not",i=>!i),this.handlebars.registerHelper("eq",(i,l)=>i==l),this.handlebars.registerHelper("ne",(i,l)=>i!=l),this.handlebars.registerHelper("gt",(i,l)=>i>l),this.handlebars.registerHelper("lt",(i,l)=>i<l),this.handlebars.registerHelper("gte",(i,l)=>i>=l),this.handlebars.registerHelper("lte",(i,l)=>i<=l),this.handlebars.registerHelper("array",function(...i){return i.pop(),i}),this.handlebars.registerHelper("append",(i,l)=>{const c=this.state.get(i)||[],p=Array.isArray(c)?[...c]:[c],f=r(l);return Array.isArray(f)?p.push(...f.map(r)):p.push(f),this.state.set(i,p),""}),this.handlebars.registerHelper("prepend",(i,l)=>{const c=this.state.get(i)||[],p=Array.isArray(c)?[...c]:[c],f=r(l);return Array.isArray(f)?p.unshift(...f.map(r)):p.unshift(f),this.state.set(i,p),""}),this.handlebars.registerHelper("pop",i=>{const l=this.state.get(i)||[];if(!Array.isArray(l)||l.length===0)return"";const c=[...l],p=c.shift();return this.state.set(i,c),p}),this.handlebars.registerHelper("remove",(i,l)=>{const c=this.state.get(i)||[];if(!Array.isArray(c))return"";const p=r(l),f=c.findIndex(g=>r(g)===p);if(f!==-1){const g=[...c];g.splice(f,1),this.state.set(i,g)}return""}),this.handlebars.registerHelper("contains",(i,l)=>{let c;if(typeof i=="string"){const f=this.state.get(i);c=Array.isArray(f)?f:[]}else if(Array.isArray(i))c=i;else return!1;const p=r(l);return c.some(f=>r(f)===p)}),this.handlebars.registerHelper("length",i=>{let l;if(typeof i=="string"){const c=this.state.get(i);l=Array.isArray(c)?c:[]}else if(Array.isArray(i))l=i;else return 0;return l.length});const o=i=>{let l="";const c=i.hash.set||"";return c&&(l+=` data-set=\'${JSON.stringify(c.split(",").map(p=>p.trim()))}\'`),l};this.handlebars.registerHelper("section",(i,l)=>{const c=l.hash.text||i;return new $e.SafeString(`<a class="squiffy-link link-section" data-section="${i}"${o(l)} role="link" tabindex="0">${c}</a>`)}),this.handlebars.registerHelper("passage",(i,l)=>{const c=l.hash.text||i;return new $e.SafeString(`<a class="squiffy-link link-passage" data-passage="${i}"${o(l)} role="link" tabindex="0">${c}</a>`)})}process(e,t){try{return e=this.handlebars.compile(e)(this.state.getStore()),t?Er(e,{async:!1}).trim():Lr(e,{async:!1}).trim()}catch(n){const r=n instanceof Error?n.message:String(n);return console.error("Squiffy template error:",r),`<div class="squiffy-error" style="color: red; background: #ffe0e0; padding: 8px; border: 1px solid red; margin: 4px 0; font-family: monospace; white-space: pre-wrap;"><strong>Template error:</strong> ${r}</div>`}}}class rl{constructor(){this.listeners=new Map}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>this.off(e,t)}off(e,t){this.listeners.get(e)?.delete(t)}once(e,t){const n=this.on(e,r=>{n(),t(r)});return n}emit(e,t){this.listeners.get(e)?.forEach(n=>{try{n(t)}catch(r){console.error(`[Squiffy] handler for "${String(e)}" failed`,r)}})}}class nl{constructor(e,t,n,r,o){this.store={},this.persist=e,this.storyId=t,this.onSet=n,this.emitter=r,this.onSetInternal=o}usePersistentStorage(){return this.persist&&window.localStorage&&this.storyId}set(e,t){this.setInternal(e,t,!0)}setInternal(e,t,n){typeof t>"u"&&(t=!0),n&&this.onSetInternal&&this.onSetInternal(e,this.get(e),structuredClone(t)),this.store[e]=structuredClone(t),this.usePersistentStorage()&&(localStorage[this.storyId+"-"+e]=JSON.stringify(t)),n&&this.emitter.emit("set",{attribute:e,value:t}),this.onSet(e,t)}get(e){return e in this.store?structuredClone(this.store[e]):null}getStore(){return new Proxy({},{get:(e,t)=>this.get(String(t)),has:(e,t)=>String(t)in this.store,ownKeys:()=>Object.keys(this.store),getOwnPropertyDescriptor:(e,t)=>{const n=String(t);if(n in this.store)return{enumerable:!0,configurable:!0,value:this.get(n)}}})}load(){if(!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)if(t.startsWith(this.storyId+"-")){const n=t.substring(this.storyId.length+1);this.store[n]=JSON.parse(localStorage[t])}}reset(){if(this.store={},!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)t.startsWith(this.storyId)&&localStorage.removeItem(t)}setSeen(e){let t=this.get("_seen_sections");t||(t=[]),t.indexOf(e)==-1&&(t.push(e),this.set("_seen_sections",t))}getSeen(e){const t=this.get("_seen_sections");return t?t.indexOf(e)>-1:!1}}function Fi(s,e){return!s&&!e?!0:!s||!e||s.length!==e.length?!1:s.every((t,n)=>t===e[n])}function il(s,e,t,n,r,o){function i(f){return f.replace(/\'/g,"\\\\\'")}function l(f){return t.querySelectorAll(`[data-source=\'[[${i(f)}]]\']`)}function c(f,g){return t.querySelectorAll(`[data-source=\'[[${i(f)}]][${i(g)}]\']`)}function p(f,g){const u=Array.from(f.querySelectorAll("a.link-passage.disabled")).map(h=>h.getAttribute("data-passage"));f.innerHTML=g;for(const h of u){const a=f.querySelector(`a.link-passage[data-passage="${h}"]`);a&&r(a)}}for(const f of Object.keys(s.sections)){const g=l(f);if(g.length){const u=e.sections[f];if(u){const h=s.sections[f],a=!Fi(h.attributes,u.attributes),d=u.text!=h.text;if(a&&o(u.attributes||[]),d||a)for(const m of g)p(m,n.processText(u.text,!1))}else for(const h of g)h.closest(".squiffy-output-section").remove()}if(s.sections[f].passages)for(const u of Object.keys(s.sections[f].passages)){const h=c(f,u);if(!h.length)continue;const a=e.sections[f]?.passages&&e.sections[f]?.passages[u];if(a){const d=s.sections[f].passages[u],m=!Fi(d.attributes,a.attributes),v=a.text!=d.text;if(m&&o(a.attributes||[]),v||m)for(const _ of h)p(_,n.processText(a.text,!1))}else for(const d of h)d.closest(".squiffy-output-passage").remove()}}}class ol{constructor(e,t,n,r,o,i,l,c,p,f){this.plugins=[],this.outputElement=e,this.textProcessor=t,this.state=n,this.linkHandler=r,this.getSectionText=o,this.getPassageText=i,this.processText=l,this.addTransition=c,this.animation=p,this.emitter=f}add(e){const t=e.init({outputElement:this.outputElement,registerHelper:(n,r)=>{this.textProcessor.handlebars.registerHelper(n,r)},registerLinkHandler:(n,r)=>{this.linkHandler.registerLinkHandler(n,r)},get:n=>this.state.get(n),set:(n,r)=>this.state.set(n,r),getSectionText:this.getSectionText,getPassageText:this.getPassageText,processText:this.processText,addTransition:this.addTransition,animation:this.animation,on:(n,r)=>this.emitter.on(n,r),off:(n,r)=>this.emitter.off(n,r),once:(n,r)=>this.emitter.once(n,r)});return this.plugins.push(e),t}onWrite(e){this.plugins.forEach(t=>t.onWrite?.(e))}onLoad(){this.plugins.forEach(e=>e.onLoad?.())}}function $i(s,e){return new Promise(t=>{s.addEventListener("transitionend",function(){s.innerHTML=e,s.addEventListener("transitionend",function(){s.classList.remove("fade-in"),t()},{once:!0}),s.classList.remove("fade-out"),s.classList.add("fade-in")},{once:!0}),s.classList.add("fade-out")})}function al(){return{name:"replaceLabel",init(s){s.registerHelper("label",function(e,t){return new $e.SafeString(`<span class="squiffy-label-${e}">${t.fn(this)}</span>`)}),s.registerHelper("replace",function(e,t){const n=t.fn(this),r=s.outputElement.querySelector(`.squiffy-label-${e}`);if(r){const i=n.includes(`\n\n`)?Lr(n,{async:!1}).trim():Er(n,{async:!1}).trim();s.addTransition(()=>$i(r,i))}return""})}}}function ll(){const s=r=>r.replace(/&/g,"&amp;").replace(/\'/g,"&#39;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=(r,o,i,l)=>{const c=i.map(h=>h.toString()),p=n(c,null),f=l.hash.set||"";f&&r.set(f,p[0]);const g=s(JSON.stringify(p.slice(1))||""),u=l.hash.show=="next"?p[1]:p[0];return new $e.SafeString(`<a class="squiffy-link" data-handler="${o}" data-value="${s(p[0])}" data-show="${l.hash.show||""}" data-options=\'${g}\' data-attribute="${f}" role="link">${u}</a>`)},t=(r,o,i)=>{const l={},c=JSON.parse(o.getAttribute("data-options"))||[],p=n(c,i?o.getAttribute("data-value"):"");o.innerHTML=o.getAttribute("data-show")=="next"?p[1]:p[0],o.setAttribute("data-value",p[0]),o.setAttribute("data-options",JSON.stringify(p.slice(1))||""),p[1]||(l.disableLink=!0);const f=o.getAttribute("data-attribute");return f&&r.set(f,o.getAttribute("data-value")),window.getSelection()?.removeAllRanges(),l},n=(r,o)=>{const i=r[0],l=r.slice(1);return o&&l.push(o),[i,...l]};return{name:"rotateSequence",init(r){r.registerHelper("rotate",(o,i)=>e(r,"rotate",o,i)),r.registerHelper("sequence",(o,i)=>e(r,"sequence",o,i)),r.registerLinkHandler("rotate",o=>t(r,o,!0)),r.registerLinkHandler("sequence",o=>t(r,o,!1))}}}function cl(){return{name:"random",init(s){s.registerHelper("random",(e,t)=>{const n=e.map(l=>l.toString()),r=Math.floor(Math.random()*n.length),o=n[r],i=t.hash.set||"";return i&&s.set(i,o),new $e.SafeString(o)})}}}function ul(){let s;return{name:"live",init(e){s=e,s.registerHelper("live",(n,r)=>{const o=r.hash.section||"";if(o)return new $e.SafeString(`<span class="squiffy-live" data-attribute="${n}" data-section="${o}"></span>`);const i=r.hash.passage||"";return i?new $e.SafeString(`<span class="squiffy-live" data-attribute="${n}" data-passage="${i}"></span>`):new $e.SafeString(`<span class="squiffy-live" data-attribute="${n}"></span>`)});const t=async n=>{const r=[],o=`.squiffy-live[data-attribute="${CSS.escape(n.attribute)}"]`;for(const i of s.outputElement.querySelectorAll(o)){const l=i.innerHTML;let c="";if(i.dataset.section){const p=s.getSectionText(i.dataset.section);p&&(c=s.processText(p,!0))}else if(i.dataset.passage){const p=s.getPassageText(i.dataset.passage);p&&(c=s.processText(p,!0))}else c=n.value;l!==c&&r.push($i(i,c))}await Promise.all(r)};s.on("set",async n=>{await t(n)})},onWrite(e){if(!s)return;e.querySelectorAll(".squiffy-live").forEach(n=>{if(n.dataset.section){const r=s.getSectionText(n.dataset.section);r&&(n.innerHTML=s.processText(r,!0))}else if(n.dataset.passage){const r=s.getPassageText(n.dataset.passage);r&&(n.innerHTML=s.processText(r,!0))}else{const r=n.dataset.attribute;n.textContent=r?s.get(r):""}})}}}function hl(){let s;const e=n=>{const r={};for(const[o,i]of Object.entries(n)){if(i==null){r[o]=i;continue}try{r[o]=JSON.parse(i)}catch{r[o]=i}}return r},t=n=>{const r=".squiffy-animate";for(const o of n.querySelectorAll(r)){const i=e(o.dataset);if(!i.content||(i.content.includes(`\n\n`)?o.innerHTML=Lr(i.content,{async:!1}).trim():o.innerHTML=Er(i.content,{async:!1}).trim(),!i.name))continue;const c=o.innerHTML,p=()=>{i.loop?s.animation.runAnimation(i.name,o,i,()=>{},!0):(s.animation.isInitiallyHidden(i.name)&&(o.style.opacity="0"),s.addTransition(()=>new Promise(f=>{o.style.opacity="",s.animation.runAnimation(i.name,o,i,()=>{o.classList.remove("squiffy-animate"),o.innerHTML=c,f()},!1)})))};if(i.trigger==="link"){const f=o.querySelectorAll("a");for(const g of f)s.animation.addLinkAnimation(g,p)}else p()}};return{name:"animate",init(n){s=n,s.registerHelper("animate",function(r,o){const i=o.fn(this),l={name:r,content:i,...o.hash},c=Object.entries(l).map(([g,u])=>` data-${$e.escapeExpression(g)}="${$e.escapeExpression(JSON.stringify(u))}"`).join(""),f=i.includes(`\n\n`)?"div":"span";return new $e.SafeString(`<${f} class="squiffy-animate"${c}></${f}>`)})},onWrite(n){t(n)},onLoad(){t(s.outputElement)}}}const rs={ReplaceLabel:al,RotateSequencePlugin:ll,RandomPlugin:cl,LivePlugin:ul,AnimatePlugin:hl};class pl{constructor(){this.linkHandlers={}}registerLinkHandler(e,t){this.linkHandlers[e]=t}handleLink(e){const t=e.getAttribute("data-handler")||"",n=this.linkHandlers[t];return n?[!0,t,n(e)]:[!1,t,null]}}/**\n * anime.js - ESM\n * @version v4.1.3\n * @author Julian Garnier\n * @license MIT\n * @copyright (c) 2025 Julian Garnier\n * @see https://animejs.com\n */const ot=typeof window<"u",Ie=ot?window:null,H=ot?document:null,pe={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},Z={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Ge={NONE:0,AUTO:1,FORCE:2},ke={replace:0,none:1,blend:2},zi=Symbol(),Qs=Symbol(),qr=Symbol(),ns=Symbol(),Vi=Symbol(),Ui=Symbol(),te=1e-11,Ht=1e12,Ne=1e3,Hr=120,dt="",Fr=(()=>{const s=new Map;return s.set("x","translateX"),s.set("y","translateY"),s.set("z","translateZ"),s})(),is=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],$r=is.reduce((s,e)=>({...s,[e]:e+"("}),{}),W=()=>{},fl=/(^#([\\da-f]{3}){1,2}$)|(^#([\\da-f]{4}){1,2}$)/i,dl=/rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/i,gl=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,ml=/hsl\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*\\)/i,vl=/hsla\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,Wi=/[-+]?\\d*\\.?\\d+(?:e[-+]?\\d)?/gi,Gi=/^([-+]?\\d*\\.?\\d+(?:e[-+]?\\d+)?)([a-z]+|%)$/i,yl=/([a-z])([A-Z])/g,_l=/(\\w+)(\\([^)]+\\)+)/g,Xi=/(\\*=|\\+=|-=)/,Yi={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:Hr,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:Ne,delay:0,loopDelay:0,ease:"out(2)",composition:ke.replace,modifier:s=>s,onBegin:W,onBeforeUpdate:W,onUpdate:W,onLoop:W,onPause:W,onComplete:W,onRender:W},me={current:null,root:H},G={defaults:Yi,precision:4,timeScale:1,tickThreshold:200},Ji={version:"4.1.3",engine:null};ot&&(Ie.AnimeJS||(Ie.AnimeJS=[]),Ie.AnimeJS.push(Ji));const Qi=s=>s.replace(yl,"$1-$2").toLowerCase(),_e=(s,e)=>s.indexOf(e)===0,kt=Date.now,Le=Array.isArray,be=s=>s&&s.constructor===Object,Xe=s=>typeof s=="number"&&!isNaN(s),ze=s=>typeof s=="string",fe=s=>typeof s=="function",I=s=>typeof s>"u",os=s=>I(s)||s===null,zr=s=>ot&&s instanceof SVGElement,Ki=s=>fl.test(s),Zi=s=>_e(s,"rgb"),ji=s=>_e(s,"hsl"),bl=s=>Ki(s)||Zi(s)||ji(s),Ft=s=>!G.defaults.hasOwnProperty(s),Lt=s=>ze(s)?parseFloat(s):s,$t=Math.pow,xt=Math.sqrt,Vr=Math.sin,Ur=Math.cos,at=Math.abs,eo=Math.exp,Sl=Math.ceil,as=Math.floor,kl=Math.asin,Wr=Math.max,Ks=Math.atan2,zt=Math.PI,Gr=Math.round,F=(s,e,t)=>s<e?e:s>t?t:s,to={},N=(s,e)=>{if(e<0)return s;if(!e)return Gr(s);let t=to[e];return t||(t=to[e]=10**e),Gr(s*t)/t},At=(s,e)=>Le(e)?e.reduce((t,n)=>at(n-s)<at(t-s)?n:t):e?Gr(s/e)*e:s,gt=(s,e,t)=>s+(e-s)*t,Xr=(s,e,t)=>{const n=10**(t||0);return as((Math.random()*(e-s+1/n)+s)*n)/n},so=s=>{let e=s.length,t,n;for(;e;)n=Xr(0,--e),t=s[e],s[e]=s[n],s[n]=t;return s},Zs=s=>s===1/0?Ht:s===-1/0?-1e12:s,Vt=s=>s<=te?te:Zs(N(s,11)),Be=s=>Le(s)?[...s]:s,ls=(s,e)=>{const t={...s};for(let n in e){const r=s[n];t[n]=I(r)?e[n]:r}return t},ie=(s,e,t,n="_prev",r="_next")=>{let o=s._head,i=r;for(t&&(o=s._tail,i=n);o;){const l=o[i];e(o),o=l}},mt=(s,e,t="_prev",n="_next")=>{const r=e[t],o=e[n];r?r[n]=o:s._head=o,o?o[t]=r:s._tail=r,e[t]=null,e[n]=null},vt=(s,e,t,n="_prev",r="_next")=>{let o=s._tail;for(;o&&t&&t(o,e);)o=o[n];const i=o?o[r]:s._head;o?o[r]=e:s._head=e,i?i[n]=e:s._tail=e,e[n]=o,e[r]=i},Yr=s=>{let e;return(...t)=>{let n,r,o,i;e&&(n=e.currentIteration,r=e.iterationProgress,o=e.reversed,i=e._alternate,e.revert());const l=s(...t);return l&&!fe(l)&&l.revert&&(e=l),I(r)||(e.currentIteration=n,e.iterationProgress=(i&&n%2?!o:o)?1-r:r),l||W}};class ro{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=N(Ne/Hr,0),this._fps=Hr,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=this._frameDuration,n=+e,r=n<te?te:n,o=N(Ne/r,0);this._fps=r,this._frameDuration=o,this._scheduledTime+=o-t}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<te?te:t}requestTick(e){const t=this._scheduledTime,n=this._elapsedTime;if(this._elapsedTime+=e-n,n<t)return Ge.NONE;const r=this._frameDuration,o=n-t;return this._scheduledTime+=o<r?r:o,Ge.AUTO}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}}const js=(s,e,t,n,r)=>{const o=s.parent,i=s.duration,l=s.completed,c=s.iterationDuration,p=s.iterationCount,f=s._currentIteration,g=s._loopDelay,u=s._reversed,h=s._alternate,a=s._hasChildren,d=s._delay,m=s._currentTime,v=d+c,_=e-d,S=F(m,-d,i),y=F(_,-d,i),b=_-m,k=y>0,x=y>=i,C=i<=te,O=r===Ge.FORCE;let P=0,w=_,E=0;if(p>1){const U=~~(y/(c+(x?0:g)));s._currentIteration=F(U,0,p),x&&s._currentIteration--,P=s._currentIteration%2,w=y%(c+g)||0}const L=u^(h&&P),M=s._ease;let q=x?L?0:i:L?c-w:w;M&&(q=c*M(q/c)||0);const $=(o?o.backwards:_<m)?!L:!!L;if(s._currentTime=_,s._iterationTime=q,s.backwards=$,k&&!s.began?(s.began=!0,!t&&!(o&&($||!o.began))&&s.onBegin(s)):_<=0&&(s.began=!1),!t&&!a&&k&&s._currentIteration!==f&&s.onLoop(s),O||r===Ge.AUTO&&(e>=d&&e<=v||e<=d&&S>d||e>=v&&S!==i)||q>=v&&S!==i||q<=d&&S>0||e<=S&&S===i&&l||x&&!l&&C){if(k&&(s.computeDeltaTime(S),t||s.onBeforeUpdate(s)),!a){const U=O||($?b*-1:b)>=G.tickThreshold,z=s._offset+(o?o._offset:0)+d+q;let R=s._head,ae,se,xe,ve,V=0;for(;R;){const ee=R._composition,re=R._currentTime,ue=R._changeDuration,ct=R._absoluteStartTime+R._changeDuration,Ae=R._nextRep,we=R._prevRep,he=ee!==ke.none;if((U||(re!==ue||z<=ct+(Ae?Ae._delay:0))&&(re!==0||z>=R._absoluteStartTime))&&(!he||!R._isOverridden&&(!R._isOverlapped||z<=ct)&&(!Ae||Ae._isOverridden||z<=Ae._absoluteStartTime)&&(!we||we._isOverridden||z>=we._absoluteStartTime+we._changeDuration+R._delay))){const j=R._currentTime=F(q-R._startTime,0,ue),J=R._ease(j/R._updateDuration),Te=R._modifier,Ue=R._valueType,Ce=R._tweenType,Re=Ce===pe.OBJECT,St=Ue===Z.NUMBER,qe=St&&Re||J===0||J===1?-1:G.precision;let ge,T;if(St)ge=T=Te(N(gt(R._fromNumber,R._toNumber,J),qe));else if(Ue===Z.UNIT)T=Te(N(gt(R._fromNumber,R._toNumber,J),qe)),ge=`${T}${R._unit}`;else if(Ue===Z.COLOR){const A=R._fromNumbers,B=R._toNumbers,Q=N(F(Te(gt(A[0],B[0],J)),0,255),0),X=N(F(Te(gt(A[1],B[1],J)),0,255),0),ye=N(F(Te(gt(A[2],B[2],J)),0,255),0),Pe=F(Te(N(gt(A[3],B[3],J),qe)),0,1);if(ge=`rgba(${Q},${X},${ye},${Pe})`,he){const Ee=R._numbers;Ee[0]=Q,Ee[1]=X,Ee[2]=ye,Ee[3]=Pe}}else if(Ue===Z.COMPLEX){ge=R._strings[0];for(let A=0,B=R._toNumbers.length;A<B;A++){const Q=Te(N(gt(R._fromNumbers[A],R._toNumbers[A],J),qe)),X=R._strings[A+1];ge+=`${X?Q+X:Q}`,he&&(R._numbers[A]=Q)}}if(he&&(R._number=T),!n&&ee!==ke.blend){const A=R.property;ae=R.target,Re?ae[A]=ge:Ce===pe.ATTRIBUTE?ae.setAttribute(A,ge):(se=ae.style,Ce===pe.TRANSFORM?(ae!==xe&&(xe=ae,ve=ae[ns]),ve[A]=ge,V=1):Ce===pe.CSS?se[A]=ge:Ce===pe.CSS_VAR&&se.setProperty(A,ge)),k&&(E=1)}else R._value=ge}if(V&&R._renderTransforms){let j=dt;for(let J in ve)j+=`${$r[J]}${ve[J]}) `;se.transform=j,V=0}R=R._next}!t&&E&&s.onRender(s)}!t&&k&&s.onUpdate(s)}return o&&C?!t&&(o.began&&!$&&_>=i&&!l||$&&_<=te&&l)&&(s.onComplete(s),s.completed=!$):k&&x?p===1/0?s._startTime+=s.duration:s._currentIteration>=p-1&&(s.paused=!0,!l&&!a&&(s.completed=!0,!t&&!(o&&($||!o.began))&&(s.onComplete(s),s._resolve(s)))):s.completed=!1,E},Rt=(s,e,t,n,r)=>{const o=s._currentIteration;if(js(s,e,t,n,r),s._hasChildren){const i=s,l=i.backwards,c=n?e:i._iterationTime,p=kt();let f=0,g=!0;if(!n&&i._currentIteration!==o){const u=i.iterationDuration;ie(i,h=>{if(!l)!h.completed&&!h.backwards&&h._currentTime<h.iterationDuration&&js(h,u,t,1,Ge.FORCE),h.began=!1,h.completed=!1;else{const a=h.duration,d=h._offset+h._delay,m=d+a;!t&&a<=te&&(!d||m===u)&&h.onComplete(h)}}),t||i.onLoop(i)}ie(i,u=>{const h=N((c-u._offset)*u._speed,12),a=u._fps<i._fps?u.requestTick(p):r;f+=js(u,h,t,n,a),!u.completed&&g&&(g=!1)},l),!t&&f&&i.onRender(i),(g||l)&&i._currentTime>=i.duration&&(i.paused=!0,i.completed||(i.completed=!0,t||(i.onComplete(i),i._resolve(i))))}},Ut={animation:null,update:W},xl=s=>{let e=Ut.animation;return e||(e={duration:te,computeDeltaTime:W,_offset:0,_delay:0,_head:null,_tail:null},Ut.animation=e,Ut.update=()=>{s.forEach(t=>{for(let n in t){const r=t[n],o=r._head;if(o){const i=o._valueType,l=i===Z.COMPLEX||i===Z.COLOR?Be(o._fromNumbers):null;let c=o._fromNumber,p=r._tail;for(;p&&p!==o;){if(l)for(let f=0,g=p._numbers.length;f<g;f++)l[f]+=p._numbers[f];else c+=p._number;p=p._prevAdd}o._toNumber=c,o._toNumbers=l}}}),js(e,1,1,0,Ge.FORCE)}),e},no=ot?requestAnimationFrame:setImmediate,wl=ot?cancelAnimationFrame:clearImmediate;class Tl extends ro{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Yi,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=kt();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,n=this._fps;let r=this._head;for(;r;){const o=r._next;r.paused?(mt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Rt(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):Ge.AUTO),r=o}Ut.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(kt()),this.reqId=no(io)),this}pause(){if(this.reqId)return this.paused=!0,Cl()}resume(){if(this.paused)return this.paused=!1,ie(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(G.timeScale===1?1:Ne)}set speed(e){this._speed=e*G.timeScale,ie(this,t=>t.speed=t._speed)}get timeUnit(){return G.timeScale===1?"ms":"s"}set timeUnit(e){const n=e==="s",r=n?.001:1;if(G.timeScale!==r){G.timeScale=r,G.tickThreshold=200*r;const o=n?.001:Ne;this.defaults.duration*=o,this._speed*=o}}get precision(){return G.precision}set precision(e){G.precision=e}}const Se=(()=>{const s=new Tl(kt());return ot&&(Ji.engine=s,H.addEventListener("visibilitychange",()=>{s.pauseOnDocumentHidden&&(H.hidden?s.pause():s.resume())})),s})(),io=()=>{Se._head?(Se.reqId=no(io),Se.update()):Se.reqId=0},Cl=()=>(wl(Se.reqId),Se.reqId=0,Se),Pl=(s,e,t)=>{const n=s.style.transform;let r;if(n){const o=s[ns];let i;for(;i=_l.exec(n);){const l=i[1],c=i[2].slice(1,-1);o[l]=c,l===e&&(r=c,t&&(t[e]=c))}}return n&&!I(r)?r:_e(e,"scale")?"1":_e(e,"rotate")||_e(e,"skew")?"0deg":"0px"};function Jr(s){const e=ze(s)?me.root.querySelectorAll(s):s;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function Ke(s){if(os(s))return[];if(!ot)return Le(s)&&s.flat(1/0)||[s];if(Le(s)){const t=s.flat(1/0),n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r];if(!os(i)){const l=Jr(i);if(l)for(let c=0,p=l.length;c<p;c++){const f=l[c];if(!os(f)){let g=!1;for(let u=0,h=n.length;u<h;u++)if(n[u]===f){g=!0;break}g||n.push(f)}}else{let c=!1;for(let p=0,f=n.length;p<f;p++)if(n[p]===i){c=!0;break}c||n.push(i)}}}return n}const e=Jr(s);return e?Array.from(e):[s]}function cs(s){const e=Ke(s),t=e.length;if(t)for(let n=0;n<t;n++){const r=e[n];if(!r[zi]){r[zi]=!0;const o=zr(r);(r.nodeType||o)&&(r[Qs]=!0,r[qr]=o,r[ns]={})}}return e}const oo=s=>{const t=Ke(s)[0];if(!(!t||!zr(t)))return t},El=(s,e=.33)=>t=>{const n=oo(s);if(!n)return;const r=t.tagName==="path",o=r?" ":",",i=t[Vi];i&&t.setAttribute(r?"d":"points",i);let l="",c="";if(!e)l=t.getAttribute(r?"d":"points"),c=n.getAttribute(r?"d":"points");else{const p=t.getTotalLength(),f=n.getTotalLength(),g=Math.max(Math.ceil(p*e),Math.ceil(f*e));for(let u=0;u<g;u++){const h=u/(g-1),a=t.getPointAtLength(p*h),d=n.getPointAtLength(f*h),m=r?u===0?"M":"L":"";l+=m+N(a.x,3)+o+a.y+" ",c+=m+N(d.x,3)+o+d.y+" "}}return t[Vi]=c,[l,c]},Ll=s=>{let e=1;if(s&&s.getCTM){const t=s.getCTM();if(t){const n=xt(t.a*t.a+t.b*t.b),r=xt(t.c*t.c+t.d*t.d);e=(n+r)/2}}return e},Al=(s,e,t)=>{const n=Ne,r=getComputedStyle(s),o=r.strokeLinecap,i=r.vectorEffect==="non-scaling-stroke"?s:null;let l=o;const c=new Proxy(s,{get(p,f){const g=p[f];return f===Ui?p:f==="setAttribute"?(...u)=>{if(u[0]==="draw"){const a=u[1].split(" "),d=+a[0],m=+a[1],v=Ll(i),_=d*-1e3*v,S=m*n*v+_,y=n*v+(d===0&&m===1||d===1&&m===0?0:10*v)-S;if(o!=="butt"){const b=d===m?"butt":o;l!==b&&(p.style.strokeLinecap=`${b}`,l=b)}p.setAttribute("stroke-dashoffset",`${_}`),p.setAttribute("stroke-dasharray",`${S} ${y}`)}return Reflect.apply(g,p,u)}:fe(g)?(...u)=>Reflect.apply(g,p,u):g}});return s.getAttribute("pathLength")!==`${n}`&&(s.setAttribute("pathLength",`${n}`),c.setAttribute("draw",`${e} ${t}`)),c},Rl=(s,e=0,t=0)=>Ke(s).map(r=>Al(r,e,t)),Qr=(s,e,t=0)=>s.getPointAtLength(e+t>=1?e+t:0),Kr=(s,e)=>t=>{const n=+s.getTotalLength(),r=t[qr],o=s.getCTM();return{from:0,to:n,modifier:i=>{if(e==="a"){const l=Qr(s,i,-1),c=Qr(s,i,1);return Ks(c.y-l.y,c.x-l.x)*180/zt}else{const l=Qr(s,i,0);return e==="x"?r||!o?l.x:l.x*o.a+l.y*o.c+o.e:r||!o?l.y:l.x*o.b+l.y*o.d+o.f}}}},Ol=s=>{const e=oo(s);if(e)return{translateX:Kr(e,"x"),translateY:Kr(e,"y"),rotate:Kr(e,"a")}},Ml=["opacity","rotate","overflow","color"],Il=(s,e)=>{if(Ml.includes(e))return!1;if(s.getAttribute(e)||e in s){if(e==="scale"){const t=s.parentNode;return t&&t.tagName==="filter"}return!0}},Nl={morphTo:El,createMotionPath:Ol,createDrawable:Rl},Bl=s=>{const e=dl.exec(s)||gl.exec(s),t=I(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],t]},Dl=s=>{const e=s.length,t=e===4||e===5;return[+("0x"+s[1]+s[t?1:2]),+("0x"+s[t?2:3]+s[t?2:4]),+("0x"+s[t?3:5]+s[t?3:6]),e===5||e===9?+(+("0x"+s[t?4:7]+s[t?4:8])/255).toFixed(3):1]},Zr=(s,e,t)=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*(2/3-t)*6:s),ql=s=>{const e=ml.exec(s)||vl.exec(s),t=+e[1]/360,n=+e[2]/100,r=+e[3]/100,o=I(e[4])?1:+e[4];let i,l,c;if(n===0)i=l=c=r;else{const p=r<.5?r*(1+n):r+n-r*n,f=2*r-p;i=N(Zr(f,p,t+1/3)*255,0),l=N(Zr(f,p,t)*255,0),c=N(Zr(f,p,t-1/3)*255,0)}return[i,l,c,o]},Hl=s=>Zi(s)?Bl(s):Ki(s)?Dl(s):ji(s)?ql(s):[0,0,0,1],D=(s,e)=>I(s)?e:s,Ye=(s,e,t,n,r)=>{if(fe(s)){const o=()=>{const i=s(e,t,n);return isNaN(+i)?i||0:+i};return r&&(r.func=o),o()}else return s},jr=(s,e)=>s[Qs]?s[qr]&&Il(s,e)?pe.ATTRIBUTE:is.includes(e)||Fr.get(e)?pe.TRANSFORM:_e(e,"--")?pe.CSS_VAR:e in s.style?pe.CSS:e in s?pe.OBJECT:pe.ATTRIBUTE:pe.OBJECT,ao=(s,e,t)=>{const n=s.style[e];n&&t&&(t[e]=n);const r=n||getComputedStyle(s[Ui]||s).getPropertyValue(e);return r==="auto"?"0":r},Ot=(s,e,t,n)=>{const r=I(t)?jr(s,e):t;return r===pe.OBJECT?s[e]||0:r===pe.ATTRIBUTE?s.getAttribute(e):r===pe.TRANSFORM?Pl(s,e,n):r===pe.CSS_VAR?ao(s,e,n).trimStart():ao(s,e,n)},Mt=(s,e,t)=>t==="-"?s-e:t==="+"?s+e:s*e,en=()=>({t:Z.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ze=(s,e)=>{if(e.t=Z.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!s)return e;const t=+s;if(isNaN(t)){let n=s;n[1]==="="&&(e.o=n[0],n=n.slice(2));const r=n.includes(" ")?!1:Gi.exec(n);if(r)return e.t=Z.UNIT,e.n=+r[1],e.u=r[2],e;if(e.o)return e.n=+n,e;if(bl(n))return e.t=Z.COLOR,e.d=Hl(n),e;{const o=n.match(Wi);return e.t=Z.COMPLEX,e.d=o?o.map(Number):[],e.s=n.split(Wi)||[],e}}else return e.n=t,e},lo=(s,e)=>(e.t=s._valueType,e.n=s._toNumber,e.u=s._unit,e.o=null,e.d=Be(s._toNumbers),e.s=Be(s._strings),e),De=en(),er={_rep:new WeakMap,_add:new Map},tn=(s,e,t="_rep")=>{const n=er[t];let r=n.get(s);return r||(r={},n.set(s,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Fl=(s,e)=>s._isOverridden||s._absoluteStartTime>e._absoluteStartTime,tr=s=>{s._isOverlapped=1,s._isOverridden=1,s._changeDuration=te,s._currentTime=te},co=(s,e)=>{const t=s._composition;if(t===ke.replace){const n=s._absoluteStartTime;vt(e,s,Fl,"_prevRep","_nextRep");const r=s._prevRep;if(r){const o=r.parent,i=r._absoluteStartTime+r._changeDuration;if(s.parent.id!==o.id&&o.iterationCount>1&&i+(o.duration-o.iterationDuration)>n){tr(r);let p=r._prevRep;for(;p&&p.parent.id===o.id;)tr(p),p=p._prevRep}const l=n-s._delay;if(i>l){const p=r._startTime,f=i-(p+r._updateDuration),g=N(l-f-p,12);r._changeDuration=g,r._currentTime=g,r._isOverlapped=1,g<te&&tr(r)}let c=!0;if(ie(o,p=>{p._isOverlapped||(c=!1)}),c){const p=o.parent;if(p){let f=!0;ie(p,g=>{g!==o&&ie(g,u=>{u._isOverlapped||(f=!1)})}),f&&p.cancel()}else o.cancel()}}}else if(t===ke.blend){const n=tn(s.target,s.property,"_add"),r=xl(er._add);let o=n._head;o||(o={...s},o._composition=ke.replace,o._updateDuration=te,o._startTime=0,o._numbers=Be(s._fromNumbers),o._number=0,o._next=null,o._prev=null,vt(n,o),vt(r,o));const i=s._toNumber;if(s._fromNumber=o._fromNumber-i,s._toNumber=0,s._numbers=Be(s._fromNumbers),s._number=0,o._fromNumber=i,s._toNumbers){const l=Be(s._toNumbers);l&&l.forEach((c,p)=>{s._fromNumbers[p]=o._fromNumbers[p]-c,s._toNumbers[p]=0}),o._fromNumbers=l}vt(n,s,null,"_prevAdd","_nextAdd")}return s},uo=s=>{const e=s._composition;if(e!==ke.none){const t=s.target,n=s.property,i=er._rep.get(t)[n];if(mt(i,s,"_prevRep","_nextRep"),e===ke.blend){const l=er._add,c=l.get(t);if(!c)return;const p=c[n],f=Ut.animation;mt(p,s,"_prevAdd","_nextAdd");const g=p._head;if(g&&g===p._tail){mt(p,g,"_prevAdd","_nextAdd"),mt(f,g);let u=!0;for(let h in c)if(c[h]._head){u=!1;break}u&&l.delete(t)}}}return s},ho=s=>(s.paused=!0,s.began=!1,s.completed=!1,s),sn=s=>(s._cancelled&&(s._hasChildren?ie(s,sn):ie(s,e=>{e._composition!==ke.none&&co(e,tn(e.target,e.property))}),s._cancelled=0),s);let $l=0;class Je extends ro{constructor(e={},t=null,n=0){super(0);const{id:r,delay:o,duration:i,reversed:l,alternate:c,loop:p,loopDelay:f,autoplay:g,frameRate:u,playbackRate:h,onComplete:a,onLoop:d,onPause:m,onBegin:v,onBeforeUpdate:_,onUpdate:S}=e;me.current&&me.current.register(this);const y=t?0:Se._elapsedTime,b=t?t.defaults:G.defaults,k=fe(o)||I(o)?b.delay:+o,x=fe(i)||I(i)?1/0:+i,C=D(p,b.loop),O=D(f,b.loopDelay),P=C===!0||C===1/0||C<0?1/0:C+1;let w=0;t?w=n:(Se.reqId||Se.requestTick(kt()),w=(Se._elapsedTime-Se._startTime)*G.timeScale),this.id=I(r)?++$l:r,this.parent=t,this.duration=Zs((x+O)*P-O)||te,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=v||b.onBegin,this.onBeforeUpdate=_||b.onBeforeUpdate,this.onUpdate=S||b.onUpdate,this.onLoop=d||b.onLoop,this.onPause=m||b.onPause,this.onComplete=a||b.onComplete,this.iterationDuration=x,this.iterationCount=P,this._autoplay=t?!1:D(g,b.autoplay),this._offset=w,this._delay=k,this._loopDelay=O,this._iterationTime=0,this._currentIteration=0,this._resolve=W,this._running=!1,this._reversed=+D(l,b.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=D(c,b.alternate),this._prev=null,this._next=null,this._elapsedTime=y,this._startTime=y,this._lastTime=y,this._fps=D(u,b.frameRate),this._speed=D(h,b.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return F(N(this._currentTime,G.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return N(this._iterationTime,G.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return F(N(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return F(N(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*F(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=0){return sn(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Rt(this,0,1,e,Ge.FORCE),ho(this),this._hasChildren&&ie(this,ho),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Rt(this,this.duration,1,e,Ge.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!I(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Se._speed);return this._startTime=kt()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=te&&!this._hasChildren?Rt(this,te,0,0,Ge.FORCE):(this._running||(vt(Se,this),Se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Se.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){sn(this),this.completed=!1;const r=this.paused;return this.paused=!0,Rt(this,e+this._delay,~~t,~~n,Ge.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?as(Ht/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?ie(this,e=>e.cancel(),!0):ie(this,uo),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=Vt(e);if(t===n)return this;const r=e/t,o=e<=te;return this.duration=o?te:n,this.iterationDuration=o?te:Vt(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Rt(this,0,1,0,Ge.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const zl=s=>new Je(s,null,0).init(),yt=s=>s,po=(s,e,t)=>(((1-3*t+3*e)*s+(3*t-6*e))*s+3*e)*s,Vl=(s,e,t)=>{let n=0,r=1,o,i,l=0;do i=n+(r-n)/2,o=po(i,e,t)-s,o>0?r=i:n=i;while(at(o)>1e-7&&++l<100);return i},Ul=(s=.5,e=0,t=.5,n=1)=>s===e&&t===n?yt:r=>r===0||r===1?r:po(Vl(r,s,t),e,n),Wl=(s=10,e)=>{const t=e?Sl:as;return n=>t(F(n,0,1)*s)*(1/s)},fo=(...s)=>{const e=s.length;if(!e)return yt;const t=e-1,n=s[0],r=s[t],o=[0],i=[Lt(n)];for(let l=1;l<t;l++){const c=s[l],p=ze(c)?c.trim().split(" "):[c],f=p[0],g=p[1];o.push(I(g)?l/t:Lt(g)/100),i.push(Lt(f))}return i.push(Lt(r)),o.push(1),function(c){for(let p=1,f=o.length;p<f;p++){const g=o[p];if(c<=g){const u=o[p-1],h=i[p-1];return h+(i[p]-h)*(c-u)/(g-u)}}return i[i.length-1]}},Gl=(s=10,e=1)=>{const t=[0],n=s-1;for(let r=1;r<n;r++){const o=t[r-1],i=r/n,l=(r+1)/n,c=i+(l-i)*Math.random(),p=i*(1-e)+c*e;t.push(F(p,o,1))}return t.push(1),fo(...t)},Xl=zt/2,go=zt*2,Wt=(s=1.68)=>e=>$t(e,+s),mo={[dt]:Wt,Quad:Wt(2),Cubic:Wt(3),Quart:Wt(4),Quint:Wt(5),Sine:s=>1-Ur(s*Xl),Circ:s=>1-xt(1-s*s),Expo:s=>s?$t(2,10*s-10):0,Bounce:s=>{let e,t=4;for(;s<((e=$t(2,--t))-1)/11;);return 1/$t(4,3-t)-7.5625*$t((e*3-2)/22-s,2)},Back:(s=1.70158)=>e=>(+s+1)*e*e*e-+s*e*e,Elastic:(s=1,e=.3)=>{const t=F(+s,1,10),n=F(+e,te,2),r=n/go*kl(1/t),o=go/n;return i=>i===0||i===1?i:-t*$t(2,-10*(1-i))*Vr((1-i-r)*o)}},us={in:s=>e=>s(e),out:s=>e=>1-s(1-e),inOut:s=>e=>e<.5?s(e*2)/2:1-s(e*-2+2)/2,outIn:s=>e=>e<.5?(1-s(1-e*2))/2:(s(e*2-1)+1)/2},vo=(s,e,t)=>{if(t[s])return t[s];if(s.indexOf("(")<=-1){const r=us[s]||s.includes("Back")||s.includes("Elastic")?e[s]():e[s];return r?t[s]=r:yt}else{const n=s.slice(0,-1).split("("),r=e[n[0]];return r?t[s]=r(...n[1].split(",")):yt}},Gt=(()=>{const s={linear:fo,irregular:Gl,steps:Wl,cubicBezier:Ul};for(let e in us)for(let t in mo){const n=mo[t],r=us[e];s[e+t]=t===dt||t==="Back"||t==="Elastic"?(o,i)=>r(n(o,i)):r(n)}return s})(),Yl={linear:yt},It=s=>fe(s)?s:ze(s)?vo(s,Gt,Yl):yt,yo={},rn=(s,e,t)=>{if(t===pe.TRANSFORM){const n=Fr.get(s);return n||s}else if(t===pe.CSS||t===pe.ATTRIBUTE&&zr(e)&&s in e.style){const n=yo[s];if(n)return n;{const r=s&&Qi(s);return yo[s]=r,r}}else return s},nn={deg:1,rad:180/zt,turn:360},_o={},on=(s,e,t,n=!1)=>{const r=e.u,o=e.n;if(e.t===Z.UNIT&&r===t)return e;const i=o+r+t,l=_o[i];if(!I(l)&&!n)e.n=l;else{let c;if(r in nn)c=o*nn[r]/nn[t];else{const f=s.cloneNode(),g=s.parentNode,u=g&&g!==H?g:H.body;u.appendChild(f);const h=f.style;h.width=100+r;const a=f.offsetWidth||100;h.width=100+t;const d=f.offsetWidth||100,m=a/d;u.removeChild(f),c=m*o}e.n=c,_o[i]=c}return e.t,Z.UNIT,e.u=t,e},sr=s=>{if(s._hasChildren)ie(s,sr,!0);else{const e=s;e.pause(),ie(e,t=>{const n=t.property,r=t.target;if(r[Qs]){const o=r.style,i=e._inlineStyles[n];if(t._tweenType===pe.TRANSFORM){const l=r[ns];if(I(i)||i===dt?delete l[n]:l[n]=i,t._renderTransforms)if(!Object.keys(l).length)o.removeProperty("transform");else{let c=dt;for(let p in l)c+=$r[p]+l[p]+") ";o.transform=c}}else I(i)||i===dt?o.removeProperty(n):o[n]=i;e._tail===t&&e.targets.forEach(l=>{l.getAttribute&&l.getAttribute("style")===dt&&l.removeAttribute("style")})}})}return s},Y=en(),K=en(),rr={func:null},nr=[null],Xt=[null,null],ir={to:null};let Jl=0,wt,lt;const Ql=(s,e)=>{const t={};if(Le(s)){const n=[].concat(...s.map(r=>Object.keys(r))).filter(Ft);for(let r=0,o=n.length;r<o;r++){const i=n[r],l=s.map(c=>{const p={};for(let f in c){const g=c[f];Ft(f)?f===i&&(p.to=g):p[f]=g}return p});t[i]=l}}else{const n=D(e.duration,G.defaults.duration);Object.keys(s).map(o=>({o:parseFloat(o)/100,p:s[o]})).sort((o,i)=>o.o-i.o).forEach(o=>{const i=o.o,l=o.p;for(let c in l)if(Ft(c)){let p=t[c];p||(p=t[c]=[]);const f=i*n;let g=p.length,u=p[g-1];const h={to:l[c]};let a=0;for(let d=0;d<g;d++)a+=p[d].duration;g===1&&(h.from=u.to),l.ease&&(h.ease=l.ease),h.duration=f-(g?a:0),p.push(h)}return o});for(let o in t){const i=t[o];let l;for(let c=0,p=i.length;c<p;c++){const f=i[c],g=f.ease;f.ease=l||void 0,l=g}i[0].duration||i.shift()}}return t};class _t extends Je{constructor(e,t,n,r,o=!1,i=0,l=0){super(t,n,r);const c=cs(e),p=c.length,f=t.keyframes,g=f?ls(Ql(f,t),t):t,{delay:u,duration:h,ease:a,playbackEase:d,modifier:m,composition:v,onRender:_}=g,S=n?n.defaults:G.defaults,y=D(d,S.playbackEase),b=y?It(y):null,k=!I(a)&&!I(a.ease),x=k?a.ease:D(a,b?"linear":S.ease),C=k?a.duration:D(h,S.duration),O=D(u,S.delay),P=m||S.modifier,w=I(v)&&p>=Ne?ke.none:I(v)?S.composition:v,E={},L=this._offset+(n?n._offset:0);let M=NaN,q=NaN,$=0,U=0;for(let z=0;z<p;z++){const R=c[z],ae=i||z,se=l||p;let xe=NaN,ve=NaN;for(let V in g)if(Ft(V)){const ee=jr(R,V),re=rn(V,R,ee);let ue=g[V];const ct=Le(ue);if(o&&!ct&&(Xt[0]=ue,Xt[1]=ue,ue=Xt),ct){const Te=ue.length,Ue=!be(ue[0]);Te===2&&Ue?(ir.to=ue,nr[0]=ir,wt=nr):Te>2&&Ue?(wt=[],ue.forEach((Ce,Re)=>{Re?Re===1?(Xt[1]=Ce,wt.push(Xt)):wt.push(Ce):Xt[0]=Ce})):wt=ue}else nr[0]=ue,wt=nr;let Ae=null,we=null,he=NaN,j=0,J=0;for(let Te=wt.length;J<Te;J++){const Ue=wt[J];be(Ue)?lt=Ue:(ir.to=Ue,lt=ir),rr.func=null;const Ce=Ye(lt.to,R,ae,se,rr);let Re;be(Ce)&&!I(Ce.to)?(lt=Ce,Re=Ce.to):Re=Ce;const St=Ye(lt.from,R,ae,se),qe=lt.ease,ge=!I(qe)&&!I(qe.ease),T=ge?qe.ease:qe||x,A=ge?qe.duration:Ye(D(lt.duration,Te>1?Ye(C,R,ae,se)/Te:C),R,ae,se),B=Ye(D(lt.delay,J?0:O),R,ae,se),Q=Ye(D(lt.composition,w),R,ae,se),X=Xe(Q)?Q:ke[Q],ye=lt.modifier||P,Pe=!I(St),Ee=!I(Re),je=Le(Re),de=je||Pe&&Ee,kn=we?j+B:B,xn=N(L+kn,12);!U&&(Pe||je)&&(U=1);let et=we;if(X!==ke.none){Ae||(Ae=tn(R,re));let ce=Ae._head;for(;ce&&!ce._isOverridden&&ce._absoluteStartTime<=xn;)if(et=ce,ce=ce._nextRep,ce&&ce._absoluteStartTime>=xn)for(;ce;)tr(ce),ce=ce._nextRep}if(de?(Ze(je?Ye(Re[0],R,ae,se):St,Y),Ze(je?Ye(Re[1],R,ae,se,rr):Re,K),Y.t===Z.NUMBER&&(et?et._valueType===Z.UNIT&&(Y.t=Z.UNIT,Y.u=et._unit):(Ze(Ot(R,re,ee,E),De),De.t===Z.UNIT&&(Y.t=Z.UNIT,Y.u=De.u)))):(Ee?Ze(Re,K):we?lo(we,K):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,ee,E),K),Pe?Ze(St,Y):we?lo(we,Y):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,ee,E),Y)),Y.o&&(Y.n=Mt(et?et._toNumber:Ze(Ot(R,re,ee,E),De).n,Y.n,Y.o)),K.o&&(K.n=Mt(Y.n,K.n,K.o)),Y.t!==K.t){if(Y.t===Z.COMPLEX||K.t===Z.COMPLEX){const ce=Y.t===Z.COMPLEX?Y:K,Oe=Y.t===Z.COMPLEX?K:Y;Oe.t=Z.COMPLEX,Oe.s=Be(ce.s),Oe.d=ce.d.map(()=>Oe.n)}else if(Y.t===Z.UNIT||K.t===Z.UNIT){const ce=Y.t===Z.UNIT?Y:K,Oe=Y.t===Z.UNIT?K:Y;Oe.t=Z.UNIT,Oe.u=ce.u}else if(Y.t===Z.COLOR||K.t===Z.COLOR){const ce=Y.t===Z.COLOR?Y:K,Oe=Y.t===Z.COLOR?K:Y;Oe.t=Z.COLOR,Oe.s=ce.s,Oe.d=[0,0,0,1]}}if(Y.u!==K.u){let ce=K.u?Y:K;ce=on(R,ce,K.u?K.u:Y.u,!1)}if(K.d&&Y.d&&K.d.length!==Y.d.length){const ce=Y.d.length>K.d.length?Y:K,Oe=ce===Y?K:Y;Oe.d=ce.d.map((Bc,zo)=>I(Oe.d[zo])?0:Oe.d[zo]),Oe.s=Be(ce.s)}const wn=N(+A||te,12),yr={parent:this,id:Jl++,property:re,target:R,_value:null,_func:rr.func,_ease:It(T),_fromNumbers:Be(Y.d),_toNumbers:Be(K.d),_strings:Be(K.s),_fromNumber:Y.n,_toNumber:K.n,_numbers:Be(Y.d),_number:Y.n,_unit:K.u,_modifier:ye,_currentTime:0,_startTime:kn,_delay:+B,_updateDuration:wn,_changeDuration:wn,_absoluteStartTime:xn,_tweenType:ee,_valueType:K.t,_composition:X,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};X!==ke.none&&co(yr,Ae),isNaN(he)&&(he=yr._startTime),j=N(kn+wn,12),we=yr,$++,vt(this,yr)}(isNaN(q)||he<q)&&(q=he),(isNaN(M)||j>M)&&(M=j),ee===pe.TRANSFORM&&(xe=$-J,ve=$)}if(!isNaN(xe)){let V=0;ie(this,ee=>{V>=xe&&V<ve&&(ee._renderTransforms=1,ee._composition===ke.blend&&ie(Ut.animation,re=>{re.id===ee.id&&(re._renderTransforms=1)})),V++})}}p||console.warn("No target found. Make sure the element you\'re trying to animate is accessible before creating your animation."),q?(ie(this,z=>{z._startTime-z._delay||(z._delay-=q),z._startTime-=q}),M-=q):q=0,M||(M=te,this.iterationCount=0),this.targets=c,this.duration=M===te?te:Zs((M+this._loopDelay)*this.iterationCount-this._loopDelay)||te,this.onRender=_||S.onRender,this._ease=b,this._delay=q,this.iterationDuration=M,this._inlineStyles=E,!this._autoplay&&U&&this.onRender(this)}stretch(e){const t=this.duration;if(t===Vt(e))return this;const n=e/t;return ie(this,r=>{r._updateDuration=Vt(r._updateDuration*n),r._changeDuration=Vt(r._changeDuration*n),r._currentTime*=n,r._startTime*=n,r._absoluteStartTime*=n}),super.stretch(e)}refresh(){return ie(this,e=>{const t=e._func;if(t){const n=Ot(e.target,e.property,e._tweenType);Ze(n,De),Ze(t(),K),e._fromNumbers=Be(De.d),e._fromNumber=De.n,e._toNumbers=Be(K.d),e._strings=Be(K.s),e._toNumber=K.o?Mt(De.n,K.n,K.o):K.n}}),this}revert(){return super.revert(),sr(this)}then(e){return super.then(e)}}const hs=(s,e)=>new _t(s,e,null,0,!1).init(),or=(s,e=100)=>{const t=[];for(let n=0;n<=e;n++)t.push(s(n/e));return`linear(${t.join(", ")})`},an={in:"ease-in",out:"ease-out",inOut:"ease-in-out"},Kl=(()=>{const s={};for(let e in us)s[e]=t=>us[e](Wt(t));return s})(),ln=s=>{let e=an[s];if(e)return e;if(e="linear",ze(s)){if(_e(s,"linear")||_e(s,"cubic-")||_e(s,"steps")||_e(s,"ease"))e=s;else if(_e(s,"cubicB"))e=Qi(s);else{const t=vo(s,Kl,an);fe(t)&&(e=t===yt?"linear":or(t))}an[s]=e}else if(fe(s)){const t=or(s);t&&(e=t)}else s.ease&&(e=or(s.ease));return e},bo=["x","y","z"],Zl=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...bo],jl=[...bo,...is.filter(s=>["X","Y","Z"].some(e=>s.endsWith(e)))];let cn=null;const un={_head:null,_tail:null},hn=(s,e,t)=>{let n=un._head;for(;n;){const r=n._next,o=n.$el===s,i=!e||n.property===e,l=!t||n.parent===t;if(o&&i&&l){const c=n.animation;try{c.commitStyles()}catch{}c.cancel(),mt(un,n);const p=n.parent;p&&(p._completed++,p.animations.length===p._completed&&(p.completed=!0,p.muteCallbacks||(p.paused=!0,p.onComplete(p),p._resolve(p))))}n=r}},So=(s,e,t,n,r)=>{const o=e.animate(n,r),i=r.delay+ +r.duration*r.iterations;o.playbackRate=s._speed,s.paused&&o.pause(),s.duration<i&&(s.duration=i,s.controlAnimation=o),s.animations.push(o),hn(e,t),vt(un,{parent:s,animation:o,$el:e,property:t,_next:null,_prev:null});const l=()=>{hn(e,t,s)};return o.onremove=l,o.onfinish=l,o},ps=(s,e,t,n,r)=>{let o=Ye(e,t,n,r);return Xe(o)?Zl.includes(s)||_e(s,"translate")?`${o}px`:_e(s,"rotate")||_e(s,"skew")?`${o}deg`:`${o}`:o},ko=(s,e,t,n,r,o)=>{let i="0";const l=I(n)?getComputedStyle(s)[e]:ps(e,n,s,r,o);return I(t)?i=Le(n)?n.map(c=>ps(e,c,s,r,o)):l:i=[ps(e,t,s,r,o),l],i};class xo{constructor(e,t){me.current&&me.current.register(this),os(cn)&&(ot&&(I(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"))?cn=!1:(is.forEach(v=>{const _=_e(v,"skew"),S=_e(v,"scale"),y=_e(v,"rotate"),b=_e(v,"translate"),k=y||_,x=k?"<angle>":S?"<number>":b?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+v,syntax:x,inherits:!1,initialValue:b?"0px":k?"0deg":S?"1":"0"})}catch{}}),cn=!0));const n=cs(e),r=n.length;r||console.warn("No target found. Make sure the element you\'re trying to animate is accessible before creating your animation.");const o=D(t.ease,ln(G.defaults.ease)),i=o.ease&&o,l=D(t.autoplay,G.defaults.autoplay),c=l&&l.link?l:!1,p=t.alternate&&t.alternate===!0,f=t.reversed&&t.reversed===!0,g=D(t.loop,G.defaults.loop),u=g===!0||g===1/0?1/0:Xe(g)?g+1:1,h=p?f?"alternate-reverse":"alternate":f?"reverse":"normal",a="forwards",d=ln(o),m=G.timeScale===1?1:Ne;this.targets=n,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||W,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!l||c!==!1,this.reversed=f,this.autoplay=l,this._speed=D(t.playbackRate,G.defaults.playbackRate),this._resolve=W,this._completed=0,this._inlineStyles=n.map(v=>v.getAttribute("style")),n.forEach((v,_)=>{const S=v[ns],y=jl.some(C=>t.hasOwnProperty(C)),b=(i?i.duration:Ye(D(t.duration,G.defaults.duration),v,_,r))*m,k=Ye(D(t.delay,G.defaults.delay),v,_,r)*m,x=D(t.composition,"replace");for(let C in t){if(!Ft(C))continue;const O={},P={iterations:u,direction:h,fill:a,easing:d,duration:b,delay:k,composite:x},w=t[C],E=y?is.includes(C)?C:Fr.get(C):!1;let L;if(be(w)){const M=w,q=D(M.ease,o),$=q.ease&&q,U=M.to,z=M.from;if(P.duration=($?$.duration:Ye(D(M.duration,b),v,_,r))*m,P.delay=Ye(D(M.delay,k),v,_,r)*m,P.composite=D(M.composition,x),P.easing=ln(q),L=ko(v,C,z,U,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=ko(v,C,z,U,_,r),So(this,v,C,O,P),!I(z))if(!E)v.style[C]=O[C][0];else{const R=`--${E}`;v.style.setProperty(R,O[R][0])}}else L=Le(w)?w.map(M=>ps(C,M,v,_,r)):ps(C,w,v,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=L,So(this,v,C,O,P)}if(y){let C=dt;for(let O in S)C+=`${$r[O]}var(--${O})) `;v.style.transform=C}}),c&&this.autoplay.link(this)}forEach(e){const t=ze(e)?n=>n[e]():e;return this.animations.forEach(t),this}get speed(){return this._speed}set speed(e){this._speed=+e,this.forEach(t=>t.playbackRate=e)}get currentTime(){const e=this.controlAnimation,t=G.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(G.timeScale===1?1:Ne);this.forEach(n=>{t>=this.duration&&n.play(),n.currentTime=t})}get progress(){return this.currentTime/this.duration}set progress(e){this.forEach(t=>t.currentTime=e*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(e,t=!1){return t&&(this.muteCallbacks=!0),e<this.duration&&(this.completed=!1),this.currentTime=e,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.forEach("cancel"),this.pause()}revert(){return this.cancel(),this.targets.forEach((e,t)=>e.setAttribute("style",this._inlineStyles[t])),this}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const ec={animate:(s,e)=>new xo(s,e),convertEase:or},wo=(s=W)=>new Je({duration:1*G.timeScale,onComplete:s},null,0).resume();function Nt(s,e,t){const n=cs(s);if(!n.length)return;const[r]=n,o=jr(r,e),i=rn(e,r,o);let l=Ot(r,i);if(I(t))return l;if(Ze(l,De),De.t===Z.NUMBER||De.t===Z.UNIT){if(t===!1)return De.n;{const c=on(r,De,t,!1);return`${N(c.n,G.precision)}${c.u}`}}}const Tt=(s,e)=>{if(!I(e))return e.duration=te,e.composition=D(e.composition,ke.none),new _t(s,e,null,0,!0).resume()},To=(s,e,t)=>{let n=!1;return ie(e,r=>{const o=r.target;if(s.includes(o)){const i=r.property,l=r._tweenType,c=rn(t,o,l);(!c||c&&c===i)&&(r.parent._tail===r&&r._tweenType===pe.TRANSFORM&&r._prev&&r._prev._tweenType===pe.TRANSFORM&&(r._prev._renderTransforms=1),mt(e,r),uo(r),n=!0)}},!0),n},bt=(s,e,t)=>{const n=Ke(s),r=e||Se,o=e&&e.controlAnimation&&e;for(let l=0,c=n.length;l<c;l++){const p=n[l];hn(p,t,o)}let i;if(r._hasChildren){let l=0;ie(r,c=>{if(!c._hasChildren)if(i=To(n,c,t),i&&!c._head)c.cancel(),mt(r,c);else{const f=c._offset+c._delay+c.duration;f>l&&(l=f)}c._head?bt(s,c,t):c._hasChildren=!1},!0),I(r.iterationDuration)||(r.iterationDuration=l)}else i=To(n,r,t);return i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),n},tc=Yr,sc=s=>s[Xr(0,s.length-1)],rc=(s,e)=>(+s).toFixed(e),nc=(s,e,t)=>`${s}`.padStart(e,t),ic=(s,e,t)=>`${s}`.padEnd(e,t),oc=(s,e,t)=>((s-e)%(t-e)+(t-e))%(t-e)+e,fs=(s,e,t,n,r)=>n+(s-e)/(t-e)*(r-n),ac=s=>s*zt/180,lc=s=>s*180/zt,Co=(s,e,t,n)=>{let r=Ne/G.defaults.frameRate;if(n!==!1){const i=n||Se._hasChildren&&Se;i&&i.deltaTime&&(r=i.deltaTime)}const o=1-Math.exp(-t*r*.1);return t?t===1?e:(1-o)*s+o*e:s},cc=(s,e=0)=>(...t)=>e?n=>s(...t,n):n=>s(n,...t),Po=s=>(...e)=>{const t=s(...e);return new Proxy(W,{apply:(n,r,[o])=>t(o),get:(n,r)=>Po((...o)=>{const i=Eo[r](...o);return l=>i(t(l))})})},nt=(s,e=0)=>(...t)=>(t.length<s.length?Po(cc(s,e)):s)(...t),Eo={$:cs,get:Nt,set:Tt,remove:bt,cleanInlineStyles:sr,random:Xr,randomPick:sc,shuffle:so,lerp:Co,sync:wo,keepTime:tc,clamp:nt(F),round:nt(N),snap:nt(At),wrap:nt(oc),interpolate:nt(gt,1),mapRange:nt(fs),roundPad:nt(rc),padStart:nt(nc),padEnd:nt(ic),degToRad:nt(ac),radToDeg:nt(lc)},uc=(s,e)=>{if(_e(e,"<")){const t=e[1]==="<",n=s._tail,r=n?n._offset+n._delay:0;return t?r:r+n.duration}},ds=(s,e)=>{let t=s.iterationDuration;if(t===te&&(t=0),I(e))return t;if(Xe(+e))return+e;const n=e,r=s?s.labels:null,o=!os(r),i=uc(s,n),l=!I(i),c=Xi.exec(n);if(c){const p=c[0],f=n.split(p),g=o&&f[0]?r[f[0]]:t,u=l?i:o?g:t,h=+f[1];return Mt(u,h,p[0])}else return l?i:o?I(r[n])?t:r[n]:t};function hc(s){return Zs((s.iterationDuration+s._loopDelay)*s.iterationCount-s._loopDelay)||te}function pn(s,e,t,n,r,o){const l=Xe(s.duration)&&s.duration<=te?t-te:t;Rt(e,l,1,1,Ge.AUTO);const c=n?new _t(n,s,e,l,!1,r,o):new Je(s,e,l);return c.init(1),vt(e,c),ie(e,p=>{const g=p._offset+p._delay+p.duration;g>e.iterationDuration&&(e.iterationDuration=g)}),e.duration=hc(e),e}class Lo extends Je{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=G.defaults;this.defaults=t?ls(t,n):n,this.onRender=e.onRender||n.onRender;const r=D(e.playbackEase,n.playbackEase);this._ease=r?It(r):null,this.iterationDuration=0}add(e,t,n){const r=be(t),o=be(e);if(r||o){if(this._hasChildren=!0,r){const i=t;if(fe(n)){const l=n,c=Ke(e),p=this.duration,f=this.iterationDuration,g=i.id;let u=0;const h=c.length;c.forEach(a=>{const d={...i};this.duration=p,this.iterationDuration=f,I(g)||(d.id=g+"-"+u),pn(d,this,ds(this,l(a,u,h,this)),a,u,h),u++})}else pn(i,this,ds(this,n),e)}else pn(e,this,ds(this,t));return this.init(1)}}sync(e,t){if(I(e)||e&&I(e.pause))return this;e.pause();const n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:"linear"},t)}set(e,t,n){return I(t)?this:(t.duration=te,t.composition=ke.replace,this.add(e,t,n))}call(e,t){return I(e)||e&&!fe(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return I(e)||e&&!ze(e)?this:(this.labels[e]=ds(this,t),this)}remove(e,t){return bt(e,this,t),this}stretch(e){const t=this.duration;if(t===Vt(e))return this;const n=e/t,r=this.labels;ie(this,o=>o.stretch(o.duration*n));for(let o in r)r[o]*=n;return super.stretch(e)}refresh(){return ie(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),ie(this,e=>e.revert,!0),sr(this)}then(e){return super.then(e)}}const pc=s=>new Lo(s).init();class fn{constructor(e,t){me.current&&me.current.register(this);const n=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let c=!0;for(let p in this.animations)if(!this.animations[p].paused&&c){c=!1;break}c&&this.callbacks.complete()},o={onBegin:n,onComplete:r,onPause:r},i={v:1,autoplay:!1},l={};if(this.targets=[],this.animations={},this.callbacks=null,!(I(e)||I(t))){for(let c in t){const p=t[c];Ft(c)?l[c]=p:_e(c,"on")?i[c]=p:o[c]=p}this.callbacks=new _t({v:0},i);for(let c in l){const p=l[c],f=be(p);let g={},u="+=0";if(f){const d=p.unit;ze(d)&&(u+=d)}else g.duration=p;g[c]=f?ls({to:u},p):u;const h=ls(o,g);h.composition=ke.replace,h.autoplay=!1;const a=this.animations[c]=new _t(e,h,null,0,!1).init();this.targets.length||this.targets.push(...a.targets),this[c]=(d,m,v)=>{const _=a._head;if(I(d)&&_){const S=_._numbers;return S&&S.length?S:_._modifier(_._number)}else return ie(a,S=>{if(Le(d))for(let y=0,b=d.length;y<b;y++)I(S._numbers[y])||(S._fromNumbers[y]=S._modifier(S._numbers[y]),S._toNumbers[y]=d[y]);else S._fromNumber=S._modifier(S._number),S._toNumber=d;I(v)||(S._ease=It(v)),S._currentTime=0}),I(m)||a.stretch(m),a.reset(1).resume(),this}}}}revert(){for(let e in this.animations)this[e]=W,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const fc=(s,e)=>new fn(s,e),Ct=Ne*10;class Ao{constructor(e={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/Ne,this.maxIterations=this.maxDuration/this.timeStep/Ne,this.m=F(D(e.mass,1),0,Ct),this.s=F(D(e.stiffness,100),1,Ct),this.d=F(D(e.damping,10),.1,Ct),this.v=F(D(e.velocity,0),-1e4,Ct),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>t===0||t===1?t:this.solve(t*this.solverDuration)}solve(e){const{zeta:t,w0:n,wd:r,b:o}=this;let i=e;return t<1?i=eo(-i*t*n)*(1*Ur(r*i)+o*Vr(r*i)):i=(1+o*i)*eo(-i*n),1-i}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:o,d:i,s:l,v:c}=this,p=this.w0=F(xt(l/o),te,Ne),f=this.zeta=i/(2*xt(l*o)),g=this.wd=f<1?p*xt(1-f*f):0;this.b=f<1?(f*p+-c)/g:-c+p;let u=0,h=0,a=0;for(;h<e&&a<t;)at(1-this.solve(u))<n?h++:h=0,this.solverDuration=u,u+=r,a++;this.duration=N(this.solverDuration*Ne,0)*G.timeScale}get mass(){return this.m}set mass(e){this.m=F(D(e,1),0,Ct),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=F(D(e,100),1,Ct),this.compute()}get damping(){return this.d}set damping(e){this.d=F(D(e,10),.1,Ct),this.compute()}get velocity(){return this.v}set velocity(e){this.v=F(D(e,0),-1e4,Ct),this.compute()}}const dn=s=>new Ao(s),Pt=s=>{s.cancelable&&s.preventDefault()};class dc{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:W,remove:W}}get x(){return this.el.x||0}set x(e){this.el.x=e}get y(){return this.el.y||0}set y(e){this.el.y=e}get width(){return this.el.width||0}set width(e){this.el.width=e}get height(){return this.el.height||0}set height(e){this.el.height=e}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class gc{constructor(e){this.$el=e,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(e,t){return this.point.x=e,this.point.y=t,this.point.matrixTransform(this.inversedMatrix)}traverseUp(e){let t=this.$el.parentElement,n=0;for(;t&&t!==H;)e(t,n),t=t.parentElement,n++}getMatrix(){const e=new DOMMatrix;return this.traverseUp(t=>{const n=getComputedStyle(t).transform;if(n){const r=new DOMMatrix(n);e.preMultiplySelf(r)}}),e}remove(){this.traverseUp((e,t)=>{this.inlineTransforms[t]=e.style.transform,e.style.transform="none"})}revert(){this.traverseUp((e,t)=>{const n=this.inlineTransforms[t];n===""?e.style.removeProperty("transform"):e.style.transform=n})}}const Ve=(s,e)=>s&&fe(s)?s(e):s;let ar=0;class Ro{constructor(e,t={}){if(!e)return;me.current&&me.current.register(this);const n=t.x,r=t.y,o=t.trigger,i=t.modifier,l=t.releaseEase,c=l&&It(l),p=!I(l)&&!I(l.ease),f=be(n)&&!I(n.mapTo)?n.mapTo:"translateX",g=be(r)&&!I(r.mapTo)?r.mapTo:"translateY",u=Ve(t.container,this);this.containerArray=Le(u)?u:null,this.$container=u&&!this.containerArray?Ke(u)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.$target=be(e)?new dc(e):Ke(e)[0],this.$trigger=Ke(o||e)[0],this.fixed=Nt(this.$target,"position")==="fixed",this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=p?l:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseYSpring=p?l:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseEase=c||Gt.outQuint,this.hasReleaseSpring=p,this.onGrab=t.onGrab||W,this.onDrag=t.onDrag||W,this.onRelease=t.onRelease||W,this.onUpdate=t.onUpdate||W,this.onSettle=t.onSettle||W,this.onSnap=t.onSnap||W,this.onResize=t.onResize||W,this.onAfterResize=t.onAfterResize||W,this.disabled=[0,0];const h={};if(i&&(h.modifier=i),I(n)||n===!0)h[f]=0;else if(be(n)){const a=n,d={};a.modifier&&(d.modifier=a.modifier),a.composition&&(d.composition=a.composition),h[f]=d}else n===!1&&(h[f]=0,this.disabled[0]=1);if(I(r)||r===!0)h[g]=0;else if(be(r)){const a=r,d={};a.modifier&&(d.modifier=a.modifier),a.composition&&(d.composition=a.composition),h[g]=d}else r===!1&&(h[g]=0,this.disabled[1]=1);this.animate=new fn(this.$target,h),this.xProp=f,this.yProp=g,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-1e12,Ht,Ht,-1e12],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=kt(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new gc(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new Je({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new Je({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!I(u),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?f:g,this.animate.callbacks.onRender=()=>{const a=this.updated,m=!(this.grabbed&&a)&&this.released,v=this.x,_=this.y,S=v-this.coords[2],y=_-this.coords[3];this.deltaX=S,this.deltaY=y,this.coords[2]=v,this.coords[3]=_,a&&(S||y)&&this.onUpdate(this),m?(this.computeVelocity(S,y),this.angle=Ks(y,S)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new Je({autoplay:!1,duration:150*G.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=t,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),be(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const n=this.velocityTime,r=kt(),o=r-n;if(o<17)return this.velocity;this.velocityTime=r;const i=this.velocityStack,l=this.velocityMultiplier,c=this.minVelocity,p=this.maxVelocity,f=this.velocityStackIndex;i[f]=N(F(xt(e*e+t*t)/o*l,c,p),5);const g=Wr(i[0],i[1],i[2]);return this.velocity=g,this.velocityStackIndex=(f+1)%3,g}setX(e,t=!1){if(this.disabled[0])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destX=n,this.snapped[0]=At(n,this.snapX),this.animate[this.xProp](n,0),this.manual=!1,this}setY(e,t=!1){if(this.disabled[1])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destY=n,this.snapped[1]=At(n,this.snapY),this.animate[this.yProp](n,0),this.manual=!1,this}get x(){return N(this.animate[this.xProp](),G.precision)}set x(e){this.setX(e,!1)}get y(){return N(this.animate[this.yProp](),G.precision)}set y(e){this.setY(e,!1)}get progressX(){return fs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(fs(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return fs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(fs(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=N(this.useWin?Ie.scrollX:this.$container.scrollLeft,0),t=N(this.useWin?Ie.scrollY:this.$container.scrollTop,0),[n,r,o,i]=this.containerPadding,l=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+n-l,this.scrollBounds[1]=e-this.targetBounds[1]-r+l,this.scrollBounds[2]=t-this.targetBounds[2]-o+l,this.scrollBounds[3]=e-this.targetBounds[3]+i-l}updateBoundingValues(){const e=this.$container;if(!e)return;const t=this.x,n=this.y,r=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const i=this.window[0]=Ie.innerWidth,l=this.window[1]=Ie.innerHeight,c=this.useWin,p=e.scrollWidth,f=e.scrollHeight,g=this.fixed,u=e.getBoundingClientRect(),[h,a,d,m]=this.containerPadding;this.dragArea[0]=c?0:u.left,this.dragArea[1]=c?0:u.top,this.scrollView[0]=c?F(p,i,p):p,this.scrollView[1]=c?F(f,l,f):f,this.updateScrollCoords();const{width:v,height:_,left:S,top:y,right:b,bottom:k}=e.getBoundingClientRect();this.dragArea[2]=N(c?F(v,i,i):v,0),this.dragArea[3]=N(c?F(_,l,l):_,0);const x=Nt(e,"overflow"),C=x==="visible",O=x==="hidden";if(this.canScroll=g?!1:this.contained&&(e===H.body&&C||!O&&!C)&&(p>this.dragArea[2]+m-a||f>this.dragArea[3]+h-d)&&(!this.containerArray||this.containerArray&&!Le(this.containerArray)),this.contained){const P=this.scroll.x,w=this.scroll.y,E=this.canScroll,L=this.$target.getBoundingClientRect(),M=E?c?0:e.scrollLeft:0,q=E?c?0:e.scrollTop:0,$=E?this.scrollView[0]-M-v:0,U=E?this.scrollView[1]-q-_:0;this.targetBounds[0]=N(L.top+w-(c?0:y),0),this.targetBounds[1]=N(L.right+P-(c?i:b),0),this.targetBounds[2]=N(L.bottom+w-(c?l:k),0),this.targetBounds[3]=N(L.left+P-(c?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+h,this.containerBounds[1]=this.containerArray[1]-a,this.containerBounds[2]=this.containerArray[2]-d,this.containerBounds[3]=this.containerArray[3]+m):(this.containerBounds[0]=-N(L.top-(g?F(y,0,l):y)+q-h,0),this.containerBounds[1]=-N(L.right-(g?F(b,0,i):b)-$+a,0),this.containerBounds[2]=-N(L.bottom-(g?F(k,0,l):k)-U+d,0),this.containerBounds[3]=-N(L.left-(g?F(S,0,i):S)+M-m,0))}this.transforms.revert(),this.coords[2]=r,this.coords[3]=o,this.setX(t,!0),this.setY(n,!0)}isOutOfBounds(e,t,n){if(!this.contained)return 0;const[r,o,i,l]=e,[c,p]=this.disabled,f=!c&&t<l||!c&&t>o,g=!p&&n<r||!p&&n>i;return f&&!g?1:!f&&g?2:f&&g?3:0}refresh(){const e=this.parameters,t=e.x,n=e.y,r=Ve(e.container,this),o=Ve(e.containerPadding,this)||0,i=Le(o)?o:[o,o,o,o],l=this.x,c=this.y,p=Ve(e.cursor,this),f={onHover:"grab",onGrab:"grabbing"};if(p){const{onHover:d,onGrab:m}=p;d&&(f.onHover=d),m&&(f.onGrab=m)}this.containerArray=Le(r)?r:null,this.$container=r&&!this.containerArray?Ke(r)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=D(i,[0,0,0,0]),this.containerFriction=F(D(Ve(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=F(D(Ve(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ve(be(t)&&!I(t.snap)?t.snap:e.snap,this),this.snapY=Ve(be(n)&&!I(n.snap)?n.snap:e.snap,this),this.scrollSpeed=D(Ve(e.scrollSpeed,this),1.5),this.scrollThreshold=D(Ve(e.scrollThreshold,this),20),this.dragSpeed=D(Ve(e.dragSpeed,this),1),this.minVelocity=D(Ve(e.minVelocity,this),0),this.maxVelocity=D(Ve(e.maxVelocity,this),50),this.velocityMultiplier=D(Ve(e.velocityMultiplier,this),1),this.cursor=p===!1?!1:f,this.updateBoundingValues();const[g,u,h,a]=this.containerBounds;this.setX(F(l,a,u),!0),this.setY(F(c,g,h),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[_,S,y,b]=this.containerPadding,[k,x]=this.scrollView,C=this.dragArea[2],O=this.dragArea[3],P=this.scroll.x,w=this.scroll.y,E=this.$container.scrollWidth,L=this.$container.scrollHeight,M=this.useWin?F(E,this.window[0],E):E,q=this.useWin?F(L,this.window[1],L):L,$=k-M,U=x-q;this.dragged&&$>0&&(this.coords[0]-=$,this.scrollView[0]=M),this.dragged&&U>0&&(this.coords[1]-=U,this.scrollView[1]=q);const z=this.scrollSpeed*10,R=this.scrollThreshold,[ae,se]=this.coords,[xe,ve,V,ee]=this.scrollBounds,re=N(F((se-xe+_)/R,-1,0)*z,0),ue=N(F((ae-ve-S)/R,0,1)*z,0),ct=N(F((se-V-y)/R,0,1)*z,0),Ae=N(F((ae-ee+b)/R,-1,0)*z,0);if(re||ct||Ae||ue){const[we,he]=this.disabled;let j=P,J=w;we||(j=N(F(P+(Ae||ue),0,k-C),0),this.coords[0]-=P-j),he||(J=N(F(w+(re||ct),0,x-O),0),this.coords[1]-=w-J),this.useWin?this.$scrollContainer.scrollBy(-(P-j),-(w-J)):this.$scrollContainer.scrollTo(j,J)}}const[e,t,n,r]=this.containerBounds,[o,i,l,c,p,f]=this.pointer;this.coords[0]+=(o-p)*this.dragSpeed,this.coords[1]+=(i-f)*this.dragSpeed,this.pointer[4]=o,this.pointer[5]=i;const[g,u]=this.coords,[h,a]=this.snapped,d=(1-this.containerFriction)*this.dragSpeed;this.setX(g>t?t+(g-t)*d:g<r?r+(g-r)*d:g,!1),this.setY(u>n?n+(u-n)*d:u<e?e+(u-e)*d:u,!1),this.computeVelocity(o-p,i-f),this.angle=Ks(i-c,o-l);const[m,v]=this.snapped;(m!==h&&this.snapX||v!==a&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let e in this.animate.animations)this.animate.animations[e].pause();return bt(this,null,"x"),bt(this,null,"y"),bt(this,null,"progressX"),bt(this,null,"progressY"),bt(this.scroll),bt(this.overshootCoords),this}scrollInView(e,t=0,n=Gt.inOutQuad){this.updateScrollCoords();const r=this.destX,o=this.destY,i=this.scroll,l=this.scrollBounds,c=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(l,r,o)){const[p,f,g,u]=l,h=N(F(o-p,-1e12,0),0),a=N(F(r-f,0,Ht),0),d=N(F(o-g,0,Ht),0),m=N(F(r-u,-1e12,0),0);new _t(i,{x:N(i.x+(m?m-t:a?a+t:0),0),y:N(i.y+(h?h-t:d?d+t:0),0),duration:I(e)?350*G.timeScale:e,ease:n,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(i.x,i.y)}}).init().then(()=>{this.canScroll=c})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Tt(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,n=Gt.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,o=this.y,[i,l,c,p]=this.containerPadding,f=this.scroll.y-this.targetBounds[0]+i+t,g=this.scroll.x-this.targetBounds[1]-l-t,u=this.scroll.y-this.targetBounds[2]-c-t,h=this.scroll.x-this.targetBounds[3]+p+t,a=this.isOutOfBounds([f,g,u,h],r,o);if(a){const[d,m]=this.disabled,v=F(At(r,this.snapX),h,g),_=F(At(o,this.snapY),f,u),S=I(e)?350*G.timeScale:e;!d&&(a===1||a===3)&&this.animate[this.xProp](v,S,n),!m&&(a===2||a===3)&&this.animate[this.yProp](_,S,n)}return this}handleDown(e){const t=e.target;if(this.grabbed||t.type==="range")return;e.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const n=e.changedTouches,r=n?n[0].clientX:e.clientX,o=n?n[0].clientY:e.clientY,{x:i,y:l}=this.transforms.normalizePoint(r,o),[c,p,f,g]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,h=this.x,a=this.y;this.coords[0]=this.coords[2]=u?h>p?p+(h-p)/u:h<g?g+(h-g)/u:h:h,this.coords[1]=this.coords[3]=u?a>f?f+(a-f)/u:a<c?c+(a-c)/u:a:a,this.pointer[0]=i,this.pointer[1]=l,this.pointer[2]=i,this.pointer[3]=l,this.pointer[4]=i,this.pointer[5]=l,this.pointer[6]=i,this.pointer[7]=l,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const d=Nt(this.$target,"zIndex",!1);ar=(d>ar?d:ar)+1,this.targetStyles=Tt(this.$target,{zIndex:ar}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Tt(H.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Gt.out(3)),this.onGrab(this),H.addEventListener("touchmove",this),H.addEventListener("touchend",this),H.addEventListener("touchcancel",this),H.addEventListener("mousemove",this),H.addEventListener("mouseup",this),H.addEventListener("selectstart",this)}handleMove(e){if(!this.grabbed)return;const t=e.changedTouches,n=t?t[0].clientX:e.clientX,r=t?t[0].clientY:e.clientY,{x:o,y:i}=this.transforms.normalizePoint(n,r),l=o-this.pointer[6],c=i-this.pointer[7];let p=e.target,f=!1,g=!1,u=!1;for(;t&&p&&p!==this.$trigger;){const h=Nt(p,"overflow-y");if(h!=="hidden"&&h!=="visible"){const{scrollTop:a,scrollHeight:d,clientHeight:m}=p;if(d>m){u=!0,f=a<=3,g=a>=d-m-3;break}}p=p.parentNode}u&&(!f&&!g||f&&c<0||g&&c>0)?(this.pointer[0]=o,this.pointer[1]=i,this.pointer[2]=o,this.pointer[3]=i,this.pointer[4]=o,this.pointer[5]=i,this.pointer[6]=o,this.pointer[7]=i):(Pt(e),this.triggerStyles||(this.triggerStyles=Tt(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Pt,{passive:!1}),this.$trigger.addEventListener("touchmove",Pt,{passive:!1}),this.$trigger.addEventListener("touchend",Pt),(!this.disabled[0]&&at(l)>3||!this.disabled[1]&&at(c)>3)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=o,this.pointer[1]=i,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[e,t]=this.disabled,[n,r,o,i,l,c]=this.pointer,[p,f,g,u]=this.containerBounds,[h,a]=this.snapped,d=this.releaseXSpring,m=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,b=this.y,k=this.computeVelocity(n-l,r-c),x=this.angle=Ks(r-i,n-o),C=k*150,O=(1-this.releaseContainerFriction)*this.dragSpeed,P=y+Ur(x)*C,w=b+Vr(x)*C,E=P>f?f+(P-f)*O:P<u?u+(P-u)*O:P,L=w>g?g+(w-g)*O:w<p?p+(w-p)*O:w,M=this.destX=F(N(At(E,this.snapX),5),u,f),q=this.destY=F(N(At(L,this.snapY),5),p,g),$=this.isOutOfBounds(this.containerBounds,P,w);let U=0,z=0,R=v,ae=v,se=0;if(S.x=y,S.y=b,!e){const ve=M===f?y>f?-1:1:y<u?-1:1,V=N(y-M,0);d.velocity=t&&_?V?C*ve/at(V):0:k;const{ease:ee,duration:re,restDuration:ue}=d;U=y===M?0:_?re:re-ue*G.timeScale,_&&(R=ee),U>se&&(se=U)}if(!t){const ve=q===g?b>g?-1:1:b<p?-1:1,V=N(b-q,0);m.velocity=e&&_?V?C*ve/at(V):0:k;const{ease:ee,duration:re,restDuration:ue}=m;z=b===q?0:_?re:re-ue*G.timeScale,_&&(ae=ee),z>se&&(se=z)}if(!_&&$&&O&&(U||z)){const ve=ke.blend;new _t(S,{x:{to:E,duration:U*.65},y:{to:L,duration:z*.65},ease:v,composition:ve}).init(),new _t(S,{x:{to:M,duration:U},y:{to:q,duration:z},ease:v,composition:ve}).init(),this.overshootTicker.stretch(Wr(U,z)).restart()}else e||this.animate[this.xProp](M,U,R),t||this.animate[this.yProp](q,z,ae);this.scrollInView(se,this.scrollThreshold,v);let xe=!1;M!==h&&(this.snapped[0]=M,this.snapX&&(xe=!0)),q!==a&&this.snapY&&(this.snapped[1]=q,this.snapY&&(xe=!0)),xe&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Pt),this.$trigger.removeEventListener("touchmove",Pt),this.$trigger.removeEventListener("touchend",Pt),H.removeEventListener("touchmove",this),H.removeEventListener("touchend",this),H.removeEventListener("touchcancel",this),H.removeEventListener("mousemove",this),H.removeEventListener("mouseup",this),H.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=Tt(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),H.removeEventListener("touchmove",this),H.removeEventListener("touchend",this),H.removeEventListener("touchcancel",this),H.removeEventListener("mousemove",this),H.removeEventListener("mouseup",this),H.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(e){switch(e.type){case"mousedown":this.handleDown(e);break;case"touchstart":this.handleDown(e);break;case"mousemove":this.handleMove(e);break;case"touchmove":this.handleMove(e);break;case"mouseup":this.handleUp();break;case"touchend":this.handleUp();break;case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":Pt(e);break}}}const mc=(s,e)=>new Ro(s,e);class Oo{constructor(e={}){me.current&&me.current.register(this);const t=e.root;let n=H;t&&(n=t.current||t.nativeElement||Ke(t)[0]||H);const r=e.defaults,o=G.defaults,i=e.mediaQueries;if(this.defaults=r?ls(r,o):o,this.root=n,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},i)for(let l in i){const c=Ie.matchMedia(i[l]);this.mediaQueryLists[l]=c,c.addEventListener("change",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=me.current,n=me.root,r=G.defaults;me.current=this,me.root=this.root,G.defaults=this.defaults;const o=this.mediaQueryLists;for(let l in o)this.matches[l]=o[l].matches;const i=e(this);return me.current=t,me.root=n,G.defaults=r,i}refresh(){return this.onceIndex=0,this.execute(()=>{let e=this.revertibles.length,t=this.revertConstructors.length;for(;e--;)this.revertibles[e].revert();for(;t--;)this.revertConstructors[t](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(n=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,fe(e)){const n=e;this.constructors.push(n),this.execute(()=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...n)=>this.execute(()=>t(...n));return this}addOnce(e){if(this.once=!0,fe(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const r=e;this.constructorsOnce[t]=r,this.execute(()=>{const o=r(this);fe(o)&&this.revertConstructorsOnce.push(o)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,n=this.constructorsOnce[t];if(fe(n))return n(this);const r=Yr(e);this.constructorsOnce[t]=r;let o;return this.execute(()=>{o=r(this)}),o}handleEvent(e){switch(e.type){case"change":this.refresh();break}}revert(){const e=this.revertibles,t=this.revertConstructors,n=this.revertiblesOnce,r=this.revertConstructorsOnce,o=this.mediaQueryLists;let i=e.length,l=t.length,c=n.length,p=r.length;for(;i--;)e[i].revert();for(;l--;)t[l](this);for(;c--;)n[c].revert();for(;p--;)r[p](this);for(let f in o)o[f].removeEventListener("change",this);e.length=0,t.length=0,this.constructors.length=0,n.length=0,r.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const vc=s=>new Oo(s),yc=()=>{const s=H.createElement("div");H.body.appendChild(s),s.style.height="100lvh";const e=s.offsetHeight;return H.body.removeChild(s),e},lr=(s,e)=>s&&fe(s)?s(e):s,cr=new Map;class _c{constructor(e){this.element=e,this.useWin=this.element===H.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new Je({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;ie(this,n=>n.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Je({autoplay:!1,frameRate:30,onUpdate:t=>{const n=t.deltaTime,r=this.prevScrollX,o=this.prevScrollY,i=this.scrollX,l=this.scrollY,c=r-i,p=o-l;this.prevScrollX=i,this.prevScrollY=l,c&&(this.backwardX=r>i),p&&(this.backwardY=o>l),this.velocity=N(n>0?Math.sqrt(c*c+p*p)/n:0,5)}}).init(),this.resizeTicker=new Je({autoplay:!1,duration:250*G.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Je({autoplay:!1,duration:500*G.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?Ie:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=N(e?Ie.scrollX:t.scrollLeft,0),this.scrollY=N(e?Ie.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=Ie.innerWidth,this.winHeight=yc()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds();let n,r;if(this.useWin)n=this.winWidth,r=this.winHeight;else{const o=t.getBoundingClientRect();n=t.clientWidth,r=t.clientHeight,this.top=o.top,this.left=o.left}this.width=n,this.height=r}refreshScrollObservers(){ie(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),ie(this,e=>{e.refresh(),e._debug&&e.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){switch(e.type){case"scroll":this.handleScroll();break}}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?Ie:this.element).removeEventListener("scroll",this),cr.delete(this.element)}}const bc=s=>{const e=s&&Ke(s)[0]||H.body;let t=cr.get(e);return t||(t=new _c(e),cr.set(e,t)),t},gs=(s,e,t,n,r)=>{const o=e==="min",i=e==="max",l=e==="top"||e==="left"||e==="start"||o?0:e==="bottom"||e==="right"||e==="end"||i?"100%":e==="center"?"50%":e,{n:c,u:p}=Ze(l,De);let f=c;return p==="%"?f=c/100*t:p&&(f=on(s,De,"px",!0).n),i&&n<0&&(f+=n),o&&r>0&&(f+=r),f},ur=(s,e,t,n,r)=>{let o;if(ze(e)){const i=Xi.exec(e);if(i){const l=i[0],c=l[0],p=e.split(l),f=p[0]==="min",g=p[0]==="max",u=gs(s,p[0],t,n,r),h=gs(s,p[1],t,n,r);if(f){const a=Mt(gs(s,"min",t),h,c);o=a<u?u:a}else if(g){const a=Mt(gs(s,"max",t),h,c);o=a>u?u:a}else o=Mt(u,h,c)}else o=gs(s,e,t,n,r)}else o=e;return N(o,0)},Mo=s=>{let e;const t=s.targets;for(let n=0,r=t.length;n<r;n++){const o=t[n];if(o[Qs]){e=o;break}}return e};let Sc=0;const Io=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class No{constructor(e={}){me.current&&me.current.register(this);const t=D(e.sync,"play pause"),n=t?It(t):null,r=t&&(t==="linear"||t===yt),o=t&&!(n===yt&&!r),i=t&&(Xe(t)||t===!0||r),l=t&&ze(t)&&!o&&!i,c=l?t.split(" ").map(f=>()=>{const g=this.linked;return g&&g[f]?g[f]():null}):null,p=l&&c.length>2;this.index=Sc++,this.id=I(e.id)?this.index:e.id,this.container=bc(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=o||i||!!c,this.syncEase=o?n:null,this.syncSmooth=i?t===!0||r?1:t:null,this.onSyncEnter=c&&!p&&c[0]?c[0]:W,this.onSyncLeave=c&&!p&&c[1]?c[1]:W,this.onSyncEnterForward=c&&p&&c[0]?c[0]:W,this.onSyncLeaveForward=c&&p&&c[1]?c[1]:W,this.onSyncEnterBackward=c&&p&&c[2]?c[2]:W,this.onSyncLeaveBackward=c&&p&&c[3]?c[3]:W,this.onEnter=e.onEnter||W,this.onLeave=e.onLeave||W,this.onEnterForward=e.onEnterForward||W,this.onLeaveForward=e.onLeaveForward||W,this.onEnterBackward=e.onEnterBackward||W,this.onLeaveBackward=e.onLeaveBackward||W,this.onUpdate=e.onUpdate||W,this.onSyncComplete=e.onSyncComplete||W,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=e,this._debug=D(e.debug,!1),this._next=null,this._prev=null,vt(this.container,this),wo(()=>{if(!this.reverted){if(!this.target){const f=Ke(e.target)[0];this.target=f||H.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;I(e.targets)?ie(e,n=>{n.targets&&!t&&(t=Mo(n))}):t=Mo(e),this.target=t||H.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:N(F(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=D(lr(e.repeat,this),!0),this.horizontal=D(lr(e.axis,this),"y")==="x",this.enter=D(lr(e.enter,this),"end start"),this.leave=D(lr(e.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const e=this.container,t=this.horizontal,n=e.element.querySelector(":scope > .animejs-onscroll-debug"),r=H.createElement("div"),o=H.createElement("div"),i=H.createElement("div"),l=Io[this.index%Io.length],c=e.useWin,p=c?e.winWidth:e.width,f=c?e.winHeight:e.height,g=e.scrollWidth,u=e.scrollHeight,h=this.container.width>360?320:260,a=t?0:10,d=t?10:0,m=t?24:h/2,v=t?m:15,_=t?60:m,S=t?_:v,y=t?"repeat-x":"repeat-y",b=P=>t?"0px "+P+"px":P+"px 2px",k=P=>`linear-gradient(${t?90:0}deg, ${P} 2px, transparent 1px)`,x=(P,w,E,L,M)=>`position:${P};left:${w}px;top:${E}px;width:${L}px;height:${M}px;`;r.style.cssText=`${x("absolute",a,d,t?g:h,t?h:u)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${t?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,o.style.cssText=`${x("sticky",0,0,t?p:m,t?m:f)}`,n||(o.style.cssText+=`background:\n ${k("#FFFF")}${b(m-10)} / 100px 100px ${y},\n ${k("#FFF8")}${b(m-10)} / 10px 10px ${y};\n `),i.style.cssText=`${x("relative",0,0,t?g:m,t?m:u)}`,n||(i.style.cssText+=`background:\n ${k("#FFFF")}${b(0)} / ${t?"100px 10px":"10px 100px"} ${y},\n ${k("#FFF8")}${b(0)} / ${t?"10px 0px":"0px 10px"} ${y};\n `);const C=[" enter: "," leave: "];this.coords.forEach((P,w)=>{const E=w>1,L=(E?0:this.offset)+P,M=w%2,q=L<S,$=L>(E?t?p:f:t?g:u)-S,U=(E?M&&!q:!M&&!q)||$,z=H.createElement("div"),R=H.createElement("div"),ae=t?U?"right":"left":U?"bottom":"top",se=U?(t?_:v)+(E?t?-1:$?0:-2:t?-1:-2):t?1:0;R.innerHTML=`${this.id}${C[M]}${this.thresholds[w]}`,z.style.cssText=`${x("absolute",0,0,_,v)}\n display: flex;\n flex-direction: ${t?"column":"row"};\n justify-content: flex-${E?"start":"end"};\n align-items: flex-${U?"end":"start"};\n border-${ae}: 2px solid ${l};\n `,R.style.cssText=`\n overflow: hidden;\n max-width: ${h/2-10}px;\n height: ${v};\n margin-${t?U?"right":"left":U?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${t&&U||!t&&!E?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${M?l:"rgba(0,0,0,.75)"};\n background-color: ${M?"rgba(0,0,0,.65)":l};\n border: 2px solid ${M?l:"transparent"};\n border-${t?U?"top-left":"top-right":U?"top-left":"bottom-left"}-radius: 5px;\n border-${t?U?"bottom-left":"bottom-right":U?"top-right":"bottom-right"}-radius: 5px;\n `,z.appendChild(R);let xe=L-se+(t?1:0);z.style[t?"left":"top"]=`${xe}px`,(E?o:i).appendChild(z)}),r.appendChild(o),r.appendChild(i),e.element.appendChild(r),n||r.classList.add("animejs-onscroll-debug"),this.$debug=r,Nt(e.element,"position")==="static"&&(this.debugStyles=Tt(e.element,{position:"relative "}))}updateBounds(){this._debug&&this.removeDebug();let e;const t=this.target,n=this.container,r=this.horizontal,o=this.linked;let i,l=t;for(o&&(i=o.currentTime,o.seek(0,!0)),l.parentElement;l&&l!==n.element&&l!==H.body;){const L=Nt(l,"position")==="sticky"?Tt(l,{position:"static"}):!1;l=l.parentElement,L&&(e||(e=[]),e.push(L))}const c=t.getBoundingClientRect(),p=r?c.left+n.scrollX-n.left:c.top+n.scrollY-n.top,f=r?c.width:c.height,g=r?n.width:n.height,h=(r?n.scrollWidth:n.scrollHeight)-g,a=this.enter,d=this.leave;let m="start",v="end",_="end",S="start";if(ze(a)){const L=a.split(" ");_=L[0],m=L.length>1?L[1]:m}else if(be(a)){const L=a;I(L.container)||(_=L.container),I(L.target)||(m=L.target)}else Xe(a)&&(_=a);if(ze(d)){const L=d.split(" ");S=L[0],v=L.length>1?L[1]:v}else if(be(d)){const L=d;I(L.container)||(S=L.container),I(L.target)||(v=L.target)}else Xe(d)&&(S=d);const y=ur(t,m,f),b=ur(t,v,f),k=y+p-g,x=b+p-h,C=ur(t,_,g,k,x),O=ur(t,S,g,k,x),P=y+p-C,w=b+p-O,E=w-P;this.offset=p,this.offsetStart=P,this.offsetEnd=w,this.distance=E<=0?0:E,this.thresholds=[m,v,_,S],this.coords=[y,b,C,O],e&&e.forEach(L=>L.revert()),o&&o.seek(i,!0),this._debug&&this.debug()}handleScroll(){const e=this.linked,t=this.sync,n=this.syncEase,r=this.syncSmooth,o=e&&(n||r),i=this.horizontal,l=this.container,c=this.scroll,p=c<=this.offsetStart,f=c>=this.offsetEnd,g=!p&&!f,u=c===this.offsetStart||c===this.offsetEnd,h=!this.hasEntered&&u,a=this._debug&&this.$debug;let d=!1,m=!1,v=this.progress;if(p&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),o){const _=e.progress;if(r&&Xe(r)){if(r<1){const y=_<v&&v===1?1e-4:_>v&&!v?-1e-4:0;v=N(Co(_,v,gt(.01,.2,r),!1)+y,6)}}else n&&(v=n(v));d=v!==this.prevProgress,m=_===1,d&&!m&&r&&_&&l.wakeTicker.restart()}if(a){const _=i?l.scrollY:l.scrollX;a.style[i?"top":"left"]=_+10+"px"}(g&&!this.isInView||h&&!this.forceEnter&&!this.hasEntered)&&(g&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(a&&g&&(a.style.zIndex=`${this.container.zIndex++}`),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,h&&(this.forceEnter=!0)):g&&(this.forceEnter=!1)),(g||!g&&this.isInView)&&(d=!0),d&&(o&&e.seek(e.duration*v),this.onUpdate(this)),!g&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),t&&!r&&(m=!0)),v>=1&&this.began&&!this.completed&&(t&&m||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),v<1&&this.completed&&(this.completed=!1),this.prevProgress=v}revert(){if(this.reverted)return;const e=this.container;return mt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const kc=(s={})=>new No(s),hr=typeof Intl<"u"&&Intl.Segmenter,xc=/\\{value\\}/g,wc=/\\{i\\}/g,Tc=/(\\s+)/,Cc=/^\\s+$/,gn="line",ms="word",vs="char",ys="data-line";let mn=null,vn=null,pr=null;const Bo=s=>s.isWordLike||s.segment===" "||Xe(+s.segment),yn=s=>s.setAttribute("aria-hidden","true"),fr=(s,e)=>[...s.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Pc={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Do=s=>{if(!s.childElementCount&&!s.textContent.trim()){const e=s.parentElement;s.remove(),e&&Do(e)}},qo=(s,e,t)=>{const n=s.getAttribute(ys);(n!==null&&+n!==e||s.tagName==="BR")&&t.add(s);let r=s.childElementCount;for(;r--;)qo(s.children[r],e,t);return t},_n=(s,e={})=>{let t="";const n=ze(e.class)?` class="${e.class}"`:"",r=D(e.clone,!1),o=D(e.wrap,!1),i=o?o===!0?"clip":o:r?"clip":!1;if(o&&(t+=`<span${i?` style="overflow:${i};"`:""}>`),t+=`<span${n}${r?\' style="position:relative;"\':""} data-${s}="{i}">`,r){const l=r==="left"?"-100%":r==="right"?"100%":"0",c=r==="top"?"-100%":r==="bottom"?"100%":"0";t+="<span>{value}</span>",t+=`<span inert style="position:absolute;top:${c};left:${l};white-space:nowrap;">{value}</span>`}else t+="{value}";return t+="</span>",o&&(t+="</span>"),t},bn=(s,e,t,n,r,o,i,l,c)=>{const p=r===gn,f=r===vs,g=`_${r}_`,u=fe(s)?s(t):s,h=p?"block":"inline-block";pr.innerHTML=u.replace(xc,`<i class="${g}"></i>`).replace(wc,`${f?c:p?i:l}`);const a=pr.content,d=a.firstElementChild,m=a.querySelector(`[data-${r}]`)||d,v=a.querySelectorAll(`i.${g}`),_=v.length;if(_){d.style.display=h,m.style.display=h,m.setAttribute(ys,`${i}`),p||(m.setAttribute("data-word",`${l}`),f&&m.setAttribute("data-char",`${c}`));let S=_;for(;S--;){const y=v[S],b=y.parentElement;b.style.display=h,p?b.innerHTML=t.innerHTML:b.replaceChild(t.cloneNode(!0),y)}e.push(m),n.appendChild(a)}else console.warn(\'The expression "{value}" is missing from the provided template.\');return o&&(d.style.outline=`1px dotted ${Pc[r]}`),d};class Ho{constructor(e,t={}){mn||(mn=hr?new hr([],{granularity:ms}):{segment:a=>{const d=[],m=a.split(Tc);for(let v=0,_=m.length;v<_;v++){const S=m[v];d.push({segment:S,isWordLike:!Cc.test(S)})}return d}}),vn||(vn=hr?new hr([],{granularity:"grapheme"}):{segment:a=>[...a].map(d=>({segment:d}))}),!pr&&ot&&(pr=H.createElement("template")),me.current&&me.current.register(this);const{words:n,chars:r,lines:o,accessible:i,includeSpaces:l,debug:c}=t,p=(e=Le(e)?e[0]:e)&&e.nodeType?e:(Jr(e)||[])[0],f=o===!0?{}:o,g=n===!0||I(n)?{}:n,u=r===!0?{}:r;this.debug=D(c,!1),this.includeSpaces=D(l,!1),this.accessible=D(i,!0),this.linesOnly=f&&!g&&!u,this.lineTemplate=be(f)?_n(gn,f):f,this.wordTemplate=be(g)||this.linesOnly?_n(ms,g):g,this.charTemplate=be(u)?_n(vs,u):u,this.$target=p,this.html=p&&p.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const h=()=>this.html&&(f||g||u)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const a=p.offsetWidth;a!==this.width&&(this.width=a,h())},150)}),this.lineTemplate&&!this.ready?H.fonts.ready.then(h):h(),p?this.resizeObserver.observe(p):console.warn("No Text Splitter target found.")}addEffect(e){if(!fe(e))return console.warn("Effect must return a function.");const t=Yr(e);return this.effects.push(t),this.ready&&(this.effectsCleanups[this.effects.length-1]=t(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(e=>fe(e)?e(this):e.revert&&e.revert()),this.$target.innerHTML=this.html,this}splitNode(e){const t=this.wordTemplate,n=this.charTemplate,r=this.includeSpaces,o=this.debug,i=e.nodeType;if(i===3){const l=e.nodeValue;if(l.trim()){const c=[],p=this.words,f=this.chars,g=mn.segment(l),u=H.createDocumentFragment();let h=null;for(const a of g){const d=a.segment,m=Bo(a);if(!h||m&&h&&Bo(h))c.push(d);else{const v=c.length-1;!c[v].includes(" ")&&!d.includes(" ")?c[v]+=d:c.push(d)}h=a}for(let a=0,d=c.length;a<d;a++){const m=c[a];if(m.trim()){const v=c[a+1],_=r&&v&&!v.trim(),S=m,y=n?vn.segment(S):null,b=n?H.createDocumentFragment():H.createTextNode(_?m+" ":m);if(n){const k=[...y];for(let x=0,C=k.length;x<C;x++){const O=k[x],w=x===C-1&&_?O.segment+" ":O.segment,E=H.createTextNode(w);bn(n,f,E,b,vs,o,-1,p.length,f.length)}}t?bn(t,p,b,u,ms,o,-1,p.length,f.length):n?u.appendChild(b):u.appendChild(H.createTextNode(m)),_&&a++}else{if(a&&r)continue;u.appendChild(H.createTextNode(m))}}e.parentNode.replaceChild(u,e)}}else if(i===1){const l=[...e.childNodes];for(let c=0,p=l.length;c<p;c++)this.splitNode(l[c])}}split(e=!1){const t=this.$target,n=!!this.cache&&!e,r=this.lineTemplate,o=this.wordTemplate,i=this.charTemplate,l=H.fonts.status!=="loading",c=r&&l;this.ready=!r||l,(c||e)&&this.effectsCleanups.forEach(u=>fe(u)&&u(this)),n||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),c&&(n&&(t.innerHTML=this.cache),this.lines.length=0,o&&(this.words=fr(t,ms))),i&&(c||o)&&(this.chars=fr(t,vs));const p=this.words.length?this.words:this.chars;let f,g=0;for(let u=0,h=p.length;u<h;u++){const a=p[u],{top:d,height:m}=a.getBoundingClientRect();f&&d-f>m*.5&&g++,a.setAttribute(ys,`${g}`);const v=a.querySelectorAll(`[${ys}]`);let _=v.length;for(;_--;)v[_].setAttribute(ys,`${g}`);f=d}if(c){const u=H.createDocumentFragment(),h=new Set,a=[];for(let d=0;d<g+1;d++){const m=t.cloneNode(!0);qo(m,d,new Set).forEach(v=>{const _=v.parentElement;_&&h.add(_),v.remove()}),a.push(m)}h.forEach(Do);for(let d=0,m=a.length;d<m;d++)bn(r,this.lines,a[d],u,gn,this.debug,d);t.innerHTML="",t.appendChild(u),o&&(this.words=fr(t,ms)),i&&(this.chars=fr(t,vs))}if(this.linesOnly){const u=this.words;let h=u.length;for(;h--;){const a=u[h];a.replaceWith(a.textContent)}u.length=0}if(this.accessible&&(c||!n)){const u=H.createElement("span");u.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",u.innerHTML=this.html,t.insertBefore(u,t.firstChild),this.lines.forEach(yn),this.words.forEach(yn),this.chars.forEach(yn)}return this.width=t.offsetWidth,(c||e)&&this.effects.forEach((u,h)=>this.effectsCleanups[h]=u(this)),this}refresh(){this.split(!0)}}const dr={split:(s,e)=>new Ho(s,e)},gr=(s,e={})=>{let t=[],n=0;const r=e.from,o=e.reversed,i=e.ease,l=!I(i),p=l&&!I(i.ease)?i.ease:l?It(i):null,f=e.grid,g=e.axis,u=e.total,h=I(r)||r===0||r==="first",a=r==="center",d=r==="last",m=r==="random",v=Le(s),_=e.use,S=Lt(v?s[0]:s),y=v?Lt(s[1]):0,b=Gi.exec((v?s[1]:s)+dt),k=e.start||0+(v?S:0);let x=h?0:Xe(r)?r:0;return(C,O,P,w)=>{const[E]=cs(C),L=I(u)?P:u,M=I(_)?!1:fe(_)?_(E,O,L):Ot(E,_),q=Xe(M)||ze(M)&&Xe(+M)?+M:O;if(a&&(x=(L-1)/2),d&&(x=L-1),!t.length){for(let R=0;R<L;R++){if(!f)t.push(at(x-R));else{const ae=a?(f[0]-1)/2:x%f[0],se=a?(f[1]-1)/2:as(x/f[0]),xe=R%f[0],ve=as(R/f[0]),V=ae-xe,ee=se-ve;let re=xt(V*V+ee*ee);g==="x"&&(re=-V),g==="y"&&(re=-ee),t.push(re)}n=Wr(...t)}p&&(t=t.map(R=>p(R/n)*n)),o&&(t=t.map(R=>g?R<0?R*-1:-R:at(n-R))),m&&(t=so(t))}const $=v?(y-S)/n:S;let z=(w?ds(w,I(e.start)?w.iterationDuration:k):k)+($*N(t[q],2)||0);return e.modifier&&(z=e.modifier(z)),b&&(z=`${z}${b[2]}`),z}},Ec=Object.freeze(Object.defineProperty({__proto__:null,Animatable:fn,Draggable:Ro,JSAnimation:_t,Scope:Oo,ScrollObserver:No,Spring:Ao,TextSplitter:Ho,Timeline:Lo,Timer:Je,WAAPIAnimation:xo,animate:hs,createAnimatable:fc,createDraggable:mc,createScope:vc,createSpring:dn,createTimeline:pc,createTimer:zl,eases:Gt,engine:Se,onScroll:kc,scrollContainers:cr,stagger:gr,svg:Nl,text:dr,utils:Eo,waapi:ec},Symbol.toStringTag,{value:"Module"}));class Lc{constructor(){this.animations={},this.linkAnimations=new Map,this.registerAnimation("typewriter",function(e,t,n,r){const{chars:o}=dr.split(e,{words:!1,chars:!0}),i=t.fadeDuration||100,l=t.interval||100;hs(o,{opacity:[0,1],easing:"linear",duration:i,delay:gr(l,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("toast",function(e,t,n,r){const{words:o}=dr.split(e,{words:!0,chars:!1}),i=t.fadeDuration||100,l=t.interval||200;hs(o,{opacity:[0,1],y:[{to:["100%","0%"]}],easing:"linear",duration:i,delay:gr(l,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("fadeIn",function(e,t,n,r){const o=t.duration||500;hs(e,{opacity:[0,1],easing:t.easing||"easeOutQuad",duration:o,delay:t.start||0,loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation("continue",function(e,t,n){e.classList.add("squiffy-continue");const r=t.style||"pulse";let o=null,i=null;r==="wave"?(e.classList.add("squiffy-continue-wave"),i=dr.split(e,{words:!1,chars:!0}).chars,o=hs(i,{opacity:[1,.3,1],easing:"easeInOutSine",duration:1200,delay:gr(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const l=()=>{if(e.classList.remove("squiffy-continue","squiffy-continue-wave",`squiffy-continue-${r}`),e.removeEventListener("click",l),o&&(o.pause(),i))for(const c of i)c.style.opacity="1";n()};e.addEventListener("click",l)})}registerAnimation(e,t,n={}){this.animations[e]={handler:t,options:n}}isInitiallyHidden(e){return this.animations[e]?.options.initiallyHidden??!1}runAnimation(e,t,n,r,o){const i=this.animations[e];i?i.handler(t,n,r,o):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}runLinkAnimation(e){const t=this.linkAnimations.get(e);t&&t()}}const Ac={animejs:Ec},Fo="input:not([disabled]), textarea:not([disabled]), select:not([disabled])",Rc="a.squiffy-link[data-section], a.squiffy-link[data-passage]";function $o(s){if(!s)return!0;const e=s.querySelectorAll(Fo);for(const t of e)if(!t.checkValidity())return!1;return!0}function Sn(s){if(!s)return;const e=$o(s),t=s.querySelectorAll(Rc);for(const n of t)e?(n.classList.remove("validation-disabled"),n.removeAttribute("aria-disabled")):(n.classList.add("validation-disabled"),n.setAttribute("aria-disabled","true"))}function mr(s){if(!s)return;const e=s.querySelectorAll(Fo);for(const t of e)t.addEventListener("input",()=>Sn(s)),t.addEventListener("change",()=>Sn(s)),t.addEventListener("invalid",n=>{n.preventDefault(),t.classList.add("squiffy-invalid")}),t.addEventListener("input",()=>{t.checkValidity()&&t.classList.remove("squiffy-invalid")});Sn(s)}const Oc=async s=>{let e,t,n,r,o,i=0;const l=new rl,c=[];let p=!1;async function f(T){if(p||T.closest(".squiffy-output-section")!==n||T.classList.contains("disabled")||!$o(n))return!1;const B=T.getAttribute("data-passage"),Q=T.getAttribute("data-section");if(B!==null)return u(T),J("_turncount",j("_turncount")+1),await d(T),B&&(o=null,await b(B)),l.emit("linkClick",{linkType:"passage"}),!0;if(Q!==null)return await d(T),Q&&await v(Q),l.emit("linkClick",{linkType:"section"}),!0;const[X,ye,Pe]=Ue.handleLink(T);return X?(Pe?.disableLink&&u(T),C(),l.emit("linkClick",{linkType:ye}),!0):!1}async function g(T){const A=T.target;A.classList.contains("squiffy-link")&&await f(A)}function u(T){T.classList.add("disabled"),T.setAttribute("tabindex","-1")}function h(T){T.classList.remove("disabled"),T.removeAttribute("tabindex")}async function a(){O()||await v(e.start)}async function d(T){qe.runLinkAnimation(T),await y();const A=T.getAttribute("data-set");if(A){const B=JSON.parse(A);for(const Q of B)m(Q)}}function m(T){T=T.replace(/^(\\w*\\s*):=(.*)$/,(Q,X,ye)=>X+"="+$.processText(ye,!0));const B=/^([\\w]*)\\s*=\\s*(.*)$/.exec(T);if(B){const Q=B[1];let X=B[2];X==="true"?J(Q,!0):X==="false"?J(Q,!1):isNaN(X)?(X.startsWith("@")&&(X=j(X.substring(1))),J(Q,X)):J(Q,parseFloat(X))}else{const X=/^([\\w]*)\\s*([+\\-*/])=\\s*(.*)$/.exec(T);if(X){const ye=X[1],Pe=X[2];let Ee=X[3];Ee.startsWith("@")&&(Ee=j(Ee.substring(1)));const je=parseFloat(Ee);let de=j(ye);de===null&&(de=0),Pe=="+"&&(de+=je),Pe=="-"&&(de-=je),Pe=="*"&&(de*=je),Pe=="/"&&(de/=je),J(ye,de)}else{let ye=!0;T.startsWith("not ")&&(T=T.substring(4),ye=!1),J(T,ye)}}}async function v(T){const A=se();if(t=e.sections[T],!t)return;J("_section",T),he.setSeen(T);const B=e.sections[""];(B?.clear||t.clear)&&M(),w(T);const Q=n;if(B&&(await S(B,"[[]]"),j("_section")!==T)){Q.remove();return}if(await S(t,`[[${T}]]`),j("_section")!==T){Q.remove();return}mr(n),J("_turncount",0),Ae(),C();const X=se();X!=A&&l.emit("canGoBackChanged",{canGoBack:X})}function _(T,A=null){const B={get:j,set:J,ui:{transition:St,write:$.write,scrollToEnd:$.scrollToEnd},story:{go:v},element:ve,import:Ac,...A};e.js[T](B,j,J)}async function S(T,A){if(T.attributes&&await k(T.attributes),T.jsIndex!==void 0){const B=j("_section");if(_(T.jsIndex),j("_section")!==B)return}$.write(T.text||"",A),await y()}async function y(){p=!0,n.classList.add("links-disabled");for(const T of c)await T();c.length=0,p=!1,n.classList.remove("links-disabled")}async function b(T){const A=se();let B=t.passages&&t.passages[T];const Q=e.sections[""];if(!B&&Q&&Q.passages&&(B=Q.passages[T]),!B)throw`No passage named ${T} in the current section or master section`;he.setSeen(T);const X=[],ye=[];if(Q&&Q.passages){const de=Q.passages[""];de&&(X.push(de),ye.push(()=>S(de,"[[]][]")))}const Pe=t.passages&&t.passages[""];Pe&&(X.push(Pe),ye.push(()=>S(Pe,`[[${j("_section")}]][]`))),X.push(B),ye.push(()=>S(B,`[[${j("_section")}]][${T}]`));const Ee="@"+j("_turncount");if(t.passages){if(Ee in t.passages){const de=t.passages[Ee];X.push(de),ye.push(()=>S(de,`[[${j("_section")}]][${Ee}]`))}if("@last"in t.passages&&j("_turncount")>=(t.passageCount||0)){const de=t.passages["@last"];X.push(de),ye.push(()=>S(de,`[[${j("_section")}]][${Ee}]`))}}X.some(de=>de.clear)&&(M(),E()),r=document.createElement("div"),r.classList.add("squiffy-output-passage"),r.setAttribute("data-passage",`${T}`),n.appendChild(r);for(const de of ye)await de();mr(n),Ae(),C();const je=se();je!=A&&l.emit("canGoBackChanged",{canGoBack:je})}async function k(T){for(const A of T)m(A)}function x(){he.reset(),ee.scroll==="element"||ee.scroll==="none"?(V.innerHTML="",a()):location.reload()}function C(){J("_output",V.innerHTML)}function O(){const T=()=>{e.uiJsIndex!==void 0&&_(e.uiJsIndex,{registerAnimation:qe.registerAnimation.bind(qe)})};he.load();const A=j("_output");return A?(V.innerHTML=A,z(),R(),o=V.querySelector(".squiffy-output-block:last-child"),t=e.sections[j("_section")],T(),ge.onLoad(),mr(n),!0):(T(),!1)}function P(){o=document.createElement("div"),o.classList.add("squiffy-output-block"),(r||n)?.appendChild(o)}function w(T){n&&(n.querySelectorAll("input").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&J(B,A.value),A.disabled=!0}),n.querySelectorAll("[contenteditable]").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&J(B,A.innerHTML),A.contentEditable="false"}),n.querySelectorAll("textarea").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&J(B,A.value),A.disabled=!0}),n.querySelectorAll("select").forEach(A=>{const B=A.getAttribute("data-attribute")||A.id;B&&J(B,A.value),A.disabled=!0})),r=null,E(T),P()}function E(T){n=document.createElement("div"),n.classList.add("squiffy-output-section"),n.setAttribute("data-section",T??j("_section")),T||n.setAttribute("data-clear","true"),V.appendChild(n)}function L(){return V.querySelector(".squiffy-clear-stack")}function M(){let T=L();T||(T=document.createElement("div"),T.classList.add("squiffy-clear-stack"),T.style.display="none",V.prepend(T));const A=document.createElement("div");T.appendChild(A);for(const B of[...V.children])B!==T&&A.appendChild(B)}function q(){const T=L();for(const B of[...V.children])B!==T&&B.remove();const A=T.children[T.children.length-1];for(const B of[...A.children])V.appendChild(B);A.remove()}const $={write:(T,A)=>{i=V.scrollHeight;const B=$.processText(T,!1).trim();o||P();const Q=document.createElement("div");A&&Q.setAttribute("data-source",A),Q.innerHTML=B,ge.onWrite(Q),o.appendChild(Q),mr(n),$.scrollToEnd()},clearScreen:()=>{M(),E()},scrollToEnd:()=>{if(ee.scroll!=="none")if(ee.scroll==="element")V.lastElementChild.scrollIntoView({block:"end",inline:"nearest",behavior:"smooth"});else{let T=i;const A=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(T>A){const B=document.documentElement.scrollHeight-window.innerHeight;T>B&&(T=B),window.scrollTo({top:T,behavior:"smooth"})}}},processText:(T,A)=>Te.process(T,A)};function U(T){if(T.start!=e.start){e=T,he.reset(),V.innerHTML="",v(e.start);return}il(e,T,V,$,u,A=>k(A)),e=T,z(),R()}function z(){const T=V.querySelectorAll(".squiffy-output-section:last-child");n=T[T.length-1];const A=n.getAttribute("data-section");t=e.sections[A]}function R(){r=n.querySelector(".squiffy-output-passage:last-child")}function ae(){const T=L(),A=V.querySelectorAll(".squiffy-output-section").length+V.querySelectorAll(".squiffy-output-passage").length;return T?A+T.children.length:A}function se(){return ae()>1}function xe(){if(!se())return;const T=L();if(r){const A=r.getAttribute("data-passage");we(r.getAttribute("data-undo")),r.remove();let B=!1,Q=!1;for(const X of V.children)if(X!==T){if(X.getAttribute("data-clear")=="true"&&X.children.length==0){B=!0;continue}Q=!0;break}B&&!Q&&(q(),z());for(const X of n.querySelectorAll("a.squiffy-link[data-passage]"))X.getAttribute("data-passage")==A&&h(X);R()}else{we(n.getAttribute("data-undo")),n.remove();let A=!1;for(const B of[...V.children])if(B!==T){A=!0;break}A||q(),z(),R()}se()||l.emit("canGoBackChanged",{canGoBack:!1})}const ve=s.element,V=document.createElement("div");ve.appendChild(V),e=s.story;const ee={scroll:s.scroll||"body",persist:s.persist===void 0?!0:s.persist,onSet:s.onSet||(()=>{})};let re="";ee.persist&&(s.storyId!==void 0?re=s.storyId:window.location.protocol==="file:"?re=e.id||"":re=window.location.pathname,re||(console.warn("Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled."),ee.persist=!1)),ee.scroll==="element"&&(V.style.overflowY="auto"),V.addEventListener("click",g),V.addEventListener("keypress",async function(T){T.key==="Enter"&&await g(T)});let ue={};const ct=function(T,A){T!="_output"&&(T in ue||(ue[T]=A))},Ae=function(){(r??n).setAttribute("data-undo",JSON.stringify(ue)),ue={}},we=function(T){if(!T)return;const A=JSON.parse(T);if(A)for(const B of Object.keys(A))he.setInternal(B,A[B],!1)},he=new nl(ee.persist,re,ee.onSet,l,ct),j=he.get.bind(he),J=he.set.bind(he),Te=new sl(e,he,()=>t),Ue=new pl,Ce=T=>T in e.sections&&e.sections[T].text||null,Re=T=>t.passages&&T in t.passages?t.passages[T].text||null:"passages"in e.sections[""]&&e.sections[""].passages&&T in e.sections[""].passages&&e.sections[""].passages[T].text||null,St=T=>{c.push(T)},qe=new Lc,ge=new ol(V,Te,he,Ue,Ce,Re,$.processText,St,qe,l);return ge.add(rs.ReplaceLabel()),ge.add(rs.RotateSequencePlugin()),ge.add(rs.RandomPlugin()),ge.add(rs.LivePlugin()),ge.add(rs.AnimatePlugin()),{begin:a,restart:x,get:j,set:J,clickLink:f,update:U,goBack:xe,on:(T,A)=>l.on(T,A),off:(T,A)=>l.off(T,A),once:(T,A)=>l.once(T,A)}};return ut.init=Oc,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"}),ut})({});\n//# sourceMappingURL=squiffy.runtime.global.js.map\n', Ye = `/* Core Squiffy Runtime Styles */
442
+ var xe = 'var squiffyRuntime=(function(gr){Object.defineProperty(gr,Symbol.toStringTag,{value:"Module"});var Io=Object.create,Es=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,No=Object.getOwnPropertyNames,Mo=Object.getPrototypeOf,mi=Object.prototype.hasOwnProperty,ue=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Yt=(e,t)=>{let s={};for(var r in e)Es(s,r,{get:e[r],enumerable:!0});return t||Es(s,Symbol.toStringTag,{value:"Module"}),s},Do=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=No(t),n=0,o=i.length,a;n<o;n++)a=i[n],!mi.call(e,a)&&a!==s&&Es(e,a,{get:(h=>t[h]).bind(null,a),enumerable:!(r=Oo(t,a))||r.enumerable});return e},Bo=(e,t,s)=>(s=e!=null?Io(Mo(e)):{},Do(t||!e||!e.__esModule||!mi.call(e,"default")?Es(s,"default",{value:e,enumerable:!0}):s,e));function is(e){"@babel/helpers - typeof";return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(e)}function Ho(e,t){if(is(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(is(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $o(e){var t=Ho(e,"string");return is(t)=="symbol"?t:t+""}function Pe(e,t,s){return(t=$o(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}var As;function mr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=mr();function vi(e){Nt=e}var Mt={exec:()=>null};function Gt(e){let t=[];return s=>{let r=Math.max(0,Math.min(3,s-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function me(e,t=""){let s=typeof e=="string"?e:e.source,r={replace:(i,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(Ve.caret,"$1"),s=s.replace(i,o),r},getRegex:()=>new RegExp(s,t)};return r}var qo=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Ve={codeRemoveIndent:/^(?: {1,4}| {0,3}\\t)/gm,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\] +\\S/,listReplaceTask:/^\\[[ xX]\\] +/,listTaskCheckbox:/\\[[ xX]\\]/,anyLine:/\\n.*\\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\||\\| *$/g,tableRowBlankLine:/\\n[ \\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\\s|>)/i,endPreScriptTag:/^<\\/(pre|code|kbd|script)(\\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^\'"]*[^\\s])\\s+([\'"])(.*)\\2/,unicodeAlphaNumeric:/[\\p{L}\\p{N}]/u,escapeTest:/[&<>"\']/,escapeReplace:/[&<>"\']/g,escapeTestNoEncode:/[<>"\']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,escapeReplaceNoEncode:/[<>"\']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,caret:/(^|[^\\[])\\^/g,percentDecode:/%25/g,findPipe:/\\|/g,splitPipe:/ \\|/,slashPipe:/\\\\\\|/g,carriageReturn:/\\r\\n|\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\S*/,endingNewline:/\\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\\\n]*)?(?:\\\\n|$))`),nextBulletRegex:Gt(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ ][^\\\\n]*)?(?:\\\\n|$))`)),hrRegex:Gt(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`)),fencesBeginRegex:Gt(e=>new RegExp(`^ {0,${e}}(?:\\`\\`\\`|~~~)`)),headingBeginRegex:Gt(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Gt(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Gt(e=>new RegExp(`^ {0,${e}}>`))},Fo=/^(?:[ \\t]*(?:\\n|$))+/,Vo=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,zo=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,ns=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,Uo=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,vr=/ {0,3}(?:[*+-]|\\d{1,9}[.)])/,yi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,_i=me(yi).replace(/bull/g,vr).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/\\|table/g,"").getRegex(),Wo=me(yi).replace(/bull/g,vr).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/table/g,/ {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/).getRegex(),yr=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \\t]+\\n)[^\\n]+)*)/,Xo=/^[^\\n]+/,_r=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\])+/,Yo=me(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace("label",_r).replace("title",/(?:"(?:\\\\"?|[^"\\\\])*"|\'[^\'\\n]*(?:\\n[^\'\\n]+)*\\n?\'|\\([^()]*\\))/).getRegex(),Go=me(/^(bull)([ \\t][^\\n]*?)?(?:\\n|$)/).replace(/bull/g,vr).getRegex(),Ls="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",br=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,Zo=me("^ {0,3}(?:<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n*|$)|comment[^\\\\n]*(\\\\n+|$)|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>[^\\\\n]*\\\\n*|$)|<![A-Z][\\\\s\\\\S]*?(?:>[^\\\\n]*\\\\n*|$)|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>[^\\\\n]*\\\\n*|$)|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$)|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$)|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$))","i").replace("comment",br).replace("tag",Ls).replace("attribute",/ +[a-zA-Z:_][\\w.:-]*(?: *= *"[^"\\n]*"| *= *\'[^\'\\n]*\'| *= *[^\\s"\'=<>`]+)?/).getRegex(),bi=e=>me(yr).replace("hr",ns).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ls).getRegex(),Qo=bi(/ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/),Jo=bi(/ {0,3}(?:[*+-]|\\d{1,9}[.)])(?:[ \\t]|\\n|$)/),Sr={blockquote:me(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/).replace("paragraph",Jo).getRegex(),code:Vo,def:Yo,fences:zo,heading:Uo,hr:ns,html:Zo,lheading:_i,list:Go,newline:Fo,paragraph:Qo,table:Mt,text:Xo},Si=me("^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)").replace("hr",ns).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\\\t]").replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ls).getRegex(),Ko={...Sr,lheading:Wo,table:Si,paragraph:me(yr).replace("hr",ns).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("|lheading","").replace("table",Si).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\\\t]+[^ \\\\t\\\\n]").replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ls).getRegex()},jo={...Sr,html:me(`^ *(?:comment *(?:\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)|<tag(?:"[^"]*"|\'[^\']*\'|\\\\s[^\'"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))`).replace("comment",br).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b").getRegex(),def:/^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +(["(][^\\n]+[")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:Mt,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:me(yr).replace("hr",ns).replace("heading",` *#{1,6} *[^\n]`).replace("lheading",_i).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ea=/^\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,ta=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,ki=/^( {2,}|\\\\)\\n(?!\\s*$)/,sa=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,bt=/[\\p{P}\\p{S}]/u,Zt=/[\\s\\p{P}\\p{S}]/u,os=/[^\\s\\p{P}\\p{S}]/u,ra=me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zt).getRegex(),ia=/[\\p{Pi}\\p{Ps}"\']/u,wi=/(?!~)[\\p{P}\\p{S}]/u,na=/(?!~)[\\s\\p{P}\\p{S}]/u,oa=/(?:[^\\s\\p{P}\\p{S}]|~)/u,aa=me(/link|precode-code|html/,"g").replace("link",/\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)/).replace("precode-",qo?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),xi=/^(?:\\*+(?:((?!\\*)punct)|([^\\s*]))?)|^_+(?:((?!_)punct)|([^\\s_]))?/,la=me(xi,"u").replace(/punct/g,bt).getRegex(),ca=me(xi,"u").replace(/punct/g,wi).getRegex(),ua=me(/^(?:\\*+(?:((?!\\*)(?!openQuote)punct)|([^\\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\\s_]))?/,"u").replace(/openQuote/g,ia).replace(/punct/g,bt).getRegex(),Ti="^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)",ha=me(Ti,"gu").replace(/notPunctSpace/g,os).replace(/punctSpace/g,Zt).replace(/punct/g,bt).getRegex(),fa=me(Ti,"gu").replace(/notPunctSpace/g,oa).replace(/punctSpace/g,na).replace(/punct/g,wi).getRegex(),da=me("^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)[\\\\s](\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|(?:(?!\\\\*)punct|notPunctSpace)(\\\\*+)(?!\\\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,os).replace(/punctSpace/g,Zt).replace(/punct/g,bt).getRegex(),pa=me("^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,os).replace(/punctSpace/g,Zt).replace(/punct/g,bt).getRegex(),ga=me("^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\\\s](_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,os).replace(/punctSpace/g,Zt).replace(/punct/g,bt).getRegex(),ma=me(/^~~?(?:((?!~)punct)|[^\\s~])/,"u").replace(/punct/g,bt).getRegex(),va=me("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,os).replace(/punctSpace/g,Zt).replace(/punct/g,bt).getRegex(),ya=me(/\\\\(punct)/,"gu").replace(/punct/g,bt).getRegex(),_a=me(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ba=me(br).replace("(?:-->|$)","-->").getRegex(),Sa=me("^comment|^</[a-zA-Z][\\\\w:-]*\\\\s*>|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>").replace("comment",ba).replace("attribute",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*"[^"]*"|\\s*=\\s*\'[^\']*\'|\\s*=\\s*[^\\s"\'=<>`]+)?/).getRegex(),Rs=/(?:\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\])|[^\\[\\]\\\\`])*?/,ka=me(/^!?\\[(label)\\]\\(\\s*(href)(?:(?:[ \\t]+(?:\\n[ \\t]*)?|\\n[ \\t]*)(title))?\\s*\\)/).replace("label",Rs).replace("href",/<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]+|(?=\\))/).replace("title",/"(?:\\\\"?|[^"\\\\])*"|\'(?:\\\\\'?|[^\'\\\\])*\'|\\((?:\\\\\\)?|[^)\\\\])*\\)/).getRegex(),Ci=me(/^!?\\[(label)\\]\\[(ref)\\]/).replace("label",Rs).replace("ref",_r).getRegex(),Pi=me(/^!?\\[(ref)\\](?:\\[\\])?/).replace("ref",_r).getRegex(),wa=me("reflink|nolink(?!\\\\()","g").replace("reflink",Ci).replace("nolink",Pi).getRegex(),Ei=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,kr={_backpedal:Mt,anyPunctuation:ya,autolink:_a,blockSkip:aa,br:ki,code:ta,del:Mt,delLDelim:Mt,delRDelim:Mt,emStrongLDelim:la,emStrongRDelimAst:ha,emStrongRDelimUnd:pa,escape:ea,link:ka,nolink:Pi,punctuation:ra,reflink:Ci,reflinkSearch:wa,tag:Sa,text:sa,url:Mt},xa={...kr,emStrongLDelim:ua,emStrongRDelimAst:da,emStrongRDelimUnd:ga,link:me(/^!?\\[(label)\\]\\((.*?)\\)/).replace("label",Rs).getRegex(),reflink:me(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace("label",Rs).getRegex()},wr={...kr,emStrongRDelimAst:fa,emStrongLDelim:ca,delLDelim:ma,delRDelim:va,url:me(/^((?:protocol):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/).replace("protocol",Ei).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_\'"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_\'"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:me(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|protocol:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)))/).replace("protocol",Ei).getRegex()},Ta={...wr,br:me(ki).replace("{2,}","*").getRegex(),text:me(wr.text).replace("\\\\b_","\\\\b_| {2,}\\\\n").replace(/\\{2,\\}/g,"*").getRegex()},Is={normal:Sr,gfm:Ko,pedantic:jo},as={normal:kr,gfm:wr,breaks:Ta,pedantic:xa},Ca={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"},Ai=e=>Ca[e];function gt(e,t){if(t){if(Ve.escapeTest.test(e))return e.replace(Ve.escapeReplace,Ai)}else if(Ve.escapeTestNoEncode.test(e))return e.replace(Ve.escapeReplaceNoEncode,Ai);return e}function Li(e){try{e=encodeURI(e).replace(Ve.percentDecode,"%")}catch{return null}return e}function Ri(e,t){let s=e.replace(Ve.findPipe,(i,n,o)=>{let a=!1,h=n;for(;--h>=0&&o[h]==="\\\\";)a=!a;return a?"|":" |"}).split(Ve.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(Ve.slashPipe,"|");return s}function Ct(e,t,s){let r=e.length;if(r===0)return"";let i=0;for(;i<r;){let n=e.charAt(r-i-1);if(n===t&&!s)i++;else if(n!==t&&s)i++;else break}return e.slice(0,r-i)}function Ii(e){let t=e.split(`\n`),s=t.length-1;for(;s>=0&&Ve.blankLine.test(t[s]);)s--;return t.length-s<=2?e:t.slice(0,s+1).join(`\n`)}function Pa(e,t){if(e.indexOf(t[1])===-1)return-1;let s=0;for(let r=0;r<e.length;r++)if(e[r]==="\\\\")r++;else if(e[r]===t[0])s++;else if(e[r]===t[1]&&(s--,s<0))return r;return s>0?-2:-1}function Ea(e,t=0){let s=t,r="";for(let i of e)if(i===" "){let n=4-s%4;r+=" ".repeat(n),s+=n}else r+=i,s++;return r}function Oi(e,t,s,r,i){let n=t.href,o=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1"),h=e[0].charAt(0)==="!";r.state.inLink=!0;let u=r.state.linkEmitted,d=r.state.inRawBlock;r.state.linkEmitted=!1;let l=r.inlineTokens(a),f=r.state.linkEmitted;if(r.state.linkEmitted=u,r.state.inLink=!1,!h){if(f){r.state.inRawBlock=d;return}r.state.linkEmitted=!0}return{type:h?"image":"link",raw:s,href:n,title:o,text:a,tokens:l}}function Aa(e,t,s){let r=e.match(s.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`\n`).map(n=>{let o=n.match(s.other.beginningSpace);if(o===null)return n;let[a]=o;return a.length>=i.length?n.slice(i.length):n}).join(`\n`)}var Os=class{constructor(e){Pe(this,"options",void 0),Pe(this,"rules",void 0),Pe(this,"lexer",void 0),this.options=e||Nt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let s=this.options.pedantic?t[0]:Ii(t[0]);return{type:"code",raw:s,codeBlockStyle:"indented",text:s.replace(this.rules.other.codeRemoveIndent,"")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let s=t[0],r=Aa(s,t[3]||"",this.rules);return{type:"code",raw:s,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let s=t[2].trim();if(this.rules.other.endingHash.test(s)){let r=Ct(s,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(s=r.trim())}return{type:"heading",raw:Ct(t[0],`\n`),depth:t[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ct(t[0],`\n`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=Ct(t[0],`\n`).split(`\n`),r="",i="",n=[];for(;s.length>0;){let o=!1,a=[],h;for(h=0;h<s.length;h++)if(this.rules.other.blockquoteStart.test(s[h]))a.push(s[h]),o=!0;else if(!o)a.push(s[h]);else break;s=s.slice(h);let u=a.join(`\n`),d=u.replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${u}`:u,i=i?`${i}\n${d}`:d;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=l,s.length===0)break;let f=n.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let c=f,p=s.join(`\n`),g=c.raw+`\n`+p.replace(this.rules.other.blockquoteSetextReplace2,""),v=this.blockquote(g);n[n.length-1]=v,r=`${r}\n${p}`,i=i.substring(0,i.length-c.text.length)+v.text;break}else if(f?.type==="list"){let c=f,p=c.raw+`\n`+s.join(`\n`),g=this.list(p);n[n.length-1]=g,r=r.substring(0,r.length-f.raw.length)+g.raw,i=i.substring(0,i.length-c.raw.length)+g.raw,s=p.substring(n.at(-1).raw.length).split(`\n`);continue}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let s=t[1].trim(),r=s.length>1,i={type:"list",raw:"",ordered:r,start:r?+s.slice(0,-1):"",loose:!1,items:[]};s=r?`\\\\d{1,9}\\\\${s.slice(-1)}`:`\\\\${s}`,this.options.pedantic&&(s=r?s:"[*+-]");let n=this.rules.other.listItemRegex(s),o=!1;for(;e;){let h=!1,u="",d="";if(!(t=n.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let l=Ea(t[2].split(`\n`,1)[0],t[1].length),f=e.split(`\n`,1)[0],c=!l.trim(),p=0;if(this.options.pedantic?(p=2,d=l.trimStart()):c?p=t[1].length+1:(p=l.search(this.rules.other.nonSpaceChar),p=p>4?1:p,d=l.slice(p),p+=t[1].length),c&&this.rules.other.blankLine.test(f)&&(u+=f+`\n`,e=e.substring(f.length+1),h=!0),!h){let g=this.rules.other.nextBulletRegex(p),v=this.rules.other.hrRegex(p),b=this.rules.other.fencesBeginRegex(p),S=this.rules.other.headingBeginRegex(p),y=this.rules.other.htmlBeginRegex(p),m=this.rules.other.blockquoteBeginRegex(p);for(;e;){let _=e.split(`\n`,1)[0],k;if(f=_,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),k=f):k=f.replace(this.rules.other.tabCharGlobal," "),b.test(f)||S.test(f)||y.test(f)||m.test(f)||g.test(f)||v.test(f))break;if(k.search(this.rules.other.nonSpaceChar)>=p||!f.trim())d+=`\n`+k.slice(p);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(l)||S.test(l)||v.test(l))break;d+=`\n`+f}c=!f.trim(),u+=_+`\n`,e=e.substring(_.length+1),l=k.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0)),i.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),i.raw+=u}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let h of i.items)if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),!i.loose){let u=h.tokens.filter(d=>d.type==="space");i.loose=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw))}for(let h of i.items){let u=h.tokens[0];if(h.task&&(u?.type==="text"||u?.type==="paragraph")){h.text=h.text.replace(this.rules.other.listReplaceTask,""),u.raw=u.raw.replace(this.rules.other.listReplaceTask,""),u.text=u.text.replace(this.rules.other.listReplaceTask,"");for(let l=this.lexer.inlineQueue.length-1;l>=0;l--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[l].src)){this.lexer.inlineQueue[l].src=this.lexer.inlineQueue[l].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(h.raw);if(d){let l={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};h.checked=l.checked,i.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=l.raw+h.tokens[0].raw,h.tokens[0].text=l.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(l)):h.tokens.unshift({type:"paragraph",raw:l.raw,text:l.raw,tokens:[l]}):h.tokens.unshift(l)}}else h.task&&(h.task=!1)}if(i.loose)for(let h of i.items){h.loose=!0;for(let u of h.tokens)u.type==="text"&&(u.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let s=Ii(t[0]);return{type:"html",block:!0,raw:s,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:s}}}def(e){let t=this.rules.block.def.exec(e);if(t){let s=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:s,raw:Ct(t[0],`\n`),href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let s=Ri(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`\n`):[],n={type:"table",raw:Ct(t[0],`\n`),header:[],align:[],rows:[]};if(s.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?n.align.push("right"):this.rules.other.tableAlignCenter.test(o)?n.align.push("center"):this.rules.other.tableAlignLeft.test(o)?n.align.push("left"):n.align.push(null);for(let o=0;o<s.length;o++)n.header.push({text:s[o],tokens:this.lexer.inline(s[o]),header:!0,align:n.align[o]});for(let o of i)n.rows.push(Ri(o,n.header.length).map((a,h)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:n.align[h]})));return n}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let s=t[1].trim();return{type:"heading",raw:Ct(t[0],`\n`),depth:t[2].charAt(0)==="="?1:2,text:s,tokens:this.lexer.inline(s)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let s=t[1].charAt(t[1].length-1)===`\n`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:s,tokens:this.lexer.inline(s)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let s=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let n=Ct(s.slice(0,-1),"\\\\");if((s.length-n.length)%2===0)return}else{let n=Pa(t[2],"()");if(n===-2)return;if(n>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(r);n&&(r=n[1],i=n[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),Oi(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){let r=t[(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){let i=s[0].charAt(0);return{type:"text",raw:i,text:i}}return Oi(s,r,s[0],this.lexer,this.rules)}}emStrong(e,t,s=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!s||this.rules.inline.punctuation.exec(s))){let i=[...r[0]].length-1,n,o,a=i,h=0,u=r[0][0],d=s===u,l=u==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!==null;){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(o=[...n].length,r[3]||r[4]){a+=o;continue}else if(r[5]||r[6]){if(i%3&&!((i+o)%3)){h+=o;continue}if(d)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+h);let f=[...r[0]][0].length,c=e.slice(0,i+r.index+f+o);if(Math.min(i,o)%2){let g=c.slice(1,-1);return{type:"em",raw:c,text:g,tokens:this.lexer.inlineTokens(g)}}let p=c.slice(2,-2);return{type:"strong",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let s=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(s),i=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return r&&i&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:t[0],text:s}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,s=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!s||this.rules.inline.punctuation.exec(s))){let i=[...r[0]].length-1,n,o,a=i,h=this.rules.inline.delRDelim;for(h.lastIndex=0,t=t.slice(-1*e.length+i);(r=h.exec(t))!==null;){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n||(o=[...n].length,o!==i))continue;if(r[3]||r[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let u=[...r[0]][0].length,d=e.slice(0,i+r.index+u+o),l=d.slice(i,-i);return{type:"del",raw:d,text:l,tokens:this.lexer.inlineTokens(l)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let s,r;return t[2]==="@"?(s=t[1],r="mailto:"+s):(s=t[1],r=s),{type:"link",raw:t[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let s,r;if(t[2]==="@")s=t[0],r="mailto:"+s;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);s=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let s=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:s}}}},ct=class pi{constructor(t){Pe(this,"tokens",void 0),Pe(this,"options",void 0),Pe(this,"state",void 0),Pe(this,"inlineQueue",void 0),Pe(this,"tokenizer",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Nt,this.options.tokenizer=this.options.tokenizer||new Os,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let s={other:Ve,block:Is.normal,inline:as.normal};this.options.pedantic?(s.block=Is.pedantic,s.inline=as.pedantic):this.options.gfm&&(s.block=Is.gfm,this.options.breaks?s.inline=as.breaks:s.inline=as.gfm),this.tokenizer.rules=s}static get rules(){return{block:Is,inline:as}}static lex(t,s){return new pi(s).lex(t)}static lexInline(t,s){return new pi(s).inlineTokens(t)}lex(t){t=t.replace(Ve.carriageReturn,`\n`),this.blockTokens(t,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let r=this.inlineQueue[s];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,s=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Ve.tabCharGlobal," ").replace(Ve.spaceLine,""));let i=1/0;for(;t;){if(t.length<i)i=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},t,s))?(t=t.substring(n.raw.length),s.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let a=s.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`\n`:s.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let a=s.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`\n`)?"":`\n`)+n.raw,a.text+=`\n`+n.text,this.inlineQueue.at(-1).src=a.text):s.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let a=s.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`\n`)?"":`\n`)+n.raw,a.text+=`\n`+n.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},s.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),s.push(n);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(d=>{u=d.call({lexer:this},h),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){let a=s.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`\n`)?"":`\n`)+n.raw,a.text+=`\n`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):s.push(n),r=o.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let a=s.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`\n`)?"":`\n`)+n.raw,a.text+=`\n`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):s.push(n);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,s}inline(t,s=[]){return this.inlineQueue.push({src:t,tokens:s}),s}linkInText(t){if(!t.includes("["))return!1;let s=this.tokenizer.rules.inline.link;for(let r of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(s.test(r[0])&&t.charAt(r.index-1)!=="!")return!0;for(let r of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=r[0],n=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,i.slice(n+1,-1)))&&!(n>1&&this.linkInText(i.slice(1,n-1))))return!0}return!1}inlineTokens(t,s=[]){this.tokenizer.lexer=this;let r=t;if(this.tokens.links&&t.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,h=u=>{let d=u.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,u.slice(d+1,-1)))return u;if(d>1&&u.charAt(0)!=="!"){let l=u.slice(1,d-1);if(this.linkInText(l))return"["+l.replace(a,h)+"]["+"a".repeat(u.length-d-2)+"]"}return"["+"a".repeat(u.length-2)+"]"};r=r.replace(a,h)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,a=>"+".repeat(a.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(a,h,u)=>{let d=u?u.length:0;return a.slice(0,d)+"["+"a".repeat(a.length-d-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let i=!1,n="",o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}i||(n=""),i=!1;let a;if(this.options.extensions?.inline?.some(u=>(a=u.call({lexer:this},t,s))?(t=t.substring(a.raw.length),s.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let u=s.at(-1);a.type==="text"&&u?.type==="text"?(u.raw+=a.raw,u.text+=a.text):s.push(a);continue}if(a=this.tokenizer.emStrong(t,r,n)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.del(t,r,n)){t=t.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),s.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),s.push(a);continue}let h=t;if(this.options.extensions?.startInline){let u=1/0,d=t.slice(1),l;this.options.extensions.startInline.forEach(f=>{l=f.call({lexer:this},d),typeof l=="number"&&l>=0&&(u=Math.min(u,l))}),u<1/0&&u>=0&&(h=t.substring(0,u+1))}if(a=this.tokenizer.inlineText(h)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(n=a.raw.slice(-1)),i=!0;let u=s.at(-1);u?.type==="text"?(u.raw+=a.raw,u.text+=a.text):s.push(a);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return s}infiniteLoopError(t){let s="Infinite loop on byte: "+t;if(this.options.silent)console.error(s);else throw new Error(s)}},Ns=class{constructor(e){Pe(this,"options",void 0),Pe(this,"parser",void 0),this.options=e||Nt}space(e){return""}code({text:e,lang:t,escaped:s}){let r=(t||"").match(Ve.notSpaceStart)?.[0],i=e.replace(Ve.endingNewline,"")+`\n`;return r?\'<pre><code class="language-\'+gt(r)+\'">\'+(s?i:gt(i,!0))+`</code></pre>\n`:"<pre><code>"+(s?i:gt(i,!0))+`</code></pre>\n`}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return`<hr>\n`}list(e){let t=e.ordered,s=e.start,r="";for(let o=0;o<e.items.length;o++){let a=e.items[o];r+=this.listitem(a)}let i=t?"ol":"ul",n=t&&s!==1?\' start="\'+s+\'"\':"";return"<"+i+n+`>\n`+r+"</"+i+`>\n`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return"<input "+(e?\'checked="" \':"")+\'disabled="" type="checkbox"> \'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",s="";for(let i=0;i<e.header.length;i++)s+=this.tablecell(e.header[i]);t+=this.tablerow({text:s});let r="";for(let i=0;i<e.rows.length;i++){let n=e.rows[i];s="";for(let o=0;o<n.length;o++)s+=this.tablecell(n[o]);r+=this.tablerow({text:s})}return r&&(r=`<tbody>${r}</tbody>`),`<table>\n<thead>\n`+t+`</thead>\n`+r+`</table>\n`}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),s=e.header?"th":"td";return(e.align?`<${s} align="${e.align}">`:`<${s}>`)+t+`</${s}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${gt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:s}){let r=this.parser.parseInline(s),i=Li(e);if(i===null)return r;e=i;let n=\'<a href="\'+e+\'"\';return t&&(n+=\' title="\'+gt(t)+\'"\'),n+=">"+r+"</a>",n}image({href:e,title:t,text:s,tokens:r}){r&&(s=this.parser.parseInline(r,this.parser.textRenderer));let i=Li(e);if(i===null)return gt(s);e=i;let n=`<img src="${e}" alt="${gt(s)}"`;return t&&(n+=` title="${gt(t)}"`),n+=">",n}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:gt(e.text)}},xr=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ut=class gi{constructor(t){Pe(this,"options",void 0),Pe(this,"renderer",void 0),Pe(this,"textRenderer",void 0),this.options=t||Nt,this.options.renderer=this.options.renderer||new Ns,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xr}static parse(t,s){return new gi(s).parse(t)}static parseInline(t,s){return new gi(s).parseInline(t)}parse(t){this.renderer.parser=this;let s="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let o=i,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){s+=a||"";continue}}let n=i;switch(n.type){case"space":s+=this.renderer.space(n);break;case"hr":s+=this.renderer.hr(n);break;case"heading":s+=this.renderer.heading(n);break;case"code":s+=this.renderer.code(n);break;case"table":s+=this.renderer.table(n);break;case"blockquote":s+=this.renderer.blockquote(n);break;case"list":s+=this.renderer.list(n);break;case"checkbox":s+=this.renderer.checkbox(n);break;case"html":s+=this.renderer.html(n);break;case"def":s+=this.renderer.def(n);break;case"paragraph":s+=this.renderer.paragraph(n);break;case"text":s+=this.renderer.text(n);break;default:{let o=\'Token with "\'+n.type+\'" type was not found.\';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}parseInline(t,s=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let a=this.options.extensions.renderers[n.type].call({parser:this},n);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){r+=a||"";continue}}let o=n;switch(o.type){case"escape":r+=s.text(o);break;case"html":r+=s.html(o);break;case"link":r+=s.link(o);break;case"image":r+=s.image(o);break;case"checkbox":r+=s.checkbox(o);break;case"strong":r+=s.strong(o);break;case"em":r+=s.em(o);break;case"codespan":r+=s.codespan(o);break;case"br":r+=s.br(o);break;case"del":r+=s.del(o);break;case"text":r+=s.text(o);break;default:{let a=\'Token with "\'+o.type+\'" type was not found.\';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}},ls=(As=class{constructor(e){Pe(this,"options",void 0),Pe(this,"block",void 0),this.options=e||Nt}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ct.lex:ct.lexInline}provideParser(e=this.block){return e?ut.parse:ut.parseInline}},Pe(As,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Pe(As,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),As),La=class{constructor(...e){Pe(this,"defaults",mr()),Pe(this,"options",this.setOptions),Pe(this,"parse",this.parseMarkdown(!0)),Pe(this,"parseInline",this.parseMarkdown(!1)),Pe(this,"Parser",ut),Pe(this,"Renderer",Ns),Pe(this,"TextRenderer",xr),Pe(this,"Lexer",ct),Pe(this,"Tokenizer",Os),Pe(this,"Hooks",ls),this.use(...e)}walkTokens(e,t){let s=[];for(let r of e)switch(s=s.concat(t.call(this,r)),r.type){case"table":{let i=r;for(let n of i.header)s=s.concat(this.walkTokens(n.tokens,t));for(let n of i.rows)for(let o of n)s=s.concat(this.walkTokens(o.tokens,t));break}case"list":{let i=r;s=s.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let o=i[n].flat(1/0);s=s.concat(this.walkTokens(o,t))}):i.tokens&&(s=s.concat(this.walkTokens(i.tokens,t)))}}return s}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(s=>{let r={...s};if(r.async=this.defaults.async||r.async||!1,s.extensions&&(s.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=t.renderers[i.name];n?t.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=n.apply(this,o)),a}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be \'block\' or \'inline\'");let n=t[i.level];n?n.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),s.renderer){let i=this.defaults.renderer||new Ns(this.defaults);for(let n in s.renderer){if(!(n in i))throw new Error(`renderer \'${n}\' does not exist`);if(["options","parser"].includes(n))continue;let o=n,a=s.renderer[o],h=i[o];i[o]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=h.apply(i,u)),d||""}}r.renderer=i}if(s.tokenizer){let i=this.defaults.tokenizer||new Os(this.defaults);for(let n in s.tokenizer){if(!(n in i))throw new Error(`tokenizer \'${n}\' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,a=s.tokenizer[o],h=i[o];i[o]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=h.apply(i,u)),d}}r.tokenizer=i}if(s.hooks){let i=this.defaults.hooks||new ls;for(let n in s.hooks){if(!(n in i))throw new Error(`hook \'${n}\' does not exist`);if(["options","block"].includes(n))continue;let o=n,a=s.hooks[o],h=i[o];ls.passThroughHooks.has(n)?i[o]=u=>{if(this.defaults.async&&ls.passThroughHooksRespectAsync.has(n))return(async()=>{let l=await a.call(i,u);return h.call(i,l)})();let d=a.call(i,u);return h.call(i,d)}:i[o]=(...u)=>{if(this.defaults.async)return(async()=>{let l=await a.apply(i,u);return l===!1&&(l=await h.apply(i,u)),l})();let d=a.apply(i,u);return d===!1&&(d=h.apply(i,u)),d}}r.hooks=i}if(s.walkTokens){let i=this.defaults.walkTokens,n=s.walkTokens;r.walkTokens=function(o){let a=[];return a.push(n.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ct.lex(e,t??this.defaults)}parser(e,t){return ut.parse(e,t??this.defaults)}parseMarkdown(e){return(t,s)=>{let r={...s},i={...this.defaults,...r},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(t):t,a=await(i.hooks?await i.hooks.provideLexer(e):e?ct.lex:ct.lexInline)(o,i),h=i.hooks?await i.hooks.processAllTokens(a):a;i.walkTokens&&await Promise.all(this.walkTokens(h,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser(e):e?ut.parse:ut.parseInline)(h,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(n);try{i.hooks&&(t=i.hooks.preprocess(t));let o=(i.hooks?i.hooks.provideLexer(e):e?ct.lex:ct.lexInline)(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let a=(i.hooks?i.hooks.provideParser(e):e?ut.parse:ut.parseInline)(o,i);return i.hooks&&(a=i.hooks.postprocess(a)),a}catch(o){return n(o)}}}onError(e,t){return s=>{if(s.message+=`\nPlease report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+gt(s.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(s);throw s}}},Dt=new La;function Ce(e,t){return Dt.parse(e,t)}Ce.options=Ce.setOptions=function(e){return Dt.setOptions(e),Ce.defaults=Dt.defaults,vi(Ce.defaults),Ce},Ce.getDefaults=mr,Ce.defaults=Nt;function Ra(...e){return Dt.use(...e),Ce.defaults=Dt.defaults,vi(Ce.defaults),Ce}Ce.use=Ra,Ce.walkTokens=function(e,t){return Dt.walkTokens(e,t)},Ce.parseInline=Dt.parseInline,Ce.Parser=ut,Ce.parser=ut.parse,Ce.Renderer=Ns,Ce.TextRenderer=xr,Ce.Lexer=ct,Ce.lexer=ct.lex,Ce.Tokenizer=Os,Ce.Hooks=ls,Ce.parse=Ce;var zc=Ce.options,Uc=Ce.setOptions,Wc=Ce.walkTokens,Tr=Ce.parseInline,Cr=Ce,Xc=ut.parse,Yc=ct.lex,Ue=ue((e=>{e.__esModule=!0,e.extend=n,e.indexOf=u,e.escapeExpression=d,e.isEmpty=l,e.createFrame=f,e.blockParams=c,e.appendContextPath=p;var t={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;","=":"&#x3D;"},s=/[&<>"\'`=]/g,r=/[&<>"\'`=]/;function i(g){return t[g]}function n(g){for(var v=1;v<arguments.length;v++)for(var b in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],b)&&(g[b]=arguments[v][b]);return g}var o=Object.prototype.toString;e.toString=o;var a=function(v){return typeof v=="function"};a(/x/)&&(e.isFunction=a=function(g){return typeof g=="function"&&o.call(g)==="[object Function]"}),e.isFunction=a;var h=Array.isArray||function(g){return g&&typeof g=="object"?o.call(g)==="[object Array]":!1};e.isArray=h;function u(g,v){for(var b=0,S=g.length;b<S;b++)if(g[b]===v)return b;return-1}function d(g){if(typeof g!="string"){if(g&&typeof g.toHTML=="function")return g.toHTML();if(g==null)return"";if(!g)return g+"";g=""+g}return r.test(g)?g.replace(s,i):g}function l(g){return!g&&g!==0?!0:!!(h(g)&&g.length===0)}function f(g){var v=n({},g);return v._parent=g,v}function c(g,v){return g.path=v,g}function p(g,v){return(g?g+".":"")+v}})),ht=ue(((e,t)=>{e.__esModule=!0;var s=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(i,n){var o=n&&n.loc,a=void 0,h=void 0,u=void 0,d=void 0;o&&o.start&&(a=o.start.line,u=o.start.column,o.end&&(h=o.end.line,d=o.end.column),i+=" - "+a+":"+u);for(var l=Error.prototype.constructor.call(this,i),f=0;f<s.length;f++)this[s[f]]=l[s[f]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{o&&(this.lineNumber=a,this.endLineNumber=h,Object.defineProperty?(Object.defineProperty(this,"column",{value:u,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:d,enumerable:!0})):(this.column=u,this.endColumn=d))}catch{}}r.prototype=new Error,e.default=r,t.exports=e.default})),Ia=ue(((e,t)=>{e.__esModule=!0;var s=Ue();e.default=function(r){r.registerHelper("blockHelperMissing",function(i,n){var o=n.inverse,a=n.fn;if(i===!0)return a(this);if(i===!1||i==null)return o(this);if(s.isArray(i))return i.length>0?(n.ids&&(n.ids=[n.name]),r.helpers.each(i,n)):o(this);if(n.data&&n.ids){var h=s.createFrame(n.data);h.contextPath=s.appendContextPath(n.data.contextPath,n.name),n={data:h}}return a(i,n)})},t.exports=e.default})),Oa=ue(((e,t)=>{e.__esModule=!0;function s(o){return o&&o.__esModule?o:{default:o}}var r=Ue(),i=s(ht());function n(o){try{var a=o.return;r.isFunction(a)&&a.call(o)}catch{}}e.default=function(o){o.registerHelper("each",function(a,h){if(!h)throw new i.default("Must pass iterator to #each");var u=h.fn,d=h.inverse,l=0,f="",c=void 0,p=void 0;h.data&&h.ids&&(p=r.appendContextPath(h.data.contextPath,h.ids[0])+"."),r.isFunction(a)&&(a=a.call(this)),h.data&&(c=r.createFrame(h.data));function g(m,_,k,w){c&&(c.key=m,c.index=_,c.first=_===0,c.last=!!k,p&&(c.contextPath=p+m)),f=f+u(w,{data:c,blockParams:r.blockParams([w,m],[p+m,null])})}if(a&&typeof a=="object")if(r.isArray(a))for(var v=a.length;l<v;l++)l in a&&g(l,l,l===a.length-1,a[l]);else if(typeof Symbol=="function"&&a[Symbol.iterator])for(var b=a[Symbol.iterator](),S=b.next();!S.done;){var y=b.next();try{g(l,l,y.done,S.value)}catch(m){throw y.done||n(b),m}S=y,l++}else(function(){var m=void 0;Object.keys(a).forEach(function(_){m!==void 0&&g(m,l-1,!1,a[m]),m=_,l++}),m!==void 0&&g(m,l-1,!0,a[m])})();return l===0&&(f=d(this)),f})},t.exports=e.default})),Na=ue(((e,t)=>{e.__esModule=!0;function s(i){return i&&i.__esModule?i:{default:i}}var r=s(ht());e.default=function(i){i.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new r.default(\'Missing helper: "\'+arguments[arguments.length-1].name+\'"\')})},t.exports=e.default})),Ma=ue(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=Ue(),i=s(ht());e.default=function(n){n.registerHelper("if",function(o,a){if(arguments.length!=2)throw new i.default("#if requires exactly one argument");return r.isFunction(o)&&(o=o.call(this)),!a.hash.includeZero&&!o||r.isEmpty(o)?a.inverse(this):a.fn(this)}),n.registerHelper("unless",function(o,a){if(arguments.length!=2)throw new i.default("#unless requires exactly one argument");return n.helpers.if.call(this,o,{fn:a.inverse,inverse:a.fn,hash:a.hash})})},t.exports=e.default})),Da=ue(((e,t)=>{e.__esModule=!0,e.default=function(s){s.registerHelper("log",function(){for(var r=[void 0],i=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)r.push(arguments[n]);var o=1;i.hash.level!=null?o=i.hash.level:i.data&&i.data.level!=null&&(o=i.data.level),r[0]=o,s.log.apply(s,r)})},t.exports=e.default})),Ba=ue(((e,t)=>{e.__esModule=!0,e.default=function(s){s.registerHelper("lookup",function(r,i,n){return r&&n.lookupProperty(r,i)})},t.exports=e.default})),Ha=ue(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=Ue(),i=s(ht());e.default=function(n){n.registerHelper("with",function(o,a){if(arguments.length!=2)throw new i.default("#with requires exactly one argument");r.isFunction(o)&&(o=o.call(this));var h=a.fn;if(r.isEmpty(o))return a.inverse(this);var u=a.data;return a.data&&a.ids&&(u=r.createFrame(a.data),u.contextPath=r.appendContextPath(a.data.contextPath,a.ids[0])),h(o,{data:u,blockParams:r.blockParams([o],[u&&u.contextPath])})})},t.exports=e.default})),Ni=ue((e=>{e.__esModule=!0,e.registerDefaultHelpers=u,e.moveHelperToHooks=d;function t(l){return l&&l.__esModule?l:{default:l}}var s=t(Ia()),r=t(Oa()),i=t(Na()),n=t(Ma()),o=t(Da()),a=t(Ba()),h=t(Ha());function u(l){s.default(l),r.default(l),i.default(l),n.default(l),o.default(l),a.default(l),h.default(l)}function d(l,f,c){l.helpers[f]&&(l.hooks[f]=l.helpers[f],c||(l.helpers[f]=void 0))}})),$a=ue(((e,t)=>{e.__esModule=!0;var s=Ue();e.default=function(r){r.registerDecorator("inline",function(i,n,o,a){var h=i;return n.partials||(n.partials={},h=function(u,d){var l=o.partials;o.partials=s.extend({},l,n.partials);var f=i(u,d);return o.partials=l,f}),n.partials[a.args[0]]=a.fn,h})},t.exports=e.default})),qa=ue((e=>{e.__esModule=!0,e.registerDefaultDecorators=r;function t(i){return i&&i.__esModule?i:{default:i}}var s=t($a());function r(i){s.default(i)}})),Mi=ue(((e,t)=>{e.__esModule=!0;var s=Ue(),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(n){if(typeof n=="string"){var o=s.indexOf(r.methodMap,n.toLowerCase());o>=0?n=o:n=parseInt(n,10)}return n},log:function(n){if(n=r.lookupLevel(n),typeof console<"u"&&r.lookupLevel(r.level)<=n){var o=r.methodMap[n];console[o]||(o="log");for(var a=arguments.length,h=Array(a>1?a-1:0),u=1;u<a;u++)h[u-1]=arguments[u];console[o].apply(console,h)}}};e.default=r,t.exports=e.default})),Di=ue((e=>{e.__esModule=!0,e.createProtoAccessControl=n,e.resultIsAllowed=o,e.isPrototypeConstructor=a,e.resetLoggedProperties=d;function t(l){return l&&l.__esModule?l:{default:l}}var s=Ue(),r=t(Mi()),i=Object.create(null);function n(l){var f=Object.create(null);f.__proto__=!1,s.extend(f,l.allowedProtoProperties);var c=Object.create(null);return c.constructor=!1,c.__defineGetter__=!1,c.__defineSetter__=!1,c.__lookupGetter__=!1,c.__lookupSetter__=!1,s.extend(c,l.allowedProtoMethods),{properties:{whitelist:f,defaultValue:l.allowProtoPropertiesByDefault},methods:{whitelist:c,defaultValue:l.allowProtoMethodsByDefault}}}function o(l,f,c){return h(typeof l=="function"?f.methods:f.properties,c)}function a(l,f,c){return f==="constructor"&&typeof c=="function"&&l===c.prototype}function h(l,f){return l.whitelist[f]!==void 0?l.whitelist[f]===!0:l.defaultValue!==void 0?l.defaultValue:(u(f),!1)}function u(l){i[l]!==!0&&(i[l]=!0,r.default.log("error",\'Handlebars: Access has been denied to resolve the property "\'+l+`" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function d(){Object.keys(i).forEach(function(l){delete i[l]})}})),Pr=ue((e=>{e.__esModule=!0,e.HandlebarsEnvironment=c;function t(g){return g&&g.__esModule?g:{default:g}}var s=Ue(),r=t(ht()),i=Ni(),n=qa(),o=t(Mi()),a=Di(),h="4.7.10";e.VERSION=h;var u=8;e.COMPILER_REVISION=u;var d=7;e.LAST_COMPATIBLE_COMPILER_REVISION=d;var l={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};e.REVISION_CHANGES=l;var f="[object Object]";function c(g,v,b){this.helpers=g||{},this.partials=v||{},this.decorators=b||{},i.registerDefaultHelpers(this),n.registerDefaultDecorators(this)}c.prototype={constructor:c,logger:o.default,log:o.default.log,registerHelper:function(v,b){if(s.toString.call(v)===f){if(b)throw new r.default("Arg not supported with multiple helpers");s.extend(this.helpers,v)}else this.helpers[v]=b},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,b){if(s.toString.call(v)===f)s.extend(this.partials,v);else{if(typeof b>"u")throw new r.default(\'Attempting to register a partial called "\'+v+\'" as undefined\');this.partials[v]=b}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,b){if(s.toString.call(v)===f){if(b)throw new r.default("Arg not supported with multiple decorators");s.extend(this.decorators,v)}else this.decorators[v]=b},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){a.resetLoggedProperties()}};var p=o.default.log;e.log=p,e.createFrame=s.createFrame,e.logger=o.default})),Fa=ue(((e,t)=>{e.__esModule=!0;function s(r){this.string=r}s.prototype.toString=s.prototype.toHTML=function(){return""+this.string},e.default=s,t.exports=e.default})),Va=ue((e=>{e.__esModule=!0,e.wrapHelper=t;function t(s,r){return typeof s!="function"?s:function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=r(n),s.apply(this,arguments)}}})),za=ue((e=>{e.__esModule=!0,e.checkRevision=u,e.template=d,e.wrapProgram=l,e.resolvePartial=f,e.invokePartial=c,e.noop=p;function t(m){return m&&m.__esModule?m:{default:m}}function s(m){if(m&&m.__esModule)return m;var _={};if(m!=null)for(var k in m)Object.prototype.hasOwnProperty.call(m,k)&&(_[k]=m[k]);return _.default=m,_}var r=s(Ue()),i=t(ht()),n=Pr(),o=Ni(),a=Va(),h=Di();function u(m){var _=m&&m[0]||1,k=n.COMPILER_REVISION;if(!(_>=n.LAST_COMPATIBLE_COMPILER_REVISION&&_<=n.COMPILER_REVISION))if(_<n.LAST_COMPATIBLE_COMPILER_REVISION){var w=n.REVISION_CHANGES[k],E=n.REVISION_CHANGES[_];throw new i.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+w+") or downgrade your runtime to an older version ("+E+").")}else throw new i.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+m[1]+").")}function d(m,_){if(!_)throw new i.default("No environment passed to template");if(!m||!m.main)throw new i.default("Unknown template object: "+typeof m);m.main.decorator=m.main_d,_.VM.checkRevision(m.compiler);var k=m.compiler&&m.compiler[0]===7;function w(P,A,C){C.hash&&(A=r.extend({},A,C.hash),C.ids&&(C.ids[0]=!0)),P=_.VM.resolvePartial.call(this,P,A,C),C.hooks=this.hooks,C.protoAccessControl=this.protoAccessControl;var H=_.VM.invokePartial.call(this,P,A,C);if(H==null&&r.isFunction(P))throw new i.default("The partial "+C.name+" returned no output: partials must return a string");if(H==null&&_.compile){if(typeof P!="string")throw new i.default("The partial "+C.name+" could not be compiled: partials must be strings or functions returning strings");C.partials[C.name]=_.compile(P,m.compilerOptions,_),H=C.partials[C.name](A,C)}if(H!=null){if(C.indent){for(var $=H.split(`\n`),V=0,x=$.length;V<x&&!(!$[V]&&V+1===x);V++)$[V]=C.indent+$[V];H=$.join(`\n`)}return H}else throw new i.default("The partial "+C.name+" could not be compiled when running in runtime-only mode")}var E={strict:function(A,C,H){if(!A||!(C in A))throw new i.default(\'"\'+C+\'" not defined in \'+A,{loc:H});return E.lookupProperty(A,C)},lookupProperty:function(A,C){var H=A[C];if(H==null||Object.prototype.hasOwnProperty.call(A,C)&&!h.isPrototypeConstructor(A,C,H)||h.resultIsAllowed(H,E.protoAccessControl,C))return H},lookup:function(A,C){for(var H=A.length,$=0;$<H;$++){var V=A[$]&&E.lookupProperty(A[$],C);if(V!=null)return V}},lambda:function(A,C){return typeof A=="function"?A.call(C):A},escapeExpression:r.escapeExpression,invokePartial:w,fn:function(A){var C=m[A];return C.decorator=m[A+"_d"],C},programs:[],program:function(A,C,H,$,V){var x=this.programs[A],M=this.fn(A);return C||V||$||H?x=l(this,A,M,C,H,$,V):x||(x=this.programs[A]=l(this,A,M)),x},data:function(A,C){for(;A&&C--;)A=A._parent;return A},mergeIfNeeded:function(A,C){var H=A||C;return A&&C&&A!==C&&(H=r.extend({},C,A)),H},nullContext:Object.seal({}),noop:_.VM.noop,compilerInfo:m.compiler};function N(P){var A=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],C=A.data;N._setup(A),!A.partial&&m.useData&&(C=v(P,C));var H=void 0,$=m.useBlockParams?[]:void 0;m.useDepths&&(A.depths?H=P!=A.depths[0]?[P].concat(A.depths):A.depths:H=[P]);function V(x){return""+m.main(E,x,E.helpers,E.partials,C,$,H)}return V=b(m.main,V,E,A.depths||[],C,$),V(P,A)}return N.isTop=!0,N._setup=function(P){if(P.partial)E.protoAccessControl=P.protoAccessControl,E.helpers=P.helpers,E.partials=P.partials,E.decorators=P.decorators,E.hooks=P.hooks;else{var A={};S(A,_.helpers,E),S(A,P.helpers,E),E.helpers=A,m.usePartial&&(E.partials=E.mergeIfNeeded(P.partials,_.partials)),(m.usePartial||m.useDecorators)&&(E.decorators=r.extend({},_.decorators,P.decorators)),E.hooks={},E.protoAccessControl=h.createProtoAccessControl(P);var C=P.allowCallsToHelperMissing||k;o.moveHelperToHooks(E,"helperMissing",C),o.moveHelperToHooks(E,"blockHelperMissing",C)}},N._child=function(P,A,C,H){if(m.useBlockParams&&!C)throw new i.default("must pass block params");if(m.useDepths&&!H)throw new i.default("must pass parent depths");return l(E,P,m[P],A,0,C,H)},N}function l(m,_,k,w,E,N,P){function A(C){var H=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],$=P;return P&&C!=P[0]&&!(C===m.nullContext&&P[0]===null)&&($=[C].concat(P)),k(m,C,m.helpers,m.partials,H.data||w,N&&[H.blockParams].concat(N),$)}return A=b(k,A,m,P,w,N),A.program=_,A.depth=P?P.length:0,A.blockParams=E||0,A}function f(m,_,k){return m?typeof m!="function"&&!k.name&&(k.name=m,m=g(k.partials,m)):k.name==="@partial-block"?m=g(k.data,"partial-block"):m=g(k.partials,k.name),m}function c(m,_,k){var w=g(k.data,"partial-block");k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var E=void 0;if(k.fn&&k.fn!==p&&(function(){k.data=n.createFrame(k.data);var N=k.fn;E=k.data["partial-block"]=function(A){var C=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return C.data=n.createFrame(C.data),C.data["partial-block"]=w,N(A,C)},N.partials&&(k.partials=r.extend({},k.partials,N.partials))})(),m===void 0&&E&&(m=E),m===void 0)throw new i.default("The partial "+k.name+" could not be found");if(m instanceof Function)return m(_,k)}function p(){return""}function g(m,_){if(m&&Object.prototype.hasOwnProperty.call(m,_))return m[_]}function v(m,_){return(!_||!("root"in _))&&(_=_?n.createFrame(_):{},_.root=m),_}function b(m,_,k,w,E,N){if(m.decorator){var P={};_=m.decorator(_,P,k,w&&w[0],E,N,w),r.extend(_,P)}return _}function S(m,_,k){_&&Object.keys(_).forEach(function(w){var E=_[w];m[w]=y(E,k)})}function y(m,_){var k=_.lookupProperty;return a.wrapHelper(m,function(w){return w.lookupProperty=k,w})}})),Bi=ue(((e,t)=>{e.__esModule=!0,e.default=function(s){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var r=globalThis.Handlebars;s.noConflict=function(){return globalThis.Handlebars===s&&(globalThis.Handlebars=r),s}},t.exports=e.default})),Ua=ue(((e,t)=>{e.__esModule=!0;function s(f){return f&&f.__esModule?f:{default:f}}function r(f){if(f&&f.__esModule)return f;var c={};if(f!=null)for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(c[p]=f[p]);return c.default=f,c}var i=r(Pr()),n=s(Fa()),o=s(ht()),a=r(Ue()),h=r(za()),u=s(Bi());function d(){var f=new i.HandlebarsEnvironment;return a.extend(f,i),f.SafeString=n.default,f.Exception=o.default,f.Utils=a,f.escapeExpression=a.escapeExpression,f.VM=h,f.template=function(c){return h.template(c,f)},f}var l=d();l.create=d,u.default(l),l.default=l,e.default=l,t.exports=e.default})),Hi=ue(((e,t)=>{e.__esModule=!0;var s={helpers:{helperExpression:function(i){return i.type==="SubExpression"||(i.type==="MustacheStatement"||i.type==="BlockStatement")&&!!(i.params&&i.params.length||i.hash)},scopedId:function(i){return/^\\.|this\\b/.test(i.original)},simpleId:function(i){return i.parts.length===1&&!s.helpers.scopedId(i)&&!i.depth}}};e.default=s,t.exports=e.default})),Wa=ue(((e,t)=>{e.__esModule=!0;var s=(function(){var r={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,a,h,u,d,l,f){var c=l.length-1;switch(d){case 1:return l[c-1];case 2:this.$=u.prepareProgram(l[c]);break;case 3:this.$=l[c];break;case 4:this.$=l[c];break;case 5:this.$=l[c];break;case 6:this.$=l[c];break;case 7:this.$=l[c];break;case 8:this.$=l[c];break;case 9:this.$={type:"CommentStatement",value:u.stripComment(l[c]),strip:u.stripFlags(l[c],l[c]),loc:u.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[c],value:l[c],loc:u.locInfo(this._$)};break;case 11:this.$=u.prepareRawBlock(l[c-2],l[c-1],l[c],this._$);break;case 12:this.$={path:l[c-3],params:l[c-2],hash:l[c-1]};break;case 13:this.$=u.prepareBlock(l[c-3],l[c-2],l[c-1],l[c],!1,this._$);break;case 14:this.$=u.prepareBlock(l[c-3],l[c-2],l[c-1],l[c],!0,this._$);break;case 15:this.$={open:l[c-5],path:l[c-4],params:l[c-3],hash:l[c-2],blockParams:l[c-1],strip:u.stripFlags(l[c-5],l[c])};break;case 16:this.$={path:l[c-4],params:l[c-3],hash:l[c-2],blockParams:l[c-1],strip:u.stripFlags(l[c-5],l[c])};break;case 17:this.$={path:l[c-4],params:l[c-3],hash:l[c-2],blockParams:l[c-1],strip:u.stripFlags(l[c-5],l[c])};break;case 18:this.$={strip:u.stripFlags(l[c-1],l[c-1]),program:l[c]};break;case 19:var p=u.prepareBlock(l[c-2],l[c-1],l[c],l[c],!1,this._$),g=u.prepareProgram([p],l[c-1].loc);g.chained=!0,this.$={strip:l[c-2].strip,program:g,chain:!0};break;case 20:this.$=l[c];break;case 21:this.$={path:l[c-1],strip:u.stripFlags(l[c-2],l[c])};break;case 22:this.$=u.prepareMustache(l[c-3],l[c-2],l[c-1],l[c-4],u.stripFlags(l[c-4],l[c]),this._$);break;case 23:this.$=u.prepareMustache(l[c-3],l[c-2],l[c-1],l[c-4],u.stripFlags(l[c-4],l[c]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[c-3],params:l[c-2],hash:l[c-1],indent:"",strip:u.stripFlags(l[c-4],l[c]),loc:u.locInfo(this._$)};break;case 25:this.$=u.preparePartialBlock(l[c-2],l[c-1],l[c],this._$);break;case 26:this.$={path:l[c-3],params:l[c-2],hash:l[c-1],strip:u.stripFlags(l[c-4],l[c])};break;case 27:this.$=l[c];break;case 28:this.$=l[c];break;case 29:this.$={type:"SubExpression",path:l[c-3],params:l[c-2],hash:l[c-1],loc:u.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[c],loc:u.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:u.id(l[c-2]),value:l[c],loc:u.locInfo(this._$)};break;case 32:this.$=u.id(l[c-1]);break;case 33:this.$=l[c];break;case 34:this.$=l[c];break;case 35:this.$={type:"StringLiteral",value:l[c],original:l[c],loc:u.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[c]),original:Number(l[c]),loc:u.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[c]==="true",original:l[c]==="true",loc:u.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:u.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:u.locInfo(this._$)};break;case 40:this.$=l[c];break;case 41:this.$=l[c];break;case 42:this.$=u.preparePath(!0,l[c],this._$);break;case 43:this.$=u.preparePath(!1,l[c],this._$);break;case 44:l[c-2].push({part:u.id(l[c]),original:l[c],separator:l[c-1]}),this.$=l[c-2];break;case 45:this.$=[{part:u.id(l[c]),original:l[c]}];break;case 46:this.$=[];break;case 47:l[c-1].push(l[c]);break;case 48:this.$=[];break;case 49:l[c-1].push(l[c]);break;case 50:this.$=[];break;case 51:l[c-1].push(l[c]);break;case 58:this.$=[];break;case 59:l[c-1].push(l[c]);break;case 64:this.$=[];break;case 65:l[c-1].push(l[c]);break;case 70:this.$=[];break;case 71:l[c-1].push(l[c]);break;case 78:this.$=[];break;case 79:l[c-1].push(l[c]);break;case 82:this.$=[];break;case 83:l[c-1].push(l[c]);break;case 86:this.$=[];break;case 87:l[c-1].push(l[c]);break;case 90:this.$=[];break;case 91:l[c-1].push(l[c]);break;case 94:this.$=[];break;case 95:l[c-1].push(l[c]);break;case 98:this.$=[l[c]];break;case 99:l[c-1].push(l[c]);break;case 100:this.$=[l[c]];break;case 101:l[c-1].push(l[c])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,a){throw new Error(o)},parse:function(o){var a=this,h=[0],u=[null],d=[],l=this.table,f="",c=0,p=0,g=0;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var v=this.lexer.yylloc;d.push(v);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function S(){var $=a.lexer.lex()||1;return typeof $!="number"&&($=a.symbols_[$]||$),$}for(var y,m,_,k,w,E={},N,P,A,C;;){if(_=h[h.length-1],this.defaultActions[_]?k=this.defaultActions[_]:((y===null||typeof y>"u")&&(y=S()),k=l[_]&&l[_][y]),typeof k>"u"||!k.length||!k[0]){var H="";if(!g){C=[];for(N in l[_])this.terminals_[N]&&N>2&&C.push("\'"+this.terminals_[N]+"\'");this.lexer.showPosition?H="Parse error on line "+(c+1)+`:\n`+this.lexer.showPosition()+`\nExpecting `+C.join(", ")+", got \'"+(this.terminals_[y]||y)+"\'":H="Parse error on line "+(c+1)+": Unexpected "+(y==1?"end of input":"\'"+(this.terminals_[y]||y)+"\'"),this.parseError(H,{text:this.lexer.match,token:this.terminals_[y]||y,line:this.lexer.yylineno,loc:v,expected:C})}}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+y);switch(k[0]){case 1:h.push(y),u.push(this.lexer.yytext),d.push(this.lexer.yylloc),h.push(k[1]),y=null,m?(y=m,m=null):(p=this.lexer.yyleng,f=this.lexer.yytext,c=this.lexer.yylineno,v=this.lexer.yylloc,g>0&&g--);break;case 2:if(P=this.productions_[k[1]][1],E.$=u[u.length-P],E._$={first_line:d[d.length-(P||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(P||1)].first_column,last_column:d[d.length-1].last_column},b&&(E._$.range=[d[d.length-(P||1)].range[0],d[d.length-1].range[1]]),w=this.performAction.call(E,f,p,c,this.yy,k[1],u,d),typeof w<"u")return w;P&&(h=h.slice(0,-1*P*2),u=u.slice(0,-1*P),d=d.slice(0,-1*P)),h.push(this.productions_[k[1]][0]),u.push(E.$),d.push(E._$),A=l[h[h.length-2]][h[h.length-1]],h.push(A);break;case 3:return!0}}return!0}};r.lexer=(function(){var n={EOF:1,parseError:function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var h=a.length,u=a.split(/(?:\\r\\n?|\\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h-1),this.offset-=h;var d=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var l=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-h]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\\n/g,"")},showPosition:function(){var a=this.pastInput(),h=new Array(a.length+1).join("-");return a+this.upcomingInput()+`\n`+h+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,h,u,d,l;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),c=0;c<f.length&&(u=this._input.match(this.rules[f[c]]),!(u&&(!h||u[0].length>h[0].length)&&(h=u,d=c,!this.options.flex)));c++);return h?(l=h[0].match(/(?:\\r\\n?|\\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return typeof a<"u"?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return n.options={},n.performAction=function(a,h,u,d){function l(f,c){return h.yytext=h.yytext.substring(f,h.yyleng-c+f)}switch(u){case 0:if(h.yytext.slice(-2)==="\\\\\\\\"?(l(0,1),this.begin("mu")):h.yytext.slice(-1)==="\\\\"?(l(0,1),this.begin("emu")):this.begin("mu"),h.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(h.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return h.yytext=l(1,2).replace(/\\\\"/g,\'"\'),80;case 32:return h.yytext=l(1,2).replace(/\\\\\'/g,"\'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return h.yytext=h.yytext.replace(/\\\\([\\\\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\\x00]*?(?=(\\{\\{)))/,/^(?:[^\\x00]+)/,/^(?:[^\\x00]{2,}?(?=(\\{\\{|\\\\\\{\\{|\\\\\\\\\\{\\{|$)))/,/^(?:\\{\\{\\{\\{(?=[^\\/]))/,/^(?:\\{\\{\\{\\{\\/[^\\s!"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=[=}\\s\\/.])\\}\\}\\}\\})/,/^(?:[^\\x00]+?(?=(\\{\\{\\{\\{)))/,/^(?:[\\s\\S]*?--(~)?\\}\\})/,/^(?:\\()/,/^(?:\\))/,/^(?:\\{\\{\\{\\{)/,/^(?:\\}\\}\\}\\})/,/^(?:\\{\\{(~)?>)/,/^(?:\\{\\{(~)?#>)/,/^(?:\\{\\{(~)?#\\*?)/,/^(?:\\{\\{(~)?\\/)/,/^(?:\\{\\{(~)?\\^\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\s*else\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\^)/,/^(?:\\{\\{(~)?\\s*else\\b)/,/^(?:\\{\\{(~)?\\{)/,/^(?:\\{\\{(~)?&)/,/^(?:\\{\\{(~)?!--)/,/^(?:\\{\\{(~)?![\\s\\S]*?\\}\\})/,/^(?:\\{\\{(~)?\\*?)/,/^(?:=)/,/^(?:\\.\\.)/,/^(?:\\.(?=([=~}\\s\\/.)|])))/,/^(?:[\\/.])/,/^(?:\\s+)/,/^(?:\\}(~)?\\}\\})/,/^(?:(~)?\\}\\})/,/^(?:"(\\\\["]|[^"])*")/,/^(?:\'(\\\\[\']|[^\'])*\')/,/^(?:@)/,/^(?:true(?=([~}\\s)])))/,/^(?:false(?=([~}\\s)])))/,/^(?:undefined(?=([~}\\s)])))/,/^(?:null(?=([~}\\s)])))/,/^(?:-?[0-9]+(?:\\.[0-9]+)?(?=([~}\\s)])))/,/^(?:as\\s+\\|)/,/^(?:\\|)/,/^(?:([^\\s!"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=([=~}\\s\\/.)|]))))/,/^(?:\\[(\\\\\\]|[^\\]])*\\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();function i(){this.yy={}}return i.prototype=r,r.Parser=i,new i})();e.default=s,t.exports=e.default})),$i=ue((e=>{e.__esModule=!0;var t=["Program","BlockStatement","DecoratorBlock","PartialStatement","PartialBlockStatement","Decorator","MustacheStatement","ContentStatement","CommentStatement","SubExpression","PathExpression","StringLiteral","NumberLiteral","BooleanLiteral","UndefinedLiteral","NullLiteral","Hash","HashPair"];e.NODE_TYPES=t})),qi=ue(((e,t)=>{e.__esModule=!0;function s(l){return l&&l.__esModule?l:{default:l}}var r=s(ht()),i=Ue(),n=$i();function o(){this.parents=[]}function a(l,f){return i.indexOf(n.NODE_TYPES,f)!==-1||!(f in o.prototype)&&typeof l[f]=="function"}o.prototype={constructor:o,mutating:!1,acceptKey:function(f,c){var p=this.accept(f[c]);if(this.mutating){if(p&&!a(this,p.type))throw new r.default(\'Unexpected node type "\'+p.type+\'" found when accepting \'+c+" on "+f.type);f[c]=p}},acceptRequired:function(f,c){if(this.acceptKey(f,c),!f[c])throw new r.default(f.type+" requires "+c)},acceptArray:function(f){for(var c=0,p=f.length;c<p;c++)this.acceptKey(f,c),f[c]||(f.splice(c,1),c--,p--)},accept:function(f){if(f){if(!a(this,f.type)||!this[f.type])throw new r.default("Unknown type: "+f.type,f);this.current&&this.parents.unshift(this.current),this.current=f;var c=this[f.type](f);if(this.current=this.parents.shift(),!this.mutating||c)return c;if(c!==!1)return f}},Program:function(f){this.acceptArray(f.body)},MustacheStatement:h,Decorator:h,BlockStatement:u,DecoratorBlock:u,PartialStatement:d,PartialBlockStatement:function(f){d.call(this,f),this.acceptKey(f,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:h,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(f){this.acceptArray(f.pairs)},HashPair:function(f){this.acceptRequired(f,"value")}};function h(l){this.acceptRequired(l,"path"),this.acceptArray(l.params),this.acceptKey(l,"hash")}function u(l){h.call(this,l),this.acceptKey(l,"program"),this.acceptKey(l,"inverse")}function d(l){this.acceptRequired(l,"name"),this.acceptArray(l.params),this.acceptKey(l,"hash")}e.default=o,t.exports=e.default})),Xa=ue(((e,t)=>{e.__esModule=!0;function s(u){return u&&u.__esModule?u:{default:u}}var r=s(qi());function i(){var u=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=u}i.prototype=new r.default,i.prototype.Program=function(u){var d=!this.options.ignoreStandalone,l=!this.isRootSeen;this.isRootSeen=!0;for(var f=u.body,c=0,p=f.length;c<p;c++){var g=f[c],v=this.accept(g);if(v){var b=n(f,c,l),S=o(f,c,l),y=v.openStandalone&&b,m=v.closeStandalone&&S,_=v.inlineStandalone&&b&&S;v.close&&a(f,c,!0),v.open&&h(f,c,!0),d&&_&&(a(f,c),h(f,c)&&g.type==="PartialStatement"&&(g.indent=/(?:^|[^ \\t])([ \\t]+)$/.exec(f[c-1].original)[1])),d&&y&&(a((g.program||g.inverse).body),h(f,c)),d&&m&&(a(f,c),h((g.inverse||g.program).body))}}return u},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(u){this.accept(u.program),this.accept(u.inverse);var d=u.program||u.inverse,l=u.program&&u.inverse,f=l,c=l;if(l&&l.chained)for(f=l.body[0].program;c.chained;)c=c.body[c.body.length-1].program;var p={open:u.openStrip.open,close:u.closeStrip.close,openStandalone:o(d.body),closeStandalone:n((f||d).body)};if(u.openStrip.close&&a(d.body,null,!0),l){var g=u.inverseStrip;g.open&&h(d.body,null,!0),g.close&&a(f.body,null,!0),u.closeStrip.open&&h(c.body,null,!0),!this.options.ignoreStandalone&&n(d.body)&&o(f.body)&&(h(d.body),a(f.body))}else u.closeStrip.open&&h(d.body,null,!0);return p},i.prototype.Decorator=i.prototype.MustacheStatement=function(u){return u.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(u){var d=u.strip||{};return{inlineStandalone:!0,open:d.open,close:d.close}};function n(u,d,l){d===void 0&&(d=u.length);var f=u[d-1],c=u[d-2];if(!f)return l;if(f.type==="ContentStatement")return(c||!l?/(?:^|\\S)[^\\S\\n]*\\n\\s*$/:/^\\s*$|(?:^|\\S)[^\\S\\n]*\\n\\s*$/).test(f.original)}function o(u,d,l){d===void 0&&(d=-1);var f=u[d+1],c=u[d+2];if(!f)return l;if(f.type==="ContentStatement")return(c||!l?/^\\s*?\\r?\\n/:/^\\s*?(\\r?\\n|$)/).test(f.original)}function a(u,d,l){var f=u[d==null?0:d+1];if(!(!f||f.type!=="ContentStatement"||!l&&f.rightStripped)){var c=f.value;f.value=f.value.replace(l?/^\\s+/:/^[ \\t]*\\r?\\n?/,""),f.rightStripped=f.value!==c}}function h(u,d,l){var f=u[d==null?u.length-1:d-1];if(!(!f||f.type!=="ContentStatement"||!l&&f.leftStripped)){var c=f.value;return f.value=f.value.replace(l?/(^|\\S)\\s+$/:/(^|[^ \\t])[ \\t]+$/,"$1"),f.leftStripped=f.value!==c,f.leftStripped}}e.default=i,t.exports=e.default})),Ya=ue((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=n,e.stripFlags=o,e.stripComment=a,e.preparePath=h,e.prepareMustache=u,e.prepareRawBlock=d,e.prepareBlock=l,e.prepareProgram=f,e.preparePartialBlock=c;function t(p){return p&&p.__esModule?p:{default:p}}var s=t(ht());function r(p,g){if(g=g.path?g.path.original:g,p.path.original!==g){var v={loc:p.path.loc};throw new s.default(p.path.original+" doesn\'t match "+g,v)}}function i(p,g){this.source=p,this.start={line:g.first_line,column:g.first_column},this.end={line:g.last_line,column:g.last_column}}function n(p){return/^\\[.*\\]$/.test(p)?p.substring(1,p.length-1):p}function o(p,g){return{open:p.charAt(2)==="~",close:g.charAt(g.length-3)==="~"}}function a(p){return p.replace(/^\\{\\{~?!-?-?/,"").replace(/-?-?~?\\}\\}$/,"")}function h(p,g,v){v=this.locInfo(v);for(var b=p?"@":"",S=[],y=0,m=0,_=g.length;m<_;m++){var k=g[m].part,w=g[m].original!==k;if(b+=(g[m].separator||"")+k,!w&&(k===".."||k==="."||k==="this")){if(S.length>0)throw new s.default("Invalid path: "+b,{loc:v});k===".."&&y++}else S.push(k)}return{type:"PathExpression",data:p,depth:y,parts:S,original:b,loc:v}}function u(p,g,v,b,S,y){var m=b.charAt(3)||b.charAt(2),_=m!=="{"&&m!=="&";return{type:/\\*/.test(b)?"Decorator":"MustacheStatement",path:p,params:g,hash:v,escaped:_,strip:S,loc:this.locInfo(y)}}function d(p,g,v,b){r(p,v),b=this.locInfo(b);var S={type:"Program",body:g,strip:{},loc:b};return{type:"BlockStatement",path:p.path,params:p.params,hash:p.hash,program:S,openStrip:{},inverseStrip:{},closeStrip:{},loc:b}}function l(p,g,v,b,S,y){b&&b.path&&r(p,b);var m=/\\*/.test(p.open);g.blockParams=p.blockParams;var _=void 0,k=void 0;if(v){if(m)throw new s.default("Unexpected inverse block on decorator",v);v.chain&&(v.program.body[0].closeStrip=b.strip),k=v.strip,_=v.program}return S&&(S=_,_=g,g=S),{type:m?"DecoratorBlock":"BlockStatement",path:p.path,params:p.params,hash:p.hash,program:g,inverse:_,openStrip:p.strip,inverseStrip:k,closeStrip:b&&b.strip,loc:this.locInfo(y)}}function f(p,g){if(!g&&p.length){var v=p[0].loc,b=p[p.length-1].loc;v&&b&&(g={source:v.source,start:{line:v.start.line,column:v.start.column},end:{line:b.end.line,column:b.end.column}})}return{type:"Program",body:p,strip:{},loc:g}}function c(p,g,v,b){return r(p,v),{type:"PartialBlockStatement",name:p.path,params:p.params,hash:p.hash,program:g,openStrip:p.strip,closeStrip:v&&v.strip,loc:this.locInfo(b)}}})),Ga=ue((e=>{e.__esModule=!0,e.parseWithoutProcessing=h,e.parse=u;function t(d){if(d&&d.__esModule)return d;var l={};if(d!=null)for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(l[f]=d[f]);return l.default=d,l}function s(d){return d&&d.__esModule?d:{default:d}}var r=s(Wa()),i=s(Xa()),n=t(Ya()),o=Ue();e.parser=r.default;var a={};o.extend(a,n);function h(d,l){return d.type==="Program"?d:(r.default.yy=a,a.locInfo=function(f){return new a.SourceLocation(l&&l.srcName,f)},r.default.parse(d))}function u(d,l){var f=h(d,l);return new i.default(l).accept(f)}})),Za=ue((e=>{e.__esModule=!0,e.Compiler=a,e.precompile=h,e.compile=u;function t(S){return S&&S.__esModule?S:{default:S}}var s=t(ht()),r=Ue(),i=t(Hi()),n=$i(),o=[].slice;function a(){}a.prototype={compiler:a,equals:function(y){var m=this.opcodes.length;if(y.opcodes.length!==m)return!1;for(var _=0;_<m;_++){var k=this.opcodes[_],w=y.opcodes[_];if(k.opcode!==w.opcode||!v(k.args,w.args))return!1}m=this.children.length;for(var _=0;_<m;_++)if(!this.children[_].equals(y.children[_]))return!1;return!0},guid:0,compile:function(y,m){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=m,this.stringParams=m.stringParams,this.trackIds=m.trackIds,m.blockParams=m.blockParams||[],m.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},m.knownHelpers),this.accept(y)},compileProgram:function(y){var m=new this.compiler().compile(y,this.options),_=this.guid++;return this.usePartial=this.usePartial||m.usePartial,this.children[_]=m,this.useDepths=this.useDepths||m.useDepths,_},accept:function(y){if(r.indexOf(n.NODE_TYPES,y.type)===-1||!this[y.type])throw new s.default("Unknown type: "+y.type,y);this.sourceNode.unshift(y);var m=this[y.type](y);return this.sourceNode.shift(),m},Program:function(y){g(y),this.options.blockParams.unshift(y.blockParams);for(var m=y.body,_=m.length,k=0;k<_;k++)this.accept(m[k]);return this.options.blockParams.shift(),this.isSimple=_===1,this.blockParams=y.blockParams?y.blockParams.length:0,this},BlockStatement:function(y){b(y);var m=y.program,_=y.inverse;m=m&&this.compileProgram(m),_=_&&this.compileProgram(_);var k=this.classifySexpr(y);k==="helper"?this.helperSexpr(y,m,_):k==="simple"?(this.simpleSexpr(y),this.opcode("pushProgram",m),this.opcode("pushProgram",_),this.opcode("emptyHash"),this.opcode("blockValue",y.path.original)):(this.ambiguousSexpr(y,m,_),this.opcode("pushProgram",m),this.opcode("pushProgram",_),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(y){var m=y.program&&this.compileProgram(y.program),_=this.setupFullMustacheParams(y,m,void 0),k=y.path;this.useDecorators=!0,this.opcode("registerDecorator",_.length,k.original)},PartialStatement:function(y){this.usePartial=!0;var m=y.program;m&&(m=this.compileProgram(y.program));var _=y.params;if(_.length>1)throw new s.default("Unsupported number of partial arguments: "+_.length,y);_.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):_.push({type:"PathExpression",parts:[],depth:0}));var k=y.name.original,w=y.name.type==="SubExpression";w&&this.accept(y.name),this.setupFullMustacheParams(y,m,void 0,!0);var E=y.indent||"";this.options.preventIndent&&E&&(this.opcode("appendContent",E),E=""),this.opcode("invokePartial",w,k,E),this.opcode("append")},PartialBlockStatement:function(y){this.PartialStatement(y)},MustacheStatement:function(y){this.SubExpression(y),y.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(y){this.DecoratorBlock(y)},ContentStatement:function(y){if(y.value!=null&&typeof y.value!="string")throw d(y,"value must be a string");y.value&&this.opcode("appendContent",y.value)},CommentStatement:function(){},SubExpression:function(y){b(y);var m=this.classifySexpr(y);m==="simple"?this.simpleSexpr(y):m==="helper"?this.helperSexpr(y):this.ambiguousSexpr(y)},ambiguousSexpr:function(y,m,_){var k=y.path,w=k.parts[0],E=m!=null||_!=null;this.opcode("getContext",l(k)),this.opcode("pushProgram",m),this.opcode("pushProgram",_),k.strict=!0,this.accept(k),this.opcode("invokeAmbiguous",w,E)},simpleSexpr:function(y){var m=y.path;m.strict=!0,this.accept(m),this.opcode("resolvePossibleLambda")},helperSexpr:function(y,m,_){var k=this.setupFullMustacheParams(y,m,_),w=y.path,E=w.parts[0];if(this.options.knownHelpers[E])this.opcode("invokeKnownHelper",k.length,E);else{if(this.options.knownHelpersOnly)throw new s.default("You specified knownHelpersOnly, but used the unknown helper "+E,y);w.strict=!0,w.falsy=!0,this.accept(w),this.opcode("invokeHelper",k.length,w.original,i.default.helpers.simpleId(w))}},PathExpression:function(y){var m=l(y),_=p(y);this.addDepth(m),this.opcode("getContext",m);var k=_[0],w=i.default.helpers.scopedId(y),E=!m&&!w&&this.blockParamIndex(k);E?this.opcode("lookupBlockParam",E,_):k?y.data?(this.options.data=!0,this.opcode("lookupData",m,_,y.strict)):this.opcode("lookupOnContext",_,y.falsy,y.strict,w):this.opcode("pushContext")},StringLiteral:function(y){f(y),this.opcode("pushString",y.value)},NumberLiteral:function(y){f(y),this.opcode("pushLiteral",y.value)},BooleanLiteral:function(y){f(y),this.opcode("pushLiteral",y.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(y){var m=y.pairs,_=0,k=void 0;if(!r.isArray(m))throw d(y,"pairs must be an array");k=m.length;for(var w=0;w<k;w++)if(!m[w]||typeof m[w].key!="string")throw d(y,"pair keys must be strings");for(this.opcode("pushHash");_<k;_++)this.pushParam(m[_].value);for(;_--;)this.opcode("assignToHash",m[_].key);this.opcode("popHash")},opcode:function(y){this.opcodes.push({opcode:y,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(y){y&&(this.useDepths=!0)},classifySexpr:function(y){p(y.path);var m=i.default.helpers.simpleId(y.path),_=m&&!!this.blockParamIndex(y.path.parts[0]),k=!_&&i.default.helpers.helperExpression(y),w=!_&&(k||m);if(w&&!k){var E=y.path.parts[0],N=this.options;N.knownHelpers[E]?k=!0:N.knownHelpersOnly&&(w=!1)}return k?"helper":w?"ambiguous":"simple"},pushParams:function(y){for(var m=0,_=y.length;m<_;m++)this.pushParam(y[m])},pushParam:function(y){f(y);var m=y.value!=null?y.value:y.original||"",_=l(y);if(this.stringParams)typeof m!="number"&&typeof m!="boolean"&&(m=String(m)),m.replace&&(m=m.replace(/^(\\.?\\.\\/)*/g,"").replace(/\\//g,".")),_&&this.addDepth(_),this.opcode("getContext",_),this.opcode("pushStringParam",m,y.type),y.type==="SubExpression"&&this.accept(y);else{if(this.trackIds){var k=void 0;if(y.parts&&!i.default.helpers.scopedId(y)&&!_&&(k=this.blockParamIndex(p(y)[0])),k){var w=y.parts.slice(1).join(".");this.opcode("pushId","BlockParam",k,w)}else m=y.original||m,m.replace&&(m=m.replace(/^this(?:\\.|$)/,"").replace(/^\\.\\//,"").replace(/^\\.$/,"")),this.opcode("pushId",y.type,m)}this.accept(y)}},setupFullMustacheParams:function(y,m,_,k){var w=y.params;return this.pushParams(w),this.opcode("pushProgram",m),this.opcode("pushProgram",_),y.hash?this.accept(y.hash):this.opcode("emptyHash",k),w},blockParamIndex:function(y){for(var m=0,_=this.options.blockParams.length;m<_;m++){var k=this.options.blockParams[m],w=k&&r.indexOf(k,y);if(k&&w>=0)return[m,w]}}};function h(S,y,m){if(S==null||typeof S!="string"&&S.type!=="Program")throw new s.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+S);y=y||{},"data"in y||(y.data=!0),y.compat&&(y.useDepths=!0);var _=m.parse(S,y),k=new m.Compiler().compile(_,y);return new m.JavaScriptCompiler().compile(k,y)}function u(S,y,m){if(y===void 0&&(y={}),S==null||typeof S!="string"&&S.type!=="Program")throw new s.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+S);y=r.extend({},y),"data"in y||(y.data=!0),y.compat&&(y.useDepths=!0);var _=void 0;function k(){var E=m.parse(S,y),N=new m.Compiler().compile(E,y),P=new m.JavaScriptCompiler().compile(N,y,void 0,!0);return m.template(P)}function w(E,N){return _||(_=k()),_.call(this,E,N)}return w._setup=function(E){return _||(_=k()),_._setup(E)},w._child=function(E,N,P,A){return _||(_=k()),_._child(E,N,P,A)},w}function d(S,y){return new s.default("Invalid AST: "+S.type+" "+y,S)}function l(S){var y=S.depth;if(y==null)return 0;if(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y<0)throw d(S,"depth must be a non-negative integer");return y}function f(S){var y=S.value;if(S.type==="StringLiteral"&&typeof y!="string")throw d(S,"value must be a string");if(S.type==="NumberLiteral"&&typeof y!="number")throw d(S,"value must be a number");if(S.type==="BooleanLiteral"&&typeof y!="boolean")throw d(S,"value must be a boolean")}function c(S,y,m){if(!r.isArray(y))throw d(S,m+" must be an array");for(var _=0;_<y.length;_++)if(typeof y[_]!="string")throw d(S,m+" must only contain strings");return y}function p(S){return c(S,S.parts,"parts")}function g(S){S.blockParams!=null&&c(S,S.blockParams,"blockParams")}function v(S,y){if(S===y)return!0;if(r.isArray(S)&&r.isArray(y)&&S.length===y.length){for(var m=0;m<S.length;m++)if(!v(S[m],y[m]))return!1;return!0}}function b(S){if(!S.path.parts){var y=S.path;S.path={type:"PathExpression",data:!1,depth:0,parts:[y.original+""],original:y.original+"",loc:y.loc}}}})),Qa=ue((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(s){if(0<=s&&s<t.length)return t[s];throw new TypeError("Must be between 0 and 63: "+s)},e.decode=function(s){var r=65,i=90,n=97,o=122,a=48,h=57,u=43,d=47,l=26,f=52;return r<=s&&s<=i?s-r:n<=s&&s<=o?s-n+l:a<=s&&s<=h?s-a+f:s==u?62:s==d?63:-1}})),Fi=ue((e=>{var t=Qa(),s=5,r=1<<s,i=r-1,n=r;function o(h){return h<0?(-h<<1)+1:(h<<1)+0}function a(h){var u=(h&1)===1,d=h>>1;return u?-d:d}e.encode=function(u){var d="",l,f=o(u);do l=f&i,f>>>=s,f>0&&(l|=n),d+=t.encode(l);while(f>0);return d},e.decode=function(u,d,l){var f=u.length,c=0,p=0,g,v;do{if(d>=f)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(u.charCodeAt(d++)),v===-1)throw new Error("Invalid base64 digit: "+u.charAt(d-1));g=!!(v&n),v&=i,c=c+(v<<p),p+=s}while(g);l.value=a(c),l.rest=d}})),cs=ue((e=>{function t(m,_,k){if(_ in m)return m[_];if(arguments.length===3)return k;throw new Error(\'"\'+_+\'" is a required argument.\')}e.getArg=t;var s=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,r=/^data:.+\\,.+$/;function i(m){var _=m.match(s);return _?{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}:null}e.urlParse=i;function n(m){var _="";return m.scheme&&(_+=m.scheme+":"),_+="//",m.auth&&(_+=m.auth+"@"),m.host&&(_+=m.host),m.port&&(_+=":"+m.port),m.path&&(_+=m.path),_}e.urlGenerate=n;function o(m){var _=m,k=i(m);if(k){if(!k.path)return m;_=k.path}for(var w=e.isAbsolute(_),E=_.split(/\\/+/),N,P=0,A=E.length-1;A>=0;A--)N=E[A],N==="."?E.splice(A,1):N===".."?P++:P>0&&(N===""?(E.splice(A+1,P),P=0):(E.splice(A,2),P--));return _=E.join("/"),_===""&&(_=w?"/":"."),k?(k.path=_,n(k)):_}e.normalize=o;function a(m,_){m===""&&(m="."),_===""&&(_=".");var k=i(_),w=i(m);if(w&&(m=w.path||"/"),k&&!k.scheme)return w&&(k.scheme=w.scheme),n(k);if(k||_.match(r))return _;if(w&&!w.host&&!w.path)return w.host=_,n(w);var E=_.charAt(0)==="/"?_:o(m.replace(/\\/+$/,"")+"/"+_);return w?(w.path=E,n(w)):E}e.join=a,e.isAbsolute=function(m){return m.charAt(0)==="/"||s.test(m)};function h(m,_){m===""&&(m="."),m=m.replace(/\\/$/,"");for(var k=0;_.indexOf(m+"/")!==0;){var w=m.lastIndexOf("/");if(w<0||(m=m.slice(0,w),m.match(/^([^\\/]+:\\/)?\\/*$/)))return _;++k}return Array(k+1).join("../")+_.substr(m.length+1)}e.relative=h;var u=(function(){return!("__proto__"in Object.create(null))})();function d(m){return m}function l(m){return c(m)?"$"+m:m}e.toSetString=u?d:l;function f(m){return c(m)?m.slice(1):m}e.fromSetString=u?d:f;function c(m){if(!m)return!1;var _=m.length;if(_<9||m.charCodeAt(_-1)!==95||m.charCodeAt(_-2)!==95||m.charCodeAt(_-3)!==111||m.charCodeAt(_-4)!==116||m.charCodeAt(_-5)!==111||m.charCodeAt(_-6)!==114||m.charCodeAt(_-7)!==112||m.charCodeAt(_-8)!==95||m.charCodeAt(_-9)!==95)return!1;for(var k=_-10;k>=0;k--)if(m.charCodeAt(k)!==36)return!1;return!0}function p(m,_,k){var w=v(m.source,_.source);return w!==0||(w=m.originalLine-_.originalLine,w!==0)||(w=m.originalColumn-_.originalColumn,w!==0||k)||(w=m.generatedColumn-_.generatedColumn,w!==0)||(w=m.generatedLine-_.generatedLine,w!==0)?w:v(m.name,_.name)}e.compareByOriginalPositions=p;function g(m,_,k){var w=m.generatedLine-_.generatedLine;return w!==0||(w=m.generatedColumn-_.generatedColumn,w!==0||k)||(w=v(m.source,_.source),w!==0)||(w=m.originalLine-_.originalLine,w!==0)||(w=m.originalColumn-_.originalColumn,w!==0)?w:v(m.name,_.name)}e.compareByGeneratedPositionsDeflated=g;function v(m,_){return m===_?0:m===null?1:_===null?-1:m>_?1:-1}function b(m,_){var k=m.generatedLine-_.generatedLine;return k!==0||(k=m.generatedColumn-_.generatedColumn,k!==0)||(k=v(m.source,_.source),k!==0)||(k=m.originalLine-_.originalLine,k!==0)||(k=m.originalColumn-_.originalColumn,k!==0)?k:v(m.name,_.name)}e.compareByGeneratedPositionsInflated=b;function S(m){return JSON.parse(m.replace(/^\\)]}\'[^\\n]*\\n/,""))}e.parseSourceMapInput=S;function y(m,_,k){if(_=_||"",m&&(m[m.length-1]!=="/"&&_[0]!=="/"&&(m+="/"),_=m+_),k){var w=i(k);if(!w)throw new Error("sourceMapURL could not be parsed");if(w.path){var E=w.path.lastIndexOf("/");E>=0&&(w.path=w.path.substring(0,E+1))}_=a(n(w),_)}return o(_)}e.computeSourceURL=y})),Vi=ue((e=>{var t=cs(),s=Object.prototype.hasOwnProperty,r=typeof Map<"u";function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(o,a){for(var h=new i,u=0,d=o.length;u<d;u++)h.add(o[u],a);return h},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(o,a){var h=r?o:t.toSetString(o),u=r?this.has(o):s.call(this._set,h),d=this._array.length;(!u||a)&&this._array.push(o),u||(r?this._set.set(o,d):this._set[h]=d)},i.prototype.has=function(o){if(r)return this._set.has(o);var a=t.toSetString(o);return s.call(this._set,a)},i.prototype.indexOf=function(o){if(r){var a=this._set.get(o);if(a>=0)return a}else{var h=t.toSetString(o);if(s.call(this._set,h))return this._set[h]}throw new Error(\'"\'+o+\'" is not in the set.\')},i.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),Ja=ue((e=>{var t=cs();function s(i,n){var o=i.generatedLine,a=n.generatedLine,h=i.generatedColumn,u=n.generatedColumn;return a>o||a==o&&u>=h||t.compareByGeneratedPositionsInflated(i,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(n,o){this._array.forEach(n,o)},r.prototype.add=function(n){s(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r})),zi=ue((e=>{var t=Fi(),s=cs(),r=Vi().ArraySet,i=Ja().MappingList;function n(o){o||(o={}),this._file=s.getArg(o,"file",null),this._sourceRoot=s.getArg(o,"sourceRoot",null),this._skipValidation=s.getArg(o,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}n.prototype._version=3,n.fromSourceMap=function(a){var h=a.sourceRoot,u=new n({file:a.file,sourceRoot:h});return a.eachMapping(function(d){var l={generated:{line:d.generatedLine,column:d.generatedColumn}};d.source!=null&&(l.source=d.source,h!=null&&(l.source=s.relative(h,l.source)),l.original={line:d.originalLine,column:d.originalColumn},d.name!=null&&(l.name=d.name)),u.addMapping(l)}),a.sources.forEach(function(d){var l=d;h!==null&&(l=s.relative(h,d)),u._sources.has(l)||u._sources.add(l);var f=a.sourceContentFor(d);f!=null&&u.setSourceContent(d,f)}),u},n.prototype.addMapping=function(a){var h=s.getArg(a,"generated"),u=s.getArg(a,"original",null),d=s.getArg(a,"source",null),l=s.getArg(a,"name",null);this._skipValidation||this._validateMapping(h,u,d,l),d!=null&&(d=String(d),this._sources.has(d)||this._sources.add(d)),l!=null&&(l=String(l),this._names.has(l)||this._names.add(l)),this._mappings.add({generatedLine:h.line,generatedColumn:h.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:d,name:l})},n.prototype.setSourceContent=function(a,h){var u=a;this._sourceRoot!=null&&(u=s.relative(this._sourceRoot,u)),h!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(u)]=h):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(a,h,u){var d=h;if(h==null){if(a.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.`);d=a.file}var l=this._sourceRoot;l!=null&&(d=s.relative(l,d));var f=new r,c=new r;this._mappings.unsortedForEach(function(p){if(p.source===d&&p.originalLine!=null){var g=a.originalPositionFor({line:p.originalLine,column:p.originalColumn});g.source!=null&&(p.source=g.source,u!=null&&(p.source=s.join(u,p.source)),l!=null&&(p.source=s.relative(l,p.source)),p.originalLine=g.line,p.originalColumn=g.column,g.name!=null&&(p.name=g.name))}var v=p.source;v!=null&&!f.has(v)&&f.add(v);var b=p.name;b!=null&&!c.has(b)&&c.add(b)},this),this._sources=f,this._names=c,a.sources.forEach(function(p){var g=a.sourceContentFor(p);g!=null&&(u!=null&&(p=s.join(u,p)),l!=null&&(p=s.relative(l,p)),this.setSourceContent(p,g))},this)},n.prototype._validateMapping=function(a,h,u,d){if(h&&typeof h.line!="number"&&typeof h.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(a&&"line"in a&&"column"in a&&a.line>0&&a.column>=0&&!h&&!u&&!d)){if(a&&"line"in a&&"column"in a&&h&&"line"in h&&"column"in h&&a.line>0&&a.column>=0&&h.line>0&&h.column>=0&&u)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:a,source:u,original:h,name:d}))}},n.prototype._serializeMappings=function(){for(var a=0,h=1,u=0,d=0,l=0,f=0,c="",p,g,v,b,S=this._mappings.toArray(),y=0,m=S.length;y<m;y++){if(g=S[y],p="",g.generatedLine!==h)for(a=0;g.generatedLine!==h;)p+=";",h++;else if(y>0){if(!s.compareByGeneratedPositionsInflated(g,S[y-1]))continue;p+=","}p+=t.encode(g.generatedColumn-a),a=g.generatedColumn,g.source!=null&&(b=this._sources.indexOf(g.source),p+=t.encode(b-f),f=b,p+=t.encode(g.originalLine-1-d),d=g.originalLine-1,p+=t.encode(g.originalColumn-u),u=g.originalColumn,g.name!=null&&(v=this._names.indexOf(g.name),p+=t.encode(v-l),l=v)),c+=p}return c},n.prototype._generateSourcesContent=function(a,h){return a.map(function(u){if(!this._sourcesContents)return null;h!=null&&(u=s.relative(h,u));var d=s.toSetString(u);return Object.prototype.hasOwnProperty.call(this._sourcesContents,d)?this._sourcesContents[d]:null},this)},n.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=n})),Ka=ue((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(s,r,i,n,o,a){var h=Math.floor((r-s)/2)+s,u=o(i,n[h],!0);return u===0?h:u>0?r-h>1?t(h,r,i,n,o,a):a==e.LEAST_UPPER_BOUND?r<n.length?r:-1:h:h-s>1?t(s,h,i,n,o,a):a==e.LEAST_UPPER_BOUND?h:s<0?-1:s}e.search=function(r,i,n,o){if(i.length===0)return-1;var a=t(-1,i.length,r,i,n,o||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&n(i[a],i[a-1],!0)===0;)--a;return a}})),ja=ue((e=>{function t(i,n,o){var a=i[n];i[n]=i[o],i[o]=a}function s(i,n){return Math.round(i+Math.random()*(n-i))}function r(i,n,o,a){if(o<a){var h=s(o,a),u=o-1;t(i,h,a);for(var d=i[a],l=o;l<a;l++)n(i[l],d)<=0&&(u+=1,t(i,u,l));t(i,u+1,l);var f=u+1;r(i,n,o,f-1),r(i,n,f+1,a)}}e.quickSort=function(i,n){r(i,n,0,i.length-1)}})),el=ue((e=>{var t=cs(),s=Ka(),r=Vi().ArraySet,i=Fi(),n=ja().quickSort;function o(d,l){var f=d;return typeof d=="string"&&(f=t.parseSourceMapInput(d)),f.sections!=null?new u(f,l):new a(f,l)}o.fromSourceMap=function(d,l){return a.fromSourceMap(d,l)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(l,f){var c=l.charAt(f);return c===";"||c===","},o.prototype._parseMappings=function(l,f){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(l,f,c){var p=f||null,g=c||o.GENERATED_ORDER,v;switch(g){case o.GENERATED_ORDER:v=this._generatedMappings;break;case o.ORIGINAL_ORDER:v=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var b=this.sourceRoot;v.map(function(S){var y=S.source===null?null:this._sources.at(S.source);return y=t.computeSourceURL(b,y,this._sourceMapURL),{source:y,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:this._names.at(S.name)}},this).forEach(l,p)},o.prototype.allGeneratedPositionsFor=function(l){var f=t.getArg(l,"line"),c={source:t.getArg(l,"source"),originalLine:f,originalColumn:t.getArg(l,"column",0)};if(c.source=this._findSourceIndex(c.source),c.source<0)return[];var p=[],g=this._findMapping(c,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(g>=0){var v=this._originalMappings[g];if(l.column===void 0)for(var b=v.originalLine;v&&v.originalLine===b;)p.push({line:t.getArg(v,"generatedLine",null),column:t.getArg(v,"generatedColumn",null),lastColumn:t.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++g];else for(var S=v.originalColumn;v&&v.originalLine===f&&v.originalColumn==S;)p.push({line:t.getArg(v,"generatedLine",null),column:t.getArg(v,"generatedColumn",null),lastColumn:t.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++g]}return p},e.SourceMapConsumer=o;function a(d,l){var f=d;typeof d=="string"&&(f=t.parseSourceMapInput(d));var c=t.getArg(f,"version"),p=t.getArg(f,"sources"),g=t.getArg(f,"names",[]),v=t.getArg(f,"sourceRoot",null),b=t.getArg(f,"sourcesContent",null),S=t.getArg(f,"mappings"),y=t.getArg(f,"file",null);if(c!=this._version)throw new Error("Unsupported version: "+c);v&&(v=t.normalize(v)),p=p.map(String).map(t.normalize).map(function(m){return v&&t.isAbsolute(v)&&t.isAbsolute(m)?t.relative(v,m):m}),this._names=r.fromArray(g.map(String),!0),this._sources=r.fromArray(p,!0),this._absoluteSources=this._sources.toArray().map(function(m){return t.computeSourceURL(v,m,l)}),this.sourceRoot=v,this.sourcesContent=b,this._mappings=S,this._sourceMapURL=l,this.file=y}a.prototype=Object.create(o.prototype),a.prototype.consumer=o,a.prototype._findSourceIndex=function(d){var l=d;if(this.sourceRoot!=null&&(l=t.relative(this.sourceRoot,l)),this._sources.has(l))return this._sources.indexOf(l);var f;for(f=0;f<this._absoluteSources.length;++f)if(this._absoluteSources[f]==d)return f;return-1},a.fromSourceMap=function(l,f){var c=Object.create(a.prototype),p=c._names=r.fromArray(l._names.toArray(),!0),g=c._sources=r.fromArray(l._sources.toArray(),!0);c.sourceRoot=l._sourceRoot,c.sourcesContent=l._generateSourcesContent(c._sources.toArray(),c.sourceRoot),c.file=l._file,c._sourceMapURL=f,c._absoluteSources=c._sources.toArray().map(function(w){return t.computeSourceURL(c.sourceRoot,w,f)});for(var v=l._mappings.toArray().slice(),b=c.__generatedMappings=[],S=c.__originalMappings=[],y=0,m=v.length;y<m;y++){var _=v[y],k=new h;k.generatedLine=_.generatedLine,k.generatedColumn=_.generatedColumn,_.source&&(k.source=g.indexOf(_.source),k.originalLine=_.originalLine,k.originalColumn=_.originalColumn,_.name&&(k.name=p.indexOf(_.name)),S.push(k)),b.push(k)}return n(c.__originalMappings,t.compareByOriginalPositions),c},a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function h(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}a.prototype._parseMappings=function(l,f){for(var c=1,p=0,g=0,v=0,b=0,S=0,y=l.length,m=0,_={},k={},w=[],E=[],N,P,A,C,H;m<y;)if(l.charAt(m)===";")c++,m++,p=0;else if(l.charAt(m)===",")m++;else{for(N=new h,N.generatedLine=c,C=m;C<y&&!this._charIsMappingSeparator(l,C);C++);if(P=l.slice(m,C),A=_[P],A)m+=P.length;else{for(A=[];m<C;)i.decode(l,m,k),H=k.value,m=k.rest,A.push(H);if(A.length===2)throw new Error("Found a source, but no line and column");if(A.length===3)throw new Error("Found a source and line, but no column");_[P]=A}N.generatedColumn=p+A[0],p=N.generatedColumn,A.length>1&&(N.source=b+A[1],b+=A[1],N.originalLine=g+A[2],g=N.originalLine,N.originalLine+=1,N.originalColumn=v+A[3],v=N.originalColumn,A.length>4&&(N.name=S+A[4],S+=A[4])),E.push(N),typeof N.originalLine=="number"&&w.push(N)}n(E,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,n(w,t.compareByOriginalPositions),this.__originalMappings=w},a.prototype._findMapping=function(l,f,c,p,g,v){if(l[c]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+l[c]);if(l[p]<0)throw new TypeError("Column must be greater than or equal to 0, got "+l[p]);return s.search(l,f,g,v)},a.prototype.computeColumnSpans=function(){for(var l=0;l<this._generatedMappings.length;++l){var f=this._generatedMappings[l];if(l+1<this._generatedMappings.length){var c=this._generatedMappings[l+1];if(f.generatedLine===c.generatedLine){f.lastGeneratedColumn=c.generatedColumn-1;continue}}f.lastGeneratedColumn=1/0}},a.prototype.originalPositionFor=function(l){var f={generatedLine:t.getArg(l,"line"),generatedColumn:t.getArg(l,"column")},c=this._findMapping(f,this._generatedMappings,"generatedLine","generatedColumn",t.compareByGeneratedPositionsDeflated,t.getArg(l,"bias",o.GREATEST_LOWER_BOUND));if(c>=0){var p=this._generatedMappings[c];if(p.generatedLine===f.generatedLine){var g=t.getArg(p,"source",null);g!==null&&(g=this._sources.at(g),g=t.computeSourceURL(this.sourceRoot,g,this._sourceMapURL));var v=t.getArg(p,"name",null);return v!==null&&(v=this._names.at(v)),{source:g,line:t.getArg(p,"originalLine",null),column:t.getArg(p,"originalColumn",null),name:v}}}return{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(l){return l==null}):!1},a.prototype.sourceContentFor=function(l,f){if(!this.sourcesContent)return null;var c=this._findSourceIndex(l);if(c>=0)return this.sourcesContent[c];var p=l;this.sourceRoot!=null&&(p=t.relative(this.sourceRoot,p));var g;if(this.sourceRoot!=null&&(g=t.urlParse(this.sourceRoot))){var v=p.replace(/^file:\\/\\//,"");if(g.scheme=="file"&&this._sources.has(v))return this.sourcesContent[this._sources.indexOf(v)];if((!g.path||g.path=="/")&&this._sources.has("/"+p))return this.sourcesContent[this._sources.indexOf("/"+p)]}if(f)return null;throw new Error(\'"\'+p+\'" is not in the SourceMap.\')},a.prototype.generatedPositionFor=function(l){var f=t.getArg(l,"source");if(f=this._findSourceIndex(f),f<0)return{line:null,column:null,lastColumn:null};var c={source:f,originalLine:t.getArg(l,"line"),originalColumn:t.getArg(l,"column")},p=this._findMapping(c,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(l,"bias",o.GREATEST_LOWER_BOUND));if(p>=0){var g=this._originalMappings[p];if(g.source===c.source)return{line:t.getArg(g,"generatedLine",null),column:t.getArg(g,"generatedColumn",null),lastColumn:t.getArg(g,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=a;function u(d,l){var f=d;typeof d=="string"&&(f=t.parseSourceMapInput(d));var c=t.getArg(f,"version"),p=t.getArg(f,"sections");if(c!=this._version)throw new Error("Unsupported version: "+c);this._sources=new r,this._names=new r;var g={line:-1,column:0};this._sections=p.map(function(v){if(v.url)throw new Error("Support for url field in sections not implemented.");var b=t.getArg(v,"offset"),S=t.getArg(b,"line"),y=t.getArg(b,"column");if(S<g.line||S===g.line&&y<g.column)throw new Error("Section offsets must be ordered and non-overlapping.");return g=b,{generatedOffset:{generatedLine:S+1,generatedColumn:y+1},consumer:new o(t.getArg(v,"map"),l)}})}u.prototype=Object.create(o.prototype),u.prototype.constructor=o,u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){for(var d=[],l=0;l<this._sections.length;l++)for(var f=0;f<this._sections[l].consumer.sources.length;f++)d.push(this._sections[l].consumer.sources[f]);return d}}),u.prototype.originalPositionFor=function(l){var f={generatedLine:t.getArg(l,"line"),generatedColumn:t.getArg(l,"column")},c=s.search(f,this._sections,function(g,v){var b=g.generatedLine-v.generatedOffset.generatedLine;return b||g.generatedColumn-v.generatedOffset.generatedColumn}),p=this._sections[c];return p?p.consumer.originalPositionFor({line:f.generatedLine-(p.generatedOffset.generatedLine-1),column:f.generatedColumn-(p.generatedOffset.generatedLine===f.generatedLine?p.generatedOffset.generatedColumn-1:0),bias:l.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(l){return l.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(l,f){for(var c=0;c<this._sections.length;c++){var p=this._sections[c].consumer.sourceContentFor(l,!0);if(p)return p}if(f)return null;throw new Error(\'"\'+l+\'" is not in the SourceMap.\')},u.prototype.generatedPositionFor=function(l){for(var f=0;f<this._sections.length;f++){var c=this._sections[f];if(c.consumer._findSourceIndex(t.getArg(l,"source"))!==-1){var p=c.consumer.generatedPositionFor(l);if(p)return{line:p.line+(c.generatedOffset.generatedLine-1),column:p.column+(c.generatedOffset.generatedLine===p.line?c.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},u.prototype._parseMappings=function(l,f){this.__generatedMappings=[],this.__originalMappings=[];for(var c=0;c<this._sections.length;c++)for(var p=this._sections[c],g=p.consumer._generatedMappings,v=0;v<g.length;v++){var b=g[v],S=p.consumer._sources.at(b.source);S=t.computeSourceURL(p.consumer.sourceRoot,S,this._sourceMapURL),this._sources.add(S),S=this._sources.indexOf(S);var y=null;b.name&&(y=p.consumer._names.at(b.name),this._names.add(y),y=this._names.indexOf(y));var m={source:S,generatedLine:b.generatedLine+(p.generatedOffset.generatedLine-1),generatedColumn:b.generatedColumn+(p.generatedOffset.generatedLine===b.generatedLine?p.generatedOffset.generatedColumn-1:0),originalLine:b.originalLine,originalColumn:b.originalColumn,name:y};this.__generatedMappings.push(m),typeof m.originalLine=="number"&&this.__originalMappings.push(m)}n(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),n(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=u})),tl=ue((e=>{var t=zi().SourceMapGenerator,s=cs(),r=/(\\r?\\n)/,i=10,n="$$$isSourceNode$$$";function o(a,h,u,d,l){this.children=[],this.sourceContents={},this.line=a??null,this.column=h??null,this.source=u??null,this.name=l??null,this[n]=!0,d!=null&&this.add(d)}o.fromStringWithSourceMap=function(h,u,d){var l=new o,f=h.split(r),c=0,p=function(){return y()+(y()||"");function y(){return c<f.length?f[c++]:void 0}},g=1,v=0,b=null;return u.eachMapping(function(y){if(b!==null)if(g<y.generatedLine)S(b,p()),g++,v=0;else{var m=f[c]||"",_=m.substr(0,y.generatedColumn-v);f[c]=m.substr(y.generatedColumn-v),v=y.generatedColumn,S(b,_),b=y;return}for(;g<y.generatedLine;)l.add(p()),g++;if(v<y.generatedColumn){var m=f[c]||"";l.add(m.substr(0,y.generatedColumn)),f[c]=m.substr(y.generatedColumn),v=y.generatedColumn}b=y},this),c<f.length&&(b&&S(b,p()),l.add(f.splice(c).join(""))),u.sources.forEach(function(y){var m=u.sourceContentFor(y);m!=null&&(d!=null&&(y=s.join(d,y)),l.setSourceContent(y,m))}),l;function S(y,m){if(y===null||y.source===void 0)l.add(m);else{var _=d?s.join(d,y.source):y.source;l.add(new o(y.originalLine,y.originalColumn,_,m,y.name))}}},o.prototype.add=function(h){if(Array.isArray(h))h.forEach(function(u){this.add(u)},this);else if(h[n]||typeof h=="string")h&&this.children.push(h);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+h);return this},o.prototype.prepend=function(h){if(Array.isArray(h))for(var u=h.length-1;u>=0;u--)this.prepend(h[u]);else if(h[n]||typeof h=="string")this.children.unshift(h);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+h);return this},o.prototype.walk=function(h){for(var u,d=0,l=this.children.length;d<l;d++)u=this.children[d],u[n]?u.walk(h):u!==""&&h(u,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(h){var u,d,l=this.children.length;if(l>0){for(u=[],d=0;d<l-1;d++)u.push(this.children[d]),u.push(h);u.push(this.children[d]),this.children=u}return this},o.prototype.replaceRight=function(h,u){var d=this.children[this.children.length-1];return d[n]?d.replaceRight(h,u):typeof d=="string"?this.children[this.children.length-1]=d.replace(h,u):this.children.push("".replace(h,u)),this},o.prototype.setSourceContent=function(h,u){this.sourceContents[s.toSetString(h)]=u},o.prototype.walkSourceContents=function(h){for(var u=0,d=this.children.length;u<d;u++)this.children[u][n]&&this.children[u].walkSourceContents(h);for(var l=Object.keys(this.sourceContents),u=0,d=l.length;u<d;u++)h(s.fromSetString(l[u]),this.sourceContents[l[u]])},o.prototype.toString=function(){var h="";return this.walk(function(u){h+=u}),h},o.prototype.toStringWithSourceMap=function(h){var u={code:"",line:1,column:0},d=new t(h),l=!1,f=null,c=null,p=null,g=null;return this.walk(function(v,b){u.code+=v,b.source!==null&&b.line!==null&&b.column!==null?((f!==b.source||c!==b.line||p!==b.column||g!==b.name)&&d.addMapping({source:b.source,original:{line:b.line,column:b.column},generated:{line:u.line,column:u.column},name:b.name}),f=b.source,c=b.line,p=b.column,g=b.name,l=!0):l&&(d.addMapping({generated:{line:u.line,column:u.column}}),f=null,l=!1);for(var S=0,y=v.length;S<y;S++)v.charCodeAt(S)===i?(u.line++,u.column=0,S+1===y?(f=null,l=!1):l&&d.addMapping({source:b.source,original:{line:b.line,column:b.column},generated:{line:u.line,column:u.column},name:b.name})):u.column++}),this.walkSourceContents(function(v,b){d.setSourceContent(v,b)}),{code:u.code,map:d}},e.SourceNode=o})),sl=ue((e=>{e.SourceMapGenerator=zi().SourceMapGenerator,e.SourceMapConsumer=el().SourceMapConsumer,e.SourceNode=tl().SourceNode})),rl=ue((e=>{e.__esModule=!0,e.safeJsonLiteral=o;var t=Ue(),s=/[\\x00-\\x1f\\\\"\\u2028\\u2029<\\ud800-\\udfff]/,r=/<(?=!--|\\/?script)/gi;function i(d){return d.replace(r,"\\\\u003C")}function n(d){return"\\\\u"+d.charCodeAt(0).toString(16)}function o(d){return i(JSON.stringify(d).replace(/\\u2028/g,"\\\\u2028").replace(/\\u2029/g,"\\\\u2029").replace(/[\\ud800-\\udfff]/g,n))}var a=void 0;try{(typeof define!="function"||!define.amd)&&(a=sl().SourceNode)}catch{}a||(a=function(d,l,f,c){this.src="",c&&this.add(c)},a.prototype={add:function(l){t.isArray(l)&&(l=l.join("")),this.src+=l},prepend:function(l){t.isArray(l)&&(l=l.join("")),this.src=l+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function h(d,l,f){if(t.isArray(d)){for(var c=[],p=0,g=d.length;p<g;p++)c.push(l.wrap(d[p],f));return c}else if(typeof d=="boolean"||typeof d=="number")return d+"";return d}function u(d){this.srcFile=d,this.source=[]}u.prototype={isEmpty:function(){return!this.source.length},prepend:function(l,f){this.source.unshift(this.wrap(l,f))},push:function(l,f){this.source.push(this.wrap(l,f))},merge:function(){var l=this.empty();return this.each(function(f){l.add([" ",f,`\n`])}),l},each:function(l){for(var f=0,c=this.source.length;f<c;f++)l(this.source[f])},empty:function(){var l=this.currentLocation||{start:{}};return new a(l.start.line,l.start.column,this.srcFile)},wrap:function(l){var f=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return l instanceof a?l:(l=h(l,this,f),new a(f.start.line,f.start.column,this.srcFile,l))},functionCall:function(l,f,c){return c=this.generateList(c),this.wrap([l,f?"."+f+"(":"(",c,")"])},quotedString:function(l){return l=l+"",s.test(l)?o(l):\'"\'+l+\'"\'},objectLiteral:function(l){var f=this,c=[];Object.keys(l).forEach(function(g){var v=h(l[g],f);v!=="undefined"&&c.push([f.quotedString(g),":",v])});var p=this.generateList(c);return p.prepend("{"),p.add("}"),p},generateList:function(l){for(var f=this.empty(),c=0,p=l.length;c<p;c++)c&&f.add(","),f.add(h(l[c],this));return f},generateArray:function(l){var f=this.generateList(l);return f.prepend("["),f.add("]"),f}},e.default=u})),il=ue(((e,t)=>{e.__esModule=!0;function s(f){return f&&f.__esModule?f:{default:f}}var r=Pr(),i=s(ht()),n=Ue(),o=rl(),a=s(o);function h(f){this.value=f}function u(){}u.prototype={nameLookup:function(c,p){return this.internalNameLookup(c,p)},depthedLookup:function(c){return[this.aliasable("container.lookup"),"(depths, ",this.quotedString(c),")"]},compilerInfo:function(){var c=r.COMPILER_REVISION;return[c,r.REVISION_CHANGES[c]]},appendToBuffer:function(c,p,g){return n.isArray(c)||(c=[c]),c=this.source.wrap(c,p),this.environment.isSimple?["return ",c,";"]:g?["buffer += ",c,";"]:(c.appendToBuffer=!0,c)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(c,p){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",c,",",this.quotedString(p),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(c,p,g,v){this.environment=c,this.options=p,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!v,this.name=this.environment.name,this.isChild=!!g,this.context=g||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(c,p),this.useDepths=this.useDepths||c.useDepths||c.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||c.useBlockParams;var b=c.opcodes,S=void 0,y=void 0,m=void 0,_=void 0;for(m=0,_=b.length;m<_;m++)S=b[m],this.source.currentLocation=S.loc,y=y||S.loc,this[S.opcode].apply(this,S.args);if(this.source.currentLocation=y,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new i.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;\n`]),this.decorators.push("return fn;"),v?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {\n`),this.decorators.push(`}\n`),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(v);if(this.isChild)return k;var w={compiler:this.compilerInfo(),main:k};this.decorators&&(w.main_d=this.decorators,w.useDecorators=!0);var E=this.context,N=E.programs,P=E.decorators;for(m=0,_=N.length;m<_;m++)w[m]=N[m],P[m]&&(w[m+"_d"]=P[m],w.useDecorators=!0);return this.environment.usePartial&&(w.usePartial=!0),this.options.data&&(w.useData=!0),this.useDepths&&(w.useDepths=!0),this.useBlockParams&&(w.useBlockParams=!0),this.options.compat&&(w.compat=!0),v?w.compilerOptions=this.options:(w.compiler=JSON.stringify(w.compiler),this.source.currentLocation={start:{line:1,column:0}},w=this.objectLiteral(w),p.srcName?(w=w.toStringWithSourceMap({file:p.destName}),w.map=w.map&&w.map.toString()):w=w.toString()),w},preamble:function(){this.lastContext=0,this.source=new a.default(this.options.srcName),this.decorators=new a.default(this.options.srcName)},createFunctionContext:function(c){var p=this,g="",v=this.stackVars.concat(this.registers.list);v.length>0&&(g+=", "+v.join(", "));var b=0;Object.keys(this.aliases).forEach(function(m){var _=p.aliases[m];_.children&&_.referenceCount>1&&(g+=", alias"+ ++b+"="+m,_.children[0]="alias"+b)}),this.lookupPropertyFunctionIsUsed&&(g+=", "+this.lookupPropertyFunctionVarDeclaration());var S=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&S.push("blockParams"),this.useDepths&&S.push("depths");var y=this.mergeSource(g);return c?(S.push(y),Function.apply(this,S)):this.source.wrap(["function(",S.join(","),`) {\n `,y,"}"])},mergeSource:function(c){var p=this.environment.isSimple,g=!this.forceBuffer,v=void 0,b=void 0,S=void 0,y=void 0;return this.source.each(function(m){m.appendToBuffer?(S?m.prepend(" + "):S=m,y=m):(S&&(b?S.prepend("buffer += "):v=!0,y.add(";"),S=y=void 0),b=!0,p||(g=!1))}),g?S?(S.prepend("return "),y.add(";")):b||this.source.push(\'return "";\'):(c+=", buffer = "+(v?"":this.initializeBuffer()),S?(S.prepend("return buffer + "),y.add(";")):this.source.push("return buffer;")),c&&this.source.prepend("var "+c.substring(2)+(v?"":`;\n`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n `.trim()},blockValue:function(c){var p=this.aliasable("container.hooks.blockHelperMissing"),g=[this.contextName(0)];this.setupHelperArgs(c,0,g);var v=this.popStack();g.splice(1,0,v),this.push(this.source.functionCall(p,"call",g))},ambiguousBlockValue:function(){var c=this.aliasable("container.hooks.blockHelperMissing"),p=[this.contextName(0)];this.setupHelperArgs("",0,p,!0),this.flushInline();var g=this.topStack();p.splice(1,0,g),this.pushSource(["if (!",this.lastHelper,") { ",g," = ",this.source.functionCall(c,"call",p),"}"])},appendContent:function(c){this.pendingContent?c=this.pendingContent+c:this.pendingLocation=this.source.currentLocation,this.pendingContent=c},append:function(){if(this.isInline())this.replaceStack(function(p){return[" != null ? ",p,\' : ""\']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var c=this.popStack();this.pushSource(["if (",c," != null) { ",this.appendToBuffer(c,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("\'\'",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(c){this.lastContext=c},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(c,p,g,v){var b=0;!v&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(c[b++])):this.pushContext(),this.resolvePath("context",c,b,p,g)},lookupBlockParam:function(c,p){this.useBlockParams=!0,this.push(["blockParams[",c[0],"][",c[1],"]"]),this.resolvePath("context",p,1)},lookupData:function(c,p,g){c?this.pushStackLiteral("container.data(data, "+c+")"):this.pushStackLiteral("data"),this.resolvePath("data",p,0,!0,g)},resolvePath:function(c,p,g,v,b){var S=this;if(this.options.strict||this.options.assumeObjects){this.push(l(this.options.strict&&b,this,p,g,c));return}for(var y=p.length,m=function(k){S.replaceStack(function(w){var E=S.nameLookup(w,p[k],c);return v?[" && ",E]:[" != null ? ",E," : ",w]})},_=g;_<y;_++)m(_)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(c,p){this.pushContext(),this.pushString(p),p!=="SubExpression"&&(typeof c=="string"?this.pushString(c):this.pushStackLiteral(c))},emptyHash:function(c){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(c?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var c=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(c.ids)),this.stringParams&&(this.push(this.objectLiteral(c.contexts)),this.push(this.objectLiteral(c.types))),this.push(this.objectLiteral(c.values))},pushString:function(c){this.pushStackLiteral(this.quotedString(c))},pushLiteral:function(c){this.pushStackLiteral(c)},pushProgram:function(c){c!=null?this.pushStackLiteral(this.programExpression(c)):this.pushStackLiteral(null)},registerDecorator:function(c,p){var g=this.nameLookup("decorators",p,"decorator"),v=this.setupHelperArgs(p,c);this.decorators.push(["var decorator = ",g,";"]),this.decorators.push([\'if (typeof decorator !== "function") { throw new Error(\',this.quotedString(\'Missing decorator: "\'+p+\'"\'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",v])," || fn;"])},invokeHelper:function(c,p,g){var v=this.popStack(),b=this.setupHelper(c,p),S=[];g&&S.push(b.name),S.push(v),this.options.strict||S.push(this.aliasable("container.hooks.helperMissing"));var y=["(",this.itemsSeparatedBy(S,"||"),")"],m=this.source.functionCall(y,"call",b.callParams);this.push(m)},itemsSeparatedBy:function(c,p){var g=[];g.push(c[0]);for(var v=1;v<c.length;v++)g.push(p,c[v]);return g},invokeKnownHelper:function(c,p){var g=this.setupHelper(c,p);this.push(this.source.functionCall(g.name,"call",g.callParams))},invokeAmbiguous:function(c,p){this.useRegister("helper");var g=this.popStack();this.emptyHash();var v=this.setupHelper(0,c,p),b=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",c,"helper")," || ",g,")"];this.options.strict||(b[0]="(helper = ",b.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",b,v.paramsInit?["),(",v.paramsInit]:[],"),","(typeof helper === ",this.aliasable(\'"function"\')," ? ",this.source.functionCall("helper","call",v.callParams)," : helper))"])},invokePartial:function(c,p,g){var v=[],b=this.setupParams(p,1,v);c&&(p=this.popStack(),delete b.name),g&&(b.indent=this.quotedString(g)),b.helpers="helpers",b.partials="partials",b.decorators="container.decorators",c?v.unshift(p):v.unshift(this.nameLookup("partials",p,"partial")),this.options.compat&&(b.depths="depths"),b=this.objectLiteral(b),v.push(b),this.push(this.source.functionCall("container.invokePartial","",v))},assignToHash:function(c){var p=this.popStack(),g=void 0,v=void 0,b=void 0;this.trackIds&&(b=this.popStack()),this.stringParams&&(v=this.popStack(),g=this.popStack());var S=this.hash;g&&(S.contexts[c]=g),v&&(S.types[c]=v),b&&(S.ids[c]=b),S.values[c]=p},pushId:function(c,p,g){c==="BlockParam"?this.pushStackLiteral("blockParams["+p[0]+"].path["+p[1]+"]"+(g?" + "+this.quotedString("."+g):"")):c==="PathExpression"?this.pushString(p):c==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:u,compileChildren:function(c,p){for(var g=c.children,v=void 0,b=void 0,S=0,y=g.length;S<y;S++){v=g[S],b=new this.compiler;var m=this.matchExistingProgram(v);if(m==null){var _=this.context.programs.push("")-1;v.index=_,v.name="program"+_,this.context.programs[_]=b.compile(v,p,this.context,!this.precompile),this.context.decorators[_]=b.decorators,this.context.environments[_]=v,this.useDepths=this.useDepths||b.useDepths,this.useBlockParams=this.useBlockParams||b.useBlockParams,v.useDepths=this.useDepths,v.useBlockParams=this.useBlockParams}else v.index=m.index,v.name="program"+m.index,this.useDepths=this.useDepths||m.useDepths,this.useBlockParams=this.useBlockParams||m.useBlockParams}},matchExistingProgram:function(c){for(var p=0,g=this.context.environments.length;p<g;p++){var v=this.context.environments[p];if(v&&v.equals(c))return v}},programExpression:function(c){var p=this.environment.children[c],g=[p.index,"data",p.blockParams];return(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths"),"container.program("+g.join(", ")+")"},useRegister:function(c){this.registers[c]||(this.registers[c]=!0,this.registers.list.push(c))},push:function(c){return c instanceof h||(c=this.source.wrap(c)),this.inlineStack.push(c),c},pushStackLiteral:function(c){this.push(new h(c))},pushSource:function(c){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),c&&this.source.push(c)},replaceStack:function(c){var p=["("],g=void 0,v=void 0,b=void 0;if(!this.isInline())throw new i.default("replaceStack on non-inline");var S=this.popStack(!0);if(S instanceof h)g=[S.value],p=["(",g],b=!0;else{v=!0;var y=this.incrStack();p=["((",this.push(y)," = ",S,")"],g=this.topStack()}var m=c.call(this,g);b||this.popStack(),v&&this.stackSlot--,this.push(p.concat(m,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var c=this.inlineStack;this.inlineStack=[];for(var p=0,g=c.length;p<g;p++){var v=c[p];if(v instanceof h)this.compileStack.push(v);else{var b=this.incrStack();this.pushSource([b," = ",v,";"]),this.compileStack.push(b)}}},isInline:function(){return this.inlineStack.length},popStack:function(c){var p=this.isInline(),g=(p?this.inlineStack:this.compileStack).pop();if(!c&&g instanceof h)return g.value;if(!p){if(!this.stackSlot)throw new i.default("Invalid stack pop");this.stackSlot--}return g},topStack:function(){var c=this.isInline()?this.inlineStack:this.compileStack,p=c[c.length-1];return p instanceof h?p.value:p},contextName:function(c){return this.useDepths&&c?"depths["+c+"]":"depth"+c},quotedString:function(c){return this.source.quotedString(c)},objectLiteral:function(c){return this.source.objectLiteral(c)},aliasable:function(c){var p=this.aliases[c];return p?(p.referenceCount++,p):(p=this.aliases[c]=this.source.wrap(c),p.aliasable=!0,p.referenceCount=1,p)},setupHelper:function(c,p,g){var v=[];return{params:v,paramsInit:this.setupHelperArgs(p,c,v,g),name:this.nameLookup("helpers",p,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(v)}},setupParams:function(c,p,g){var v={},b=[],S=[],y=[],m=!g,_=void 0;m&&(g=[]),v.name=this.quotedString(c),v.hash=this.popStack(),this.trackIds&&(v.hashIds=this.popStack()),this.stringParams&&(v.hashTypes=this.popStack(),v.hashContexts=this.popStack());var k=this.popStack(),w=this.popStack();(w||k)&&(v.fn=w||"container.noop",v.inverse=k||"container.noop");for(var E=p;E--;)_=this.popStack(),g[E]=_,this.trackIds&&(y[E]=this.popStack()),this.stringParams&&(S[E]=this.popStack(),b[E]=this.popStack());return m&&(v.args=this.source.generateArray(g)),this.trackIds&&(v.ids=this.source.generateArray(y)),this.stringParams&&(v.types=this.source.generateArray(S),v.contexts=this.source.generateArray(b)),this.options.data&&(v.data="data"),this.useBlockParams&&(v.blockParams="blockParams"),v},setupHelperArgs:function(c,p,g,v){var b=this.setupParams(c,p,g);return b.loc=d(this),b=this.objectLiteral(b),v?(this.useRegister("options"),g.push("options"),["options=",b]):g?(g.push(b),""):b}},(function(){for(var f="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),c=u.RESERVED_WORDS={},p=0,g=f.length;p<g;p++)c[f[p]]=!0})(),u.isValidJavaScriptVariableName=function(f){return!u.RESERVED_WORDS[f]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(f)};function d(f){var c=f.source.currentLocation;return c?o.safeJsonLiteral(c):"undefined"}function l(f,c,p,g,v){var b=c.popStack(),S=p.length;f&&S--;for(var y=g;y<S;y++)b=c.nameLookup(b,p[y],v);return f?[c.aliasable("container.strict"),"(",b,", ",c.quotedString(p[S]),", ",d(c)," )"]:b}e.default=u,t.exports=e.default})),nl=ue(((e,t)=>{e.__esModule=!0;function s(c){return c&&c.__esModule?c:{default:c}}var r=s(Ua()),i=s(Hi()),n=Ga(),o=Za(),a=s(il()),h=s(qi()),u=s(Bi()),d=r.default.create;function l(){var c=d();return c.compile=function(p,g){return o.compile(p,g,c)},c.precompile=function(p,g){return o.precompile(p,g,c)},c.AST=i.default,c.Compiler=o.Compiler,c.JavaScriptCompiler=a.default,c.Parser=n.parser,c.parse=n.parse,c.parseWithoutProcessing=n.parseWithoutProcessing,c}var f=l();f.create=l,u.default(f),f.Visitor=h.default,f.default=f,e.default=f,t.exports=e.default})),Ze=Bo(nl(),1),ol=class{constructor(e,t,s){this.story=e,this.state=t,this.getCurrentSection=s,this.handlebars=Ze.default.create(),this.handlebars.registerHelper("embed",o=>{const a=this.getCurrentSection();if(a.passages&&o in a.passages)return new Ze.default.SafeString(this.process(a.passages[o].text||"",!0));if(o in this.story.sections)return new Ze.default.SafeString(this.process(this.story.sections[o].text||"",!0))}),this.handlebars.registerHelper("seen",o=>this.state.getSeen(o)),this.handlebars.registerHelper("get",o=>this.state.get(o)),this.handlebars.registerHelper("at",o=>{const a=this.state.get("_section");return Array.isArray(o)?o.includes(a):a===o});const r=o=>o&&typeof o=="object"&&typeof o.toString=="function"&&!Array.isArray(o)?o.toString():o;this.handlebars.registerHelper("set",(o,a)=>(this.state.set(o,r(a)),"")),this.handlebars.registerHelper("unset",o=>(this.state.set(o,!1),"")),this.handlebars.registerHelper("inc",(o,a)=>{const h=typeof a=="number"?a:1,u=this.state.get(o)||0;return this.state.set(o,u+h),""}),this.handlebars.registerHelper("dec",(o,a)=>{const h=typeof a=="number"?a:1,u=this.state.get(o)||0;return this.state.set(o,u-h),""}),this.handlebars.registerHelper("and",(...o)=>o.slice(0,-1).every(Boolean)),this.handlebars.registerHelper("or",(...o)=>o.slice(0,-1).some(Boolean)),this.handlebars.registerHelper("not",o=>!o),this.handlebars.registerHelper("eq",(o,a)=>o==a),this.handlebars.registerHelper("ne",(o,a)=>o!=a),this.handlebars.registerHelper("gt",(o,a)=>o>a),this.handlebars.registerHelper("lt",(o,a)=>o<a),this.handlebars.registerHelper("gte",(o,a)=>o>=a),this.handlebars.registerHelper("lte",(o,a)=>o<=a),this.handlebars.registerHelper("array",function(...o){return o.pop(),o}),this.handlebars.registerHelper("append",(o,a)=>{const h=this.state.get(o)||[],u=Array.isArray(h)?[...h]:[h],d=r(a);return Array.isArray(d)?u.push(...d.map(r)):u.push(d),this.state.set(o,u),""}),this.handlebars.registerHelper("prepend",(o,a)=>{const h=this.state.get(o)||[],u=Array.isArray(h)?[...h]:[h],d=r(a);return Array.isArray(d)?u.unshift(...d.map(r)):u.unshift(d),this.state.set(o,u),""}),this.handlebars.registerHelper("pop",o=>{const a=this.state.get(o)||[];if(!Array.isArray(a)||a.length===0)return"";const h=[...a],u=h.shift();return this.state.set(o,h),u}),this.handlebars.registerHelper("remove",(o,a)=>{const h=this.state.get(o)||[];if(!Array.isArray(h))return"";const u=r(a),d=h.findIndex(l=>r(l)===u);if(d!==-1){const l=[...h];l.splice(d,1),this.state.set(o,l)}return""}),this.handlebars.registerHelper("contains",(o,a)=>{let h;if(typeof o=="string"){const d=this.state.get(o);h=Array.isArray(d)?d:[]}else if(Array.isArray(o))h=o;else return!1;const u=r(a);return h.some(d=>r(d)===u)}),this.handlebars.registerHelper("length",o=>{let a;if(typeof o=="string"){const h=this.state.get(o);a=Array.isArray(h)?h:[]}else if(Array.isArray(o))a=o;else return 0;return a.length});const i=o=>{let a="";const h=o.hash.set||"";return h&&(a+=` data-set=\'${JSON.stringify(h.split(",").map(u=>u.trim()))}\'`),a},n=o=>o.replace(/&/g,"&amp;").replace(/"/g,"&quot;");this.handlebars.registerHelper("section",(o,a)=>{const h=a.hash.text||o;return new Ze.default.SafeString(`<a class="squiffy-link link-section" data-section="${n(o)}"${i(a)} role="link" tabindex="0">${h}</a>`)}),this.handlebars.registerHelper("passage",(o,a)=>{const h=a.hash.text||o;return new Ze.default.SafeString(`<a class="squiffy-link link-passage" data-passage="${n(o)}"${i(a)} role="link" tabindex="0">${h}</a>`)})}process(e,t){try{return e=this.handlebars.compile(e)(this.state.getStore()),t?Tr(e,{async:!1}).trim():Cr(e,{async:!1}).trim()}catch(s){const r=s instanceof Error?s.message:String(s);return console.error("Squiffy template error:",r),`<div class="squiffy-error" style="color: red; background: #ffe0e0; padding: 8px; border: 1px solid red; margin: 4px 0; font-family: monospace; white-space: pre-wrap;"><strong>Template error:</strong> ${r}</div>`}}},al=class{constructor(){this.listeners=new Map}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>this.off(e,t)}off(e,t){this.listeners.get(e)?.delete(t)}once(e,t){const s=this.on(e,r=>{s(),t(r)});return s}emit(e,t){this.listeners.get(e)?.forEach(s=>{try{s(t)}catch(r){console.error(`[Squiffy] handler for "${String(e)}" failed`,r)}})}},ll=class{constructor(e,t,s,r,i){this.store={},this.persist=e,this.storyId=t,this.onSet=s,this.emitter=r,this.onSetInternal=i}usePersistentStorage(){return this.persist&&window.localStorage&&this.storyId}set(e,t){this.setInternal(e,t,!0)}setInternal(e,t,s){typeof t>"u"&&(t=!0),s&&this.onSetInternal&&this.onSetInternal(e,this.get(e),structuredClone(t)),this.store[e]=structuredClone(t),this.usePersistentStorage()&&(localStorage[this.storyId+"-"+e]=JSON.stringify(t)),s&&this.emitter.emit("set",{attribute:e,value:t}),this.onSet(e,t)}get(e){return e in this.store?structuredClone(this.store[e]):null}getStore(){return new Proxy({},{get:(e,t)=>this.get(String(t)),has:(e,t)=>String(t)in this.store,ownKeys:()=>Object.keys(this.store),getOwnPropertyDescriptor:(e,t)=>{const s=String(t);if(s in this.store)return{enumerable:!0,configurable:!0,value:this.get(s)}}})}load(){if(!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)if(t.startsWith(this.storyId+"-")){const s=t.substring(this.storyId.length+1);this.store[s]=JSON.parse(localStorage[t])}}reset(){if(this.store={},!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)t.startsWith(this.storyId)&&localStorage.removeItem(t)}setSeen(e){let t=this.get("_seen_sections");t||(t=[]),t.indexOf(e)==-1&&(t.push(e),this.set("_seen_sections",t))}getSeen(e){const t=this.get("_seen_sections");return t?t.indexOf(e)>-1:!1}};function Ui(e,t){return!e&&!t?!0:!e||!t||e.length!==t.length?!1:e.every((s,r)=>s===t[r])}function cl(e,t,s,r,i,n){function o(d){return d.replace(/\'/g,"\\\\\'")}function a(d){return s.querySelectorAll(`[data-source=\'[[${o(d)}]]\']`)}function h(d,l){return s.querySelectorAll(`[data-source=\'[[${o(d)}]][${o(l)}]\']`)}function u(d,l){const f=Array.from(d.querySelectorAll("a.link-passage.disabled")).map(c=>c.getAttribute("data-passage"));d.innerHTML=l;for(const c of f){const p=d.querySelector(`a.link-passage[data-passage="${c}"]`);p&&i(p)}}for(const d of Object.keys(e.sections)){const l=a(d);if(l.length){const f=t.sections[d];if(f){const c=e.sections[d],p=!Ui(c.attributes,f.attributes),g=f.text!=c.text;if(p&&n(f.attributes||[]),g||p)for(const v of l)u(v,r.processText(f.text,!1))}else for(const c of l)c.closest(".squiffy-output-section")?.remove()}if(e.sections[d].passages)for(const f of Object.keys(e.sections[d].passages)){const c=h(d,f);if(!c.length)continue;const p=t.sections[d]?.passages&&t.sections[d]?.passages[f];if(p){const g=e.sections[d].passages[f],v=!Ui(g.attributes,p.attributes),b=p.text!=g.text;if(v&&n(p.attributes||[]),b||v)for(const S of c)u(S,r.processText(p.text,!1))}else for(const g of c)g.closest(".squiffy-output-passage")?.remove()}}}var ul=class{constructor(e,t,s,r,i,n,o,a,h,u){this.plugins=[],this.outputElement=e,this.textProcessor=t,this.state=s,this.linkHandler=r,this.getSectionText=i,this.getPassageText=n,this.processText=o,this.addTransition=a,this.animation=h,this.emitter=u}add(e){const t=e.init({outputElement:this.outputElement,registerHelper:(s,r)=>{this.textProcessor.handlebars.registerHelper(s,r)},registerLinkHandler:(s,r)=>{this.linkHandler.registerLinkHandler(s,r)},get:s=>this.state.get(s),set:(s,r)=>this.state.set(s,r),getSectionText:this.getSectionText,getPassageText:this.getPassageText,processText:this.processText,addTransition:this.addTransition,animation:this.animation,on:(s,r)=>this.emitter.on(s,r),off:(s,r)=>this.emitter.off(s,r),once:(s,r)=>this.emitter.once(s,r)});return this.plugins.push(e),t}onWrite(e){this.plugins.forEach(t=>t.onWrite?.(e))}onLoad(){this.plugins.forEach(e=>e.onLoad?.())}};function Wi(e,t){return new Promise(s=>{e.addEventListener("transitionend",function(){e.innerHTML=t,e.addEventListener("transitionend",function(){e.classList.remove("fade-in"),s()},{once:!0}),e.classList.remove("fade-out"),e.classList.add("fade-in")},{once:!0}),e.classList.add("fade-out")})}function hl(){return{name:"replaceLabel",init(e){e.registerHelper("label",function(t,s){return new Ze.default.SafeString(`<span class="squiffy-label-${t}">${s.fn(this)}</span>`)}),e.registerHelper("replace",function(t,s){const r=s.fn(this),i=e.outputElement.querySelector(`.squiffy-label-${t}`);if(i){const n=r.includes(`\n\n`)?Cr(r,{async:!1}).trim():Tr(r,{async:!1}).trim();e.addTransition(()=>Wi(i,n))}return""})}}}function fl(){const e=i=>i.replace(/&/g,"&amp;").replace(/\'/g,"&#39;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=(i,n,o,a)=>{const h=o.map(c=>c.toString()),u=r(h,null),d=a.hash.set||"";d&&i.set(d,u[0]);const l=e(JSON.stringify(u.slice(1))||""),f=a.hash.show=="next"?u[1]:u[0];return new Ze.default.SafeString(`<a class="squiffy-link" data-handler="${n}" data-value="${e(u[0])}" data-show="${a.hash.show||""}" data-options=\'${l}\' data-attribute="${d}" role="link">${f}</a>`)},s=(i,n,o)=>{const a={},h=JSON.parse(n.getAttribute("data-options")??"[]")||[],u=r(h,o?n.getAttribute("data-value"):"");n.innerHTML=n.getAttribute("data-show")=="next"?u[1]:u[0],n.setAttribute("data-value",u[0]),n.setAttribute("data-options",JSON.stringify(u.slice(1))||""),u[1]||(a.disableLink=!0);const d=n.getAttribute("data-attribute");return d&&i.set(d,n.getAttribute("data-value")),window.getSelection()?.removeAllRanges(),a},r=(i,n)=>{const o=i[0],a=i.slice(1);return n&&a.push(n),[o,...a]};return{name:"rotateSequence",init(i){i.registerHelper("rotate",(n,o)=>t(i,"rotate",n,o)),i.registerHelper("sequence",(n,o)=>t(i,"sequence",n,o)),i.registerLinkHandler("rotate",n=>s(i,n,!0)),i.registerLinkHandler("sequence",n=>s(i,n,!1))}}}function dl(){return{name:"random",init(e){e.registerHelper("random",(t,s)=>{const r=t.map(o=>o.toString()),i=r[Math.floor(Math.random()*r.length)],n=s.hash.set||"";return n&&e.set(n,i),new Ze.default.SafeString(i)})}}}function pl(){let e;return{name:"live",init(t){e=t,e.registerHelper("live",(r,i)=>{const n=i.hash.section||"";if(n)return new Ze.default.SafeString(`<span class="squiffy-live" data-attribute="${r}" data-section="${n}"></span>`);const o=i.hash.passage||"";return o?new Ze.default.SafeString(`<span class="squiffy-live" data-attribute="${r}" data-passage="${o}"></span>`):new Ze.default.SafeString(`<span class="squiffy-live" data-attribute="${r}"></span>`)});const s=async r=>{const i=[],n=`.squiffy-live[data-attribute="${CSS.escape(r.attribute)}"]`;for(const o of e.outputElement.querySelectorAll(n)){const a=o.innerHTML;let h="";if(o.dataset.section){const u=e.getSectionText(o.dataset.section);u&&(h=e.processText(u,!0))}else if(o.dataset.passage){const u=e.getPassageText(o.dataset.passage);u&&(h=e.processText(u,!0))}else h=r.value;a!==h&&i.push(Wi(o,h))}await Promise.all(i)};e.on("set",async r=>{await s(r)})},onWrite(t){e&&t.querySelectorAll(".squiffy-live").forEach(s=>{if(s.dataset.section){const r=e.getSectionText(s.dataset.section);r&&(s.innerHTML=e.processText(r,!0))}else if(s.dataset.passage){const r=e.getPassageText(s.dataset.passage);r&&(s.innerHTML=e.processText(r,!0))}else{const r=s.dataset.attribute;s.textContent=r?e.get(r):""}})}}}function gl(){let e;const t=r=>{const i={};for(const[n,o]of Object.entries(r)){if(o==null){i[n]=o;continue}try{i[n]=JSON.parse(o)}catch{i[n]=o}}return i},s=r=>{for(const i of r.querySelectorAll(".squiffy-animate")){const n=t(i.dataset);if(!n.content||(n.content.includes(`\n\n`)?i.innerHTML=Cr(n.content,{async:!1}).trim():i.innerHTML=Tr(n.content,{async:!1}).trim(),!n.name))continue;const o=i.innerHTML,a=()=>{n.loop?e.animation.runAnimation(n.name,i,n,()=>{},!0):(e.animation.isInitiallyHidden(n.name)&&(i.style.opacity="0"),e.addTransition(()=>new Promise(h=>{i.style.opacity="",e.animation.runAnimation(n.name,i,n,()=>{i.classList.remove("squiffy-animate"),i.innerHTML=o,h()},!1)})))};if(n.trigger==="link"){const h=i.querySelectorAll("a");for(const u of h)e.animation.addLinkAnimation(u,a)}else a()}};return{name:"animate",init(r){e=r,e.registerHelper("animate",function(i,n){const o=n.fn(this),a={name:i,content:o,...n.hash},h=Object.entries(a).map(([d,l])=>` data-${Ze.default.escapeExpression(d)}="${Ze.default.escapeExpression(JSON.stringify(l))}"`).join(""),u=o.includes(`\n\n`)?"div":"span";return new Ze.default.SafeString(`<${u} class="squiffy-animate"${h}></${u}>`)})},onWrite(r){s(r)},onLoad(){s(e.outputElement)}}}var us={ReplaceLabel:hl,RotateSequencePlugin:fl,RandomPlugin:dl,LivePlugin:pl,AnimatePlugin:gl},ml=class{constructor(){this.linkHandlers={}}registerLinkHandler(e,t){this.linkHandlers[e]=t}handleLink(e){const t=e.getAttribute("data-handler")||"",s=this.linkHandlers[t];return s?[!0,t,s(e)]:[!1,t,{}]}},mt=typeof window<"u",We=mt?window:null,J=mt?document:null,Le={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},pe={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Ke={NONE:0,AUTO:1,FORCE:2},Be={replace:0,none:1,blend:2},Xi=Symbol(),Bt=Symbol(),Er=Symbol(),hs=Symbol(),Yi=Symbol(),Re=1e-11,ft=1e12,Xe=1e3,Gc="var(",Ms=[],Ar=(()=>{const e=new Map;return e.set("x","translateX"),e.set("y","translateY"),e.set("z","translateZ"),e})(),Ht=["perspective","translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],Gi=Ht.reduce((e,t)=>({...e,[t]:t+"("}),{}),ae=()=>{},vl=e=>e,yl=/\\)\\s*[-.\\d]/,_l=/(^#([\\da-f]{3}){1,2}$)|(^#([\\da-f]{4}){1,2}$)/i,bl=/rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/i,Sl=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,kl=/hsl\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*\\)/i,wl=/hsla\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,Zi=/[-+]?\\d*\\.?\\d+(?:e[-+]?\\d)?/gi,Qi=/^([-+]?\\d*\\.?\\d+(?:e[-+]?\\d+)?)([a-z]+|%)$/i,xl=/([a-z])([A-Z])/g,Ji=/(\\*=|\\+=|-=)/,Tl=/var\\(\\s*(--[\\w-]+)(?:\\s*,\\s*([^)]+))?\\s*\\)/,fs={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:Xe,delay:0,loopDelay:0,ease:"out(2)",composition:Be.replace,modifier:vl,onBegin:ae,onBeforeUpdate:ae,onUpdate:ae,onLoop:ae,onPause:ae,onComplete:ae,onRender:ae},Ie={current:null,root:J},z={defaults:fs,precision:4,timeScale:1,tickThreshold:200,editor:null},Ki={version:"4.5.0",engine:null};mt&&(We.AnimeJS||(We.AnimeJS=[]),We.AnimeJS.push(Ki));var Ds=e=>e.replace(xl,"$1-$2").toLowerCase(),Ne=(e,t)=>e.indexOf(t)===0,Pt=Date.now,He=Array.isArray,Me=e=>e&&e.constructor===Object,$e=e=>typeof e=="number"&&!isNaN(e),De=e=>typeof e=="string",Ee=e=>typeof e=="function",B=e=>typeof e>"u",$t=e=>B(e)||e===null,Bs=e=>mt&&e instanceof SVGElement,ji=e=>_l.test(e),en=e=>Ne(e,"rgb"),tn=e=>Ne(e,"hsl"),Cl=e=>ji(e)||(en(e)||tn(e))&&(e[e.length-1]===")"||!yl.test(e)),Qt=e=>!z.defaults.hasOwnProperty(e),Pl=["opacity","rotate","overflow","color"],El=(e,t)=>{if(Pl.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t==="scale"){const s=e.parentNode;return s&&s.tagName==="filter"}return!0}},qt=e=>De(e)?parseFloat(e):e,Ft=Math.pow,rt=Math.sqrt,Lr=Math.sin,Rr=Math.cos,it=Math.abs,Hs=Math.exp,Al=Math.ceil,Jt=Math.floor,Ll=Math.asin,sn=Math.max,$s=Math.atan2,vt=Math.PI,Ir=Math.round,G=(e,t,s)=>e<t?t:e>s?s:e,F=(e,t)=>{if(t<0)return e;if(!t)return Ir(e);const s=10**t;return Ir(e*s)/s},Vt=(e,t)=>He(t)?t.reduce((s,r)=>it(r-e)<it(s-e)?r:s):t?Ir(e/t)*t:e,Et=(e,t,s)=>s===1?t:s===0?e:e+(t-e)*s,qs=e=>e===1/0?ft:e===-1/0?-ft:e,Kt=e=>e<=1e-11?Re:qs(F(e,11)),ze=e=>He(e)?[...e]:e,nt=(e,t)=>{const s={...e};for(let r in t){const i=e[r];s[r]=B(i)?t[r]:i}return s},Se=(e,t,s,r="_prev",i="_next")=>{let n=e._head,o=i;for(s&&(n=e._tail,o=r);n;){const a=n[o];t(n),n=a}},dt=(e,t,s="_prev",r="_next")=>{const i=t[s],n=t[r];i?i[r]=n:e._head=n,n?n[s]=i:e._tail=i,t[s]=null,t[r]=null},pt=(e,t,s,r="_prev",i="_next")=>{let n=e._tail;for(;n&&s&&s(n,t);)n=n[r];const o=n?n[i]:e._head;n?n[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=n,t[i]=o},Rl=(e,t,s)=>{const r=e.style.transform;if(r){const i=e[hs];let n=0;const o=r.length;let a;for(;n<o;){for(;n<o&&r.charCodeAt(n)===32;)n++;if(n>=o)break;const u=n;for(;n<o&&r.charCodeAt(n)!==40;)n++;if(n>=o)break;const d=r.substring(u,n);let l=1;const f=n+1;let c=-1,p=-1;for(n++;n<o&&l>0;){const v=r.charCodeAt(n);v===40?l++:v===41?l--:v===44&&l===1&&(c===-1?c=n:p===-1&&(p=n)),n++}const g=n-1;d==="translate"||d==="translate3d"?(c===-1?i.translateX=r.substring(f,g).trim():(i.translateX=r.substring(f,c).trim(),p===-1?i.translateY=r.substring(c+1,g).trim():(i.translateY=r.substring(c+1,p).trim(),i.translateZ=r.substring(p+1,g).trim())),a=r.substring(f,g)):d==="scale"||d==="scale3d"?c===-1?i.scale=r.substring(f,g).trim():(i.scaleX=r.substring(f,c).trim(),p===-1?i.scaleY=r.substring(c+1,g).trim():(i.scaleY=r.substring(c+1,p).trim(),i.scaleZ=r.substring(p+1,g).trim())):i[d]=r.substring(f,g)}if(t==="translate3d"&&a)return s&&(s[t]=a),a;const h=i[t];if(!B(h))return s&&(s[t]=h),h}return t==="translate3d"?"0px, 0px, 0px":t==="rotate3d"?"0, 0, 0, 0deg":Ne(t,"scale")?"1":Ne(t,"rotate")||Ne(t,"skew")?"0deg":"0px"},rn=e=>{let t="";for(let s=0,r=Ht.length;s<r;s++){const i=Ht[s],n=e[i];if(n!==void 0){if(i==="translateX"){const o=e.translateY;if(o!==void 0){const a=e.translateZ;a!==void 0?(t+=`translate3d(${n},${o},${a}) `,s+=2):(t+=`translate(${n},${o}) `,s+=1);continue}}if(i==="scaleX"&&e.scale===void 0){const o=e.scaleY;if(o!==void 0){const a=e.scaleZ;a!==void 0?(t+=`scale3d(${n},${o},${a}) `,s+=2):(t+=`scale(${n},${o}) `,s+=1);continue}}t+=`${Gi[i]}${n}) `}i==="rotateZ"&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},Or=[];function nn(e,t){if(!e)return null;const s=Or.length;e:for(let r=0;r<s;r++){const i=Or[r];if(i.detect&&!i.detect(e))continue;const n=i.targetAdapters;for(let o=0,a=n.length;o<a;o++){const h=n[o];if(h.detect(e)){const u=h.props[t];if(u&&(!u.gate||u.gate(e)))return u;break e}}}for(let r=0;r<s;r++){const i=Or[r];if(i.detect&&!i.detect(e))continue;const n=i.propertyResolvers;for(let o=0,a=n.length;o<a;o++){const h=n[o](e,t);if(h)return h}}return null}var Il=e=>{const t=bl.exec(e)||Sl.exec(e),s=B(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],s]},Ol=e=>{const t=e.length,s=t===4||t===5;return[+("0x"+e[1]+e[s?1:2]),+("0x"+e[s?2:3]+e[s?2:4]),+("0x"+e[s?3:5]+e[s?3:6]),t===5||t===9?+(+("0x"+e[s?4:7]+e[s?4:8])/255).toFixed(3):1]},Nr=(e,t,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e),Nl=e=>{const t=kl.exec(e)||wl.exec(e),s=+t[1]/360,r=+t[2]/100,i=+t[3]/100,n=B(t[4])?1:+t[4];let o,a,h;if(r===0)o=a=h=i;else{const u=i<.5?i*(1+r):i+r-i*r,d=2*i-u;o=F(Nr(d,u,s+1/3)*255,0),a=F(Nr(d,u,s)*255,0),h=F(Nr(d,u,s-1/3)*255,0)}return[o,a,h,n]},Ml=e=>en(e)?Il(e):ji(e)?Ol(e):tn(e)?Nl(e):[0,0,0,1],U=(e,t)=>B(e)?t:e,on=(e,t)=>{const s=e.match(Tl),r=t[Bt]?t:document.documentElement;let i=getComputedStyle(r)?.getPropertyValue(s[1]);return(!i||i.trim()==="")&&s[2]&&(i=s[2].trim()),i||0},Oe=(e,t,s,r,i,n)=>{if(Ee(e)){if(!i){const a=e(t,s,r,n);return isNaN(+a)?a||0:+a}const o=()=>{const a=e(t,s,r,n);return isNaN(+a)?a||0:+a};return i.func=o,o()}if(De(e)&&Ne(e,"var(")){if(!i)return on(e,t);const o=()=>on(e,t);return i.func=o,o()}return e},Mr=(e,t)=>e[Bt]?e[Er]&&El(e,t)?Le.ATTRIBUTE:Ht.includes(t)||Ar.get(t)?Le.TRANSFORM:Ne(t,"--")?Le.CSS_VAR:t in e.style?Le.CSS:t in e?Le.OBJECT:Le.ATTRIBUTE:Le.OBJECT,an=(e,t,s)=>{const r=e.style[t];r&&s&&(s[t]=r);const i=r||getComputedStyle(e[Yi]||e).getPropertyValue(t);return i==="auto"?"0":i},zt=(e,t,s,r)=>{const i=B(s)?Mr(e,t):s,n=nn(e,t);if(n){const o=n.get(e);return o&&r&&(r[t]=o),o??0}if(i===Le.OBJECT){const o=e[t];return o&&r&&(r[t]=o),o||0}if(i===Le.ATTRIBUTE){const o=e.getAttribute(t);return o&&r&&(r[t]=o),o}return i===Le.TRANSFORM?Rl(e,t,r):i===Le.CSS_VAR?an(e,t,r).trimStart():an(e,t,r)},Ut=(e,t,s)=>s==="-"?e-t:s==="+"?e+t:e*t,Dr=()=>({t:pe.NUMBER,n:0,u:null,o:null,d:null,s:null}),Qe=(e,t)=>{if(t.t=pe.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;const s=+e;if(!isNaN(s))return t.n=s,t;let r=e;r[1]==="="&&(t.o=r[0],r=r.slice(2));const i=r.includes(" ")?!1:Qi.exec(r);if(i)return t.t=pe.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(Cl(r))return t.t=pe.COLOR,t.d=Ml(r),t;{const n=r.match(Zi);return t.t=pe.COMPLEX,t.d=n?n.map(Number):[],t.s=r.split(Zi)||[],t}},ln=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=ze(e._toNumbers),t.s=ze(e._strings),t),qe=Dr(),cn=(e,t,s)=>{const r=e._modifier,i=e._fromNumbers,n=e._toNumbers,o=e._strings;let a=o[0];for(let h=0,u=n.length;h<u;h++){const d=r(F(Et(i[h],n[h],t),s)),l=o[h+1];a+=`${l?d+l:d}`,e._numbers[h]=d}return a},Fs=(e,t,s,r,i)=>{const n=e.parent,o=e.duration,a=e.completed,h=e.iterationDuration,u=e.iterationCount,d=e._currentIteration,l=e._loopDelay,f=e._reversed,c=e._alternate,p=e._hasChildren,g=e._delay,v=e._currentTime,b=g+h,S=t-g,y=G(v,-g,o),m=G(S,-g,o),_=S-v,k=m>0,w=m>=o,E=o<=Re,N=i===Ke.FORCE;let P=0,A=S,C=0;if(u>1){const M=h+(w?0:l),R=~~(m/M);e._currentIteration=G(R,0,u),w&&e._currentIteration--,P=e._currentIteration%2,A=m-R*M||0}const H=f^(c&&P),$=e._ease;let V=w?H?0:o:H?h-A:A;$&&(V=h*$(V/h)||0);const x=(n?n.backwards:S<v)?!H:!!H;if(e._currentTime=S,e._iterationTime=V,e.backwards=x,k&&!e.began?(e.began=!0,!s&&!(n&&(x||!n.began))&&e.onBegin(e)):S<=0&&(e.began=!1),!s&&!p&&k&&e._currentIteration!==d&&e.onLoop(e),N||i===Ke.AUTO&&(t>=(n&&g>0?0:g)&&t<=b||t<=g&&y>g||t>=b&&y!==o)||V>=b&&y!==o||V<=g&&y>0&&!w||t<=y&&y===o&&a||w&&!a&&E){if(k&&(e.computeDeltaTime(y),s||e.onBeforeUpdate(e)),!p){const M=N||(x?_*-1:_)>=z.tickThreshold,R=F(e._offset+(n?n._offset:0)+g+V,12);let L=e._head,q,Z,Q,X,W=0;for(;L;){const se=L._composition,le=L._currentTime,ve=L._changeDuration,de=L._absoluteStartTime+L._changeDuration,ce=L._nextRep,K=L._prevRep,te=se!==Be.none,re=K?K._absoluteStartTime+K._changeDuration:0,oe=K&&K.parent!==L.parent,ke=!ce||ce._isOverridden?de:ce.parent===L.parent?de+ce._delay:ce._absoluteStartTime<ce._absoluteUpdateStartTime?ce._absoluteStartTime:ce._absoluteUpdateStartTime;if((M||(le!==ve||R<=ke||K&&!oe&&(!ce||ce.parent!==L.parent))&&(le!==0||R>=L._absoluteStartTime||oe&&!L._hasFromValue&&!K._isOverridden&&R>=re||ce&&!ce._isOverridden&&ce.parent===L.parent&&ce._currentTime!==0&&V<ce._startTime))&&(!K||oe||V>=L._startTime)&&(!te||!L._isOverridden&&(!L._isOverlapped||R<=de)&&(!ce||ce._isOverridden||R<=ke)&&(!K||K._isOverridden||(oe?R>=L._absoluteStartTime||!L._hasFromValue&&R>=re:R>=re+L._delay)))){const Te=L._currentTime=G(V-L._startTime,0,ve),ye=L._ease(Te/L._updateDuration),we=L._modifier,xe=L._valueType,_e=L._tweenType,fe=_e===Le.OBJECT,T=xe===pe.NUMBER,I=T&&fe||ye===0||ye===1?-1:z.precision;let D,Y;if(T)D=Y=we(F(Et(L._fromNumber,L._toNumber,ye),I));else if(xe===pe.UNIT)Y=we(F(Et(L._fromNumber,L._toNumber,ye),I)),D=`${Y}${L._unit}`;else if(xe===pe.COLOR){const O=L._numbers,j=L._fromNumbers,ie=L._toNumbers,ee=1-ye,Ae=j[0],ge=j[1],_t=j[2],Xt=ie[0],Ps=ie[1],Ot=ie[2];O[0]=we(Math.sqrt(Ae*Ae*ee+Xt*Xt*ye)),O[1]=we(Math.sqrt(ge*ge*ee+Ps*Ps*ye)),O[2]=we(Math.sqrt(_t*_t*ee+Ot*Ot*ye)),O[3]=we(Et(j[3],ie[3],ye)),(!L._setter||r)&&(D=`rgba(${F(O[0],0)},${F(O[1],0)},${F(O[2],0)},${O[3]})`)}else xe===pe.COMPLEX&&(D=cn(L,ye,I));if(te&&(L._number=Y),!r&&se!==Be.blend){const O=L.property;q=L.target,L._setter?L._setter(q,Y,L):fe?q[O]=D:_e===Le.ATTRIBUTE?q.setAttribute(O,D):(Z=q.style,_e===Le.TRANSFORM?(q!==Q&&(Q=q,X=q[hs]),X[O]=D,W=1):_e===Le.CSS?Z[O]=D:_e===Le.CSS_VAR&&Z.setProperty(O,D)),k&&(C=1)}else L._value=D}else le&&K&&!oe&&V<L._startTime&&(L._currentTime=0);W&&L._renderTransforms&&(Z.transform=rn(X),W=0),L=L._next}!s&&C&&e.onRender(e)}!s&&k&&e.onUpdate(e)}return n&&E?!s&&(n.began&&!x&&S>0&&!a||x&&S<=1e-11&&a)&&(e.onComplete(e),e.completed=!x):k&&w?u===1/0?e._startTime+=e.duration:e._currentIteration>=u-1&&(e.paused=!0,!a&&!p&&(e.completed=!0,!s&&!(n&&(x||!n.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,C},Wt=(e,t,s,r,i)=>{const n=e._currentIteration;if(Fs(e,t,s,r,i),e._hasChildren){const o=e,a=o.backwards,h=r?t:o._iterationTime,u=Pt();let d=0,l=!0;if(!r&&o._currentIteration!==n){const f=o.iterationDuration;Se(o,c=>{if(!a)!c.completed&&!c.backwards&&c._currentTime<c.iterationDuration&&Fs(c,f,s,1,Ke.FORCE),c.began=!1,c.completed=!1;else{const p=c.duration,g=c._offset+c._delay,v=g+p;!s&&p<=1e-11&&(!g||v===f)&&c.onComplete(c)}}),s||o.onLoop(o)}Se(o,f=>{const c=F((h-f._offset)*f._speed,12);if(a&&c>f._delay+f.duration)return;const p=f._fps<o._fps?f.requestTick(u):i;d+=Fs(f,c,s,r,p),!f.completed&&l&&(l=!1)},a),!s&&d&&o.onRender(o),(l||a)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},un={},Br=(e,t,s)=>{if(s===Le.TRANSFORM){const r=Ar.get(e);return r||e}else if(s===Le.CSS||s===Le.ATTRIBUTE&&Bs(t)&&e in t.style){const r=un[e];if(r)return r;{const i=e&&Ds(e);return un[e]=i,i}}else return e},Vs=(e,t=!1)=>{if(e._hasChildren)Se(e,s=>Vs(s,t),!0);else{const s=e;s.pause(),Se(s,r=>{const i=r.property,n=r.target,o=r._tweenType,a=r._inlineValue,h=$t(a)||a==="";if(r._setter){if(!t&&!h){if(Qe(a,qe),qe.d){const u=qe.d,d=r._numbers;for(let l=0,f=u.length;l<f;l++)d[l]=u[l]}else r._number=qe.n;r._setter(r.target,r._number,r)}}else if(o===Le.OBJECT)!t&&!h&&(n[i]=a);else if(n[Bt])if(o===Le.ATTRIBUTE)t||(h?n.removeAttribute(i):n.setAttribute(i,a));else{const u=n.style;if(o===Le.TRANSFORM){const d=n[hs];h?delete d[i]:d[i]=a,r._renderTransforms&&(Object.keys(d).length?u.transform=rn(d):u.removeProperty("transform"))}else h?u.removeProperty(Ds(i)):u[i]=a}n[Bt]&&s._tail===r&&s.targets.forEach(u=>{u.getAttribute&&u.getAttribute("style")===""&&u.removeAttribute("style")})})}return e},hn=e=>Vs(e,!0),fn=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=Xe/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=+e,s=t<1e-11?Re:t,r=Xe/s;s>fs.frameRate&&(fs.frameRate=s),this._fps=s,this._frameDuration=r}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<1e-11?Re:t}requestTick(e){const t=this._frameDuration,s=e-this._lastTickTime,r=t*.25;return s+(r<4?r:4)<t?Ke.NONE:(this._lastTickTime=s>=t?e-s%t:e,Ke.AUTO)}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},jt={animation:null,update:ae},Dl=e=>{let t=jt.animation;return t||(t={duration:Re,computeDeltaTime:ae,_offset:0,_delay:0,_head:null,_tail:null},jt.animation=t,jt.update=()=>{e.forEach(s=>{for(let r in s){const i=s[r],n=i._head;if(n){const o=n._valueType,a=o===pe.COMPLEX||o===pe.COLOR?ze(n._fromNumbers):null;let h=n._fromNumber,u=i._tail;for(;u&&u!==n;){if(a)for(let d=0,l=u._numbers.length;d<l;d++)a[d]+=u._numbers[d];else h+=u._number;u=u._prevAdd}n._toNumber=h,n._toNumbers=a}}}),Fs(t,1,1,0,Ke.FORCE)}),t},dn=mt?requestAnimationFrame:setImmediate,Bl=mt?cancelAnimationFrame:clearImmediate,Hl=class extends fn{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=fs,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=Pt();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,s=this._fps;let r=this._head;for(;r;){const i=r._next;r.paused?(dt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Wt(r,(e-r._startTime)*r._speed*t,0,0,r._fps<s?r.requestTick(e):Ke.AUTO),r=i}jt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(Pt()),this.reqId=dn(pn)),this}pause(){if(this.reqId)return this.paused=!0,$l()}resume(){if(this.paused)return this.paused=!1,Se(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(z.timeScale===1?1:Xe)}set speed(e){const t=e*z.timeScale;this._speed!==t&&(this._speed=t,Se(this,s=>s.speed=s._speed))}get timeUnit(){return z.timeScale===1?"ms":"s"}set timeUnit(e){const s=e==="s",r=s?.001:1;if(z.timeScale!==r){z.timeScale=r,z.tickThreshold=200*r;const i=s?.001:Xe;this.defaults.duration*=i,this._speed*=i}}get precision(){return z.precision}set precision(e){z.precision=e}},Fe=(()=>{const e=new Hl(Pt());return mt&&(Ki.engine=e,J.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(J.hidden?e.pause():e.resume())})),e})(),pn=()=>{Fe._head?(Fe.reqId=dn(pn),Fe.update()):Fe.reqId=0},$l=()=>(Bl(Fe.reqId),Fe.reqId=0,Fe),zs={_rep:new WeakMap,_add:new Map},Hr=(e,t,s="_rep")=>{const r=zs[s];let i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},ql=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,Us=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=Re,e._currentTime=Re},gn=(e,t)=>{const s=e._composition;if(s===Be.replace){const r=e._absoluteStartTime;pt(t,e,ql,"_prevRep","_nextRep");const i=e._prevRep;if(i){const n=i.parent,o=i._absoluteEndTime;if(e.parent.id!==n.id&&n.iterationCount>1&&o+(n.duration-n.iterationDuration)>r){Us(i);let u=i._prevRep;for(;u&&u.parent.id===n.id;)Us(u),u=u._prevRep}const a=e._absoluteUpdateStartTime;if(o>a){const u=i._startTime,d=o-(u+i._updateDuration),l=F(a-d-u,12);i._changeDuration=l,i._currentTime=l,i._isOverlapped=1,l<1e-11&&Us(i)}const h=e.parent.parent;if(!h||h!==n.parent){let u=!0;if(Se(n,d=>{d._isOverlapped||(u=!1)}),u){const d=n.parent;if(d){let l=!0;Se(d,f=>{f!==n&&Se(f,c=>{c._isOverlapped||(l=!1)})}),l&&d.cancel()}else n.cancel()}}}}else if(s===Be.blend){const r=Hr(e.target,e.property,"_add"),i=Dl(zs._add);let n=r._head;n||(n={...e},n._composition=Be.replace,n._updateDuration=Re,n._startTime=0,n._numbers=ze(e._fromNumbers),n._number=0,n._next=null,n._prev=null,pt(r,n),pt(i,n));const o=e._toNumber;if(e._fromNumber=n._fromNumber-o,e._toNumber=0,e._numbers=ze(e._fromNumbers),e._number=0,n._fromNumber=o,e._toNumbers.length){const a=ze(e._toNumbers);a.forEach((h,u)=>{e._fromNumbers[u]=n._fromNumbers[u]-h,e._toNumbers[u]=0}),n._fromNumbers=a}pt(r,e,null,"_prevAdd","_nextAdd")}return e},mn=e=>{const t=e._composition;if(t!==Be.none){const s=e.target,r=e.property,i=zs._rep.get(s)[r];if(dt(i,e,"_prevRep","_nextRep"),t===Be.blend){const n=zs._add,o=n.get(s);if(!o)return;const a=o[r],h=jt.animation;dt(a,e,"_prevAdd","_nextAdd");const u=a._head;if(u&&u===a._tail){dt(a,u,"_prevAdd","_nextAdd"),dt(h,u);let d=!0;for(let l in o)if(o[l]._head){d=!1;break}d&&n.delete(s)}}}return e},vn=(e,t,s)=>{let r=!1;return Se(t,i=>{const n=i.target;if(e.includes(n)){const o=i.property,a=i._tweenType,h=Br(s,n,a);(!h||h&&h===o)&&(i.parent._tail===i&&i._tweenType===Le.TRANSFORM&&i._prev&&i._prev._tweenType===Le.TRANSFORM&&(i._prev._renderTransforms=1),dt(t,i),mn(i),r=!0)}},!0),r},St=(e,t,s)=>{const r=t||Fe;let i;if(r._hasChildren){let n=0;Se(r,o=>{if(!o._hasChildren)if(i=vn(e,o,s),i&&!o._head)o.cancel(),dt(r,o);else{const a=o._offset+o._delay+o.duration;a>n&&(n=a)}o._head?St(e,o,s):o._hasChildren=!1},!0),B(r.iterationDuration)||(r.iterationDuration=n)}else i=vn(e,r,s);i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())},yn=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),$r=e=>(e._cancelled&&(e._hasChildren?Se(e,$r):Se(e,t=>{t._composition!==Be.none&&gn(t,Hr(t.target,t.property))}),e._cancelled=0),e),_n=0,Fl=(e,t)=>e._priority>t._priority,je=class extends fn{constructor(e={},t=null,s=0){super(0),++_n;const{id:r,delay:i,duration:n,reversed:o,alternate:a,loop:h,loopDelay:u,autoplay:d,frameRate:l,playbackRate:f,priority:c,onComplete:p,onLoop:g,onPause:v,onBegin:b,onBeforeUpdate:S,onUpdate:y}=e;Ie.current&&Ie.current.register(this);const m=t?0:Fe._lastTickTime,_=t?t.defaults:z.defaults,k=Ee(i)||B(i)?_.delay:+i,w=Ee(n)||B(n)?1/0:+n,E=U(h,_.loop),N=U(u,_.loopDelay);let P=E===!0||E===1/0||E<0?1/0:E+1,A=0;t?A=s:(Fe.reqId||Fe.requestTick(Pt()),A=(Fe._lastTickTime-Fe._startTime)*z.timeScale),this.id=B(r)?_n:r,this.parent=t,this.duration=qs((w+N)*P-N)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=b||_.onBegin,this.onBeforeUpdate=S||_.onBeforeUpdate,this.onUpdate=y||_.onUpdate,this.onLoop=g||_.onLoop,this.onPause=v||_.onPause,this.onComplete=p||_.onComplete,this.iterationDuration=w,this.iterationCount=P,this._autoplay=t?!1:U(d,_.autoplay),this._offset=A,this._delay=k,this._loopDelay=N,this._iterationTime=0,this._currentIteration=0,this._resolve=ae,this._running=!1,this._reversed=+U(o,_.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=U(a,_.alternate),this._prev=null,this._next=null,this._lastTickTime=m,this._startTime=m,this._lastTime=m,this._fps=U(l,_.frameRate),this._speed=U(f,_.playbackRate),this._priority=+U(c,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return G(F(this._currentTime,z.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return G(F(this._iterationTime,z.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return G(F(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return G(F(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*G(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return $r(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Wt(this,0,1,~~e,Ke.FORCE),yn(this),this._hasChildren&&Se(this,yn),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Wt(this,this.duration,1,~~e,Ke.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!B(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Fe._speed);return this._startTime=Pt()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?Wt(this,Re,0,0,Ke.FORCE):(this._running||(pt(Fe,this,Fl),Fe._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Fe.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,s=0){$r(this),this.completed=!1;const r=this.paused;return this.paused=!0,Wt(this,e+this._delay,~~t,~~s,Ke.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,s=this.iterationDuration,r=t===1/0?Jt(ft/s):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Se(this,e=>e.cancel(),!0):Se(this,mn),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,s=Kt(e);if(t===s)return this;const r=e/t,i=e<=Re;return this.duration=i?Re:s,this.iterationDuration=i?Re:Kt(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Wt(this,0,1,0,Ke.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=ae){const t=this.then,s=()=>{this.then=null,e(this),this.then=t,this._resolve=ae};return new Promise(r=>(this._resolve=()=>r(s()),this.completed&&this._resolve(),this))}},Vl=e=>new je(e,null,0).init();function qr(e){const t=De(e)?Ie.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function et(e){if($t(e))return[];if(!mt)return He(e)&&e.flat(1/0)||[e];if(He(e)){const s=e.flat(1/0),r=[];for(let i=0,n=s.length;i<n;i++){const o=s[i];if(!$t(o)){const a=qr(o);if(a)for(let h=0,u=a.length;h<u;h++){const d=a[h];if(!$t(d)){let l=!1;for(let f=0,c=r.length;f<c;f++)if(r[f]===d){l=!0;break}l||r.push(d)}}else{let h=!1;for(let u=0,d=r.length;u<d;u++)if(r[u]===o){h=!0;break}h||r.push(o)}}}return r}const t=qr(e);return t?Array.from(t):[e]}function At(e){const t=et(e),s=t.length;for(let r=0;r<s;r++){const i=t[r];if(!i[Xi]){i[Xi]=!0;const n=Bs(i);(i.nodeType||n)&&(i[Bt]=!0,i[Er]=n,i[hs]={})}}return t}var Fr={deg:1,rad:180/vt,turn:360},bn={},Ws=(e,t,s,r=!1)=>{const i=t.u,n=t.n;if(t.t===pe.UNIT&&i===s)return t;const o=n+i+s,a=bn[o];if(!B(a)&&!r)t.n=a;else{let h;if(i in Fr)h=n*Fr[i]/Fr[s];else{const d=e.cloneNode(),l=e.parentNode,f=l&&l!==J?l:J.body;f.appendChild(d);const c=d.style;c.width=100+i;const p=d.offsetWidth||100;c.width=100+s;const g=p/(d.offsetWidth||100);f.removeChild(d),h=g*n}t.n=h,bn[o]=h}return t.t,pe.UNIT,t.u=s,t},tt=e=>e,ds=(e=1.68)=>t=>Ft(t,+e),Vr={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},zl=vt/2,Sn=vt*2,kn={"":ds,Quad:ds(2),Cubic:ds(3),Quart:ds(4),Quint:ds(5),Sine:e=>1-Rr(e*zl),Circ:e=>1-rt(1-e*e),Expo:e=>e?Ft(2,10*e-10):0,Bounce:e=>{let t,s=4;for(;e<((t=Ft(2,--s))-1)/11;);return 1/Ft(4,3-s)-7.5625*Ft((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{const s=G(+e,1,10),r=G(+t,Re,2),i=r/Sn*Ll(1/s),n=Sn/r;return o=>o===0||o===1?o:-s*Ft(2,-10*(1-o))*Lr((1-o-i)*n)}},kt=(()=>{const e={linear:tt,none:tt};for(let t in Vr)for(let s in kn){const r=kn[s],i=Vr[t];e[t+s]=s===""||s==="Back"||s==="Elastic"?(n,o)=>i(r(n,o)):i(r)}return e})(),Xs={linear:tt,none:tt},wn=e=>{if(Xs[e])return Xs[e];if(e.indexOf("(")<=-1){const t=Vr[e]||e.includes("Back")||e.includes("Elastic")?kt[e]():kt[e];return t?Xs[e]=t:tt}else{const t=e.slice(0,-1).split("("),s=kt[t[0]];return s?Xs[e]=s(...t[1].split(",")):tt}},xn=["steps(","irregular(","linear(","cubicBezier("],wt=e=>{if(De(e)){for(let t=0,s=xn.length;t<s;t++)if(Ne(e,xn[t]))return console.warn(`String syntax for \\`ease: "${e}"\\` has been removed from the core and replaced by importing and passing the easing function directly: \\`ease: ${e}\\``),tt}return Ee(e)?e:De(e)?wn(e):tt},ne=Dr(),he=Dr(),es={},Ys={func:null},Gs={func:null},Zs=[null],ts=[null,null],Qs={to:null},Ul=0,Tn=0,Lt,yt,Wl=(e,t)=>{const s={};if(He(e)){const r=[].concat(...e.map(i=>Object.keys(i))).filter(Qt);for(let i=0,n=r.length;i<n;i++){const o=r[i];s[o]=e.map(a=>{const h={};for(let u in a){const d=a[u];Qt(u)?u===o&&(h.to=d):h[u]=d}return h})}}else{const r=U(t.duration,z.defaults.duration);Object.keys(e).map(i=>({o:parseFloat(i)/100,p:e[i]})).sort((i,n)=>i.o-n.o).forEach(i=>{const n=i.o,o=i.p;for(let a in o)if(Qt(a)){let h=s[a];h||(h=s[a]=[]);const u=n*r;let d=h.length,l=h[d-1];const f={to:o[a]};let c=0;for(let p=0;p<d;p++)c+=h[p].duration;d===1&&(f.from=l.to),o.ease&&(f.ease=o.ease),f.duration=u-(d?c:0),h.push(f)}return i});for(let i in s){const n=s[i];let o;for(let a=0,h=n.length;a<h;a++){const u=n[a],d=u.ease;u.ease=o||void 0,o=d}n[0].duration||n.shift()}}return s},xt=class extends je{constructor(e,t,s,r,i=!1,n=0,o){super(t,s,r),this._head,this._tail,++Tn;const a=At(e),h=a.length,u=t.keyframes,d=u?nt(Wl(u,t),t):t,{id:l,delay:f,duration:c,ease:p,playbackEase:g,modifier:v,composition:b,onRender:S}=d,y=s?s.defaults:z.defaults,m=U(p,y.ease),_=U(g,y.playbackEase),k=_?wt(_):null,w=!B(m.ease),E=w?m.ease:U(p,k?"linear":y.ease),N=w?m.settlingDuration:U(c,y.duration),P=U(f,y.delay),A=v||y.modifier,C=B(b)&&h>=1e3?Be.none:B(b)?y.composition:b,H=this._offset+(s?s._offset:0);w&&(m.parent=this);let $=NaN,V=NaN,x=0,M=0;for(let R=0;R<h;R++){const L=a[R],q=n||R,Z=o||a;let Q=NaN,X=NaN;for(let W in d)if(Qt(W)){const se=Mr(L,W),le=nn(L,W),ve=Br(W,L,se);let de=d[W];const ce=He(de);if(i&&!ce&&(ts[0]=de,ts[1]=de,de=ts),ce){const Te=de.length,ye=!Me(de[0]);Te===2&&ye?(Qs.to=de,Zs[0]=Qs,Lt=Zs):Te>2&&ye?(Lt=[],de.forEach((we,xe)=>{xe?xe===1?(ts[1]=we,Lt.push(ts)):Lt.push(we):ts[0]=we})):Lt=de}else Zs[0]=de,Lt=Zs;let K=null,te=null,re=NaN,oe=0,ke=0;for(let Te=Lt.length;ke<Te;ke++){const ye=Lt[ke];Me(ye)?yt=ye:(Qs.to=ye,yt=Qs),Ys.func=null,Gs.func=null;const we=Oe(U(yt.composition,C),L,q,Z,null,null),xe=$e(we)?we:Be[we];!K&&xe!==Be.none&&(K=Hr(L,ve));const _e=K?K._tail:null,fe=s&&_e&&_e.parent.parent===s?_e:te,T=Oe(yt.to,L,q,Z,Ys,fe);let I;Me(T)&&!B(T.to)?(yt=T,I=T.to):I=T;const D=Oe(yt.from,L,q,Z,Gs,fe),Y=yt.ease||E,O=Oe(Y,L,q,Z,null,fe),j=Ee(O)||De(O)?O:Y,ie=!B(j)&&!B(j.ease),ee=ie?j.ease:j,Ae=ie?j.settlingDuration:Oe(U(yt.duration,Te>1?Oe(N,L,q,Z,null,fe)/Te:N),L,q,Z,null,fe),ge=Oe(U(yt.delay,ke?0:P),L,q,Z,null,fe),_t=yt.modifier||A,Xt=!B(D),Ps=!B(I),Ot=He(I),$c=Ot||Xt&&Ps,qc=te?oe:0,ui=te?oe+ge:ge,hi=F(H+ui,12),Fc=F(H+qc,12);!M&&(Xt||Ot)&&(M=1);let lt=te;if(xe!==Be.none){let be=K._head;for(;be&&be._absoluteStartTime<=hi;)if(be._isOverridden||(lt=be),be=be._nextRep,be&&be._absoluteStartTime>=hi)for(;be;)Us(be),be=be._nextRep}if($c){Qe(Ot?Oe(I[0],L,q,Z,Gs,fe):D,ne),Qe(Ot?Oe(I[1],L,q,Z,Ys,fe):I,he);const be=zt(L,ve,se,es);ne.t===pe.NUMBER&&(lt?lt._valueType===pe.UNIT&&(ne.t=pe.UNIT,ne.u=lt._unit):(Qe(be,qe),qe.t===pe.UNIT&&(ne.t=pe.UNIT,ne.u=qe.u)))}else Ps?Qe(I,he):te?ln(te,he):Qe(s&&lt&&lt.parent.parent===s?lt._value:zt(L,ve,se,es),he),Xt?Qe(D,ne):te?ln(te,ne):Qe(s&&lt&&lt.parent.parent===s?lt._value:zt(L,ve,se,es),ne);if(ne.o&&(ne.n=Ut(lt?lt._toNumber:Qe(zt(L,ve,se,es),qe).n,ne.n,ne.o)),he.o&&(he.n=Ut(ne.n,he.n,he.o)),ne.t!==he.t){if(ne.t===pe.COMPLEX||he.t===pe.COMPLEX){const be=ne.t===pe.COMPLEX?ne:he,Ge=ne.t===pe.COMPLEX?he:ne;Ge.t=pe.COMPLEX,Ge.s=ze(be.s),Ge.d=be.d.map(()=>Ge.n)}else if(ne.t===pe.UNIT||he.t===pe.UNIT){const be=ne.t===pe.UNIT?ne:he,Ge=ne.t===pe.UNIT?he:ne;Ge.t=pe.UNIT,Ge.u=be.u}else if(ne.t===pe.COLOR||he.t===pe.COLOR){const be=ne.t===pe.COLOR?ne:he,Ge=ne.t===pe.COLOR?he:ne;Ge.t=pe.COLOR,Ge.d=be.d.map(()=>0)}}if(ne.u!==he.u){let be=he.u?ne:he;be=Ws(L,be,he.u?he.u:ne.u,!1)}if(he.d&&ne.d&&he.d.length!==ne.d.length){const be=ne.d.length>he.d.length?ne:he,Ge=be===ne?he:ne;Ge.d=be.d.map((Zc,Ro)=>B(Ge.d[Ro])?0:Ge.d[Ro]),Ge.s=ze(be.s)}const fi=F(+Ae||1e-11,12);let Eo=es[ve];$t(Eo)||(es[ve]=null);const Vc=le?le.set:null;oe=F(ui+fi,12);const pr=ne.d,Ao=he.d,Lo=he.s,st={parent:this,id:Ul++,property:ve,target:L,_value:null,_toFunc:Ys.func,_fromFunc:Gs.func,_ease:wt(ee),_fromNumbers:pr?ze(pr):Ms,_toNumbers:Ao?ze(Ao):Ms,_strings:Lo?ze(Lo):Ms,_fromNumber:ne.n,_toNumber:he.n,_numbers:pr?ze(pr):Ms,_number:ne.n,_unit:he.u,_modifier:_t,_currentTime:0,_startTime:ui,_delay:+ge,_updateDuration:fi,_changeDuration:fi,_absoluteStartTime:hi,_absoluteUpdateStartTime:Fc,_absoluteEndTime:F(H+oe,12),_hasFromValue:Xt||Ot?1:0,_tweenType:se,_setter:Vc,_valueType:he.t,_composition:xe,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Eo,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};xe!==Be.none&&gn(st,K);const di=st._valueType;if(di===pe.COMPLEX)st._value=cn(st,1,-1);else if(di===pe.UNIT)st._value=`${_t(st._toNumber)}${st._unit}`;else if(di===pe.COLOR){const be=he.d;st._value=`rgba(${F(be[0],0)},${F(be[1],0)},${F(be[2],0)},${be[3]})`}else st._value=_t(st._toNumber);isNaN(re)&&(re=st._startTime),te=st,x++,pt(this,st)}(isNaN(V)||re<V)&&(V=re),(isNaN($)||oe>$)&&($=oe),se===Le.TRANSFORM&&(Q=x-ke,X=x)}if(!isNaN(Q)){let W=0;Se(this,se=>{W>=Q&&W<X&&(se._renderTransforms=1,se._composition===Be.blend&&Se(jt.animation,le=>{le.id===se.id&&(le._renderTransforms=1)})),W++})}}h||console.warn("No target found. Make sure the element you\'re trying to animate is accessible before creating your animation."),V?(Se(this,R=>{R._startTime-R._delay||(R._delay-=V),R._startTime-=V}),$-=V):V=0,$||($=Re,this.iterationCount=0),this.targets=a,this.id=B(l)?Tn:l,this.duration=$===1e-11?Re:qs(($+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=S||y.onRender,this._ease=k,this._delay=V,this.iterationDuration=$,!this._autoplay&&M&&this.onRender(this)}stretch(e){const t=this.duration;if(t===Kt(e))return this;const s=e/t;return Se(this,r=>{r._updateDuration=Kt(r._updateDuration*s),r._changeDuration=Kt(r._changeDuration*s),r._currentTime*=s,r._delay*=s,r._startTime*=s,r._absoluteStartTime*=s,r._absoluteUpdateStartTime*=s,r._absoluteEndTime*=s}),super.stretch(e)}refresh(){return Se(this,e=>{const t=e._toFunc,s=e._fromFunc;(t||s)&&(s?(Qe(s(),ne),ne.u!==e._unit&&e.target[Bt]&&Ws(e.target,ne,e._unit,!0),e._fromNumbers=ze(ne.d),e._fromNumber=ne.n):t&&(Qe(zt(e.target,e.property,e._tweenType),qe),e._fromNumbers=ze(qe.d),e._fromNumber=qe.n),t&&(Qe(t(),he),e._toNumbers=ze(he.d),e._strings=ze(he.s),e._toNumber=he.o?Ut(e._fromNumber,he.n,he.o):he.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),Vs(this)}then(e){return super.then(e)}},ps=(e,t)=>z.editor?z.editor.addAnimation(e,t):new xt(e,t,null,0,!1).init(),Xl=(e,t)=>{if(Ne(t,"<")){const s=t[1]==="<",r=e._tail,i=r?r._offset+r._delay:0;return s?i:i+r.duration}},gs=(e,t)=>{let s=e.iterationDuration;if(s===1e-11&&(s=0),B(t))return s;if($e(+t))return+t;const r=t,i=e?e.labels:null,n=!$t(i),o=Xl(e,r),a=!B(o),h=Ji.exec(r);if(h){const u=h[0],d=r.split(u),l=n&&d[0]?i[d[0]]:s,f=a?o:n?l:s,c=+d[1];return Ut(f,c,u[0])}else return a?o:n?B(i[r])?s:i[r]:s};function Yl(e){return qs((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function zr(e,t,s,r,i,n){const o=$e(e.duration)&&e.duration<=1e-11?s-Re:s;t.composition&&Wt(t,o,1,1,Ke.AUTO);const a=r?new xt(r,e,t,o,!1,i,n):new je(e,t,o);return t.composition&&a.init(!0),pt(t,a),Se(t,h=>{const u=h._offset+h._delay+h.duration;u>t.iterationDuration&&(t.iterationDuration=u)}),t.duration=Yl(t),t}var Cn=0,Pn=class extends je{constructor(e={}){super(e,null,0),++Cn,this.id=B(e.id)?Cn:e.id,this.duration=0,this.labels={};const t=e.defaults,s=z.defaults;this.defaults=t?nt(t,s):s,this.composition=U(e.composition,!0),this.onRender=e.onRender||s.onRender;const r=U(e.playbackEase,s.playbackEase);this._ease=r?wt(r):null,this.iterationDuration=0}add(e,t,s){const r=Me(t),i=Me(e);if(r||i){if(this._hasChildren=!0,r){const n=t,o=z.editor&&z.editor.addTimelineChild,a=s&&s.type==="Stagger"&&z.editor,h=Ee(s)?s:null;if(h||a){const u=et(e),d=this.duration,l=this.iterationDuration,f=n.id;let c=0;const p=u.length,g=o?o(e,n,this.id,s,p):null,v=h||z.editor.resolveStagger(s.defaultValue);u.forEach(b=>{const S={...g||n};this.duration=d,this.iterationDuration=l,B(f)||(S.id=f+"-"+c);const y=gs(this,v(b,c,u,null,this));zr(S,this,y,b,c,u),c++})}else{const u=o?o(e,n,this.id,s):n,d=s&&s.type?s.defaultValue:s;zr(u,this,gs(this,d),e)}}else zr(e,this,gs(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if(B(e)||e&&B(e.pause))return this;e.pause();const s=+(e.effect?e.effect.getTiming().duration:e.duration);!B(e)&&!B(e.persist)&&(e.persist=!0);const r=z.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);const n=this.add(e,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},t);return r&&(r.addTimelineChild=i),n}set(e,t,s){return B(t)?this:(t.duration=Re,t.composition=Be.replace,this.add(e,t,s))}call(e,t){return B(e)||e&&!Ee(e)?this:(z.editor&&z.editor.addTimelineCall&&(t=z.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return B(e)||e&&!De(e)?this:(z.editor&&z.editor.addTimelineLabel&&(t=z.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=gs(this,t),this)}remove(e,t){return St(et(e),this,t),this}stretch(e){const t=this.duration;if(t===Kt(e))return this;const s=e/t,r=this.labels;Se(this,i=>i.stretch(i.duration*s));for(let i in r)r[i]*=s;return super.stretch(e)}refresh(){return Se(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),Se(this,e=>e.revert,!0),Vs(this)}then(e){return super.then(e)}},En=e=>z.editor?z.editor.addTimeline(e):new Pn(e).init(),Ur=class{constructor(e,t){Ie.current&&Ie.current.register(this);const s=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let a=!0;for(let h in this.animations)if(!this.animations[h].paused&&a){a=!1;break}a&&this.callbacks.complete()},i={onBegin:s,onComplete:r,onPause:r},n={v:1,autoplay:!1},o={};if(this.targets=[],this.animations={},this.callbacks=null,!(B(e)||B(t))){for(let a in t){const h=t[a];Qt(a)?o[a]=h:Ne(a,"on")?n[a]=h:i[a]=h}this.callbacks=new xt({v:0},n);for(let a in o){const h=o[a],u=Me(h);let d={},l="+=0";if(u){const p=h.unit;De(p)&&(l+=p)}else d.duration=h;d[a]=u?nt({to:l},h):l;const f=nt(i,d);f.composition=Be.replace,f.autoplay=!1;const c=this.animations[a]=new xt(e,f,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[a]=(p,g,v)=>{const b=c._head;if(B(p)&&b){const S=b._numbers;return S&&S.length?S:b._modifier(b._number)}else return Se(c,S=>{if(He(p))for(let y=0,m=p.length;y<m;y++)B(S._numbers[y])||(S._fromNumbers[y]=S._modifier(S._numbers[y]),S._toNumbers[y]=p[y]);else S._fromNumber=S._modifier(S._number),S._toNumber=p;B(v)||(S._ease=wt(v)),S._currentTime=0}),B(g)||c.stretch(g),c.reset(!0).resume(),this}}}}revert(){for(let e in this.animations)this[e]=ae,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}},Gl=(e,t)=>new Ur(e,t),Zl=Yt({clamp:()=>G,damp:()=>sc,degToRad:()=>ec,lerp:()=>Et,mapRange:()=>ms,padEnd:()=>Kl,padStart:()=>Jl,radToDeg:()=>tc,round:()=>F,roundPad:()=>Ql,snap:()=>Vt,wrap:()=>jl}),Ql=(e,t)=>(+e).toFixed(t),Jl=(e,t,s)=>`${e}`.padStart(t,s),Kl=(e,t,s)=>`${e}`.padEnd(t,s),jl=(e,t,s)=>((e-t)%(s-t)+(s-t))%(s-t)+t,ms=(e,t,s,r,i)=>r+(e-t)/(s-t)*(i-r),ec=e=>e*Math.PI/180,tc=e=>e*180/Math.PI,sc=(e,t,s,r)=>r?r===1?t:Et(e,t,1-Math.exp(-r*s*.1)):e,Je=Xe*10,Js=class{constructor(e={}){const t=!B(e.bounce)||!B(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/Xe,this.maxIterations=this.maxDuration/this.timeStep/Xe,this.bn=G(U(e.bounce,.5),-1,1),this.pd=G(U(e.duration,628),10*z.timeScale,Je*z.timeScale),this.m=G(U(e.mass,1),1,Je),this.s=G(U(e.stiffness,100),Re,Je),this.d=G(U(e.damping,10),Re,Je),this.v=G(U(e.velocity,0),-Je,Je),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||ae,t&&this.calculateSDFromBD(),this.compute(),this.ease=s=>{const r=s*this.settlingDuration,i=this.completed,n=this.pd;return r>=n&&!i&&(this.completed=!0,this.onComplete(this.parent)),r<n&&i&&(this.completed=!1),s===0||s===1?s:this.solve(s*this.solverDuration)}}solve(e){const{zeta:t,w0:s,wd:r,b:i}=this;let n=e;return t<1?n=Hs(-n*t*s)*(1*Rr(r*n)+i*Lr(r*n)):t===1?n=(1+i*n)*Hs(-n*s):n=((1+i)*Hs((-t*s+r)*n)+(1-i)*Hs((-t*s-r)*n))/2,1-n}calculateSDFromBD(){const e=z.timeScale===1?this.pd/Xe:this.pd;this.m=1,this.v=0,this.s=Ft(2*vt/e,2),this.bn>=0?this.d=(1-this.bn)*4*vt/e:this.d=4*vt/(e*(1+this.bn)),this.s=F(G(this.s,Re,Je),3),this.d=F(G(this.d,Re,300),3)}calculateBDFromSD(){const e=2*vt/rt(this.s);this.pd=e*(z.timeScale===1?Xe:1),this.d/(2*rt(this.s))<=1?this.bn=1-this.d*e/(4*vt):this.bn=4*vt/(this.d*e)-1,this.bn=F(G(this.bn,-1,1),3),this.pd=F(G(this.pd,10*z.timeScale,Je*z.timeScale),3)}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:s,timeStep:r,m:i,d:n,s:o,v:a}=this,h=this.w0=G(rt(o/i),Re,Xe),u=this.zeta=n/(2*rt(o*i));u<1?(this.wd=h*rt(1-u*u),this.b=(u*h+-a)/this.wd):u===1?(this.wd=0,this.b=-a+h):(this.wd=h*rt(u*u-1),this.b=(u*h+-a)/this.wd);let d=0,l=0,f=0;for(;l<=e&&f<=t;)it(1-this.solve(d))<s?l++:l=0,this.solverDuration=d,d+=r,f++;this.settlingDuration=F(this.solverDuration*Xe,0)*z.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=G(U(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=G(U(e,1),10*z.timeScale,Je*z.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=G(U(e,100),Re,Je),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=G(U(e,10),Re,Je),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=G(U(e,1),1,Je),this.compute()}get velocity(){return this.v}set velocity(e){this.v=G(U(e,0),-Je,Je),this.compute()}},Ks=e=>new Js(e),An=e=>(console.warn("createSpring() is deprecated use spring() instead"),new Js(e)),Wr={_head:null,_tail:null},Xr=(e,t,s)=>{let r=Wr._head,i;for(;r;){const n=r._next,o=r.$el===e,a=!t||r.property===t,h=!s||r.parent===s;if(o&&a&&h){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),dt(Wr,r);const u=r.parent;u&&(u._completed++,u.animations.length===u._completed&&(u.completed=!0,u.paused=!0,u.muteCallbacks||(u.onComplete(u),u._resolve(u))))}r=n}return i},Ln=(e,t,s,r,i)=>{const n=t.animate(r,i),o=i.delay+ +i.duration*i.iterations;n.playbackRate=e._speed,e.paused&&n.pause(),e.duration<o&&(e.duration=o,e.controlAnimation=n),e.animations.push(n),Xr(t,s),pt(Wr,{parent:e,animation:n,$el:t,property:s,_next:null,_prev:null});const a=()=>Xr(t,s,e);return n.oncancel=a,n.onremove=a,e.persist||(n.onfinish=a),n};function Rt(e,t,s){const r=At(e);if(!r.length)return;const[i]=r,n=Mr(i,t),o=Br(t,i,n);let a=zt(i,o);if(B(s))return a;if(Qe(a,qe),qe.t===pe.NUMBER||qe.t===pe.UNIT){if(s===!1)return qe.n;{const h=Ws(i,qe,s,!1);return`${F(h.n,z.precision)}${h.u}`}}}var Tt=(e,t)=>{if(!B(t))return z.editor&&z.editor.addSet?z.editor.addSet(e,t):(t.duration=Re,t.composition=U(t.composition,Be.none),new xt(e,t,null,0,!0).resume())},Rn=(e,t,s)=>{const r=et(e);for(let i=0,n=r.length;i<n;i++)Xr(r[i],s,t&&t.controlAnimation&&t);return St(r,t,s),r},It=e=>{e.cancelable&&e.preventDefault()},rc=class{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:ae,remove:ae}}get x(){return this.el.x||0}set x(e){this.el.x=e}get y(){return this.el.y||0}set y(e){this.el.y=e}get width(){return this.el.width||0}set width(e){this.el.width=e}get height(){return this.el.height||0}set height(e){this.el.height=e}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}},ic=class{constructor(e){this.$el=e,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(e,t){return this.point.x=e,this.point.y=t,this.point.matrixTransform(this.inversedMatrix)}traverseUp(e){let t=this.$el.parentElement,s=0;for(;t&&t!==J;)e(t,s),t=t.parentElement,s++}getMatrix(){const e=new DOMMatrix;return this.traverseUp(t=>{const s=getComputedStyle(t).transform;if(s){const r=new DOMMatrix(s);e.preMultiplySelf(r)}}),e}remove(){this.traverseUp((e,t)=>{this.inlineTransforms[t]=e.style.transform,e.style.transform="none"})}revert(){this.traverseUp((e,t)=>{const s=this.inlineTransforms[t];s===""?e.style.removeProperty("transform"):e.style.transform=s})}},Ye=(e,t)=>e&&Ee(e)?e(t):e,js=0,In=class{constructor(e,t={}){if(!e)return;Ie.current&&Ie.current.register(this);const s=t.x,r=t.y,i=t.trigger,n=t.modifier,o=t.releaseEase,a=o&&wt(o),h=!B(o)&&!B(o.ease),u=Me(s)&&!B(s.mapTo)?s.mapTo:"translateX",d=Me(r)&&!B(r.mapTo)?r.mapTo:"translateY",l=Ye(t.container,this);this.containerArray=He(l)?l:null,this.$container=l&&!this.containerArray?et(l)[0]:J.body,this.useWin=this.$container===J.body,this.$scrollContainer=this.useWin?We:this.$container,this.$target=Me(e)?new rc(e):et(e)[0],this.$trigger=et(i||e)[0],this.fixed=Rt(this.$target,"position")==="fixed",this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=h?o:Ks({mass:U(t.releaseMass,1),stiffness:U(t.releaseStiffness,80),damping:U(t.releaseDamping,20)}),this.releaseYSpring=h?o:Ks({mass:U(t.releaseMass,1),stiffness:U(t.releaseStiffness,80),damping:U(t.releaseDamping,20)}),this.releaseEase=a||kt.outQuint,this.hasReleaseSpring=h,this.onGrab=t.onGrab||ae,this.onDrag=t.onDrag||ae,this.onRelease=t.onRelease||ae,this.onUpdate=t.onUpdate||ae,this.onSettle=t.onSettle||ae,this.onSnap=t.onSnap||ae,this.onResize=t.onResize||ae,this.onAfterResize=t.onAfterResize||ae,this.disabled=[0,0];const f={};if(n&&(f.modifier=n),B(s)||s===!0)f[u]=0;else if(Me(s)){const c=s,p={};c.modifier&&(p.modifier=c.modifier),c.composition&&(p.composition=c.composition),f[u]=p}else s===!1&&(f[u]=0,this.disabled[0]=1);if(B(r)||r===!0)f[d]=0;else if(Me(r)){const c=r,p={};c.modifier&&(p.modifier=c.modifier),c.composition&&(p.composition=c.composition),f[d]=p}else r===!1&&(f[d]=0,this.disabled[1]=1);this.animate=new Ur(this.$target,f),this.xProp=u,this.yProp=d,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-ft,ft,ft,-ft],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=Pt(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new ic(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new je({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new je({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!B(l),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?u:d,this.animate.callbacks.onRender=()=>{const c=this.updated,p=!(this.grabbed&&c)&&this.released,g=this.x,v=this.y,b=g-this.coords[2],S=v-this.coords[3];this.deltaX=b,this.deltaY=S,this.coords[2]=g,this.coords[3]=v,c&&(b||S)&&this.onUpdate(this),p?(this.computeVelocity(b,S),this.angle=$s(S,b)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new je({autoplay:!1,duration:150*z.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=t,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),Me(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const s=this.velocityTime,r=Pt(),i=r-s;if(i<17)return this.velocity;this.velocityTime=r;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,h=this.maxVelocity,u=this.velocityStackIndex;n[u]=F(G(rt(e*e+t*t)/i*o,a,h),5);const d=sn(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(u+1)%3,d}setX(e,t=!1){if(this.disabled[0])return;const s=F(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destX=s,this.snapped[0]=Vt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(e,t=!1){if(this.disabled[1])return;const s=F(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destY=s,this.snapped[1]=Vt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return F(this.animate[this.xProp](),z.precision)}set x(e){this.setX(e,!1)}get y(){return F(this.animate[this.yProp](),z.precision)}set y(e){this.setY(e,!1)}get progressX(){return ms(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(ms(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return ms(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(ms(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=F(this.useWin?We.scrollX:this.$container.scrollLeft,0),t=F(this.useWin?We.scrollY:this.$container.scrollTop,0),[s,r,i,n]=this.containerPadding,o=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+s-o,this.scrollBounds[1]=e-this.targetBounds[1]-r+o,this.scrollBounds[2]=t-this.targetBounds[2]-i+o,this.scrollBounds[3]=e-this.targetBounds[3]+n-o}updateBoundingValues(){const e=this.$container;if(!e)return;const t=this.x,s=this.y,r=this.coords[2],i=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const n=this.window[0]=We.innerWidth,o=this.window[1]=We.innerHeight,a=this.useWin,h=e.scrollWidth,u=e.scrollHeight,d=this.fixed,l=e.getBoundingClientRect(),[f,c,p,g]=this.containerPadding;this.dragArea[0]=a?0:l.left,this.dragArea[1]=a?0:l.top,this.scrollView[0]=a?G(h,n,h):h,this.scrollView[1]=a?G(u,o,u):u,this.updateScrollCoords();const{width:v,height:b,left:S,top:y,right:m,bottom:_}=e.getBoundingClientRect();this.dragArea[2]=F(a?G(v,n,n):v,0),this.dragArea[3]=F(a?G(b,o,o):b,0);const k=Rt(e,"overflow"),w=k==="visible",E=k==="hidden";if(this.canScroll=d?!1:this.contained&&(e===J.body&&w||!E&&!w)&&(h>this.dragArea[2]+g-c||u>this.dragArea[3]+f-p)&&(!this.containerArray||this.containerArray&&!He(this.containerArray)),this.contained){const N=this.scroll.x,P=this.scroll.y,A=this.canScroll,C=this.$target.getBoundingClientRect(),H=A?a?0:e.scrollLeft:0,$=A?a?0:e.scrollTop:0,V=A?this.scrollView[0]-H-v:0,x=A?this.scrollView[1]-$-b:0;this.targetBounds[0]=F(C.top+P-(a?0:y),0),this.targetBounds[1]=F(C.right+N-(a?n:m),0),this.targetBounds[2]=F(C.bottom+P-(a?o:_),0),this.targetBounds[3]=F(C.left+N-(a?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+f,this.containerBounds[1]=this.containerArray[1]-c,this.containerBounds[2]=this.containerArray[2]-p,this.containerBounds[3]=this.containerArray[3]+g):(this.containerBounds[0]=-F(C.top-(d?G(y,0,o):y)+$-f,0),this.containerBounds[1]=-F(C.right-(d?G(m,0,n):m)-V+c,0),this.containerBounds[2]=-F(C.bottom-(d?G(_,0,o):_)-x+p,0),this.containerBounds[3]=-F(C.left-(d?G(S,0,n):S)+H-g,0))}this.transforms.revert(),this.coords[2]=r,this.coords[3]=i,this.setX(t,!0),this.setY(s,!0)}isOutOfBounds(e,t,s){if(!this.contained)return 0;const[r,i,n,o]=e,[a,h]=this.disabled,u=!a&&t<o||!a&&t>i,d=!h&&s<r||!h&&s>n;return u&&!d?1:!u&&d?2:u&&d?3:0}refresh(){const e=this.parameters,t=e.x,s=e.y,r=Ye(e.container,this),i=Ye(e.containerPadding,this)||0,n=He(i)?i:[i,i,i,i],o=this.x,a=this.y,h=Ye(e.cursor,this),u={onHover:"grab",onGrab:"grabbing"};if(h){const{onHover:v,onGrab:b}=h;v&&(u.onHover=v),b&&(u.onGrab=b)}const d=Ye(e.dragThreshold,this),l={mouse:3,touch:7};if($e(d))l.mouse=d,l.touch=d;else if(d){const{mouse:v,touch:b}=d;B(v)||(l.mouse=v),B(b)||(l.touch=b)}this.containerArray=He(r)?r:null,this.$container=r&&!this.containerArray?et(r)[0]:J.body,this.useWin=this.$container===J.body,this.$scrollContainer=this.useWin?We:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=U(n,[0,0,0,0]),this.containerFriction=G(U(Ye(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=G(U(Ye(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ye(Me(t)&&!B(t.snap)?t.snap:e.snap,this),this.snapY=Ye(Me(s)&&!B(s.snap)?s.snap:e.snap,this),this.scrollSpeed=U(Ye(e.scrollSpeed,this),1.5),this.scrollThreshold=U(Ye(e.scrollThreshold,this),20),this.dragSpeed=U(Ye(e.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?l.mouse:l.touch,this.minVelocity=U(Ye(e.minVelocity,this),0),this.maxVelocity=U(Ye(e.maxVelocity,this),50),this.velocityMultiplier=U(Ye(e.velocityMultiplier,this),1),this.cursor=h===!1?!1:u,this.updateBoundingValues();const[f,c,p,g]=this.containerBounds;this.setX(G(o,g,c),!0),this.setY(G(a,f,p),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[b,S,y,m]=this.containerPadding,[_,k]=this.scrollView,w=this.dragArea[2],E=this.dragArea[3],N=this.scroll.x,P=this.scroll.y,A=this.$container.scrollWidth,C=this.$container.scrollHeight,H=this.useWin?G(A,this.window[0],A):A,$=this.useWin?G(C,this.window[1],C):C,V=_-H,x=k-$;this.dragged&&V>0&&(this.coords[0]-=V,this.scrollView[0]=H),this.dragged&&x>0&&(this.coords[1]-=x,this.scrollView[1]=$);const M=this.scrollSpeed*10,R=this.scrollThreshold,[L,q]=this.coords,[Z,Q,X,W]=this.scrollBounds,se=F(G((q-Z+b)/R,-1,0)*M,0),le=F(G((L-Q-S)/R,0,1)*M,0),ve=F(G((q-X-y)/R,0,1)*M,0),de=F(G((L-W+m)/R,-1,0)*M,0);if(se||ve||de||le){const[ce,K]=this.disabled;let te=N,re=P;ce||(te=F(G(N+(de||le),0,_-w),0),this.coords[0]-=N-te),K||(re=F(G(P+(se||ve),0,k-E),0),this.coords[1]-=P-re),this.useWin?this.$scrollContainer.scrollBy(-(N-te),-(P-re)):this.$scrollContainer.scrollTo(te,re)}}const[e,t,s,r]=this.containerBounds,[i,n,o,a,h,u]=this.pointer;this.coords[0]+=(i-h)*this.dragSpeed,this.coords[1]+=(n-u)*this.dragSpeed,this.pointer[4]=i,this.pointer[5]=n;const[d,l]=this.coords,[f,c]=this.snapped,p=(1-this.containerFriction)*this.dragSpeed;this.setX(d>t?t+(d-t)*p:d<r?r+(d-r)*p:d,!1),this.setY(l>s?s+(l-s)*p:l<e?e+(l-e)*p:l,!1),this.computeVelocity(i-h,n-u),this.angle=$s(n-a,i-o);const[g,v]=this.snapped;(g!==f&&this.snapX||v!==c&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let e in this.animate.animations)this.animate.animations[e].pause();return St([this],null,"x"),St([this],null,"y"),St([this],null,"progressX"),St([this],null,"progressY"),St([this.scroll]),St([this.overshootCoords]),this}scrollInView(e,t=0,s=kt.inOutQuad){this.updateScrollCoords();const r=this.destX,i=this.destY,n=this.scroll,o=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,r,i)){const[h,u,d,l]=o,f=F(G(i-h,-ft,0),0),c=F(G(r-u,0,ft),0),p=F(G(i-d,0,ft),0),g=F(G(r-l,-ft,0),0);new xt(n,{x:F(n.x+(g?g-t:c?c+t:0),0),y:F(n.y+(f?f-t:p?p+t:0),0),duration:B(e)?350*z.timeScale:e,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=a})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Tt(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,s=kt.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,i=this.y,[n,o,a,h]=this.containerPadding,u=this.scroll.y-this.targetBounds[0]+n+t,d=this.scroll.x-this.targetBounds[1]-o-t,l=this.scroll.y-this.targetBounds[2]-a-t,f=this.scroll.x-this.targetBounds[3]+h+t,c=this.isOutOfBounds([u,d,l,f],r,i);if(c){const[p,g]=this.disabled,v=G(Vt(r,this.snapX),f,d),b=G(Vt(i,this.snapY),u,l),S=B(e)?350*z.timeScale:e;!p&&(c===1||c===3)&&this.animate[this.xProp](v,S,s),!g&&(c===2||c===3)&&this.animate[this.yProp](b,S,s)}return this}handleDown(e){const t=e.target;if(this.grabbed||t.type==="range")return;e.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const s=e.changedTouches,r=s?s[0].clientX:e.clientX,i=s?s[0].clientY:e.clientY,{x:n,y:o}=this.transforms.normalizePoint(r,i),[a,h,u,d]=this.containerBounds,l=(1-this.containerFriction)*this.dragSpeed,f=this.x,c=this.y;this.coords[0]=this.coords[2]=l?f>h?h+(f-h)/l:f<d?d+(f-d)/l:f:f,this.coords[1]=this.coords[3]=l?c>u?u+(c-u)/l:c<a?a+(c-a)/l:c:c,this.pointer[0]=n,this.pointer[1]=o,this.pointer[2]=n,this.pointer[3]=o,this.pointer[4]=n,this.pointer[5]=o,this.pointer[6]=n,this.pointer[7]=o,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const p=Rt(this.$target,"zIndex",!1);js=(p>js?p:js)+1,this.targetStyles=Tt(this.$target,{zIndex:js}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Tt(J.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,kt.out(3)),this.onGrab(this),J.addEventListener("touchmove",this),J.addEventListener("touchend",this),J.addEventListener("touchcancel",this),J.addEventListener("mousemove",this),J.addEventListener("mouseup",this),J.addEventListener("selectstart",this)}handleMove(e){if(!this.grabbed)return;const t=e.changedTouches,s=t?t[0].clientX:e.clientX,r=t?t[0].clientY:e.clientY,{x:i,y:n}=this.transforms.normalizePoint(s,r),o=i-this.pointer[6],a=n-this.pointer[7];let h=e.target,u=!1,d=!1,l=!1;for(;t&&h&&h!==this.$trigger;){const f=Rt(h,"overflow-y");if(f!=="hidden"&&f!=="visible"){const{scrollTop:c,scrollHeight:p,clientHeight:g}=h;if(p>g){l=!0,u=c<=3,d=c>=p-g-3;break}}h=h.parentElement}l&&(!u&&!d||u&&a<0||d&&a>0)?(this.pointer[0]=i,this.pointer[1]=n,this.pointer[2]=i,this.pointer[3]=n,this.pointer[4]=i,this.pointer[5]=n,this.pointer[6]=i,this.pointer[7]=n):(It(e),this.triggerStyles||(this.triggerStyles=Tt(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",It,{passive:!1}),this.$trigger.addEventListener("touchmove",It,{passive:!1}),this.$trigger.addEventListener("touchend",It),(this.dragged||!this.disabled[0]&&it(o)>this.dragThreshold||!this.disabled[1]&&it(a)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=i,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[e,t]=this.disabled,[s,r,i,n,o,a]=this.pointer,[h,u,d,l]=this.containerBounds,[f,c]=this.snapped,p=this.releaseXSpring,g=this.releaseYSpring,v=this.releaseEase,b=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,m=this.y,_=this.computeVelocity(s-o,r-a),k=this.angle=$s(r-n,s-i),w=_*150,E=(1-this.releaseContainerFriction)*this.dragSpeed,N=y+Rr(k)*w,P=m+Lr(k)*w,A=N>u?u+(N-u)*E:N<l?l+(N-l)*E:N,C=P>d?d+(P-d)*E:P<h?h+(P-h)*E:P,H=this.destX=G(F(Vt(A,this.snapX),5),l,u),$=this.destY=G(F(Vt(C,this.snapY),5),h,d),V=this.isOutOfBounds(this.containerBounds,N,P);let x=0,M=0,R=v,L=v,q=0;if(S.x=y,S.y=m,!e){const Q=H===u?y>u?-1:1:y<l?-1:1,X=F(y-H,0);p.velocity=t&&b?X?w*Q/it(X):0:_;const{ease:W,settlingDuration:se,restDuration:le}=p;x=y===H?0:b?se:se-le*z.timeScale,b&&(R=W),x>q&&(q=x)}if(!t){const Q=$===d?m>d?-1:1:m<h?-1:1,X=F(m-$,0);g.velocity=e&&b?X?w*Q/it(X):0:_;const{ease:W,settlingDuration:se,restDuration:le}=g;M=m===$?0:b?se:se-le*z.timeScale,b&&(L=W),M>q&&(q=M)}if(!b&&V&&E&&(x||M)){const Q=Be.blend;new xt(S,{x:{to:A,duration:x*.65},y:{to:C,duration:M*.65},ease:v,composition:Q}).init(),new xt(S,{x:{to:H,duration:x},y:{to:$,duration:M},ease:v,composition:Q}).init(),this.overshootTicker.stretch(sn(x,M)).restart()}else e||this.animate[this.xProp](H,x,R),t||this.animate[this.yProp]($,M,L);this.scrollInView(q,this.scrollThreshold,v);let Z=!1;H!==f&&(this.snapped[0]=H,this.snapX&&(Z=!0)),$!==c&&this.snapY&&(this.snapped[1]=$,this.snapY&&(Z=!0)),Z&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",It),this.$trigger.removeEventListener("touchmove",It),this.$trigger.removeEventListener("touchend",It),J.removeEventListener("touchmove",this),J.removeEventListener("touchend",this),J.removeEventListener("touchcancel",this),J.removeEventListener("mousemove",this),J.removeEventListener("mouseup",this),J.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=Tt(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),J.removeEventListener("touchmove",this),J.removeEventListener("touchend",this),J.removeEventListener("touchcancel",this),J.removeEventListener("mousemove",this),J.removeEventListener("mouseup",this),J.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(e){switch(e.type){case"mousedown":this.handleDown(e);break;case"touchstart":this.handleDown(e);break;case"mousemove":this.handleMove(e);break;case"touchmove":this.handleMove(e);break;case"mouseup":this.handleUp();break;case"touchend":this.handleUp();break;case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":It(e)}}},nc=(e,t)=>new In(e,t),Yr=(e=ae)=>new je({duration:1*z.timeScale,onComplete:e},null,0).resume(),er=e=>{let t;return((...s)=>{let r,i,n,o,a;t&&(r=t.currentIteration,i=t.iterationProgress,n=t.reversed,o=t._alternate,a=t._startTime,t.revert());const h=e(...s);return h&&!Ee(h)&&h.revert&&(t=h),B(i)||(t.currentIteration=r,t.iterationProgress=(o&&r%2?!n:n)?1-i:i,t._startTime=a),h||ae})},On=class{constructor(e={}){Ie.current&&Ie.current.register(this);const t=e.root;let s=J;t&&(s=t.current||t.nativeElement||et(t)[0]||J);const r=e.defaults,i=z.defaults,n=e.mediaQueries;if(this.defaults=r?nt(r,i):i,this.root=s,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},n)for(let o in n){const a=We.matchMedia(n[o]);this.mediaQueryLists[o]=a,a.addEventListener("change",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=Ie.current,s=Ie.root,r=z.defaults;Ie.current=this,Ie.root=this.root,z.defaults=this.defaults;const i=this.mediaQueryLists;for(let o in i)this.matches[o]=i[o].matches;const n=e(this);return Ie.current=t,Ie.root=s,z.defaults=r,n}refresh(){return this.onceIndex=0,this.execute(()=>{let e=this.revertibles.length,t=this.revertConstructors.length;for(;e--;)this.revertibles[e].revert();for(;t--;)this.revertConstructors[t](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(s=>{const r=s(this);Ee(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,Ee(e)){const s=e;this.constructors.push(s),this.execute(()=>{const r=s(this);Ee(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...s)=>this.execute(()=>t(...s));return this}addOnce(e){if(this.once=!0,Ee(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const s=e;this.constructorsOnce[t]=s,this.execute(()=>{const r=s(this);Ee(r)&&this.revertConstructorsOnce.push(r)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,s=this.constructorsOnce[t];if(Ee(s))return s(this);const r=er(e);this.constructorsOnce[t]=r;let i;return this.execute(()=>{i=r(this)}),i}handleEvent(e){e.type==="change"&&this.refresh()}revert(){const e=this.revertibles,t=this.revertConstructors,s=this.revertiblesOnce,r=this.revertConstructorsOnce,i=this.mediaQueryLists;let n=e.length,o=t.length,a=s.length,h=r.length;for(;n--;)e[n].revert();for(;o--;)t[o](this);for(;a--;)s[a].revert();for(;h--;)r[h](this);for(let u in i)i[u].removeEventListener("change",this);e.length=0,t.length=0,this.constructors.length=0,s.length=0,r.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}},oc=e=>new On(e),ac=()=>{const e=J.createElement("div");J.body.appendChild(e),e.style.height="100lvh";const t=e.offsetHeight;return J.body.removeChild(e),t},tr=(e,t)=>e&&Ee(e)?e(t):e,sr=new Map,lc=class{constructor(e){this.element=e,this.useWin=this.element===J.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new je({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Se(this,s=>s.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new je({autoplay:!1,frameRate:30,onUpdate:t=>{const s=t.deltaTime,r=this.prevScrollX,i=this.prevScrollY,n=this.scrollX,o=this.scrollY,a=r-n,h=i-o;this.prevScrollX=n,this.prevScrollY=o,a&&(this.backwardX=r>n),h&&(this.backwardY=i>o),this.velocity=F(s>0?Math.sqrt(a*a+h*h)/s:0,5)}}).init(),this.resizeTicker=new je({autoplay:!1,duration:250*z.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new je({autoplay:!1,duration:500*z.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?We:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=F(e?We.scrollX:t.scrollLeft,0),this.scrollY=F(e?We.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=We.innerWidth,this.winHeight=ac()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds();let s,r;if(this.useWin)s=this.winWidth,r=this.winHeight;else{const i=t.getBoundingClientRect();s=t.clientWidth,r=t.clientHeight,this.top=i.top,this.left=i.left,this.scale=i.width?s/i.width:i.height?r/i.height:1}this.width=s,this.height=r}refreshScrollObservers(){Se(this,e=>{e.ready&&e._debug&&e.removeDebug()}),this.updateBounds(),Se(this,e=>{e.ready&&(e.refresh(),e.onResize(e),e._debug&&e.debug())})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){e.type==="scroll"&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?We:this.element).removeEventListener("scroll",this),sr.delete(this.element)}},cc=e=>{const t=e&&et(e)[0]||J.body;let s=sr.get(t);return s||(s=new lc(t),sr.set(t,s)),s},vs=(e,t,s,r,i)=>{const n=t==="min",o=t==="max",{n:a,u:h}=Qe(t==="top"||t==="left"||t==="start"||n?0:t==="bottom"||t==="right"||t==="end"||o?"100%":t==="center"?"50%":t,qe);let u=a;return h==="%"?u=a/100*s:h&&(u=Ws(e,qe,"px",!0).n),o&&r<0&&(u+=r),n&&i>0&&(u+=i),u},rr=(e,t,s,r,i)=>{let n;if(De(t)){const o=Ji.exec(t);if(o){const a=o[0],h=a[0],u=t.split(a),d=u[0]==="min",l=u[0]==="max",f=vs(e,u[0],s,r,i),c=vs(e,u[1],s,r,i);if(d){const p=Ut(vs(e,"min",s),c,h);n=p<f?f:p}else if(l){const p=Ut(vs(e,"max",s),c,h);n=p>f?f:p}else n=Ut(f,c,h)}else n=vs(e,t,s,r,i)}else n=t;return F(n,0)},Nn=e=>{let t;const s=e.targets;for(let r=0,i=s.length;r<i;r++){const n=s[r];if(n[Bt]){t=n;break}}return t},uc=0,Mn=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"],Dn=class{constructor(e={}){Ie.current&&Ie.current.register(this);const t=U(e.sync,"play pause"),s=t?wt(t):null,r=t&&(t==="linear"||t===tt),i=t&&!(s===tt&&!r),n=t&&($e(t)||t===!0||r),o=t&&De(t)&&!i&&!n,a=o?t.split(" ").map(u=>()=>{const d=this.linked;return d&&d[u]?d[u]():null}):null,h=o&&a.length>2;this.index=uc++,this.id=B(e.id)?this.index:e.id,this.container=cc(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=i||n||!!a,this.syncEase=i?s:null,this.syncSmooth=n?t===!0||r?1:t:null,this.onSyncEnter=a&&!h&&a[0]?a[0]:ae,this.onSyncLeave=a&&!h&&a[1]?a[1]:ae,this.onSyncEnterForward=a&&h&&a[0]?a[0]:ae,this.onSyncLeaveForward=a&&h&&a[1]?a[1]:ae,this.onSyncEnterBackward=a&&h&&a[2]?a[2]:ae,this.onSyncLeaveBackward=a&&h&&a[3]?a[3]:ae,this.onEnter=e.onEnter||ae,this.onLeave=e.onLeave||ae,this.onEnterForward=e.onEnterForward||ae,this.onLeaveForward=e.onLeaveForward||ae,this.onEnterBackward=e.onEnterBackward||ae,this.onLeaveBackward=e.onLeaveBackward||ae,this.onUpdate=e.onUpdate||ae,this.onResize=e.onResize||ae,this.onSyncComplete=e.onSyncComplete||ae,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=e,this._debug=U(e.debug,!1),this._next=null,this._prev=null,pt(this.container,this),Yr(()=>{if(!this.reverted){if(!this.target){const u=et(e.target)[0];this.target=u||J.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!B(e)&&!B(e.persist)&&(e.persist=!0),!this._params.target)){let t;B(e.targets)?Se(e,s=>{s.targets&&!t&&(t=Nn(s))}):t=Nn(e),this.target=t||J.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:F(G(e,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const e=this._params;return this.repeat=U(tr(e.repeat,this),!0),this.horizontal=U(tr(e.axis,this),"y")==="x",this.enter=U(tr(e.enter,this),"end start"),this.leave=U(tr(e.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const e=this.container,t=this.horizontal,s=e.element.querySelector(":scope > .animejs-onscroll-debug"),r=J.createElement("div"),i=J.createElement("div"),n=J.createElement("div"),o=Mn[this.index%Mn.length],a=e.useWin,h=a?e.winWidth:e.width,u=a?e.winHeight:e.height,d=e.scrollWidth,l=e.scrollHeight,f=this.container.width>360?320:260,c=t?0:10,p=t?10:0,g=t?24:f/2,v=t?g:15,b=t?60:g,S=t?b:v,y=t?"repeat-x":"repeat-y",m=E=>t?"0px "+E+"px":E+"px 2px",_=E=>`linear-gradient(${t?90:0}deg, ${E} 2px, transparent 1px)`,k=(E,N,P,A,C)=>`position:${E};left:${N}px;top:${P}px;width:${A}px;height:${C}px;`;r.style.cssText=`${k("absolute",c,p,t?d:f,t?f:l)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${t?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,i.style.cssText=`${k("sticky",0,0,t?h:g,t?g:u)}`,s||(i.style.cssText+=`background:\n ${_("#FFFF")}${m(g-10)} / 100px 100px ${y},\n ${_("#FFF8")}${m(g-10)} / 10px 10px ${y};\n `),n.style.cssText=`${k("relative",0,0,t?d:g,t?g:l)}`,s||(n.style.cssText+=`background:\n ${_("#FFFF")}${m(0)} / ${t?"100px 10px":"10px 100px"} ${y},\n ${_("#FFF8")}${m(0)} / ${t?"10px 0px":"0px 10px"} ${y};\n `);const w=[" enter: "," leave: "];this.coords.forEach((E,N)=>{const P=N>1,A=(P?0:this.offset)+E,C=N%2,H=A<S,$=A>(P?t?h:u:t?d:l)-S,V=(P?C&&!H:!C&&!H)||$,x=J.createElement("div"),M=J.createElement("div"),R=t?V?"right":"left":V?"bottom":"top",L=V?(t?b:v)+(P?t?-1:$?0:-2:t?-1:-2):t?1:0;M.innerHTML=`${this.id}${w[C]}${this.thresholds[N]}`,x.style.cssText=`${k("absolute",0,0,b,v)}\n display: flex;\n flex-direction: ${t?"column":"row"};\n justify-content: flex-${P?"start":"end"};\n align-items: flex-${V?"end":"start"};\n border-${R}: 2px solid ${o};\n `,M.style.cssText=`\n overflow: hidden;\n max-width: ${f/2-10}px;\n height: ${v};\n margin-${t?V?"right":"left":V?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${t&&V||!t&&!P?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${C?o:"rgba(0,0,0,.75)"};\n background-color: ${C?"rgba(0,0,0,.65)":o};\n border: 2px solid ${C?o:"transparent"};\n border-${t?V?"top-left":"top-right":V?"top-left":"bottom-left"}-radius: 5px;\n border-${t?V?"bottom-left":"bottom-right":V?"top-right":"bottom-right"}-radius: 5px;\n `,x.appendChild(M);let q=A-L+(t?1:0);x.style[t?"left":"top"]=`${q}px`,(P?i:n).appendChild(x)}),r.appendChild(i),r.appendChild(n),e.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,Rt(e.element,"position")==="static"&&(this.debugStyles=Tt(e.element,{position:"relative "}))}updateBounds(){this._debug&&this.removeDebug();let e;const t=this.target,s=this.container,r=this.horizontal,i=this.linked;let n,o=t;for(i&&(n=i.currentTime,i.seek(0,!0));o&&o!==s.element&&o!==J.body;){const C=Rt(o,"position")==="sticky"?Tt(o,{position:"static"}):!1;o=o.parentElement,C&&(e||(e=[]),e.push(C))}const a=t.getBoundingClientRect(),h=s.scale,u=(r?a.left+s.scrollX-s.left:a.top+s.scrollY-s.top)*h,d=(r?a.width:a.height)*h,l=r?s.width:s.height,f=(r?s.scrollWidth:s.scrollHeight)-l,c=this.enter,p=this.leave;let g="start",v="end",b="end",S="start";if(De(c)){const C=c.split(" ");b=C[0],g=C.length>1?C[1]:g}else if(Me(c)){const C=c;B(C.container)||(b=C.container),B(C.target)||(g=C.target)}else $e(c)&&(b=c);if(De(p)){const C=p.split(" ");S=C[0],v=C.length>1?C[1]:v}else if(Me(p)){const C=p;B(C.container)||(S=C.container),B(C.target)||(v=C.target)}else $e(p)&&(S=p);const y=rr(t,g,d),m=rr(t,v,d),_=y+u-l,k=m+u-f,w=rr(t,b,l,_,k),E=rr(t,S,l,_,k),N=y+u-w,P=m+u-E,A=P-N;this.offset=u,this.offsetStart=N,this.offsetEnd=P,this.distance=A<=0?0:A,this.thresholds=[g,v,b,S],this.coords=[y,m,w,E],e&&e.forEach(C=>C.revert()),i&&i.seek(n,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const e=this.linked,t=this.sync,s=this.syncEase,r=this.syncSmooth,i=e&&(s||r),n=this.horizontal,o=this.container,a=this.scroll,h=a<=this.offsetStart,u=a>=this.offsetEnd,d=!h&&!u,l=a===this.offsetStart||a===this.offsetEnd,f=!this.hasEntered&&l,c=this._debug&&this.$debug;let p=!1,g=!1,v=this.progress;if(h&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),i){const b=e.progress;if(r&&$e(r)){if(r<1){const S=b<v&&v===1?1e-4:b>v&&!v?-1e-4:0;v=F(Et(b,v,Et(.01,.2,r))+S,6)}}else s&&(v=s(v));p=v!==this.prevProgress,g=b===1,p&&!g&&r&&b&&o.wakeTicker.restart()}if(c){const b=n?o.scrollY:o.scrollX;c.style[n?"top":"left"]=b+10+"px"}(d&&!this.isInView||f&&!this.forceEnter&&!this.hasEntered)&&(d&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(c&&d&&(c.style.zIndex=`${this.container.zIndex++}`),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,f&&(this.forceEnter=!0)):d&&(this.forceEnter=!1)),(d||!d&&this.isInView)&&(p=!0),p&&(i&&e.seek(e.duration*v),this.onUpdate(this)),!d&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),t&&!r&&(g=!0)),v>=1&&this.began&&!this.completed&&(t&&g||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),v<1&&this.completed&&(this.completed=!1),this.prevProgress=v}revert(){if(this.reverted)return;const e=this.container;return dt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}},hc=(e={})=>new Dn(e),Bn=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,fc=(e,t,s)=>{let r=0,i=1,n,o,a=0;do o=r+(i-r)/2,n=Bn(o,t,s)-e,n>0?i=o:r=o;while(it(n)>1e-7&&++a<100);return o},Hn=(e=.5,t=0,s=.5,r=1)=>e===t&&s===r?tt:i=>i===0||i===1?i:Bn(fc(i,e,s),t,r),$n=(e=10,t)=>{const s=t?Al:Jt;return r=>s(G(r,0,1)*e)*(1/e)},Gr=(...e)=>{const t=e.length;if(!t)return tt;const s=t-1,r=e[0],i=e[s],n=[0],o=[qt(r)];for(let a=1;a<s;a++){const h=e[a],u=De(h)?h.trim().split(" "):[h],d=u[0],l=u[1];n.push(B(l)?a/s:qt(l)/100),o.push(qt(d))}return o.push(qt(i)),n.push(1),function(h){for(let u=1,d=n.length;u<d;u++){const l=n[u];if(h<=l){const f=n[u-1],c=o[u-1];return c+(o[u]-c)*(h-f)/(l-f)}}return o[o.length-1]}},qn=(e=10,t=1)=>{const s=[0],r=e-1;for(let i=1;i<r;i++){const n=s[i-1],o=i/r,a=o+((i+1)/r-o)*Math.random(),h=o*(1-t)+a*t;s.push(G(h,n,1))}return s.push(1),Gr(...s)},dc=Yt({Spring:()=>Js,createSpring:()=>An,cubicBezier:()=>Hn,eases:()=>kt,irregular:()=>qn,linear:()=>Gr,spring:()=>Ks,steps:()=>$n}),ir=(e,t=100)=>{const s=[];for(let r=0;r<=t;r++)s.push(F(e(r/t),4));return`linear(${s.join(", ")})`},Fn={},Vn=e=>{let t=Fn[e];if(t)return t;if(t="linear",De(e)){if(Ne(e,"linear")||Ne(e,"cubic-")||Ne(e,"steps")||Ne(e,"ease"))t=e;else if(Ne(e,"cubicB"))t=Ds(e);else{const s=wn(e);Ee(s)&&(t=s===tt?"linear":ir(s))}Fn[e]=t}else if(Ee(e)){const s=ir(e);s&&(t=s)}else e.ease&&(t=ir(e.ease));return t},zn=["x","y","z"],pc=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...zn],gc=[...zn,...Ht.filter(e=>["X","Y","Z"].some(t=>e.endsWith(t)))],Zr=null,ys=(e,t,s,r,i)=>{let n=De(t)?t:Oe(t,s,r,i,null,null);return $e(n)?pc.includes(e)||Ne(e,"translate")?`${n}px`:Ne(e,"rotate")||Ne(e,"skew")?`${n}deg`:`${n}`:n},Un=(e,t,s,r,i,n)=>{let o="0";const a=B(r)?getComputedStyle(e)[t]:ys(t,r,e,i,n);return B(s)?o=He(r)?r.map(h=>ys(t,h,e,i,n)):a:o=[ys(t,s,e,i,n),a],o},Wn=class{constructor(e,t){Ie.current&&Ie.current.register(this),$t(Zr)&&(mt&&(B(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"))?Zr=!1:(Ht.forEach(f=>{const c=Ne(f,"skew"),p=Ne(f,"scale"),g=Ne(f,"rotate"),v=Ne(f,"translate"),b=g||c,S=b?"<angle>":p?"<number>":v?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+f,syntax:S,inherits:!1,initialValue:v?"0px":b?"0deg":p?"1":"0"})}catch{}}),Zr=!0));const s=At(e);s.length||console.warn("No target found. Make sure the element you\'re trying to animate is accessible before creating your animation.");const r=U(t.autoplay,z.defaults.autoplay),i=r&&r.link?r:!1,n=t.alternate&&t.alternate===!0,o=t.reversed&&t.reversed===!0,a=U(t.loop,z.defaults.loop),h=a===!0||a===1/0?1/0:$e(a)?a+1:1,u=n?o?"alternate-reverse":"alternate":o?"reverse":"normal",d="both",l=z.timeScale===1?1:Xe;this.targets=s,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||z.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!r||i!==!1,this.reversed=o,this.persist=U(t.persist,z.defaults.persist),this.autoplay=r,this._speed=U(t.playbackRate,z.defaults.playbackRate),this._resolve=ae,this._completed=0,this._inlineStyles=[],s.forEach((f,c)=>{const p=f[hs],g=gc.some(P=>t.hasOwnProperty(P)),v=f.style,b=this._inlineStyles[c]={},S=U(t.ease,z.defaults.ease),y=Oe(S,f,c,s,null,null),m=Ee(y)||De(y)?y:S,_=S.ease&&S,k=Vn(m),w=(_?_.settlingDuration:Oe(U(t.duration,z.defaults.duration),f,c,s,null,null))*l,E=Oe(U(t.delay,z.defaults.delay),f,c,s,null,null)*l,N=U(t.composition,"replace");for(let P in t){if(!Qt(P))continue;const A={},C={iterations:h,direction:u,fill:d,easing:k,duration:w,delay:E,composite:N},H=t[P],$=g?Ht.includes(P)?P:Ar.get(P):!1,V=$?"transform":P;b[V]||(b[V]=v[V]);let x;if(Me(H)){const M=H,R=U(M.ease,k),L=R.ease&&R,q=M.to,Z=M.from;if(C.duration=(L?L.settlingDuration:Oe(U(M.duration,w),f,c,s,null,null))*l,C.delay=Oe(U(M.delay,E),f,c,s,null,null)*l,C.composite=U(M.composition,N),C.easing=Vn(R),x=Un(f,P,Z,q,c,s),$?(A[`--${$}`]=x,p[$]=x):A[P]=Un(f,P,Z,q,c,s),Ln(this,f,P,A,C),!B(Z))if(!$)v[P]=A[P][0];else{const Q=`--${$}`;v.setProperty(Q,A[Q][0])}}else x=He(H)?H.map(M=>ys(P,M,f,c,s)):ys(P,H,f,c,s),$?(A[`--${$}`]=x,p[$]=x):A[P]=x,Ln(this,f,P,A,C)}if(g){let P="";for(let A in p)P+=`${Gi[A]}var(--${A})) `;v.transform=P}}),i&&this.autoplay.link(this)}forEach(e){try{const t=De(e)?s=>s[e]():e;this.animations.forEach(t)}catch{}return this}get speed(){return this._speed}set speed(e){this._speed=+e,this.forEach(t=>t.playbackRate=e)}get currentTime(){const e=this.controlAnimation,t=z.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(z.timeScale===1?1:Xe);this.forEach(s=>{!this.persist&&t>=this.duration&&s.play(),s.currentTime=t})}get progress(){return this.currentTime/this.duration}set progress(e){this.forEach(t=>t.currentTime=e*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(e,t=!1){return t&&(this.muteCallbacks=!0),e<this.duration&&(this.completed=!1),this.currentTime=e,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(e=>{e.style.transform==="none"&&e.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((e,t)=>{const s=e.style,r=this._inlineStyles[t];for(let i in r){const n=r[i];B(n)||n===""?s.removeProperty(Ds(i)):e.style[i]=n}e.getAttribute("style")===""&&e.removeAttribute("style")}),this}then(e=ae){const t=this.then,s=()=>{this.then=null,e(this),this.then=t,this._resolve=ae};return new Promise(r=>(this._resolve=()=>r(s()),this.completed&&this._resolve(),this))}},Xn={animate:(e,t)=>new Wn(e,t),convertEase:ir},mc=0,vc=0,nr=(e,t)=>!e||!t?!1:e===t||e.contains(t),ss=e=>{if(!e)return null;const t=e.style,s=t.transition||"";return t.setProperty("transition","none","important"),s},or=(e,t)=>{if(!e)return;const s=e.style;t?s.transition=t:s.removeProperty("transition")},yc=e=>{const t=e.layout.transitionMuteStore,s=e.$el,r=e.$measure;s&&!t.has(s)&&t.set(s,ss(s)),r&&!t.has(r)&&t.set(r,ss(r))},ar=e=>{e.forEach((t,s)=>or(s,t)),e.clear()},_c={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},bc=e=>{if(!e)return;const t=e.parentNode;t&&(t._head===e&&(t._head=e._next),t._tail===e&&(t._tail=e._prev),e._prev&&(e._prev._next=e._next),e._next&&(e._next._prev=e._prev),e._prev=null,e._next=null,e.parentNode=null)},Yn=(e,t,s,r)=>{let i=e.dataset.layoutId;i||(i=e.dataset.layoutId=`node-${vc++}`);const n=r||{};return n.$el=e,n.$measure=e,n.id=i,n.index=0,n.targets=null,n.delay=0,n.duration=0,n.ease=null,n.state=s,n.layout=s.layout,n.parentNode=t||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:"none",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(o=>n.properties[o]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},Gn=(e,t,s,r)=>{const i=e.$el,n=e.layout.root,o=n===i,a=e.properties,h=e.state.rootNode,u=e.parentNode,d=s.transform,l=i.style.transform,f=u?u.measuredIsRemoved:!1,c=s.position;o&&(e.layout.absoluteCoords=c==="fixed"||c==="absolute"),e.$measure=t,e.inlineTransforms=l,e.hasTransform=d&&d!=="none",e.measuredIsInsideRoot=nr(n,t),e.measuredInlineTransform=null,e.measuredDisplay=s.display,e.measuredVisibility=s.visibility,e.measuredPosition=c,e.measuredHasDisplayNone=s.display==="none",e.measuredHasVisibilityHidden=s.visibility==="hidden",e.measuredIsVisible=!(e.measuredHasDisplayNone||e.measuredHasVisibilityHidden),e.measuredIsRemoved=e.measuredHasDisplayNone||e.measuredHasVisibilityHidden||f;let p=!1,g=i.previousSibling;for(;g&&(g.nodeType===Node.COMMENT_NODE||g.nodeType===Node.TEXT_NODE&&!g.textContent.trim());)g=g.previousSibling;if(g&&g.nodeType===Node.TEXT_NODE)p=!0;else{for(g=i.nextSibling;g&&(g.nodeType===Node.COMMENT_NODE||g.nodeType===Node.TEXT_NODE&&!g.textContent.trim());)g=g.nextSibling;p=g!==null&&g.nodeType===Node.TEXT_NODE}if(e.isInlined=p,e.hasTransform&&!r){const k=e.layout.transitionMuteStore;k.get(i)||(e.inlineTransition=ss(i)),t===i?i.style.transform="none":(k.get(t)||(e.measuredInlineTransition=ss(t)),e.measuredInlineTransform=t.style.transform,t.style.transform="none")}let v=0,b=0,S=0,y=0;if(!r){const k=t.getBoundingClientRect();v=k.left,b=k.top,S=k.width,y=k.height}for(let k in a){const w=k==="transform"?d:s[k]||s.getPropertyValue&&s.getPropertyValue(k);B(w)||(a[k]=w)}a.left=v,a.top=b,a.clientLeft=r?0:t.clientLeft,a.clientTop=r?0:t.clientTop;let m,_;if(o)e.layout.absoluteCoords?(m=v,_=b):(m=0,_=0);else{const k=u||h,w=k.properties.left,E=k.properties.top,N=k.properties.clientLeft,P=k.properties.clientTop;if(e.layout.absoluteCoords)m=v-w-N,_=b-E-P;else if(k===h){const A=h.properties.left,C=h.properties.top,H=h.properties.clientLeft,$=h.properties.clientTop;m=v-A-H,_=b-C-$}else m=v-w-N,_=b-E-P}return a.x=m,a.y=_,a.width=S,a.height=y,e},Zn=(e,t)=>{if(t)for(let s in t)e.properties[s]=t[s]},_s=(e,t)=>{const s=Oe(t.ease,e.$el,e.index,e.targets,null,null),r=Ee(s)?s:t.ease,i=!B(r)&&!B(r.ease);e.ease=i?r.ease:r,e.duration=i?r.settlingDuration:Oe(t.duration,e.$el,e.index,e.targets,null,null),e.delay=Oe(t.delay,e.$el,e.index,e.targets,null,null)},Sc=e=>{const t=e.$el.style,s=e.inlineStyles;s.length=0,e.layout.recordedProperties.forEach(r=>{s.push(r,t[r]||"")})},Qn=e=>{const t=e.$el.style,s=e.inlineStyles;for(let r=0,i=s.length;r<i;r+=2){const n=s[r],o=s[r+1];o&&o!==""?t[n]=o:(t[n]="",t.removeProperty(n))}},kc=e=>{const t=e.inlineTransforms,s=e.$el.style;!e.hasTransform||!t||e.hasTransform&&s.transform==="none"||t&&t==="none"?s.removeProperty("transform"):t&&(s.transform=t);const r=e.$measure;if(e.hasTransform&&r!==e.$el){const i=r.style,n=e.measuredInlineTransform;n&&n!==""?i.transform=n:i.removeProperty("transform")}e.measuredInlineTransform=null,e.inlineTransition!==null&&(or(e.$el,e.inlineTransition),e.inlineTransition=null),r!==e.$el&&e.measuredInlineTransition!==null&&(or(r,e.measuredInlineTransition),e.measuredInlineTransition=null)},Jn=e=>{(e.measuredIsRemoved||e.hasVisibilitySwap)&&(e.$el.style.removeProperty("display"),e.$el.style.removeProperty("visibility"),e.hasVisibilitySwap&&(e.$measure.style.removeProperty("display"),e.$measure.style.removeProperty("visibility"))),e.layout.pendingRemoval.delete(e.$el)},Qr=(e,t,s)=>(t.properties={...e.properties},t.state=s,t.isTarget=e.isTarget,t.hasTransform=e.hasTransform,t.inlineTransforms=e.inlineTransforms,t.measuredIsVisible=e.measuredIsVisible,t.measuredDisplay=e.measuredDisplay,t.measuredIsRemoved=e.measuredIsRemoved,t.measuredHasDisplayNone=e.measuredHasDisplayNone,t.measuredHasVisibilityHidden=e.measuredHasVisibilityHidden,t.hasDisplayNone=e.hasDisplayNone,t.isInlined=e.isInlined,t.hasVisibilityHidden=e.hasVisibilityHidden,t),Kn=class{constructor(e){this.layout=e,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(e=>{this.layout.pendingRemoval.delete(e.$el),e.$el.removeAttribute("data-layout-id"),e.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(e){if(!(!e||!e.dataset))return this.nodes.get(e.dataset.layoutId)}getComputedValue(e,t){const s=this.getNode(e);if(s)return s.properties[t]}forEach(e,t){let s=e,r=0;for(;s;)if(t(s,r++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(e){this.forEach(this.rootNode,e)}forEachNode(e){for(const t of this.rootNodes)this.forEach(t,e)}registerElement(e,t){if(!e||e.nodeType!==1)return null;this.layout.transitionMuteStore.has(e)||this.layout.transitionMuteStore.set(e,ss(e));const s=[e,t],r=this.layout.root;let i=null;for(;s.length;){const n=s.pop(),o=s.pop();if(!o||o.nodeType!==1||Bs(o))continue;const a=n?n.measuredIsRemoved:!1,h=a?_c:getComputedStyle(o),u=a?!0:h.display==="none",d=a?!0:h.visibility==="hidden",l=!u&&!d,f=o.dataset.layoutId,c=nr(r,o);let p=f?this.nodes.get(f):null;if(p&&p.$el!==o){const v=nr(r,p.$el),b=p.measuredIsVisible,S=!v&&(c||!c&&!b&&l),y=v&&!b&&l;if(S)bc(p),p=Yn(o,n,this,p);else if(y){Gn(p,o,h,a);let m=o.lastElementChild;for(;m;)s.push(m,p),m=m.previousElementSibling;i||(i=p);continue}else{let m=o.lastElementChild;for(;m;)s.push(m,n),m=m.previousElementSibling;i||(i=p);continue}}else p=Yn(o,n,this,p);p.branchAdded=!1,p.branchRemoved=!1,p.branchNotRendered=!1,p.isTarget=!1,p.sizeChanged=!1,p.hasVisibilityHidden=d,p.hasDisplayNone=u,p.hasVisibilitySwap=d&&!p.measuredHasVisibilityHidden||u&&!p.measuredHasDisplayNone,this.nodes.set(p.id,p),p.parentNode=n||null,p._prev=null,p._next=null,n?(this.rootNodes.delete(p),n._head?(n._tail._next=p,p._prev=n._tail,n._tail=p):(n._head=p,n._tail=p)):this.rootNodes.add(p),Gn(p,p.$el,h,a);let g=o.lastElementChild;for(;g;)s.push(g,p),g=g.previousElementSibling;i||(i=p)}return i}ensureDetachedNode(e,t){if(!e||e===this.layout.root)return null;const s=e.dataset.layoutId,r=s?this.nodes.get(s):null;if(r&&r.$el===e)return r;let i=null,n=e.parentElement;for(;n&&n!==this.layout.root;){if(t.has(n)){i=this.ensureDetachedNode(n,t);break}n=n.parentElement}return this.registerElement(e,i)}record(){const e=this.layout,t=e.children,s=e.root,r=He(t)?t:[t],i=[],n=t==="*"?s:Ie.root,o=[];let a=s.parentElement;for(;a&&a.nodeType===1;){const g=getComputedStyle(a);if(g.transform&&g.transform!=="none"){const v=a.style.transform||"",b=ss(a);o.push(a,v,b),a.style.transform="none"}a=a.parentElement}for(let g=0,v=r.length;g<v;g++){const b=r[g];i[g]=De(b)?n.querySelectorAll(b):b}const h=At(i);this.nodes.clear(),this.rootNodes.clear();const u=this.registerElement(s,null);u.isTarget=!0,this.rootNode=u;const d=new Set;let l=0;const f=[];this.nodes.forEach(g=>{f.push(g.$el)}),this.nodes.forEach((g,v)=>{g.index=l++,g.targets=f,g&&g.measuredIsInsideRoot&&d.add(v)});const c=new Set,p=[];for(let g=0,v=h.length;g<v;g++){const b=h[g];if(!(!b||b.nodeType!==1||b===s)){if(!nr(s,b)){const S=b.dataset.layoutId;if(!S||!d.has(S))continue}c.has(b)||(c.add(b),p.push(b))}}for(let g=0,v=p.length;g<v;g++)this.ensureDetachedNode(p[g],c);for(let g=0,v=h.length;g<v;g++){const b=h[g],S=this.getNode(b);if(S){let y=S;for(;y&&!y.isTarget;)y.isTarget=!0,y=y.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode(kc);for(let g=0,v=o.length;g<v;g+=3){const b=o[g],S=o[g+1],y=o[g+2];S&&S!==""?b.style.transform=S:b.style.removeProperty("transform"),or(b,y)}return this}};function rs(e){const t={},s={};for(let r in e){const i=e[r],n=r==="ease";r==="duration"||r==="delay"||n?s[r]=i:t[r]=i}return[t,s]}var jn=class{constructor(e,t={}){Ie.current&&Ie.current.register(this);const s=rs(t.swapAt),r=rs(t.enterFrom),i=rs(t.leaveTo),n=t.properties;if(t.duration=U(t.duration,350),t.delay=U(t.delay,0),t.ease=U(t.ease,"inOut(3.5)"),this.params=t,this.root=At(e)[0],this.id=t.id||mc++,this.children=t.children||"*",this.absoluteCoords=!1,this.swapAtParams=nt(t.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=t.enterFrom||{opacity:0},this.leaveToParams=t.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let o in s[0])this.properties.add(o);if(r[0])for(let o in r[0])this.properties.add(o);if(i[0])for(let o in i[0])this.properties.add(o);if(n)for(let o=0,a=n.length;o<a;o++)this.properties.add(n[o]);this.recordedProperties=new Set(["display","visibility","translate","position","left","top","marginLeft","marginTop","width","height","maxWidth","maxHeight","minWidth","minHeight"]),this.properties.forEach(o=>this.recordedProperties.add(o)),this.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Kn(this),this.newState=new Kn(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),ar(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>ar(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode(Qn),this}animate(e={}){const t={ease:U(e.ease,this.params.ease),delay:U(e.delay,this.params.delay),duration:U(e.duration,this.params.duration)},s={id:this.id},r=U(e.onComplete,this.params.onComplete),i=U(e.onPause,this.params.onPause);for(let x in fs)x!=="ease"&&x!=="duration"&&x!=="delay"&&(B(e[x])?B(this.params[x])||(s[x]=this.params[x]):s[x]=e[x]);s.onComplete=()=>{const x=e.autoplay,M=z.editor;if(x&&x.linked||M&&M.showPanel){r&&r(this.timeline);return}this.transformAnimation&&this.transformAnimation.cancel(),g.forEachRootNode(R=>{Jn(R),Qn(R)});for(let R=0,L=w.length;R<L;R++){const q=w[R];q.style.transform=g.getComputedValue(q,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),r&&r(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||ar(this.transitionMuteStore)})},s.onPause=()=>{const x=e.autoplay;if(x&&x.linked){r&&r(this.timeline),i&&i(this.timeline);return}this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),g.forEachRootNode(Jn),this.root.classList.remove("is-animated"),r&&r(this.timeline),i&&i(this.timeline))},s.composition=!1;const n=nt(nt(e.swapAt||{},this.swapAtParams),t),o=nt(nt(e.enterFrom||{},this.enterFromParams),t),a=nt(nt(e.leaveTo||{},this.leaveToParams),t),[h,u]=rs(n),[d,l]=rs(o),[f,c]=rs(a),p=this.oldState,g=this.newState,v=this.animating,b=this.swapping,S=this.entering,y=this.leaving,m=this.pendingRemoval;v.length=b.length=S.length=y.length=0,p.forEachRootNode(yc),g.record(),g.forEachRootNode(Sc);const _=[],k=[],w=[],E=[],N=g.rootNode,P=N.$el;g.forEachRootNode(x=>{const M=x.$el,R=x.id,L=x.parentNode,q=L?L.branchAdded:!1,Z=L?L.branchRemoved:!1,Q=L?L.branchNotRendered:!1;let X=p.nodes.get(R);const W=!X;W?(X=Qr(x,{},p),p.nodes.set(R,X),X.measuredIsRemoved=!0):X.measuredIsRemoved&&!x.measuredIsRemoved&&(Qr(x,X,p),X.measuredIsRemoved=!0);const se=X.parentNode,le=(se?se.id:null)!==(L?L.id:null),ve=X.$el!==x.$el,de=X.measuredIsRemoved,ce=x.measuredIsRemoved;if(!X.measuredIsRemoved&&!ce&&!W&&(le||ve)){const we=X.properties.left,xe=X.properties.top,_e=L||g.rootNode,fe=_e.id?p.nodes.get(_e.id):null,T=fe?fe.properties.left:_e.properties.left,I=fe?fe.properties.top:_e.properties.top,D=fe?fe.properties.clientLeft:_e.properties.clientLeft,Y=fe?fe.properties.clientTop:_e.properties.clientTop;X.properties.x=we-T-D,X.properties.y=xe-I-Y}x.hasVisibilitySwap&&(x.hasVisibilityHidden&&(x.$el.style.visibility="visible",x.$measure.style.visibility="hidden"),x.hasDisplayNone&&(x.$el.style.display=X.measuredDisplay||x.measuredDisplay||"",x.$measure.style.visibility="hidden"));const K=m.has(M),te=X.measuredIsVisible,re=x.measuredIsVisible,oe=!te&&re&&!Q,ke=!ce&&(de||K)&&!q,Te=ce&&!de&&!Z,ye=Te||ce&&K&&!Z;x.branchAdded=q||ke,x.branchRemoved=Z||ye,x.branchNotRendered=Q||ce,ce&&te&&(x.$el.style.display=X.measuredDisplay,x.$el.style.visibility="visible",Qr(X,x,g)),Te?(x.isTarget&&(y.push(M),x.isLeaving=!0),m.add(M)):!ce&&K&&m.delete(M),ke&&!Q||oe?(Zn(X,d),x.isTarget&&(S.push(M),x.isEntering=!0)):ye&&!Q&&Zn(x,f),x!==N&&x.isTarget&&!x.isEntering&&!x.isLeaving&&v.push(M),_.push(M)});let A=0,C=0,H=0;g.forEachRootNode(x=>{const M=x.$el,R=x.parentNode,L=p.nodes.get(x.id),q=x.properties,Z=L.properties;let Q=R!==N&&R;for(;Q&&!Q.isTarget&&Q!==N;)Q=Q.parentNode;x===N?(x.index=0,x.targets=v,_s(x,t)):x.isEntering?(x.index=Q?Q.index:A,x.targets=Q?v:S,_s(x,l),A++):x.isLeaving?(x.index=Q?Q.index:C,x.targets=Q?v:y,C++,_s(x,c)):x.isTarget?(x.index=H++,x.targets=v,_s(x,t)):(x.index=Q?Q.index:0,x.targets=v,_s(x,u)),L.index=x.index,L.targets=x.targets;for(let le in q)q[le]=Oe(q[le],M,x.index,x.targets,null,null),Z[le]=Oe(Z[le],M,L.index,L.targets,null,null);const X=1,W=Math.abs(q.width-Z.width)>X,se=Math.abs(q.height-Z.height)>X;if(x.sizeChanged=W||se,x.isTarget&&(!x.measuredIsRemoved&&L.measuredIsVisible||x.measuredIsRemoved&&x.measuredIsVisible)){(q.transform!=="none"||Z.transform!=="none")&&(x.hasTransform=!0,w.push(M));for(let le in q)if(le!=="transform"&&q[le]!==Z[le]){k.push(M);break}}x.isTarget||(b.push(M),x.sizeChanged&&R&&R.isTarget&&R.sizeChanged&&(h.transform&&(x.hasTransform=!0,w.push(M)),E.push(M)))});const $={delay:x=>g.getNode(x).delay,duration:x=>g.getNode(x).duration,ease:x=>g.getNode(x).ease};if(s.defaults=$,this.timeline=En(s),!k.length&&!w.length&&!b.length)return ar(this.transitionMuteStore),this.timeline.complete();if(_.length){this.root.classList.add("is-animated");for(let x=0,M=_.length;x<M;x++){const R=_[x],L=R.dataset.layoutId,q=p.nodes.get(L),Z=g.nodes.get(L),Q=q.properties;Z.isInlined||((q.measuredDisplay==="grid"||Z.measuredDisplay==="grid")&&R.style.setProperty("display","block","important"),(R!==P||this.absoluteCoords)&&(R.style.position=this.absoluteCoords?"fixed":"absolute",R.style.left="0px",R.style.top="0px",R.style.marginLeft="0px",R.style.marginTop="0px",R.style.translate=`${Q.x}px ${Q.y}px`),R===P&&Z.measuredPosition==="static"&&(R.style.position="relative",R.style.left="0px",R.style.top="0px")),R.style.width=`${Q.width}px`,R.style.height=`${Q.height}px`,R.style.minWidth="auto",R.style.minHeight="auto",R.style.maxWidth="none",R.style.maxHeight="none"}(p.scrollX!==window.scrollX||p.scrollY!==window.scrollY)&&requestAnimationFrame(()=>window.scrollTo(p.scrollX,p.scrollY));for(let x=0,M=k.length;x<M;x++){const R=k[x],L=R.dataset.layoutId,q=p.nodes.get(L),Z=g.nodes.get(L),Q=q.properties,X=Z.properties;let W=!1;const se={composition:"none"};Q.width!==X.width&&(se.width=[Q.width,X.width],W=!0),Q.height!==X.height&&(se.height=[Q.height,X.height],W=!0),!Z.hasTransform&&!Z.isInlined&&(se.translate=[`${Q.x}px ${Q.y}px`,`${X.x}px ${X.y}px`],W=!0),this.properties.forEach(le=>{const ve=Q[le],de=X[le];le!=="transform"&&ve!==de&&(se[le]=[ve,de],W=!0)}),W&&this.timeline.add(R,se,0)}}if(b.length){for(let x=0,M=b.length;x<M;x++){const R=b[x],L=p.getNode(R),q=L.properties;R.style.width=`${q.width}px`,R.style.height=`${q.height}px`,R.style.minWidth="auto",R.style.minHeight="auto",R.style.maxWidth="none",R.style.maxHeight="none",L.isInlined||(R.style.translate=`${q.x}px ${q.y}px`),this.properties.forEach(Z=>{Z!=="transform"&&(R.style[Z]=`${p.getComputedValue(R,Z)}`)})}for(let x=0,M=b.length;x<M;x++){const R=b[x],L=g.getNode(R),q=L.properties;this.timeline.call(()=>{R.style.width=`${q.width}px`,R.style.height=`${q.height}px`,R.style.minWidth="auto",R.style.minHeight="auto",R.style.maxWidth="none",R.style.maxHeight="none",L.isInlined||(R.style.translate=`${q.x}px ${q.y}px`),this.properties.forEach(Z=>{Z!=="transform"&&(R.style[Z]=`${g.getComputedValue(R,Z)}`)})},L.delay+L.duration/2)}if(E.length){const x=wt(g.nodes.get(E[0].dataset.layoutId).ease),M=L=>1-x(1-L),R={};if(h)for(let L in h)L!=="transform"&&(R[L]=[{from:q=>p.getComputedValue(q,L),to:h[L]},{from:h[L],to:q=>g.getComputedValue(q,L),ease:M}]);this.timeline.add(E,R,0)}}const V=w.length;if(V){for(let x=0;x<V;x++){const M=w[x],R=g.getNode(M);R.isInlined||(M.style.translate=`${p.getComputedValue(M,"x")}px ${p.getComputedValue(M,"y")}px`),M.style.transform=p.getComputedValue(M,"transform"),E.includes(M)&&(R.ease=Oe(n.ease,M,R.index,R.targets,null,null),R.duration=Oe(n.duration,M,R.index,R.targets,null,null))}this.transformAnimation=Xn.animate(w,{translate:x=>g.getNode(x).isInlined?"0px 0px":`${g.getComputedValue(x,"x")}px ${g.getComputedValue(x,"y")}px`,transform:x=>{const M=g.getComputedValue(x,"transform");if(!E.includes(x))return M;const R=p.getComputedValue(x,"transform"),L=g.getNode(x);return[R,Oe(h.transform,x,L.index,L.targets,null,null),M]},autoplay:!1,...$}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(e,t={}){return this.record(),e(this),this.animate(t)}},wc=(e,t)=>new jn(e,t),ot=Zl,lr={},xc=(e,t=0)=>(...s)=>t?r=>e(...s,r):r=>e(r,...s),eo=e=>(...t)=>{const s=e(...t);return new Proxy(ae,{apply:(r,i,[n])=>s(n),get:(r,i)=>{if(lr[i])return eo((...n)=>{const o=lr[i](...n);return a=>o(s(a))})}})},at=(e,t,s=0)=>{const r=(...i)=>(i.length<t.length?eo(xc(t,s)):t)(...i);return lr[e]||(lr[e]=r),r},to=at("roundPad",ot.roundPad),so=at("padStart",ot.padStart),ro=at("padEnd",ot.padEnd),io=at("wrap",ot.wrap),no=at("mapRange",ot.mapRange),oo=at("degToRad",ot.degToRad),ao=at("radToDeg",ot.radToDeg),lo=at("snap",ot.snap),co=at("clamp",ot.clamp),uo=at("round",ot.round),ho=at("lerp",ot.lerp,1),fo=at("damp",ot.damp,1),bs=(e=0,t=1,s=0)=>{const r=10**s;return Math.floor((Math.random()*(t-e+1/r)+e)*r)/r},Tc=0,Ss=(e,t=0,s=1,r=0)=>{let i=e===void 0?Tc++:e;return(n=t,o=s,a=r)=>{i+=1831565813,i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61);const h=10**a;return Math.floor((((i^i>>>14)>>>0)/4294967296*(o-n+1/h)+n)*h)/h}},po=e=>e[bs(0,e.length-1)],Jr=(e,t=bs)=>{let s=e.length,r,i;for(;s;)i=t(0,--s),r=e[s],e[s]=e[i],e[i]=r;return e},ks=(e,t={})=>{let s=[],r=0,i,n=null;const o=t.from,a=t.reversed,h=t.ease,u=!B(h),d=u&&!B(h.ease)?h.ease:u?wt(h):null,l=t.grid,f=l===!0,c=t.axis,p=t.total,g=B(o)||o===0||o==="first",v=o==="center",b=o==="last",S=o==="random",y=He(o),m=He(e),_=t.use,k=qt(m?e[0]:e),w=m?qt(e[1]):0,E=Qi.exec((m?e[1]:e)+""),N=t.start||0+(m?k:0),P=t.seed,A=!B(P)&&P!==!1?Ss(P===!0?0:P):bs,C=t.jitter,H=!B(C),$=He(C),V=$?C[0]:C||0,x=$?C[1]:C||0;let M=g?0:$e(o)?o:0;return(R,L,q,Z,Q)=>{const[X]=At(R),W=B(p)?q.length:p,se=B(_)?!1:Ee(_)?_(X,L,W):zt(X,_),le=$e(se)||De(se)&&$e(+se)?+se:L,ve=le>=0&&le<W?le:L;if(v&&(M=(W-1)/2),b&&(M=W-1),!s.length){if(f){let K=!0,te=!1,re=1/0,oe=1/0,ke=1/0,Te=-1/0,ye=-1/0,we=-1/0;const xe=[],_e=[],fe=[];for(let T=0;T<W;T++){const I=q[T];let D=0,Y=0,O=0,j=!1;if(I&&Ee(I.getBoundingClientRect)){const ie=I.getBoundingClientRect();D=ie.left+ie.width/2,Y=ie.top+ie.height/2,j=!0}else{const ie=I;ie&&$e(ie.x)&&$e(ie.y)&&(D=ie.x,Y=ie.y,$e(ie.z)&&(O=ie.z,te=!0),j=!0)}if(!j){K=!1;break}xe.push(D),_e.push(Y),fe.push(O),D<re&&(re=D),Y<oe&&(oe=Y),O<ke&&(ke=O),D>Te&&(Te=D),Y>ye&&(ye=Y),O>we&&(we=O)}if(K){let T=xe[0],I=_e[0],D=fe[0];y?(T=re+o[0]*(Te-re),I=oe+o[1]*(ye-oe),D=te?ke+(o.length>=3?o[2]:.5)*(we-ke):0):v?(T=(re+Te)/2,I=(oe+ye)/2,D=(ke+we)/2):b?(T=xe[W-1],I=_e[W-1],D=fe[W-1]):$e(o)&&(T=xe[o],I=_e[o],D=fe[o]);for(let O=0;O<W;O++){const j=T-xe[O],ie=I-_e[O],ee=D-fe[O];let Ae=rt(j*j+ie*ie+(te?ee*ee:0));c==="x"&&(Ae=-j),c==="y"&&(Ae=-ie),c==="z"&&(Ae=-ee),s.push(Ae)}let Y=1/0;for(let O=0;O<W;O++){const j=it(s[O]);j>0&&j<Y&&(Y=j)}if(Y>0&&Y<1/0)for(let O=0;O<W;O++)s[O]=s[O]/Y}else for(let T=0;T<W;T++)s.push(it(M-T))}else for(let K=0;K<W;K++)if(!l)s.push(it(M-K));else{const te=l.length,re=l[0]*l[1];let oe,ke,Te;y?(oe=o[0]*(l[0]-1),ke=o[1]*(l[1]-1),Te=te===3?(o.length>=3?o[2]:.5)*(l[2]-1):0):v?(oe=(l[0]-1)/2,ke=(l[1]-1)/2,Te=te===3?(l[2]-1)/2:0):(oe=M%l[0],ke=Jt(M/l[0])%l[1],Te=te===3?Jt(M/re):0);const ye=K%l[0],we=Jt(K/l[0])%l[1],xe=te===3?Jt(K/re):0,_e=oe-ye,fe=ke-we,T=Te-xe;let I=rt(_e*_e+fe*fe+(te===3?T*T:0));c==="x"&&(I=-_e),c==="y"&&(I=-fe),c==="z"&&(I=-T),s.push(I)}r=s[0];for(let K=1;K<W;K++)s[K]>r&&(r=s[K]);if(d||a)for(let K=0;K<W;K++){let te=s[K];d&&(te=d(te/r)*r),a&&(te=c?-te:it(r-te)),s[K]=te}if(H){n=new Array(W);for(let K=0;K<W;K++)n[K]=A(-1,1,4)}S&&(s=Jr(s,A))}const de=m?(w-k)/r:k;B(i)&&(i=Q?gs(Q,B(t.start)?Q.iterationDuration:N):N);let ce=i+(de*F(s[ve],2)||0);if(H){const K=r?s[ve]/r:0,te=V+(x-V)*K;ce=ce+n[ve]*te}return t.modifier&&(ce=t.modifier(ce)),E&&(ce=`${ce}${E[2]}`),ce}},Cc=Yt({$:()=>At,addChild:()=>pt,clamp:()=>co,cleanInlineStyles:()=>hn,createSeededRandom:()=>Ss,damp:()=>fo,degToRad:()=>oo,forEachChildren:()=>Se,get:()=>Rt,keepTime:()=>er,lerp:()=>ho,mapRange:()=>no,padEnd:()=>ro,padStart:()=>so,radToDeg:()=>ao,random:()=>bs,randomPick:()=>po,remove:()=>Rn,removeChild:()=>dt,round:()=>uo,roundPad:()=>to,set:()=>Tt,shuffle:()=>Jr,snap:()=>lo,stagger:()=>ks,sync:()=>Yr,wrap:()=>io}),go=e=>{const t=et(e)[0];return!t||!Bs(t)?console.warn(`${e} is not a valid SVGGeometryElement`):t},Kr=(e,t,s,r,i)=>{const n=s+r,o=i?Math.max(0,Math.min(n,t)):(n%t+t)%t;return e.getPointAtLength(o)},jr=(e,t,s=0)=>r=>{const i=+e.getTotalLength(),n=r[Er],o=e.getCTM(),a=s===0;return{from:0,to:i,modifier:h=>{const u=h+s*i;if(t==="a"){const d=Kr(e,i,u,-1,a),l=Kr(e,i,u,1,a);return $s(l.y-d.y,l.x-d.x)*180/vt}else{const d=Kr(e,i,u,0,a);return t==="x"?n||!o?d.x:d.x*o.a+d.y*o.c+o.e:n||!o?d.y:d.x*o.b+d.y*o.d+o.f}}}},mo=(e,t=0)=>{const s=go(e);if(s)return{translateX:jr(s,"x",t),translateY:jr(s,"y",t),rotate:jr(s,"a",t)}},Pc=e=>{let t=1;if(e&&e.getCTM){const s=e.getCTM();s&&(t=(rt(s.a*s.a+s.b*s.b)+rt(s.c*s.c+s.d*s.d))/2)}return t},Ec=(e,t,s)=>{const r=Xe,i=getComputedStyle(e),n=i.strokeLinecap,o=i.vectorEffect==="non-scaling-stroke"?e:null;let a=n;const h=new Proxy(e,{get(u,d){const l=u[d];return d===Yi?u:d==="setAttribute"?(...f)=>{if(f[0]==="draw"){const c=f[1].split(" "),p=+c[0],g=+c[1],v=Pc(o),b=p*-r*v,S=g*r*v+b,y=r*v+(p===0&&g===1||p===1&&g===0?0:10*v)-S;if(n!=="butt"){const m=p===g?"butt":n;a!==m&&(u.style.strokeLinecap=`${m}`,a=m)}u.setAttribute("stroke-dashoffset",`${b}`),u.setAttribute("stroke-dasharray",`${S} ${y}`)}return Reflect.apply(l,u,f)}:Ee(l)?(...f)=>Reflect.apply(l,u,f):l}});return e.getAttribute("pathLength")!==`${r}`&&(e.setAttribute("pathLength",`${r}`),h.setAttribute("draw",`${t} ${s}`)),h},vo=(e,t=0,s=0)=>et(e).map(r=>Ec(r,t,s)),yo=(e,t=.33)=>(s,r,i,n)=>{if(!(s.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can\'t morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const o=go(e);if(!o)throw new Error("Can\'t morph to an invalid target. \'path2\' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(o.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can\'t morph a <${o.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const a=s.tagName==="path",h=a?" ":",",u=n?n._value:null;u&&s.setAttribute(a?"d":"points",u);let d="",l="";if(!t)d=s.getAttribute(a?"d":"points"),l=o.getAttribute(a?"d":"points");else{const f=s.getTotalLength(),c=o.getTotalLength(),p=Math.max(Math.ceil(f*t),Math.ceil(c*t));for(let g=0;g<p;g++){const v=g/(p-1),b=s.getPointAtLength(f*v),S=o.getPointAtLength(c*v),y=a?g===0?"M":"L":"";d+=y+F(b.x,3)+h+b.y+" ",l+=y+F(S.x,3)+h+S.y+" "}}return[d,l]},Ac=Yt({createDrawable:()=>vo,createMotionPath:()=>mo,morphTo:()=>yo}),cr=typeof Intl<"u"&&Intl.Segmenter,Lc=/\\{value\\}/g,Rc=/\\{i\\}/g,ei=/(\\s+)/,ti=/^\\s+$/,si="line",ws="word",xs="char",Ts="data-line",ri=null,ii=null,ur=null,_o=e=>e.isWordLike||e.segment===" "||$e(+e.segment),ni=e=>e.setAttribute("aria-hidden","true"),hr=(e,t)=>[...e.querySelectorAll(`[data-${t}]:not([data-${t}] [data-${t}])`)],Ic={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},bo=e=>{if(!e.childElementCount&&!e.textContent.trim()){const t=e.parentElement;e.remove(),t&&bo(t)}},So=(e,t,s)=>{const r=e.getAttribute(Ts);if(r!==null&&+r!==t||e.tagName==="BR"){s.add(e);const n=e.previousSibling,o=e.nextSibling;n&&n.nodeType===3&&ti.test(n.textContent)&&s.add(n),o&&o.nodeType===3&&ti.test(o.textContent)&&s.add(o)}let i=e.childElementCount;for(;i--;)So(e.children[i],t,s);return s},oi=(e,t={})=>{let s="";t||(t={});const r=De(t.class)?` class="${t.class}"`:"",i=U(t.clone,!1),n=U(t.wrap,!1),o=n?n===!0?"clip":n:i?"clip":!1;if(n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${r}${i?\' style="position:relative;"\':""} data-${e}="{i}">`,i){const a=i==="left"?"-100%":i==="right"?"100%":"0",h=i==="top"?"-100%":i==="bottom"?"100%":"0";s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${h};left:${a};white-space:nowrap;">{value}</span>`}else s+="{value}";return s+="</span>",n&&(s+="</span>"),s},ai=(e,t,s,r,i,n,o,a,h)=>{const u=i===si,d=i===xs,l=`_${i}_`,f=Ee(e)?e(s):e,c=u?"block":"inline-block";ur.innerHTML=f.replace(Lc,`<i class="${l}"></i>`).replace(Rc,`${d?h:u?o:a}`);const p=ur.content,g=p.firstElementChild,v=p.querySelector(`[data-${i}]`)||g,b=p.querySelectorAll(`i.${l}`),S=b.length;if(S){g.style.display=c,v.style.display=c,v.setAttribute(Ts,`${o}`),u||(v.setAttribute("data-word",`${a}`),d&&v.setAttribute("data-char",`${h}`));let y=S;for(;y--;){const m=b[y],_=m.parentElement;_.style.display=c,u?_.innerHTML=s.innerHTML:_.replaceChild(s.cloneNode(!0),m)}t.push(v),r.appendChild(p)}else console.warn(\'The expression "{value}" is missing from the provided template.\');return n&&(g.style.outline=`1px dotted ${Ic[i]}`),g},fr=class{constructor(e,t={}){ri||(ri=cr?new cr([],{granularity:ws}):{segment:c=>{const p=[],g=c.split(ei);for(let v=0,b=g.length;v<b;v++){const S=g[v];p.push({segment:S,isWordLike:!ti.test(S)})}return p}}),ii||(ii=cr?new cr([],{granularity:"grapheme"}):{segment:c=>[...c].map(p=>({segment:p}))}),!ur&&mt&&(ur=J.createElement("template")),Ie.current&&Ie.current.register(this);const{words:s,chars:r,lines:i,accessible:n,includeSpaces:o,debug:a}=t,h=(e=He(e)?e[0]:e)&&e.nodeType?e:(qr(e)||[])[0],u=i===!0?{}:i,d=s===!0||B(s)?{}:s,l=r===!0?{}:r;this.debug=U(a,!1),this.includeSpaces=U(o,!1),this.accessible=U(n,!0),this.linesOnly=u&&!d&&!l,this.lineTemplate=Me(u)?oi(si,u):u,this.wordTemplate=Me(d)||this.linesOnly?oi(ws,d):d,this.charTemplate=Me(l)?oi(xs,l):l,this.$target=h,this.html=h&&h.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const f=()=>this.html&&(u||d||l)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const c=h.offsetWidth;c!==this.width&&(this.width=c,f())},150)}),this.lineTemplate&&!this.ready?J.fonts.ready.then(f):f(),h?this.resizeObserver.observe(h):console.warn("No Text Splitter target found.")}addEffect(e){if(!Ee(e))return console.warn("Effect must return a function."),this;const t=er(e);return this.effects.push(t),this.ready&&(this.effectsCleanups[this.effects.length-1]=t(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(e=>Ee(e)?e(this):e.revert&&e.revert()),this.$target.innerHTML=this.html,this}splitNode(e){const t=this.wordTemplate,s=this.charTemplate,r=this.includeSpaces,i=this.debug,n=e.nodeType;if(n===3){const o=e.nodeValue;if(o.trim()){const a=[],h=this.words,u=this.chars,d=ri.segment(o),l=J.createDocumentFragment();let f=null;for(const c of d){const p=c.segment,g=_o(c);if(!f||g&&f&&_o(f))a.push(p);else{const v=a.length-1,b=a[v];!ei.test(b)&&!ei.test(p)?a[v]+=p:a.push(p)}f=c}for(let c=0,p=a.length;c<p;c++){const g=a[c];if(g.trim()){const v=a[c+1],b=r&&v&&!v.trim(),S=g,y=s?ii.segment(S):null,m=s?J.createDocumentFragment():J.createTextNode(b?g+" ":g);if(s){const _=[...y];for(let k=0,w=_.length;k<w;k++){const E=_[k],N=k===w-1&&b?E.segment+" ":E.segment,P=J.createTextNode(N);ai(s,u,P,m,xs,i,-1,h.length,u.length)}}t?ai(t,h,m,l,ws,i,-1,h.length,u.length):s?l.appendChild(m):l.appendChild(J.createTextNode(g)),b&&c++}else{if(c&&r)continue;l.appendChild(J.createTextNode(g))}}e.parentNode.replaceChild(l,e)}}else if(n===1){const o=[...e.childNodes];for(let a=0,h=o.length;a<h;a++)this.splitNode(o[a])}}split(e=!1){const t=this.$target,s=!!this.cache&&!e,r=this.lineTemplate,i=this.wordTemplate,n=this.charTemplate,o=J.fonts.status!=="loading",a=r&&o;this.ready=!r||o,(a||e)&&this.effectsCleanups.forEach(l=>Ee(l)&&l(this)),s||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),a&&(s&&(t.innerHTML=this.cache),this.lines.length=0,i&&(this.words=hr(t,ws))),n&&(a||i)&&(this.chars=hr(t,xs));const h=this.words.length?this.words:this.chars;let u,d=0;for(let l=0,f=h.length;l<f;l++){const c=h[l],{top:p,height:g}=c.getBoundingClientRect();!B(u)&&p-u>g*.5&&d++,c.setAttribute(Ts,`${d}`);const v=c.querySelectorAll(`[${Ts}]`);let b=v.length;for(;b--;)v[b].setAttribute(Ts,`${d}`);u=p}if(a){const l=J.createDocumentFragment(),f=new Set,c=[];for(let p=0;p<d+1;p++){const g=t.cloneNode(!0);So(g,p,new Set).forEach(v=>{const b=v.parentNode;b&&(v.nodeType===1&&f.add(b),b.removeChild(v))}),c.push(g)}f.forEach(bo);for(let p=0,g=c.length;p<g;p++)ai(r,this.lines,c[p],l,si,this.debug,p);t.innerHTML="",t.appendChild(l),i&&(this.words=hr(t,ws)),n&&(this.chars=hr(t,xs))}if(this.linesOnly){const l=this.words;let f=l.length;for(;f--;){const c=l[f];c.replaceWith(c.textContent)}l.length=0}if(this.accessible&&(a||!s)){const l=J.createElement("span");l.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",l.innerHTML=this.html,t.insertBefore(l,t.firstChild),this.lines.forEach(ni),this.words.forEach(ni),this.chars.forEach(ni)}return this.width=t.offsetWidth,(a||e)&&this.effects.forEach((l,f)=>this.effectsCleanups[f]=l(this)),this}refresh(){this.split(!0)}},ko=(e,t)=>new fr(e,t),Cs=(e,t)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new fr(e,t)),wo=e=>{let t="";for(let s=0,r=e.length;s<r;s++)if(s+2<r&&e[s+1]==="-"&&e.charCodeAt(s)<e.charCodeAt(s+2)){const i=e.charCodeAt(s),n=e.charCodeAt(s+2);for(let o=i;o<=n;o++)t+=String.fromCharCode(o);s+=2}else t+=e[s];return t},xo={lowercase:"a-z",uppercase:"A-Z",numbers:"0-9",symbols:"!%#_|*+=",braille:"⠀-⣿",blocks:"▀-▟",shades:"░-▓"},li=new WeakMap,To=(e={})=>{e||(e={});const t=e.chars,s=wt(e.ease||"linear"),r=e.text,i=e.from,n=e.reversed||!1,o=e.perturbation||0,a=e.cursor,h=a===!0?"_":typeof a=="number"?String.fromCharCode(a):typeof a=="string"?a:"",u=h.length,d=e.seed||0,l=e.override!==void 0?e.override:!0,f=e.revealRate||60,c=1e3*z.timeScale/f,p=e.settleDuration||300*z.timeScale,g=e.settleRate||30,v=e.duration,b=e.revealDelay,S=e.delay,y=e.onChange||ae;return(m,_,k,w)=>{const E=typeof t=="function"?t(m,_,k):t||"a-zA-Z0-9!%#_",N=wo(xo[E]||E),P=N.length-1,A=typeof v=="function"?v(m,_,k):v,C=typeof b=="function"?b(m,_,k):b||0,H=typeof S=="function"?S(m,_,k):S||0,$=d?Ss(d):Ss();li.has(m)||li.set(m,m.textContent);const V=w?w._value:m.textContent,x=r!==void 0?typeof r=="function"?r(m,_,k):r:w?w._value:li.get(m),M=x===" "||x==="&nbsp;"?" ":x,R=V===" "?0:V.length,L=M.length,q=l===!0?N:typeof l=="string"&&l.length>0?wo(xo[l]||l):null,Z=q?q.length-1:0,Q=l===" "?" ":null,X=l===""?L:Math.max(R,L),W=A>0?A:(X-1)*c+p,se=F((W+C)/z.timeScale,0)*z.timeScale,le=C>0?F(C/se,12):0,ve=i===void 0||i==="auto"?L<R?"right":"left":i,de=new Int32Array(X);if(ve==="random"){for(let O=0;O<X;O++)de[O]=O;for(let O=X-1;O>0;O--){const j=$(0,O),ie=de[O];de[O]=de[j],de[j]=ie}}else{const O=ve==="right"?(l===""||!R?X:R)-1:ve==="center"?((l===""||!R?X:R)-1)/2:typeof ve=="number"?ve:0,j=Math.abs,ie=new Array(X);for(let ee=0;ee<X;ee++)ie[ee]=ee;ie.sort((ee,Ae)=>j(ee-O)-j(Ae-O));for(let ee=0;ee<X;ee++)de[ie[ee]]=ee}if(n){const O=X-1;for(let j=0;j<X;j++)de[j]=O-de[j]}const ce=F(p/W,12),K=F((1-ce)/X,12),te=u*K,re=F(1e3*z.timeScale/(g*se),12),oe=new Float32Array(X),ke=new Float32Array(X),Te=o>0?o*ce:0;for(let O=0;O<X;O++){const j=Te>0?($(0,2e3)-1e3)/1e3*Te:0,ie=Te>0?($(0,2e3)-1e3)/1e3*Te:0;oe[O]=de[O]*K+j,ke[O]=Math.ceil((oe[O]+ce+ie)/re)*re}if(L<X&&ve!=="left"&&ve!=="right"&&ve!=="random"){let O=0;for(let ee=L;ee<X;ee++)ke[ee]>O&&(O=ke[ee]);const j=new Array(L);for(let ee=0;ee<L;ee++)j[ee]=ee;j.sort((ee,Ae)=>de[ee]-de[Ae]);const ie=(1-O)/L;for(let ee=0;ee<L;ee++){const Ae=O+ee*ie;Ae>ke[j[ee]]&&(ke[j[ee]]=Ae)}}const ye=new Array(X);for(let O=0;O<X;O++)ye[O]=N[$(0,P)];const we=q?q===N?ye:new Array(X):null;if(we&&we!==ye)for(let O=0;O<X;O++)we[O]=Q||q[$(0,q.length-1)];let xe=V;if(!w){if(l==="")xe="";else if(q){xe="";for(let O=0;O<R;O++)xe+=V[O]===" "?" ":we[O]}}let _e=-1,fe=-1,T="";const I=l!=="",D=!!q,Y=u>0;return{from:0,to:1,duration:se,delay:H,ease:"linear",modifier:O=>{if(O===_e)return T;if(_e=O,H>0&&O<=0)return T=V,V;if(O<=0)return T=xe,xe;if(O>=1)return T=M,M;T="";const j=O/re|0,ie=j!==fe;ie&&(fe=j);const ee=le>0?(O-le)/(1-le):O,Ae=ee>0?s(ee):0;for(let ge=0;ge<X;ge++){const _t=oe[ge];if(Ae>=ke[ge]){ge<L&&(T+=M[ge]);continue}if(Ae<=0||Ae<_t){I&&ge<R&&(D?V[ge]===" "?T+=" ":(ie&&(we[ge]=Q||q[$(0,Z)]),T+=we[ge]):T+=V[ge]);continue}ge<L&&M[ge]===" "||ge<R&&V[ge]===" "?T+=" ":Y&&Ae-_t<te?T+=h[u-1-((Ae-_t)/K|0)]:(ie&&(ye[ge]=N[$(0,P)]),T+=ye[ge])}return ie&&y(T,Ae),T}}}},Oc=Yt({TextSplitter:()=>fr,scrambleText:()=>To,split:()=>Cs,splitText:()=>ko}),Nc=Yt({$:()=>At,Animatable:()=>Ur,AutoLayout:()=>jn,Draggable:()=>In,JSAnimation:()=>xt,Scope:()=>On,ScrollObserver:()=>Dn,Spring:()=>Js,TextSplitter:()=>fr,Timeline:()=>Pn,Timer:()=>je,WAAPIAnimation:()=>Wn,addChild:()=>pt,animate:()=>ps,clamp:()=>co,cleanInlineStyles:()=>hn,createAnimatable:()=>Gl,createDraggable:()=>nc,createDrawable:()=>vo,createLayout:()=>wc,createMotionPath:()=>mo,createScope:()=>oc,createSeededRandom:()=>Ss,createSpring:()=>An,createTimeline:()=>En,createTimer:()=>Vl,cubicBezier:()=>Hn,damp:()=>fo,degToRad:()=>oo,eases:()=>kt,easings:()=>dc,engine:()=>Fe,forEachChildren:()=>Se,get:()=>Rt,globals:()=>z,irregular:()=>qn,keepTime:()=>er,lerp:()=>ho,linear:()=>Gr,mapRange:()=>no,morphTo:()=>yo,onScroll:()=>hc,padEnd:()=>ro,padStart:()=>so,radToDeg:()=>ao,random:()=>bs,randomPick:()=>po,remove:()=>Rn,removeChild:()=>dt,round:()=>uo,roundPad:()=>to,scrambleText:()=>To,scrollContainers:()=>sr,set:()=>Tt,shuffle:()=>Jr,snap:()=>lo,split:()=>Cs,splitText:()=>ko,spring:()=>Ks,stagger:()=>ks,steps:()=>$n,svg:()=>Ac,sync:()=>Yr,text:()=>Oc,utils:()=>Cc,waapi:()=>Xn,wrap:()=>io}),Mc=class{registerAnimation(e,t,s={}){this.animations[e]={handler:t,options:s}}isInitiallyHidden(e){return this.animations[e]?.options.initiallyHidden??!1}runAnimation(e,t,s,r,i){const n=this.animations[e];n?n.handler(t,s,r,i):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}runLinkAnimation(e){const t=this.linkAnimations.get(e);t&&t()}constructor(){this.animations={},this.linkAnimations=new Map,this.registerAnimation("typewriter",function(e,t,s,r){const{chars:i}=Cs(e,{words:!1,chars:!0}),n=t.fadeDuration||100,o=t.interval||100;ps(i,{opacity:[0,1],easing:"linear",duration:n,delay:ks(o,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation("toast",function(e,t,s,r){const{words:i}=Cs(e,{words:!0,chars:!1}),n=t.fadeDuration||100,o=t.interval||200;ps(i,{opacity:[0,1],y:[{to:["100%","0%"]}],easing:"linear",duration:n,delay:ks(o,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation("fadeIn",function(e,t,s,r){const i=t.duration||500;ps(e,{opacity:[0,1],easing:t.easing||"easeOutQuad",duration:i,delay:t.start||0,loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation("continue",function(e,t,s){e.classList.add("squiffy-continue");const r=t.style||"pulse";let i=null,n=null;r==="wave"?(e.classList.add("squiffy-continue-wave"),n=Cs(e,{words:!1,chars:!0}).chars,i=ps(n,{opacity:[1,.3,1],easing:"easeInOutSine",duration:1200,delay:ks(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const o=()=>{if(e.classList.remove("squiffy-continue","squiffy-continue-wave",`squiffy-continue-${r}`),e.removeEventListener("click",o),i&&(i.pause(),n))for(const a of n)a.style.opacity="1";s()};e.addEventListener("click",o)})}},Dc={animejs:Nc},Co="input:not([disabled]), textarea:not([disabled]), select:not([disabled])",Bc="a.squiffy-link[data-section], a.squiffy-link[data-passage]";function Po(e){if(!e)return!0;const t=e.querySelectorAll(Co);for(const s of t)if(!s.checkValidity())return!1;return!0}function ci(e){if(!e)return;const t=Po(e),s=e.querySelectorAll(Bc);for(const r of s)t?(r.classList.remove("validation-disabled"),r.removeAttribute("aria-disabled")):(r.classList.add("validation-disabled"),r.setAttribute("aria-disabled","true"))}function dr(e){if(!e)return;const t=e.querySelectorAll(Co);for(const s of t)s.addEventListener("input",()=>ci(e)),s.addEventListener("change",()=>ci(e)),s.addEventListener("invalid",r=>{r.preventDefault(),s.classList.add("squiffy-invalid")}),s.addEventListener("input",()=>{s.checkValidity()&&s.classList.remove("squiffy-invalid")});ci(e)}var Hc=async e=>{let t,s,r,i,n,o=0;const a=new al,h=[];let u=!1;async function d(T){if(u||T.closest(".squiffy-output-section")!==r||T.classList.contains("disabled")||!Po(r))return!1;const I=T.getAttribute("data-passage"),D=T.getAttribute("data-section");if(I!==null)return f(T),oe("_turncount",re("_turncount")+1),await g(T),I&&(n=null,await _(I)),a.emit("linkClick",{linkType:"passage"}),!0;if(D!==null)return await g(T),D&&await b(D),a.emit("linkClick",{linkType:"section"}),!0;const[Y,O,j]=Te.handleLink(T);return Y?(j?.disableLink&&f(T),E(),a.emit("linkClick",{linkType:O}),!0):!1}async function l(T){const I=T.target;I.classList.contains("squiffy-link")&&await d(I)}function f(T){T.classList.add("disabled"),T.setAttribute("tabindex","-1")}function c(T){T.classList.remove("disabled"),T.removeAttribute("tabindex")}async function p(){N()||await b(t.start)}async function g(T){_e.runLinkAnimation(T),await m();const I=T.getAttribute("data-set");if(I){const D=JSON.parse(I);for(const Y of D)v(Y)}}function v(T){T=T.replace(/^(\\w*\\s*):=(.*)$/,(D,Y,O)=>Y+"="+x.processText(O,!0));const I=/^([\\w]*)\\s*=\\s*(.*)$/.exec(T);if(I){const D=I[1];let Y=I[2];Y==="true"?oe(D,!0):Y==="false"?oe(D,!1):isNaN(Y)?(Y.startsWith("@")&&(Y=re(Y.substring(1))),oe(D,Y)):oe(D,parseFloat(Y))}else{const D=/^([\\w]*)\\s*([+\\-*/])=\\s*(.*)$/.exec(T);if(D){const Y=D[1],O=D[2];let j=D[3];j.startsWith("@")&&(j=re(j.substring(1)));const ie=parseFloat(j);let ee=re(Y);ee===null&&(ee=0),O=="+"&&(ee+=ie),O=="-"&&(ee-=ie),O=="*"&&(ee*=ie),O=="/"&&(ee/=ie),oe(Y,ee)}else{let Y=!0;T.startsWith("not ")&&(T=T.substring(4),Y=!1),oe(T,Y)}}}async function b(T){const I=Z();if(s=t.sections[T],!s)return;oe("_section",T),te.setSeen(T);const D=t.sections[""];(D?.clear||s.clear)&&$(),A(T);const Y=r;if(D&&(await y(D,"[[]]"),re("_section")!==T)){Y.remove();return}if(await y(s,`[[${T}]]`),re("_section")!==T){Y.remove();return}dr(r),oe("_turncount",0),ce(),E();const O=Z();O!=I&&a.emit("canGoBackChanged",{canGoBack:O})}function S(T,I=null){const D={get:re,set:oe,ui:{transition:xe,write:x.write,scrollToEnd:x.scrollToEnd},story:{go:b},element:X,import:Dc,...I};t.js[T](D,re,oe)}async function y(T,I){if(T.attributes&&await k(T.attributes),T.jsIndex!==void 0){const D=re("_section");if(S(T.jsIndex),re("_section")!==D)return}x.write(T.text||"",I),await m()}async function m(){u=!0,r.classList.add("links-disabled");for(const T of h)await T();h.length=0,u=!1,r.classList.remove("links-disabled")}async function _(T){const I=Z();let D=s.passages&&s.passages[T];const Y=t.sections[""];if(!D&&Y&&Y.passages&&(D=Y.passages[T]),!D)throw`No passage named ${T} in the current section or master section`;te.setSeen(T);const O=[],j=[];if(Y&&Y.passages){const ge=Y.passages[""];ge&&(O.push(ge),j.push(()=>y(ge,"[[]][]")))}const ie=s.passages&&s.passages[""];ie&&(O.push(ie),j.push(()=>y(ie,`[[${re("_section")}]][]`))),O.push(D),j.push(()=>y(D,`[[${re("_section")}]][${T}]`));const ee="@"+re("_turncount");if(s.passages){if(ee in s.passages){const ge=s.passages[ee];O.push(ge),j.push(()=>y(ge,`[[${re("_section")}]][${ee}]`))}if("@last"in s.passages&&re("_turncount")>=(s.passageCount||0)){const ge=s.passages["@last"];O.push(ge),j.push(()=>y(ge,`[[${re("_section")}]][${ee}]`))}}O.some(ge=>ge.clear)&&($(),C()),i=document.createElement("div"),i.classList.add("squiffy-output-passage"),i.setAttribute("data-passage",`${T}`),r.appendChild(i);for(const ge of j)await ge();dr(r),ce(),E();const Ae=Z();Ae!=I&&a.emit("canGoBackChanged",{canGoBack:Ae})}async function k(T){for(const I of T)v(I)}function w(){te.reset(),se.scroll==="element"||se.scroll==="none"?(W.innerHTML="",p()):location.reload()}function E(){oe("_output",W.innerHTML)}function N(){const T=()=>{t.uiJsIndex!==void 0&&S(t.uiJsIndex,{registerAnimation:_e.registerAnimation.bind(_e)})};te.load();const I=re("_output");return I?(W.innerHTML=I,R(),L(),n=W.querySelector(".squiffy-output-block:last-child"),s=t.sections[re("_section")],T(),fe.onLoad(),dr(r),!0):(T(),!1)}function P(){n=document.createElement("div"),n.classList.add("squiffy-output-block"),(i||r)?.appendChild(n)}function A(T){r&&(r.querySelectorAll("input").forEach(I=>{const D=I.getAttribute("data-attribute")||I.id;D&&oe(D,I.value),I.disabled=!0}),r.querySelectorAll("[contenteditable]").forEach(I=>{const D=I.getAttribute("data-attribute")||I.id;D&&oe(D,I.innerHTML),I.contentEditable="false"}),r.querySelectorAll("textarea").forEach(I=>{const D=I.getAttribute("data-attribute")||I.id;D&&oe(D,I.value),I.disabled=!0}),r.querySelectorAll("select").forEach(I=>{const D=I.getAttribute("data-attribute")||I.id;D&&oe(D,I.value),I.disabled=!0})),i=null,C(T),P()}function C(T){r=document.createElement("div"),r.classList.add("squiffy-output-section"),r.setAttribute("data-section",T??re("_section")),T||r.setAttribute("data-clear","true"),W.appendChild(r)}function H(){return W.querySelector(".squiffy-clear-stack")}function $(){let T=H();T||(T=document.createElement("div"),T.classList.add("squiffy-clear-stack"),T.style.display="none",W.prepend(T));const I=document.createElement("div");T.appendChild(I);for(const D of[...W.children])D!==T&&I.appendChild(D)}function V(){const T=H();if(!T)return;for(const D of[...W.children])D!==T&&D.remove();const I=T.children[T.children.length-1];for(const D of[...I.children])W.appendChild(D);I.remove()}const x={write:(T,I)=>{o=W.scrollHeight;const D=x.processText(T,!1).trim();n||P();const Y=document.createElement("div");I&&Y.setAttribute("data-source",I),Y.innerHTML=D,fe.onWrite(Y),n.appendChild(Y),dr(r),x.scrollToEnd()},clearScreen:()=>{$(),C()},scrollToEnd:()=>{if(se.scroll!=="none")if(se.scroll==="element")W.lastElementChild?.scrollIntoView({block:"end",inline:"nearest",behavior:"smooth"});else{let T=o;const I=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(T>I){const D=document.documentElement.scrollHeight-window.innerHeight;T>D&&(T=D),window.scrollTo({top:T,behavior:"smooth"})}}},processText:(T,I)=>ke.process(T,I)};function M(T){if(T.start!=t.start){t=T,te.reset(),W.innerHTML="",b(t.start);return}cl(t,T,W,x,f,I=>k(I)),t=T,R(),L()}function R(){const T=W.querySelectorAll(".squiffy-output-section:last-child");r=T[T.length-1];const I=r.getAttribute("data-section");s=t.sections[I]}function L(){i=r.querySelector(".squiffy-output-passage:last-child")}function q(){const T=H(),I=W.querySelectorAll(".squiffy-output-section").length+W.querySelectorAll(".squiffy-output-passage").length;return T?I+T.children.length:I}function Z(){return q()>1}function Q(){if(!Z())return;const T=H();if(i){const I=i.getAttribute("data-passage");K(i.getAttribute("data-undo")),i.remove();let D=!1,Y=!1;for(const O of W.children)if(O!==T){if(O.getAttribute("data-clear")=="true"&&O.children.length==0){D=!0;continue}Y=!0;break}D&&!Y&&(V(),R());for(const O of r.querySelectorAll("a.squiffy-link[data-passage]"))O.getAttribute("data-passage")==I&&c(O);L()}else{K(r.getAttribute("data-undo")),r.remove();let I=!1;for(const D of[...W.children])if(D!==T){I=!0;break}I||V(),R(),L()}Z()||a.emit("canGoBackChanged",{canGoBack:!1})}const X=e.element,W=document.createElement("div");X.appendChild(W),t=e.story;const se={scroll:e.scroll||"body",persist:e.persist===void 0?!0:e.persist,onSet:e.onSet||(()=>{})};let le="";se.persist&&(e.storyId!==void 0?le=e.storyId:window.location.protocol==="file:"?le=t.id||"":le=window.location.pathname,le||(console.warn("Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled."),se.persist=!1)),se.scroll==="element"&&(W.style.overflowY="auto"),W.addEventListener("click",l),W.addEventListener("keypress",async function(T){T.key==="Enter"&&await l(T)});let ve={};const de=function(T,I){T!="_output"&&(T in ve||(ve[T]=I))},ce=function(){(i??r).setAttribute("data-undo",JSON.stringify(ve)),ve={}},K=function(T){if(!T)return;const I=JSON.parse(T);if(I)for(const D of Object.keys(I))te.setInternal(D,I[D],!1)},te=new ll(se.persist,le,se.onSet,a,de),re=te.get.bind(te),oe=te.set.bind(te),ke=new ol(t,te,()=>s),Te=new ml,ye=T=>T in t.sections&&t.sections[T].text||null,we=T=>s.passages&&T in s.passages?s.passages[T].text||null:"passages"in t.sections[""]&&t.sections[""].passages&&T in t.sections[""].passages&&t.sections[""].passages[T].text||null,xe=T=>{h.push(T)},_e=new Mc,fe=new ul(W,ke,te,Te,ye,we,x.processText,xe,_e,a);return fe.add(us.ReplaceLabel()),fe.add(us.RotateSequencePlugin()),fe.add(us.RandomPlugin()),fe.add(us.LivePlugin()),fe.add(us.AnimatePlugin()),{begin:p,restart:w,get:re,set:oe,clickLink:d,update:M,goBack:Q,on:(T,I)=>a.on(T,I),off:(T,I)=>a.off(T,I),once:(T,I)=>a.once(T,I)}};return gr.init=Hc,gr})({});\n\n//# sourceMappingURL=squiffy.runtime.global.js.map', Xe = `/* Core Squiffy Runtime Styles */
428
443
 
429
444
  /* Link styles */
430
445
  a.squiffy-link
@@ -567,7 +582,7 @@ div.squiffy-output-section:not(:last-child)
567
582
  text-decoration: none;
568
583
  border-bottom: 1px solid Blue;
569
584
  }
570
- `, Ge = `<!DOCTYPE html>
585
+ `, Ye = `<!DOCTYPE html>
571
586
  <html>
572
587
  <!-- INFO -->
573
588
  <head>
@@ -609,7 +624,7 @@ div.squiffy-output-section:not(:last-child)
609
624
  </div>
610
625
  </body>
611
626
  </html>
612
- `, Je = `/* Application-specific layout and container styles */
627
+ `, Ge = `/* Application-specific layout and container styles */
613
628
  div#squiffy-container
614
629
  {
615
630
  max-width: 700px;
@@ -625,40 +640,79 @@ div#squiffy-header
625
640
  div#squiffy
626
641
  {
627
642
  font-size: 18px;
628
- }`, Ke = "6.0.0-beta.0", Qe = {
629
- version: Ke
630
- }, Ze = Qe.version, et = async (e, t = !1) => {
631
- const s = typeof t == "boolean" ? { createZip: t } : t, n = {}, r = e.getUiInfo(), i = `<!--
643
+ }
644
+ div#squiffy img
645
+ {
646
+ max-width: 100%;
647
+ }`, Ze = "@textadventures/squiffy-packager", Je = "6.0.0-beta.3", Qe = {
648
+ type: "git",
649
+ url: "git+https://github.com/textadventures/squiffy.git",
650
+ directory: "packager"
651
+ }, Ke = { access: "public" }, et = "dist/packager.js", tt = "dist/packager.d.ts", st = {
652
+ build: "vite build",
653
+ test: "vitest --run",
654
+ dev: "vitest"
655
+ }, rt = "Alex Warren", nt = [
656
+ "CrisisSDK",
657
+ "mrangel",
658
+ "Luis Felipe Morales"
659
+ ];
660
+ var it = {
661
+ fflate: "^0.8.3",
662
+ "squiffy-compiler": "^6.0.0-beta.3",
663
+ "squiffy-runtime": "^6.0.0-beta.3"
664
+ }, ot = {
665
+ esbuild: "^0.28.2",
666
+ tsx: "^4.23.13",
667
+ typescript: "^6.0.3",
668
+ vite: "^8.2.2",
669
+ "vite-plugin-dts": "^5.1.0",
670
+ vitest: "^4.1.11"
671
+ }, at = ["dist"], lt = "module", ct = {
672
+ name: Ze,
673
+ version: Je,
674
+ repository: Qe,
675
+ publishConfig: Ke,
676
+ main: et,
677
+ types: tt,
678
+ scripts: st,
679
+ author: rt,
680
+ contributors: nt,
681
+ license: "MIT",
682
+ description: "",
683
+ dependencies: it,
684
+ devDependencies: ot,
685
+ files: at,
686
+ type: lt
687
+ }, ht = ct.version, pt = async (e, t = !1) => {
688
+ const r = typeof t == "boolean" ? { createZip: t } : t, s = {}, i = e.getUiInfo(), n = `<!--
632
689
 
633
- Created with Squiffy ${Ze}
690
+ Created with Squiffy ${ht}
634
691
 
635
692
  https://squiffystory.com
636
693
  https://github.com/textadventures/squiffy
637
694
 
638
- -->`, a = r.externalScripts.map((m) => `<script src="${m}"><\/script>`).join(`
639
- `), h = r.externalStylesheets.map((m) => `<link rel="stylesheet" href="${m}"/>`).join(`
640
- `), l = Ye.toString() + `
695
+ -->`, a = i.externalScripts.map((m) => `<script src="${m}"><\/script>`).join(`
696
+ `), l = i.externalStylesheets.map((m) => `<link rel="stylesheet" href="${m}"/>`).join(`
697
+ `), p = Xe.toString() + `
641
698
 
642
- ` + Je.toString(), d = await e.getJs();
643
- let o, c, g;
644
- s.inlineHtml ? (o = `<style>
645
- ` + l + `
646
- </style>`, c = `<script>
699
+ ` + Ge.toString(), c = await e.getJs();
700
+ let o, h, g;
701
+ r.inlineHtml ? (o = `<style>
702
+ ` + p + `
703
+ </style>`, h = `<script>
647
704
  ` + xe + `
648
705
  <\/script>`, g = `<script>
649
- ` + d + `
650
- <\/script>`) : (o = '<link rel="stylesheet" href="style.css"/>', c = '<script src="squiffy.runtime.global.js"><\/script>', g = '<script src="story.js"><\/script>', n["story.js"] = d, n["squiffy.runtime.global.js"] = xe, n["style.css"] = l);
651
- let u = Ge.toString();
652
- return u = u.replace("<!-- INFO -->", () => i), u = u.replace("<!-- TITLE -->", () => r.title), u = u.replace("<!-- SCRIPTS -->", () => a), u = u.replace("<!-- STYLESHEETS -->", () => h), u = u.replace("<!-- STYLE_CONTENT -->", () => o), u = u.replace("<!-- RUNTIME_CONTENT -->", () => c), u = u.replace("<!-- STORY_CONTENT -->", () => g), n["index.html"] = u, {
653
- files: n,
654
- zip: s.createZip ? Xe(
655
- Object.fromEntries(
656
- Object.entries(n).map(([m, v]) => [m, le(v)])
657
- )
658
- ) : void 0
706
+ ` + c + `
707
+ <\/script>`) : (o = '<link rel="stylesheet" href="style.css"/>', h = '<script src="squiffy.runtime.global.js"><\/script>', g = '<script src="story.js"><\/script>', s["story.js"] = c, s["squiffy.runtime.global.js"] = xe, s["style.css"] = p);
708
+ let u = Ye.toString();
709
+ return u = u.replace("<!-- INFO -->", () => n), u = u.replace("<!-- TITLE -->", () => i.title), u = u.replace("<!-- SCRIPTS -->", () => a), u = u.replace("<!-- STYLESHEETS -->", () => l), u = u.replace("<!-- STYLE_CONTENT -->", () => o), u = u.replace("<!-- RUNTIME_CONTENT -->", () => h), u = u.replace("<!-- STORY_CONTENT -->", () => g), s["index.html"] = u, {
710
+ files: s,
711
+ zip: r.createZip ? We(Object.fromEntries(Object.entries(s).map(([m, v]) => [m, le(v)]))) : void 0
659
712
  };
660
713
  };
661
714
  export {
662
- et as createPackage
715
+ pt as createPackage
663
716
  };
664
- //# sourceMappingURL=packager.js.map
717
+
718
+ //# sourceMappingURL=packager.js.map