@textadventures/squiffy-packager 7.0.0-beta.3 → 7.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/packager.js CHANGED
@@ -1,4 +1,4 @@
1
- var A = Uint8Array, R = Uint16Array, he = Int32Array, ue = new A([
1
+ var E = Uint8Array, O = Uint16Array, he = Int32Array, ue = new E([
2
2
  0,
3
3
  0,
4
4
  0,
@@ -31,7 +31,7 @@ var A = Uint8Array, R = Uint16Array, he = Int32Array, ue = new A([
31
31
  0,
32
32
  0,
33
33
  0
34
- ]), pe = new A([
34
+ ]), pe = new E([
35
35
  0,
36
36
  0,
37
37
  0,
@@ -64,7 +64,7 @@ var A = Uint8Array, R = Uint16Array, he = Int32Array, ue = new A([
64
64
  13,
65
65
  0,
66
66
  0
67
- ]), ye = new A([
67
+ ]), ye = new E([
68
68
  16,
69
69
  17,
70
70
  18,
@@ -84,45 +84,45 @@ var A = Uint8Array, R = Uint16Array, he = Int32Array, ue = new A([
84
84
  14,
85
85
  1,
86
86
  15
87
- ]), we = function(e, t) {
88
- for (var n = new R(31), s = 0; s < 31; ++s) n[s] = t += 1 << e[s - 1];
87
+ ]), Te = function(e, t) {
88
+ for (var n = new O(31), s = 0; s < 31; ++s) n[s] = t += 1 << e[s - 1];
89
89
  for (var i = new he(n[30]), s = 1; s < 30; ++s) for (var r = n[s]; r < n[s + 1]; ++r) i[r] = r - n[s] << 5 | s;
90
90
  return {
91
91
  b: n,
92
92
  r: i
93
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), mt = Ce.b, ve = Ce.r, oe = new R(32768);
97
- for (var v = 0; v < 32768; ++v) {
98
- var z = (v & 43690) >> 1 | (v & 21845) << 1;
99
- z = (z & 52428) >> 2 | (z & 13107) << 2, z = (z & 61680) >> 4 | (z & 3855) << 4, oe[v] = ((z & 65280) >> 8 | (z & 255) << 8) >> 1;
94
+ }, Ce = Te(ue, 2), Ie = Ce.b, ie = Ce.r;
95
+ Ie[28] = 258, ie[258] = 28;
96
+ var Ae = Te(pe, 0), mt = Ae.b, ve = Ae.r, oe = new O(32768);
97
+ for (var k = 0; k < 32768; ++k) {
98
+ var z = (k & 43690) >> 1 | (k & 21845) << 1;
99
+ z = (z & 52428) >> 2 | (z & 13107) << 2, z = (z & 61680) >> 4 | (z & 3855) << 4, oe[k] = ((z & 65280) >> 8 | (z & 255) << 8) >> 1;
100
100
  }
101
101
  var J = (function(e, t, n) {
102
- for (var s = e.length, i = 0, r = new R(t); i < s; ++i) e[i] && ++r[e[i] - 1];
103
- var a = new R(t);
102
+ for (var s = e.length, i = 0, r = new O(t); i < s; ++i) e[i] && ++r[e[i] - 1];
103
+ var a = new O(t);
104
104
  for (i = 1; i < t; ++i) a[i] = a[i - 1] + r[i - 1] << 1;
105
105
  var l;
106
106
  if (n) {
107
- l = new R(1 << t);
107
+ l = new O(1 << t);
108
108
  var u = 15 - t;
109
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] >> u] = c;
110
+ for (var c = i << 4 | e[i], o = t - e[i], h = a[e[i] - 1]++ << o, v = h | (1 << o) - 1; h <= v; ++h) l[oe[h] >> u] = c;
111
111
  } else
112
- for (l = new R(s), i = 0; i < s; ++i) e[i] && (l[i] = oe[a[e[i] - 1]++] >> 15 - e[i]);
112
+ for (l = new O(s), i = 0; i < s; ++i) e[i] && (l[i] = oe[a[e[i] - 1]++] >> 15 - e[i]);
113
113
  return l;
114
- }), V = new A(288);
115
- for (var v = 0; v < 144; ++v) V[v] = 8;
116
- for (var v = 144; v < 256; ++v) V[v] = 9;
117
- for (var v = 256; v < 280; ++v) V[v] = 7;
118
- for (var v = 280; v < 288; ++v) V[v] = 8;
119
- var Q = new A(32);
120
- for (var v = 0; v < 32; ++v) Q[v] = 5;
121
- var Ie = /* @__PURE__ */ J(V, 9, 0), Ne = /* @__PURE__ */ J(Q, 5, 0), Ae = function(e) {
114
+ }), V = new E(288);
115
+ for (var k = 0; k < 144; ++k) V[k] = 8;
116
+ for (var k = 144; k < 256; ++k) V[k] = 9;
117
+ for (var k = 256; k < 280; ++k) V[k] = 7;
118
+ for (var k = 280; k < 288; ++k) V[k] = 8;
119
+ var Q = new E(32);
120
+ for (var k = 0; k < 32; ++k) Q[k] = 5;
121
+ var Ne = /* @__PURE__ */ J(V, 9, 0), Me = /* @__PURE__ */ J(Q, 5, 0), Ee = function(e) {
122
122
  return (e + 7) / 8 | 0;
123
- }, Ee = function(e, t, n) {
124
- return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new A(e.subarray(t, n));
125
- }, Me = [
123
+ }, Pe = function(e, t, n) {
124
+ return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new E(e.subarray(t, n));
125
+ }, Be = [
126
126
  "unexpected EOF",
127
127
  "invalid block type",
128
128
  "invalid length/literal",
@@ -138,7 +138,7 @@ var Ie = /* @__PURE__ */ J(V, 9, 0), Ne = /* @__PURE__ */ J(Q, 5, 0), Ae = funct
138
138
  "stream finishing",
139
139
  "invalid zip data"
140
140
  ], K = function(e, t, n) {
141
- var s = new Error(t || Me[e]);
141
+ var s = new Error(t || Be[e]);
142
142
  if (s.code = e, Error.captureStackTrace && Error.captureStackTrace(s, K), !n) throw s;
143
143
  return s;
144
144
  }, H = function(e, t, n) {
@@ -160,14 +160,14 @@ var Ie = /* @__PURE__ */ J(V, 9, 0), Ne = /* @__PURE__ */ J(Q, 5, 0), Ae = funct
160
160
  l: 0
161
161
  };
162
162
  if (i == 1) {
163
- var a = new A(n[0].s + 1);
163
+ var a = new E(n[0].s + 1);
164
164
  return a[n[0].s] = 1, {
165
165
  t: a,
166
166
  l: 1
167
167
  };
168
168
  }
169
- n.sort(function(E, P) {
170
- return E.f - P.f;
169
+ n.sort(function(P, $) {
170
+ return P.f - $.f;
171
171
  }), n.push({
172
172
  s: -1,
173
173
  f: 25001
@@ -185,37 +185,37 @@ var Ie = /* @__PURE__ */ J(V, 9, 0), Ne = /* @__PURE__ */ J(Q, 5, 0), Ae = funct
185
185
  l,
186
186
  r: u
187
187
  };
188
- for (var g = r[0].s, s = 1; s < i; ++s) r[s].s > g && (g = r[s].s);
189
- var m = new R(g + 1), b = ae(n[o - 1], m, 0);
190
- if (b > t) {
191
- var s = 0, y = 0, d = b - t, k = 1 << d;
192
- for (r.sort(function(P, S) {
193
- return m[S.s] - m[P.s] || P.f - S.f;
188
+ for (var v = r[0].s, s = 1; s < i; ++s) r[s].s > v && (v = r[s].s);
189
+ var y = new O(v + 1), _ = ae(n[o - 1], y, 0);
190
+ if (_ > t) {
191
+ var s = 0, b = 0, x = _ - t, f = 1 << x;
192
+ for (r.sort(function($, w) {
193
+ return y[w.s] - y[$.s] || $.f - w.f;
194
194
  }); s < i; ++s) {
195
- var _ = r[s].s;
196
- if (m[_] > t)
197
- y += k - (1 << b - m[_]), m[_] = t;
195
+ var m = r[s].s;
196
+ if (y[m] > t)
197
+ b += f - (1 << _ - y[m]), y[m] = t;
198
198
  else break;
199
199
  }
200
- for (y >>= d; y > 0; ) {
201
- var O = r[s].s;
202
- m[O] < t ? y -= 1 << t - m[O]++ - 1 : ++s;
200
+ for (b >>= x; b > 0; ) {
201
+ var d = r[s].s;
202
+ y[d] < t ? b -= 1 << t - y[d]++ - 1 : ++s;
203
203
  }
204
- for (; s >= 0 && y; --s) {
205
- var x = r[s].s;
206
- m[x] == t && (--m[x], ++y);
204
+ for (; s >= 0 && b; --s) {
205
+ var S = r[s].s;
206
+ y[S] == t && (--y[S], ++b);
207
207
  }
208
- b = t;
208
+ _ = t;
209
209
  }
210
210
  return {
211
- t: new A(m),
212
- l: b
211
+ t: new E(y),
212
+ l: _
213
213
  };
214
214
  }, ae = function(e, t, n) {
215
215
  return e.s == -1 ? Math.max(ae(e.l, t, n + 1), ae(e.r, t, n + 1)) : t[e.s] = n;
216
216
  }, be = function(e) {
217
217
  for (var t = e.length; t && !e[--t]; ) ;
218
- for (var n = new R(++t), s = 0, i = e[0], r = 1, a = function(u) {
218
+ for (var n = new O(++t), s = 0, i = e[0], r = 1, a = function(u) {
219
219
  n[s++] = u;
220
220
  }, l = 1; l <= t; ++l) if (e[l] == i && l != t) ++r;
221
221
  else {
@@ -236,42 +236,42 @@ var Ie = /* @__PURE__ */ J(V, 9, 0), Ne = /* @__PURE__ */ J(Q, 5, 0), Ae = funct
236
236
  }, Z = function(e, t) {
237
237
  for (var n = 0, s = 0; s < t.length; ++s) n += e[s] * t[s];
238
238
  return n;
239
- }, Pe = function(e, t, n) {
240
- var s = n.length, i = Ae(t + 2);
239
+ }, $e = function(e, t, n) {
240
+ var s = n.length, i = Ee(t + 2);
241
241
  e[i] = s & 255, e[i + 1] = s >> 8, e[i + 2] = e[i] ^ 255, e[i + 3] = e[i + 1] ^ 255;
242
242
  for (var r = 0; r < s; ++r) e[i + r + 4] = n[r];
243
243
  return (i + 4 + s) * 8;
244
244
  }, ke = function(e, t, n, s, i, r, a, l, u, c, o) {
245
245
  H(t, o++, n), ++i[256];
246
- for (var h = re(i, 15), g = h.t, m = h.l, b = re(r, 15), y = b.t, d = b.l, k = be(g), _ = k.c, O = k.n, x = be(y), E = x.c, P = x.n, S = new R(19), f = 0; f < _.length; ++f) ++S[_[f] & 31];
247
- for (var f = 0; f < E.length; ++f) ++S[E[f] & 31];
248
- for (var p = re(S, 7), L = p.t, U = p.l, $ = 19; $ > 4 && !L[ye[$ - 1]]; --$) ;
249
- var j = c + 5 << 3, I = Z(i, V) + Z(r, Q) + a, N = Z(i, g) + Z(r, y) + a + 14 + 3 * $ + Z(S, L) + 2 * S[16] + 3 * S[17] + 7 * S[18];
250
- if (u >= 0 && j <= I && j <= N) return Pe(t, o, e.subarray(u, u + c));
251
- var B, w, M, F;
246
+ for (var h = re(i, 15), v = h.t, y = h.l, _ = re(r, 15), b = _.t, x = _.l, f = be(v), m = f.c, d = f.n, S = be(b), P = S.c, $ = S.n, w = new O(19), g = 0; g < m.length; ++g) ++w[m[g] & 31];
247
+ for (var g = 0; g < P.length; ++g) ++w[P[g] & 31];
248
+ for (var p = re(w, 7), L = p.t, U = p.l, R = 19; R > 4 && !L[ye[R - 1]]; --R) ;
249
+ var j = c + 5 << 3, I = Z(i, V) + Z(r, Q) + a, N = Z(i, v) + Z(r, b) + a + 14 + 3 * R + Z(w, L) + 2 * w[16] + 3 * w[17] + 7 * w[18];
250
+ if (u >= 0 && j <= I && j <= N) return $e(t, o, e.subarray(u, u + c));
251
+ var B, T, M, F;
252
252
  if (H(t, o, 1 + (N < I)), o += 2, N < I) {
253
- B = J(g, m, 0), w = g, M = J(y, d, 0), F = y;
253
+ B = J(v, y, 0), T = v, M = J(b, x, 0), F = b;
254
254
  var ee = J(L, U, 0);
255
- H(t, o, O - 257), H(t, o + 5, P - 1), H(t, o + 10, $ - 4), o += 14;
256
- for (var f = 0; f < $; ++f) H(t, o + 3 * f, L[ye[f]]);
257
- o += 3 * $;
258
- for (var D = [_, E], Y = 0; Y < 2; ++Y)
259
- for (var W = D[Y], f = 0; f < W.length; ++f) {
260
- var q = W[f] & 31;
261
- H(t, o, ee[q]), o += L[q], q > 15 && (H(t, o, W[f] >> 5 & 127), o += W[f] >> 12);
255
+ H(t, o, d - 257), H(t, o + 5, $ - 1), H(t, o + 10, R - 4), o += 14;
256
+ for (var g = 0; g < R; ++g) H(t, o + 3 * g, L[ye[g]]);
257
+ o += 3 * R;
258
+ for (var D = [m, P], Y = 0; Y < 2; ++Y)
259
+ for (var W = D[Y], g = 0; g < W.length; ++g) {
260
+ var q = W[g] & 31;
261
+ H(t, o, ee[q]), o += L[q], q > 15 && (H(t, o, W[g] >> 5 & 127), o += W[g] >> 12);
262
262
  }
263
- } else B = Ie, w = V, M = Ne, F = Q;
264
- for (var f = 0; f < l; ++f) {
265
- var C = s[f];
266
- if (C > 255) {
267
- var q = C >> 18 & 31;
268
- G(t, o, B[q + 257]), o += w[q + 257], q > 7 && (H(t, o, C >> 23 & 31), o += ue[q]);
269
- var X = C & 31;
270
- G(t, o, M[X]), o += F[X], X > 3 && (G(t, o, C >> 5 & 8191), o += pe[X]);
271
- } else G(t, o, B[C]), o += w[C];
263
+ } else B = Ne, T = V, M = Me, F = Q;
264
+ for (var g = 0; g < l; ++g) {
265
+ var A = s[g];
266
+ if (A > 255) {
267
+ var q = A >> 18 & 31;
268
+ G(t, o, B[q + 257]), o += T[q + 257], q > 7 && (H(t, o, A >> 23 & 31), o += ue[q]);
269
+ var X = A & 31;
270
+ G(t, o, M[X]), o += F[X], X > 3 && (G(t, o, A >> 5 & 8191), o += pe[X]);
271
+ } else G(t, o, B[A]), o += T[A];
272
272
  }
273
- return G(t, o, B[256]), o + w[256];
274
- }, Be = /* @__PURE__ */ new he([
273
+ return G(t, o, B[256]), o + T[256];
274
+ }, De = /* @__PURE__ */ new he([
275
275
  65540,
276
276
  131080,
277
277
  131088,
@@ -281,116 +281,116 @@ var Ie = /* @__PURE__ */ J(V, 9, 0), Ne = /* @__PURE__ */ J(Q, 5, 0), Ae = funct
281
281
  1048832,
282
282
  2114560,
283
283
  2117632
284
- ]), Le = /* @__PURE__ */ new A(0), De = function(e, t, n, s, i, r) {
285
- var a = r.z || e.length, l = new A(s + a + 5 * (1 + Math.ceil(a / 7e3)) + i), u = l.subarray(s, l.length - i), c = r.l, o = (r.r || 0) & 7;
284
+ ]), Le = /* @__PURE__ */ new E(0), qe = function(e, t, n, s, i, r) {
285
+ var a = r.z || e.length, l = new E(s + a + 5 * (1 + Math.ceil(a / 7e3)) + i), u = l.subarray(s, l.length - i), c = r.l, o = (r.r || 0) & 7;
286
286
  if (t) {
287
287
  o && (u[0] = r.r >> 3);
288
- for (var h = Be[t - 1], g = h >> 13, m = h & 8191, b = (1 << n) - 1, y = r.p || new R(32768), d = r.h || new R(b + 1), k = Math.ceil(n / 3), _ = 2 * k, O = function(ne) {
289
- return (e[ne] ^ e[ne + 1] << k ^ e[ne + 2] << _) & b;
290
- }, x = new he(25e3), E = new R(288), P = new R(32), S = 0, f = 0, p = r.i || 0, L = 0, U = r.w || 0, $ = 0; p + 2 < a; ++p) {
291
- var j = O(p), I = p & 32767, N = d[j];
292
- if (y[I] = N, d[j] = I, U <= p) {
288
+ for (var h = De[t - 1], v = h >> 13, y = h & 8191, _ = (1 << n) - 1, b = r.p || new O(32768), x = r.h || new O(_ + 1), f = Math.ceil(n / 3), m = 2 * f, d = function(ne) {
289
+ return (e[ne] ^ e[ne + 1] << f ^ e[ne + 2] << m) & _;
290
+ }, S = new he(25e3), P = new O(288), $ = new O(32), w = 0, g = 0, p = r.i || 0, L = 0, U = r.w || 0, R = 0; p + 2 < a; ++p) {
291
+ var j = d(p), I = p & 32767, N = x[j];
292
+ if (b[I] = N, x[j] = I, U <= p) {
293
293
  var B = a - p;
294
- if ((S > 7e3 || L > 24576) && (B > 423 || !c)) {
295
- o = ke(e, u, 0, x, E, P, f, L, $, p - $, o), L = S = f = 0, $ = p;
296
- for (var w = 0; w < 286; ++w) E[w] = 0;
297
- for (var w = 0; w < 30; ++w) P[w] = 0;
294
+ if ((w > 7e3 || L > 24576) && (B > 423 || !c)) {
295
+ o = ke(e, u, 0, S, P, $, g, L, R, p - R, o), L = w = g = 0, R = p;
296
+ for (var T = 0; T < 286; ++T) P[T] = 0;
297
+ for (var T = 0; T < 30; ++T) $[T] = 0;
298
298
  }
299
- var M = 2, F = 0, ee = m, D = I - N & 32767;
300
- if (B > 2 && j == O(p - D))
301
- for (var Y = Math.min(g, B) - 1, W = Math.min(32767, p), q = Math.min(258, B); D <= W && --ee && I != N; ) {
299
+ var M = 2, F = 0, ee = y, D = I - N & 32767;
300
+ if (B > 2 && j == d(p - D))
301
+ for (var Y = Math.min(v, B) - 1, W = Math.min(32767, p), q = Math.min(258, B); D <= W && --ee && I != N; ) {
302
302
  if (e[p + M] == e[p + M - D]) {
303
- for (var C = 0; C < q && e[p + C] == e[p + C - D]; ++C) ;
304
- if (C > M) {
305
- if (M = C, F = D, C > Y) break;
306
- for (var X = Math.min(D, C - 2), de = 0, w = 0; w < X; ++w) {
307
- var te = p - D + w & 32767, fe = te - y[te] & 32767;
303
+ for (var A = 0; A < q && e[p + A] == e[p + A - D]; ++A) ;
304
+ if (A > M) {
305
+ if (M = A, F = D, A > Y) break;
306
+ for (var X = Math.min(D, A - 2), de = 0, T = 0; T < X; ++T) {
307
+ var te = p - D + T & 32767, fe = te - b[te] & 32767;
308
308
  fe > de && (de = fe, N = te);
309
309
  }
310
310
  }
311
311
  }
312
- I = N, N = y[I], D += I - N & 32767;
312
+ I = N, N = b[I], D += I - N & 32767;
313
313
  }
314
314
  if (F) {
315
- x[L++] = 268435456 | ie[M] << 18 | ve[F];
315
+ S[L++] = 268435456 | ie[M] << 18 | ve[F];
316
316
  var ge = ie[M] & 31, me = ve[F] & 31;
317
- f += ue[ge] + pe[me], ++E[257 + ge], ++P[me], U = p + M, ++S;
317
+ g += ue[ge] + pe[me], ++P[257 + ge], ++$[me], U = p + M, ++w;
318
318
  } else
319
- x[L++] = e[p], ++E[e[p]];
319
+ S[L++] = e[p], ++P[e[p]];
320
320
  }
321
321
  }
322
322
  for (p = Math.max(p, U); p < a; ++p)
323
- x[L++] = e[p], ++E[e[p]];
324
- o = ke(e, u, c, x, E, P, f, L, $, p - $, o), c || (r.r = o & 7 | u[o / 8 | 0] << 3, o -= 7, r.h = d, r.p = y, r.i = p, r.w = U);
323
+ S[L++] = e[p], ++P[e[p]];
324
+ o = ke(e, u, c, S, P, $, g, L, R, p - R, o), c || (r.r = o & 7 | u[o / 8 | 0] << 3, o -= 7, r.h = x, r.p = b, r.i = p, r.w = U);
325
325
  } else {
326
326
  for (var p = r.w || 0; p < a + c; p += 65535) {
327
327
  var se = p + 65535;
328
- se >= a && (u[o / 8 | 0] = c, se = a), o = Pe(u, o + 1, e.subarray(p, se));
328
+ se >= a && (u[o / 8 | 0] = c, se = a), o = $e(u, o + 1, e.subarray(p, se));
329
329
  }
330
330
  r.i = a;
331
331
  }
332
- return Ee(l, 0, s + Ae(o) + i);
333
- }, qe = /* @__PURE__ */ (function() {
332
+ return Pe(l, 0, s + Ee(o) + i);
333
+ }, He = /* @__PURE__ */ (function() {
334
334
  for (var e = /* @__PURE__ */ new Int32Array(256), t = 0; t < 256; ++t) {
335
335
  for (var n = t, s = 9; --s; ) n = (n & 1 && -306674912) ^ n >>> 1;
336
336
  e[t] = n;
337
337
  }
338
338
  return e;
339
- })(), He = function() {
339
+ })(), Fe = function() {
340
340
  var e = -1;
341
341
  return {
342
342
  p: function(t) {
343
- for (var n = e, s = 0; s < t.length; ++s) n = qe[n & 255 ^ t[s]] ^ n >>> 8;
343
+ for (var n = e, s = 0; s < t.length; ++s) n = He[n & 255 ^ t[s]] ^ n >>> 8;
344
344
  e = n;
345
345
  },
346
346
  d: function() {
347
347
  return ~e;
348
348
  }
349
349
  };
350
- }, Fe = function(e, t, n, s, i) {
350
+ }, ze = function(e, t, n, s, i) {
351
351
  if (!i && (i = { l: 1 }, t.dictionary)) {
352
- var r = t.dictionary.subarray(-32768), a = new A(r.length + e.length);
352
+ var r = t.dictionary.subarray(-32768), a = new E(r.length + e.length);
353
353
  a.set(r), a.set(e, r.length), e = a, i.w = r.length;
354
354
  }
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, n, s, i);
356
- }, $e = function(e, t) {
355
+ return qe(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, n, s, i);
356
+ }, Re = function(e, t) {
357
357
  var n = {};
358
358
  for (var s in e) n[s] = e[s];
359
359
  for (var s in t) n[s] = t[s];
360
360
  return n;
361
- }, T = function(e, t, n) {
361
+ }, C = function(e, t, n) {
362
362
  for (; n; ++t) e[t] = n, n >>>= 8;
363
363
  };
364
- function ze(e, t) {
365
- return Fe(e, t || {}, 0, 0);
364
+ function Ve(e, t) {
365
+ return ze(e, t || {}, 0, 0);
366
366
  }
367
- var Re = function(e, t, n, s) {
367
+ var Oe = function(e, t, n, s) {
368
368
  for (var i in e) {
369
369
  var r = e[i], a = t + i, l = s;
370
- Array.isArray(r) && (l = $e(s, r[1]), r = r[0]), ArrayBuffer.isView(r) ? n[a] = [r, l] : (n[a += "/"] = [new A(0), l], Re(r, a, n, s));
370
+ Array.isArray(r) && (l = Re(s, r[1]), r = r[0]), ArrayBuffer.isView(r) ? n[a] = [r, l] : (n[a += "/"] = [new E(0), l], Oe(r, a, n, s));
371
371
  }
372
- }, _e = typeof TextEncoder < "u" && /* @__PURE__ */ new TextEncoder(), Ve = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Ue = 0;
372
+ }, _e = typeof TextEncoder < "u" && /* @__PURE__ */ new TextEncoder(), Ue = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), je = 0;
373
373
  try {
374
- Ve.decode(Le, { stream: !0 }), Ue = 1;
374
+ Ue.decode(Le, { stream: !0 }), je = 1;
375
375
  } catch {
376
376
  }
377
377
  function le(e, t) {
378
378
  if (t) {
379
- for (var n = new A(e.length), s = 0; s < e.length; ++s) n[s] = e.charCodeAt(s);
379
+ for (var n = new E(e.length), s = 0; s < e.length; ++s) n[s] = e.charCodeAt(s);
380
380
  return n;
381
381
  }
382
382
  if (_e) return _e.encode(e);
383
- for (var i = e.length, r = new A(e.length + (e.length >> 1)), a = 0, l = function(o) {
383
+ for (var i = e.length, r = new E(e.length + (e.length >> 1)), a = 0, l = function(o) {
384
384
  r[a++] = o;
385
385
  }, s = 0; s < i; ++s) {
386
386
  if (a + 5 > r.length) {
387
- var u = new A(a + 8 + (i - s << 1));
387
+ var u = new E(a + 8 + (i - s << 1));
388
388
  u.set(r), r = u;
389
389
  }
390
390
  var c = e.charCodeAt(s);
391
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));
392
392
  }
393
- return Ee(r, 0, a);
393
+ return Pe(r, 0, a);
394
394
  }
395
395
  var ce = function(e) {
396
396
  var t = 0;
@@ -401,45 +401,45 @@ var ce = function(e) {
401
401
  return t;
402
402
  }, Se = function(e, t, n, s, i, r, a, l) {
403
403
  var u = s.length, c = n.extra, o = l && l.length, h = ce(c);
404
- T(e, t, a != null ? 33639248 : 67324752), t += 4, a != null && (e[t++] = 20, e[t++] = n.os), e[t] = 20, t += 2, e[t++] = n.flag << 1 | (r < 0 && 8), e[t++] = i && 8, e[t++] = n.compression & 255, e[t++] = n.compression >> 8;
405
- var g = new Date(n.mtime == null ? Date.now() : n.mtime), m = g.getFullYear() - 1980;
406
- if ((m < 0 || m > 119) && K(10), T(e, t, m << 25 | g.getMonth() + 1 << 21 | g.getDate() << 16 | g.getHours() << 11 | g.getMinutes() << 5 | g.getSeconds() >> 1), t += 4, r != -1 && (T(e, t, n.crc), T(e, t + 4, r < 0 ? -r - 2 : r), T(e, t + 8, n.size)), T(e, t + 12, u), T(e, t + 14, h), t += 16, a != null && (T(e, t, o), T(e, t + 6, n.attrs), T(e, t + 10, a), t += 14), e.set(s, t), t += u, h) for (var b in c) {
407
- var y = c[b], d = y.length;
408
- T(e, t, +b), T(e, t + 2, d), e.set(y, t + 4), t += 4 + d;
404
+ C(e, t, a != null ? 33639248 : 67324752), t += 4, a != null && (e[t++] = 20, e[t++] = n.os), e[t] = 20, t += 2, e[t++] = n.flag << 1 | (r < 0 && 8), e[t++] = i && 8, e[t++] = n.compression & 255, e[t++] = n.compression >> 8;
405
+ var v = new Date(n.mtime == null ? Date.now() : n.mtime), y = v.getFullYear() - 1980;
406
+ if ((y < 0 || y > 119) && K(10), C(e, t, y << 25 | v.getMonth() + 1 << 21 | v.getDate() << 16 | v.getHours() << 11 | v.getMinutes() << 5 | v.getSeconds() >> 1), t += 4, r != -1 && (C(e, t, n.crc), C(e, t + 4, r < 0 ? -r - 2 : r), C(e, t + 8, n.size)), C(e, t + 12, u), C(e, t + 14, h), t += 16, a != null && (C(e, t, o), C(e, t + 6, n.attrs), C(e, t + 10, a), t += 14), e.set(s, t), t += u, h) for (var _ in c) {
407
+ var b = c[_], x = b.length;
408
+ C(e, t, +_), C(e, t + 2, x), e.set(b, t + 4), t += 4 + x;
409
409
  }
410
410
  return o && (e.set(l, t), t += o), t;
411
- }, je = function(e, t, n, s, i) {
412
- T(e, t, 101010256), T(e, t + 8, n), T(e, t + 10, n), T(e, t + 12, s), T(e, t + 16, i);
411
+ }, We = function(e, t, n, s, i) {
412
+ C(e, t, 101010256), C(e, t + 8, n), C(e, t + 10, n), C(e, t + 12, s), C(e, t + 16, i);
413
413
  };
414
- function We(e, t) {
414
+ function Xe(e, t) {
415
415
  t || (t = {});
416
416
  var n = {}, s = [];
417
- Re(e, "", n, t);
417
+ Oe(e, "", n, t);
418
418
  var i = 0, r = 0;
419
419
  for (var a in n) {
420
- var l = n[a], u = l[0], c = l[1], o = c.level == 0 ? 0 : 8, h = le(a), g = h.length, m = c.comment, b = m && le(m), y = b && b.length, d = ce(c.extra);
421
- g > 65535 && K(11);
422
- var k = o ? ze(u, c) : u, _ = k.length, O = He();
423
- O.p(u), s.push($e(c, {
420
+ var l = n[a], u = l[0], c = l[1], o = c.level == 0 ? 0 : 8, h = le(a), v = h.length, y = c.comment, _ = y && le(y), b = _ && _.length, x = ce(c.extra);
421
+ v > 65535 && K(11);
422
+ var f = o ? Ve(u, c) : u, m = f.length, d = Fe();
423
+ d.p(u), s.push(Re(c, {
424
424
  size: u.length,
425
- crc: O.d(),
426
- c: k,
425
+ crc: d.d(),
426
+ c: f,
427
427
  f: h,
428
- m: b,
429
- u: g != a.length || b && m.length != y,
428
+ m: _,
429
+ u: v != a.length || _ && y.length != b,
430
430
  o: i,
431
431
  compression: o
432
- })), i += 30 + g + d + _, r += 76 + 2 * (g + d) + (y || 0) + _;
432
+ })), i += 30 + v + x + m, r += 76 + 2 * (v + x) + (b || 0) + m;
433
433
  }
434
- for (var x = new A(r + 22), E = i, P = r - i, S = 0; S < s.length; ++S) {
435
- var h = s[S];
436
- Se(x, h.o, h, h.f, h.u, h.c.length);
437
- var f = 30 + h.f.length + ce(h.extra);
438
- x.set(h.c, h.o + f), Se(x, i, h, h.f, h.u, h.c.length, h.o, h.m), i += 16 + f + (h.m ? h.m.length : 0);
434
+ for (var S = new E(r + 22), P = i, $ = r - i, w = 0; w < s.length; ++w) {
435
+ var h = s[w];
436
+ Se(S, h.o, h, h.f, h.u, h.c.length);
437
+ var g = 30 + h.f.length + ce(h.extra);
438
+ S.set(h.c, h.o + g), Se(S, i, h, h.f, h.u, h.c.length, h.o, h.m), i += 16 + g + (h.m ? h.m.length : 0);
439
439
  }
440
- return je(x, i, s.length, P, E), x;
440
+ return We(S, i, s.length, $, P), S;
441
441
  }
442
- var xe = 'var squiffyRuntime=(function(kr){Object.defineProperty(kr,Symbol.toStringTag,{value:"Module"});var Go=Object.create,Ms=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor,Qo=Object.getOwnPropertyNames,Jo=Object.getPrototypeOf,Ei=Object.prototype.hasOwnProperty,pe=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),Jt=(e,t)=>{let s={};for(var r in e)Ms(s,r,{get:e[r],enumerable:!0});return t||Ms(s,Symbol.toStringTag,{value:"Module"}),s},Ko=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Qo(t),o=0,n=i.length,a;o<n;o++)a=i[o],!Ei.call(e,a)&&a!==s&&Ms(e,a,{get:(u=>t[u]).bind(null,a),enumerable:!(r=Zo(t,a))||r.enumerable});return e},jo=(e,t,s)=>(s=e!=null?Go(Jo(e)):{},Ko(t||!e||!e.__esModule||!Ei.call(e,"default")?Ms(s,"default",{value:e,enumerable:!0}):s,e));function us(e){"@babel/helpers - typeof";return us=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},us(e)}function ea(e,t){if(us(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(us(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ta(e){var t=ea(e,"string");return us(t)=="symbol"?t:t+""}function Pe(e,t,s){return(t=ta(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function sa(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ra(e,t){sa(e,t),t.add(e)}function Ns(e,t,s){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:s;throw new TypeError("Private element is not present on this object")}var Kt,Ds;function wr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $t=wr();function Ai(e){$t=e}var Ht={exec:()=>null};function qt(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 ce(e,t=""){let s=typeof e=="string"?e:e.source,r={replace:(i,o)=>{let n=typeof o=="string"?o:o.source;return n=n.replace($e.caret,"$1"),s=s.replace(i,n),r},getRegex:()=>new RegExp(s,t)};return r}var Li=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),$e={codeRemoveIndent:/^(?: {0,3}\\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \\t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,leadingSpaceTab:/^[ \\t]+/,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+)[ \\t]*)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \\t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\][ \\t]+\\S/,listReplaceTask:/^\\[[ xX]\\][ \\t]+/,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,numericCharacterReference:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,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:qt(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ ][^\\\\n]*)?(?:\\\\n|$))`)),hrRegex:qt(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\\\*[ ]*){3,})(?:\\\\n+|$)`)),fencesBeginRegex:qt(e=>new RegExp(`^ {0,${e}}(?:\\`\\`\\`|~~~)`)),headingBeginRegex:qt(e=>new RegExp(`^ {0,${e}}#{1,6}(?:\\\\s|$)`)),pedanticHeadingBeginRegex:qt(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:qt(e=>new RegExp(`^ {0,${e}}(?:</?(?:${ps})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)`,"i")),blockquoteBeginRegex:qt(e=>new RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\\d{1,9}[.)])[ \\t]+|>[ \\t]?))+/},ia=/^(?:[ \\t]*(?:\\n|$))+/,na=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,oa=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}(?:(?=`)\\1`*|(?=~)\\1~*) *(?=\\n|$)|$)/,hs=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,aa=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,xr=/ {0,3}(?:[*+-]|\\d{1,9}[.)])/,Ri=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |fences|blockquote|heading|hr|html|table))+?)\\n {0,3}(=+|-+)[ \\t]*(?:\\n+|$)/,Ii=ce(Ri).replace(/bull/g,xr).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(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/\\|table/g,"").getRegex(),la=ce(Ri).replace(/bull/g,xr).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(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/table/g,/ {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/).getRegex(),Tr=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \\t]+\\n)[^\\n]+)*)/,ca=/^[^\\n]+/,Cr=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\\\n]|\\n(?![ \\t]*\\n))+/,ua=ce(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace("label",Cr).replace("title",/(?:"(?:\\\\[\\s\\S]|[^"\\\\])*"|\'(?:\\\\[\\s\\S]|[^\'\\\\\\n]|\\n(?!\\n))*\'|\\((?:\\\\[\\s\\S]|[^()\\\\])*\\))/).getRegex(),ha=ce(/^(bull)([ \\t][^\\n]*?)?(?:\\n|$)/).replace(/bull/g,xr).getRegex(),ps="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",Pr=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,pa=ce("^ {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)(?:[ \\\\t]+|\\\\n|/?>|$)[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$)|</[a-z][a-z0-9-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$))","i").replace("comment",Pr).replace("tag",ps).replace("attribute",/ +[a-zA-Z:_][\\w.:-]*(?: *= *"[^"\\n]*"| *= *\'[^\'\\n]*\'| *= *[^\\s"\'=<>`]+)?/).getRegex(),Oi=e=>ce(Tr).replace("hr",hs).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"," {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)").replace("tag",ps).getRegex(),fa=Oi(/ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/),da=Oi(/ {0,3}(?:[*+-]|\\d{1,9}[.)])(?:[ \\t]|\\n|$)/),Er={blockquote:ce(/^( {0,3}> ?(?:(?![ \\t]*(?:\\n|$))(paragraph)|[^\\n]*)(?:\\n|$))+/).replace("paragraph",da).getRegex(),code:na,def:ua,fences:oa,heading:aa,hr:hs,html:pa,lheading:Ii,list:ha,newline:ia,paragraph:fa,table:Ht,text:ca},Mi=ce("^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)").replace("hr",hs).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"," {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)").replace("tag",ps).getRegex(),ga={...Er,lheading:la,table:Mi,paragraph:ce(Tr).replace("hr",hs).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("|lheading","").replace("table",Mi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\\\t]+[^ \\\\t\\\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)").replace("tag",ps).getRegex()},ma={...Er,html:ce(`^ *(?:comment(?: *\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1>(?: *\\\\n{2,}|\\\\s*$)|<tag(?:"[^"]*"|\'[^\']*\'|\\\\s[^\'"/>\\\\s]*)*?/?>(?: *\\\\n{2,}|\\\\s*$))`).replace("comment",Pr).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:Ht,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:ce(Tr).replace("hr",hs).replace("heading",` *#{1,6} *[^\n]`).replace("lheading",Ii).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},va=/^\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,ya=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,Ni=/^( {2,}|\\\\)\\n(?!\\s*$)[ \\t]*/,ba=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,bt=/[\\p{P}\\p{S}]/u,jt=/[\\s\\p{P}\\p{S}]/u,fs=/[^\\s\\p{P}\\p{S}]/u,_a=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,jt).getRegex(),Sa=/[\\p{Pi}\\p{Ps}"\']/u,Di=/(?!~)[\\p{P}\\p{S}]/u,ka=/(?!~)[\\s\\p{P}\\p{S}]/u,wa=/(?:[^\\s\\p{P}\\p{S}]|~)/u,xa=ce(/link|precode-code|html/,"g").replace("link",/\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)/).replace("precode-",Li?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Bi=/^(?:\\*+(?:((?!\\*)punct)|([^\\s*]))?)|^_+(?:((?!_)punct)|([^\\s_]))?/,Ta=ce(Bi,"u").replace(/punct/g,bt).getRegex(),Ca=ce(Bi,"u").replace(/punct/g,Di).getRegex(),Pa=ce(/^(?:\\*+(?:((?!\\*)(?!openQuote)punct)|([^\\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\\s_]))?/,"u").replace(/openQuote/g,Sa).replace(/punct/g,bt).getRegex(),$i="^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)",Ea=ce($i,"gu").replace(/notPunctSpace/g,fs).replace(/punctSpace/g,jt).replace(/punct/g,bt).getRegex(),Aa=ce($i,"gu").replace(/notPunctSpace/g,wa).replace(/punctSpace/g,ka).replace(/punct/g,Di).getRegex(),La=ce("^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)[\\\\s](\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|(?:(?!\\\\*)punct|notPunctSpace)(\\\\*+)(?!\\\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,fs).replace(/punctSpace/g,jt).replace(/punct/g,bt).getRegex(),Ra=ce("^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fs).replace(/punctSpace/g,jt).replace(/punct/g,bt).getRegex(),Ia=ce("^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\\\s](_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,fs).replace(/punctSpace/g,jt).replace(/punct/g,bt).getRegex(),Oa=ce(/^~~?(?:((?!~)punct)|[^\\s~])/,"u").replace(/punct/g,bt).getRegex(),Ma=ce("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,fs).replace(/punctSpace/g,jt).replace(/punct/g,bt).getRegex(),Na=ce(/\\\\(punct)/,"gu").replace(/punct/g,bt).getRegex(),Da=ce(/(`+)(?:[^`]|[^`][\\s\\S]*?[^`])\\1(?!`)|`+|\\\\(punct)/,"gu").replace(/punct/g,bt).getRegex(),Ba=ce(/^<(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(),$a=ce(Pr).replace("(?:-->|$)","-->").getRegex(),Ha=ce("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>").replace("comment",$a).replace("attribute",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*"[^"]*"|\\s*=\\s*\'[^\']*\'|\\s*=\\s*[^\\s"\'=<>`]+)?/).getRegex(),Hi=/\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]/,Bs=ce(/(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\])|[^\\[\\]\\\\`])*?/).replace("brackets",Hi).getRegex(),qa=ce(/^!?\\[(label)\\]\\([ \\t\\n]*(href)(?:(?:[ \\t]+(?:\\n[ \\t]*)?|\\n[ \\t]*)(title))?[ \\t\\n]*\\)/).replace("label",Bs).replace("href",/<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]+|(?=\\))/).replace("title",/"(?:\\\\[\\s\\S]|[^"\\\\])*"|\'(?:\\\\[\\s\\S]|[^\'\\\\])*\'|\\((?:\\\\[\\s\\S]|[^)\\\\])*\\)/).getRegex(),Fa=ce(/^!?\\[(label)\\]\\[(ref)\\]/).replace("label",Bs).replace("ref",Cr).getRegex(),Va=ce(/^!?\\[(ref)\\](?:\\[\\])?/).replace("ref",Cr).getRegex(),qi=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\]){1,999}/,za=ce(/(?:[^\\[\\]\\\\`]*(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\]))){0,999}?[^\\[\\]\\\\`]*?/).replace("brackets",Hi).getRegex(),Ua=ce("reflink|nolink(?!\\\\()","g").replace("reflink",ce(/^!?\\[(label)\\]\\[(ref)\\]/).replace("label",za).replace("ref",qi).getRegex()).replace("nolink",ce(/^!?\\[(ref)\\](?:\\[\\])?/).replace("ref",qi).getRegex()).getRegex(),Fi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Wa=ce(/(?:mailto:email|xmpp:email(?:\\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),Ar={_backpedal:Ht,anyPunctuation:Na,anyPunctuationOutsideCode:Da,autolink:Ba,blockSkip:xa,br:Ni,code:ya,del:Ht,delLDelim:Ht,delRDelim:Ht,emStrongLDelim:Ta,emStrongRDelimAst:Ea,emStrongRDelimUnd:Ra,escape:va,link:qa,nolink:Va,punctuation:_a,reflink:Fa,reflinkSearch:Ua,tag:Ha,text:ba,url:Ht},Xa={...Ar,emStrongLDelim:Pa,emStrongRDelimAst:La,emStrongRDelimUnd:Ia,link:ce(/^!?\\[(label)\\]\\((.*?)\\)/).replace("label",Bs).getRegex(),reflink:ce(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace("label",Bs).getRegex()},Lr={...Ar,emStrongRDelimAst:Aa,emStrongLDelim:Ca,delLDelim:Oa,delRDelim:Ma,url:ce(/^emailProtocol|^((?:protocol):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/).replace("emailProtocol",Wa).replace("protocol",Fi).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_\'"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_\'"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:ce(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|protocol:\\/\\/|wwwStart|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@))))/).replace("protocol",Fi).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",Li?"(?<![^\\\\s*_~(])www\\\\.":"www\\\\.").getRegex()},Ya={...Lr,br:ce(Ni).replace("{2,}","*").getRegex(),text:ce(Lr.text).replace("\\\\b_","\\\\b_| {2,}\\\\n").replace(/\\{2,\\}/g,"*").getRegex()},$s={normal:Er,gfm:ga,pedantic:ma},ds={normal:Ar,gfm:Lr,breaks:Ya,pedantic:Xa},Ga={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"},Vi=e=>Ga[e];function et(e,t){if(t){if($e.escapeTest.test(e))return e.replace($e.escapeReplace,Vi)}else if($e.escapeTestNoEncode.test(e))return e.replace($e.escapeReplaceNoEncode,Vi);return e}function Za(e){return $e.numericCharacterReference.test(e)?e.replace($e.numericCharacterReferenceOrAmpersand,(t,s,r)=>{if(s===void 0&&r===void 0)return"&amp;";let i=s===void 0?Number.parseInt(r,16):Number.parseInt(s,10);return i===0||i>1114111||i>=55296&&i<=57343?"�":i===38?"&amp;":String.fromCodePoint(i)}):e}function zi(e){try{e=encodeURI(e).replace($e.percentDecode,"%")}catch{return null}return e}function Ui(e,t){let s=e.replace($e.findPipe,(i,o,n)=>{let a=!1,u=o;for(;--u>=0&&n[u]==="\\\\";)a=!a;return a?"|":" |"}).split($e.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($e.slashPipe,"|");return s}function xt(e,t,s){let r=e.length;if(r===0)return"";let i=0;for(;i<r;){let o=e.charAt(r-i-1);if(o===t&&!s)i++;else if(o!==t&&s)i++;else break}return e.slice(0,r-i)}function Wi(e){let t=e.split(`\n`),s=t.length-1;for(;s>=0&&$e.blankLine.test(t[s]);)s--;return t.length-s<=2?e:t.slice(0,s+1).join(`\n`)}function Hs(e){return e.trim().replace($e.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function Xi(e,t){if(e.indexOf(t[0])===-1&&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}var es=new WeakMap;function Rr(e){let t={"*":-1,_:-1},s=-1,r=e.length;for(let i=0;i<r;i++){let o=e[i];if(o!=="*"&&o!=="_"&&o!=="~")continue;let n=i===0?`\n`:e[i-1],a=i+1;for(;a<r&&e[a]===o;)a++;n!==" "&&n!==" "&&n!==`\n`&&n!=="\\r"&&n!=="\\f"&&(o==="~"?s=i:t[o]=i),i=a-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:t,lastPossibleDelCloserIndex:s}}function Qa(e,t){let s=Rr(t),r=es.get(e);r?r.push(s):es.set(e,[s])}function Ja(e){let t=es.get(e);t&&(t.pop(),t.length===0&&es.delete(e))}function Ka(e,t,s){let r=es.get(e)?.at(-1);return r&&r.maskedSrc===t?r.lastPossibleEmStrongCloserIndex[s]:Rr(t).lastPossibleEmStrongCloserIndex[s]}function ja(e,t){let s=es.get(e)?.at(-1);return s&&s.maskedSrc===t?s.lastPossibleDelCloserIndex:Rr(t).lastPossibleDelCloserIndex}function qs(e,t=0){let s=t,r="";for(let i of e)if(i===" "){let o=4-s%4;r+=" ".repeat(o),s+=o}else r+=i,s++;return r}function Yi(e,t,s,r,i){let o=t.href,n=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1"),u=e[0].charAt(0)==="!",h=r.state.inLink,p=r.state.linkEmitted,l=r.state.inRawBlock;r.state.inLink=!0,r.state.linkEmitted=!1;let f=r.inlineTokens(a),c=r.state.linkEmitted;if(r.state.linkEmitted=p,r.state.inLink=h,!u){if(c){r.state.inRawBlock=l;return}r.state.linkEmitted=!0}return{type:u?"image":"link",raw:s,href:o,title:n,text:a,tokens:f}}function el(e,t,s){let r=e.match(s.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`\n`).map(o=>{let n=o.match(s.other.beginningSpace);if(n===null)return o;let[a]=n;return o.slice(Math.min(a.length,i.length))}).join(`\n`)}function Gi(e,t,s,r){if(!t.includes("<"))return!1;for(let i=0;i<t.length;i++){if(t[i]==="\\\\"){i++;continue}if(t[i]==="`"){let a=r.inline.code.exec(t.slice(i));if(a){i+=a[0].length-1;continue}}if(t[i]!=="<")continue;let o=e.slice(s+i),n=r.inline.tag.exec(o)||r.inline.autolink.exec(o);if(n){if(n[0].length>t.length-i)return!0;i+=n[0].length-1}}return!1}var ts=class{constructor(e){Pe(this,"options",void 0),Pe(this,"rules",void 0),Pe(this,"lexer",void 0),this.options=e||$t}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]:Wi(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=el(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=xt(s,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(s=r.trim())}return{type:"heading",raw:xt(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:xt(t[0],`\n`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=xt(t[0],`\n`).split(`\n`),r="",i="",o=[];for(;s.length>0;){let n=!1,a=[],u=0;for(;u<s.length;u++)if(this.rules.other.blockquoteStart.test(s[u]))a.push(s[u]),n=!0;else if(!n)a.push(s[u]);else break;s=s.slice(u);let h=a.join(`\n`),p=h.replace(this.rules.other.blockquoteMarkerWhitespace,(c,d,g)=>d+qs(g,d.length)).replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${h}`:h,i=i?`${i}\n${p}`:p;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=l,s.length===0)break;let f=o.at(-1);if(f?.type==="code"||f?.type==="heading"||f?.type==="hr"||f?.type==="html"||f?.type==="table")break;if(f?.type==="blockquote"){let c=f,d=s.join(`\n`),g=c.raw+`\n`+d.replace(this.rules.other.blockquoteSetextReplace2,""),v=this.blockquote(g);o[o.length-1]=v;let _=g.substring(v.raw.length).replace(/^\\n/,""),S=_?_.split(`\n`).length:0,y=S?s.slice(0,-S):s;if(y.length>0&&(r=`${r}\n${y.join(`\n`)}`),i=i.substring(0,i.length-c.text.length)+v.text,s=s.slice(y.length),s.length>0&&this.rules.other.blockquoteStart.test(s[0]))continue;break}else if(f?.type==="list"){let c=f,d=c.raw+`\n`+s.join(`\n`),g=this.list(d);o[o.length-1]=g;let v=g.raw.length>c.raw.length?d.slice(c.raw.length+1,g.raw.length).split(`\n`).length:0;if(v>0){let _=s.slice(0,v).join(`\n`);r=`${r}\n${_}`,i=`${i}\n${_}`}s=s.slice(v);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){if(!this.options.pedantic&&this.lexer.state.lastToken?.type==="text"&&!this.rules.other.listInterruptsParagraph.test(e))return;let s=e,r=()=>s.length-e.length,i=t[1].trim(),o=i.length>1,n={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\\\d{1,9}\\\\${i.slice(-1)}`:`\\\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),u=!1;for(;e;){let p=!1,l="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;let f=r();e=e.substring(t[0].length);let c=t[2].split(`\n`,1)[0],d=t[1].length,g=this.options.pedantic?qs(c,d):c.replace(this.rules.other.leadingSpaceTab,m=>qs(m,d)),v=e.split(`\n`,1)[0],_=!g.trim(),S=0;if(this.options.pedantic?(S=2,l=g.trimStart()):_?S=d+1:(S=g.search(this.rules.other.nonSpaceChar),S=S>4?1:S,l=g.slice(S),S+=d),_&&this.rules.other.blankLine.test(v)&&(e=e.substring(v.length+1),p=!0),!p){let m=this.rules.other.nextBulletRegex(S),b=this.rules.other.hrRegex(S),k=this.rules.other.fencesBeginRegex(S),w=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(S):this.rules.other.headingBeginRegex(S),A=this.rules.other.htmlBeginRegex(S),O=this.rules.other.blockquoteBeginRegex(S),E=!1;for(;e;){let L=e.split(`\n`,1)[0],P;if(v=L,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),P=v):P=v.replace(this.rules.other.leadingSpaceTab,D=>qs(D)),k.test(v)||w.test(v)||A.test(v)||O.test(v)||m.test(v)||b.test(v))break;if(P.search(this.rules.other.nonSpaceChar)>=S||!v.trim())l+=`\n`+P.slice(S),E=!1;else{if(_||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(g)||w.test(g)||A.test(g)||b.test(g))break;if(!this.options.pedantic&&!E){let B=g.replace(this.rules.other.nestedContainerMarkers,"");if(this.rules.block.fences.test(B)||this.rules.block.heading.test(B)||this.rules.block.hr.test(B))break}let D=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(v)&&this.rules.block.lheading.test(`${g}\n${v}`)?` ${P.replace(/^ {0,3}/,"")}`:v;l+=`\n`+D,E=!0}_=!v.trim(),e=e.substring(L.length+1),g=P.slice(S)}}let y=s.slice(f,r());n.loose||(u?n.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(u=!0)),n.items.push({type:"list_item",raw:y,task:!!this.options.gfm&&this.rules.other.listIsTask.test(l),loose:!1,text:l,tokens:[]})}let h=n.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;n.raw=s.slice(0,r()).trimEnd();for(let p of n.items)if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),!n.loose){let l=p.tokens.filter(f=>f.type==="space");n.loose=l.length>0&&l.some(f=>this.rules.other.anyLine.test(f.raw))}for(let p of n.items){let l=p.tokens[0];if(p.task&&(l?.type==="text"||l?.type==="paragraph")){p.text=p.text.replace(this.rules.other.listReplaceTask,""),l.raw=l.raw.replace(this.rules.other.listReplaceTask,""),l.text=l.text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}let f=this.rules.other.listTaskCheckbox.exec(p.raw);if(f){let c={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};p.checked=c.checked,n.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=c.raw+p.tokens[0].raw,p.tokens[0].text=c.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(c)):p.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):p.tokens.unshift(c)}}else p.task&&(p.task=!1)}if(n.loose)for(let p of n.items){p.loose=!0;for(let l of p.tokens)l.type==="text"&&(l.type="paragraph")}return n}}html(e){let t=this.rules.block.html.exec(e);if(t){let s=Wi(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){if(!this.rules.other.startAngleBracket.test(t[2])&&Xi(t[2],"()")!==-1)return;let s=Hs(t[1]),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:xt(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=Ui(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`\n`):[],o={type:"table",raw:xt(t[0],`\n`),header:[],align:[],rows:[]};if(s.length===r.length){for(let n of r)this.rules.other.tableAlignRight.test(n)?o.align.push("right"):this.rules.other.tableAlignCenter.test(n)?o.align.push("center"):this.rules.other.tableAlignLeft.test(n)?o.align.push("left"):o.align.push(null);for(let n=0;n<s.length;n++)o.header.push({text:s[n],tokens:this.lexer.inline(s[n]),header:!0,align:o.align[n]});for(let n of i)o.rows.push(Ui(n,o.header.length).map((a,u)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[u]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let s=t[1].trim();return{type:"heading",raw:xt(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){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let s=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Gi(e,t[1],s,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=xt(r.slice(0,-1),"\\\\");if((r.length-a.length)%2===0)return}else{let a=Xi(t[2],"()");if(a===-2)return;if(a>-1){let u=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let i=xt(t[0].slice(0,-1),"\\\\");if((t[0].length-i.length)%2===0)return;let o=t[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],n=a[3])}else n=t[3]?t[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?o=o.slice(1):o=o.slice(1,-1)),Yi(t,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.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=s[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Gi(e,s[1],r,this.rules))return;let i=t[Hs(s[2]||s[1])];if(!i){let o=s[0].charAt(0);return{type:"text",raw:o,text:o}}return Yi(s,i,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])return;let i=r[0][0],o=s===i,n=t.length-e.length,a=n;for(;!this.options.pedantic&&a>0&&t[a-1]===i;)a--;let u=[...t.slice(Math.max(0,a-2),a)].at(-1)??"",h=u==="*"||u==="_"||!!this.rules.inline.punctuation.exec(u);a<n&&(s=u);let p=a<n?h:s==="*"||s==="_"||!!this.rules.inline.punctuation.exec(s);if(r[4]&&s.match(this.rules.other.unicodeAlphaNumeric))return;let l=r[1]||r[3]||"";if(!l||!s||p){let f=[...r[0]].length-1,c,d,g=f,v=0,_=n-a+f,S=!this.options.pedantic&&!!u.trim()&&(!!l||i==="*"&&!h);if(i!=="*"&&i!=="_")return;let y=i==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,m=Ka(this,t,i),b=t.length-e.length+f;if(m<b)return;t=t.slice(-1*e.length+f);let k=m-b;for(y.lastIndex=0;(r=y.exec(t))!==null&&!(r.index>k);){if(c=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!c)continue;if(d=[...c].length,r[3]||r[4]){g+=d;continue}else if(r[5]||r[6]||S){if(o&&(r[5]||r[6]))break;if(_%3&&!((_+d)%3)){v+=d;continue}}if(g-=d,g>0)continue;d=Math.min(d,d+g+v);let w=[...r[0]][0].length,A=e.slice(0,f+r.index+w+d);if(Math.min(f,d)%2){let E=A.slice(1,-1);return{type:"em",raw:A,text:E,tokens:this.lexer.inlineTokens(E)}}let O=A.slice(2,-2);return{type:"strong",raw:A,text:O,tokens:this.lexer.inlineTokens(O)}}}}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,o,n,a=i,u=this.rules.inline.delRDelim,h=ja(this,t),p=t.length-e.length+i;if(h<p)return;t=t.slice(-1*e.length+i);let l=h-p;for(u.lastIndex=0;(r=u.exec(t))!==null&&!(r.index>l);){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o||(n=[...o].length,n!==i))continue;if(r[3]||r[4]){a+=n;continue}if(a-=n,a>0)continue;n=Math.min(n,n+a);let f=[...r[0]][0].length,c=e.slice(0,i+r.index+f+n),d=c.slice(i,-i);return{type:"del",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}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,autolink:!0,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,autolink:!0,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:s?t[0]:Za(t[0]),escaped:s}}}},ft=(Kt=new WeakSet,class Ci{constructor(t){ra(this,Kt),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||$t,this.options.tokenizer=this.options.tokenizer||new ts,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let s={other:$e,block:$s.normal,inline:ds.normal};this.options.pedantic?(s.block=$s.pedantic,s.inline=ds.pedantic):this.options.gfm&&(s.block=$s.gfm,this.options.breaks?s.inline=ds.breaks:s.inline=ds.gfm),this.tokenizer.rules=s}static get rules(){return{block:$s,inline:ds}}static lex(t,s){return new Ci(s).lex(t)}static lexInline(t,s){return new Ci(s).inlineTokens(t)}lex(t){t=t.replace($e.carriageReturn,`\n`),this.blockTokens(t,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let r=this.inlineQueue[s];this.state.inRawBlock=!1,this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,s=[],r=!1){this.tokenizer.lexer=this;let i=this.state.lastToken;this.options.pedantic&&(t=t.replace($e.tabCharGlobal," ").replace($e.spaceLine,""));let o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}this.state.lastToken=s.at(-1);let n;if(this.options.extensions?.block?.some(u=>(n=u.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 u=s.at(-1);n.raw.length===1&&u!==void 0?u.raw+=`\n`:s.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let u=s.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`\n`)?"":`\n`)+n.raw,u.text+=`\n`+n.text,this.inlineQueue.at(-1).src=u.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 u=s.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`\n`)?"":`\n`)+n.raw,u.text+=`\n`+n.raw,this.inlineQueue.at(-1).src=u.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 a=t;if(this.options.extensions?.startBlock){let u=1/0,h=t.slice(1),p;this.options.extensions.startBlock.forEach(l=>{p=l.call({lexer:this},h),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(a=t.substring(0,u+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let u=s.at(-1);r&&u?.type==="paragraph"?(u.raw+=(u.raw.endsWith(`\n`)?"":`\n`)+n.raw,u.text+=`\n`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):s.push(n),r=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let u=s.at(-1);u?.type==="text"?(u.raw+=(u.raw.endsWith(`\n`)?"":`\n`)+n.raw,u.text+=`\n`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):s.push(n);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=i,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],o=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Hs(i.slice(o+1,-1))))&&!(o>1&&this.linkInText(i.slice(1,o-1))))return!0}return!1}inlineTokens(t,s=[]){this.tokenizer.lexer=this;let r=this.state.linkParenPossible;this.state.linkParenPossible=r&&t.includes(")");try{return Ns(Kt,this,tl).call(this,t,s)}finally{this.state.linkParenPossible=r}}infiniteLoopError(t){let s="Infinite loop on byte: "+t;if(this.options.silent)console.error(s);else throw new Error(s)}});function tl(e,t){let s=e.includes("*")||e.includes("_")||e.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==ts.prototype.emStrong||this.tokenizer.del!==ts.prototype.del?Ns(Kt,this,il).call(this,e):e;Qa(this.tokenizer,s);try{return Ns(Kt,this,sl).call(this,e,s,t)}finally{Ja(this.tokenizer)}}function sl(e,t,s){let r=!1,i="",o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let n;if(this.options.extensions?.inline?.some(u=>(n=u.call({lexer:this},e,s))?(e=e.substring(n.raw.length),s.push(n),!0):!1))continue;if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let u=s.at(-1);n.type==="text"&&u?.type==="text"?(u.raw+=n.raw,u.text+=n.text):s.push(n);continue}if(n=this.tokenizer.emStrong(e,t,i)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.del(e,t,i)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),s.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),s.push(n);continue}let a=e;if(this.options.extensions?.startInline){let u=1/0,h=e.slice(1),p;this.options.extensions.startInline.forEach(l=>{p=l.call({lexer:this},h),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(a=e.substring(0,u+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(i=n.raw.slice(-1)),r=!0;let u=s.at(-1);u?.type==="text"?(u.raw+=n.raw,u.text+=n.text):s.push(n);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return s}function rl(e){let{blockSkip:t,tag:s,autolink:r}=this.tokenizer.rules.inline,i="",o=0,n;for(t.lastIndex=0;n=t.exec(e);){let a=n.index+(n[2]?n[2].length:0),u=n.index+n[0].length;if(e.charAt(a)==="<"){let h=e.slice(a),p=s.exec(h)||r.exec(h);if(!p){t.lastIndex=a+1;continue}u=a+p[0].length,t.lastIndex=u}i+=e.slice(o,a)+"["+"a".repeat(u-a-2)+"]",o=u}return i+e.slice(o)}function il(e){let t=e;if(this.tokens.links&&e.includes("[")){let s=this.tokenizer.rules.inline.reflinkSearch,r=i=>{let o=i.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Hs(i.slice(o+1,-1))))return i;if(o>1&&i.charAt(0)!=="!"){let n=i.slice(1,o-1);if(this.linkInText(n))return"["+n.replace(s,r)+"]["+"a".repeat(i.length-o-2)+"]"}return"["+"a".repeat(i.length-2)+"]"};t=t.replace(s,r)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(s,r,i)=>i?"+".repeat(s.length):r?r+s.slice(r.length,-r.length).replace(/`/g,"+")+r:s),t=Ns(Kt,this,rl).call(this,t),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}var Fs=class{constructor(e){Pe(this,"options",void 0),Pe(this,"parser",void 0),this.options=e||$t}space(e){return""}code({text:e,lang:t,escaped:s}){let r=(t||"").match($e.notSpaceStart)?.[0],i=e?e.replace($e.endingNewline,"")+`\n`:"";return r?\'<pre><code class="language-\'+et(r)+\'">\'+(s?i:et(i,!0))+`</code></pre>\n`:"<pre><code>"+(s?i:et(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 n=0;n<e.items.length;n++){let a=e.items[n];r+=this.listitem(a)}let i=t?"ol":"ul",o=t&&s!==1?\' start="\'+s+\'"\':"";return"<"+i+o+`>\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 o=e.rows[i];s="";for(let n=0;n<o.length;n++)s+=this.tablecell(o[n]);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>${et(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:s,tokens:r,autolink:i}){let o=i?et(s,!0):this.parser.parseInline(r),n=zi(e);if(n===null)return o;e=et(n,i);let a=\'<a href="\'+e+\'"\';return t&&(a+=\' title="\'+et(t)+\'"\'),a+=">"+o+"</a>",a}image({href:e,title:t,text:s,tokens:r}){r&&(s=this.parser.parseInline(r,this.parser.textRenderer));let i=zi(e);if(i===null)return et(s);e=i;let o=`<img src="${et(e)}" alt="${et(s)}"`;return t&&(o+=` title="${et(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:et(e.text)}},Ir=class{constructor(){Pe(this,"parser",void 0)}strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`\n`}checkbox({raw:e}){return e}},dt=class Pi{constructor(t){Pe(this,"options",void 0),Pe(this,"renderer",void 0),Pe(this,"textRenderer",void 0),this.options=t||$t,this.options.renderer=this.options.renderer||new Fs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ir,this.textRenderer.parser=this}static parse(t,s){return new Pi(s).parse(t)}static parseInline(t,s){return new Pi(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 n=i,a=this.options.extensions.renderers[n.type].call({parser:this},n);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(n.type)){s+=a===!1?"":a??"";continue}}let o=i;switch(o.type){case"space":s+=this.renderer.space(o);break;case"hr":s+=this.renderer.hr(o);break;case"heading":s+=this.renderer.heading(o);break;case"code":s+=this.renderer.code(o);break;case"table":s+=this.renderer.table(o);break;case"blockquote":s+=this.renderer.blockquote(o);break;case"list":s+=this.renderer.list(o);break;case"checkbox":s+=this.renderer.checkbox(o);break;case"html":s+=this.renderer.html(o);break;case"def":s+=this.renderer.def(o);break;case"paragraph":s+=this.renderer.paragraph(o);break;case"text":s+=this.renderer.text(o);break;default:{let n=\'Token with "\'+o.type+\'" type was not found.\';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return s}parseInline(t,s=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(o.type)){r+=a===!1?"":a??"";continue}}let n=o;switch(n.type){case"escape":r+=s.text(n);break;case"html":r+=s.html(n);break;case"link":r+=s.link(n);break;case"image":r+=s.image(n);break;case"checkbox":r+=s.checkbox(n);break;case"strong":r+=s.strong(n);break;case"em":r+=s.em(n);break;case"codespan":r+=s.codespan(n);break;case"br":r+=s.br(n);break;case"del":r+=s.del(n);break;case"text":r+=s.text(n);break;default:{let a=\'Token with "\'+n.type+\'" type was not found.\';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}},gs=(Ds=class{constructor(e){Pe(this,"options",void 0),Pe(this,"block",void 0),this.options=e||$t}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ft.lex:ft.lexInline}provideParser(e=this.block){return e?dt.parse:dt.parseInline}},Pe(Ds,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Pe(Ds,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ds);function Lt(e,t){if(Array.isArray(t))for(let s=0;s<t.length;s++)e.push(t[s]);else e.push(t)}var nl=class{constructor(...e){Pe(this,"defaults",wr()),Pe(this,"options",this.setOptions),Pe(this,"parse",this.parseMarkdown(!0)),Pe(this,"parseInline",this.parseMarkdown(!1)),Pe(this,"Parser",dt),Pe(this,"Renderer",Fs),Pe(this,"TextRenderer",Ir),Pe(this,"Lexer",ft),Pe(this,"Tokenizer",ts),Pe(this,"Hooks",gs),this.use(...e)}walkTokens(e,t){let s=[];for(let r of e)switch(Lt(s,t.call(this,r)),r.type){case"table":{let i=r;for(let o of i.header)Lt(s,this.walkTokens(o.tokens,t));for(let o of i.rows)for(let n of o)Lt(s,this.walkTokens(n.tokens,t));break}case"list":{let i=r;Lt(s,this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(o=>{let n=i[o].flat(1/0);Lt(s,this.walkTokens(n,t))}):i.tokens&&Lt(s,this.walkTokens(i.tokens,t))}}return s}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};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 o=t.renderers[i.name];o?t.renderers[i.name]=function(...n){let a=i.renderer.apply(this,n);return a===!1&&(a=o.apply(this,n)),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 o=t[i.level];o?o.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 Fs(this.defaults);for(let o in s.renderer){if(!(o in i))throw new Error(`renderer \'${o}\' does not exist`);if(["options","parser"].includes(o))continue;let n=o,a=s.renderer[n],u=i[n];i[n]=(...h)=>{let p=a.apply(i,h);return p===!1&&(p=u.apply(i,h)),p===!1?"":p??""}}r.renderer=i}if(s.tokenizer){let i=this.defaults.tokenizer||new ts(this.defaults);for(let o in s.tokenizer){if(!(o in i))throw new Error(`tokenizer \'${o}\' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,a=s.tokenizer[n],u=i[n];i[n]=(...h)=>{let p=a.apply(i,h);return p===!1&&(p=u.apply(i,h)),p}}r.tokenizer=i}if(s.hooks){let i=this.defaults.hooks||new gs;for(let o in s.hooks){if(!(o in i))throw new Error(`hook \'${o}\' does not exist`);if(["options","block"].includes(o))continue;let n=o,a=s.hooks[n],u=i[n];gs.passThroughHooks.has(o)?i[n]=h=>{if(i.options.async&&gs.passThroughHooksRespectAsync.has(o))return(async()=>{let l=await a.call(i,h);return u.call(i,l)})();let p=a.call(i,h);return u.call(i,p)}:i[n]=(...h)=>{if(i.options.async)return(async()=>{let l=await a.apply(i,h);return l===!1&&(l=await u.apply(i,h)),l})();let p=a.apply(i,h);return p===!1&&(p=u.apply(i,h)),p}}r.hooks=i}if(s.walkTokens){let i=this.defaults.walkTokens,o=s.walkTokens;r.walkTokens=function(n){let a=[];return Lt(a,o.call(this,n)),i&&Lt(a,i.call(this,n)),a}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ft.lex(e,t??this.defaults)}parser(e,t){return dt.parse(e,t??this.defaults)}parseMarkdown(e){return(t,s)=>{let r={...s},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.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 t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(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 n=i.hooks?await i.hooks.preprocess(t):t,a=await(i.hooks?await i.hooks.provideLexer(e):e?ft.lex:ft.lexInline)(n,i),u=i.hooks?await i.hooks.processAllTokens(a):a;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let h=await(i.hooks?await i.hooks.provideParser(e):e?dt.parse:dt.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(h):h})().catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?ft.lex:ft.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let a=(i.hooks?i.hooks.provideParser(e):e?dt.parse:dt.parseInline)(n,i);return i.hooks&&(a=i.hooks.postprocess(a)),a}catch(n){return o(n)}}}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>"+et(s.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(s);throw s}}},Ft=new nl;function Ee(e,t){return Ft.parse(e,t)}Ee.options=Ee.setOptions=function(e){return Ft.setOptions(e),Ee.defaults=Ft.defaults,Ai(Ee.defaults),Ee},Ee.getDefaults=wr,Ee.defaults=$t;function ol(...e){return Ft.use(...e),Ee.defaults=Ft.defaults,Ai(Ee.defaults),Ee}Ee.use=ol,Ee.walkTokens=function(e,t){return Ft.walkTokens(e,t)},Ee.parseInline=Ft.parseInline,Ee.Parser=dt,Ee.parser=dt.parse,Ee.Renderer=Fs,Ee.TextRenderer=Ir,Ee.Lexer=ft,Ee.lexer=ft.lex,Ee.Tokenizer=ts,Ee.Hooks=gs,Ee.parse=Ee;var Mu=Ee.options,Nu=Ee.setOptions,Du=Ee.walkTokens,Or=Ee.parseInline,Mr=Ee,Bu=dt.parse,$u=ft.lex,Xe=pe((e=>{e.__esModule=!0,e.extend=o,e.indexOf=h,e.escapeExpression=p,e.isEmpty=l,e.createFrame=f,e.blockParams=c,e.appendContextPath=d;var t={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;","=":"&#x3D;"},s=/[&<>"\'`=]/g,r=/[&<>"\'`=]/;function i(g){return t[g]}function o(g){for(var v=1;v<arguments.length;v++)for(var _ in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],_)&&(g[_]=arguments[v][_]);return g}var n=Object.prototype.toString;e.toString=n;var a=function(v){return typeof v=="function"};a(/x/)&&(e.isFunction=a=function(g){return typeof g=="function"&&n.call(g)==="[object Function]"}),e.isFunction=a;var u=Array.isArray||function(g){return g&&typeof g=="object"?n.call(g)==="[object Array]":!1};e.isArray=u;function h(g,v){for(var _=0,S=g.length;_<S;_++)if(g[_]===v)return _;return-1}function p(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:!!(u(g)&&g.length===0)}function f(g){var v=o({},g);return v._parent=g,v}function c(g,v){return g.path=v,g}function d(g,v){return(g?g+".":"")+v}})),gt=pe(((e,t)=>{e.__esModule=!0;var s=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(i,o){var n=o&&o.loc,a=void 0,u=void 0,h=void 0,p=void 0;n&&n.start&&(a=n.start.line,h=n.start.column,n.end&&(u=n.end.line,p=n.end.column),i+=" - "+a+":"+h);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{n&&(this.lineNumber=a,this.endLineNumber=u,Object.defineProperty?(Object.defineProperty(this,"column",{value:h,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:p,enumerable:!0})):(this.column=h,this.endColumn=p))}catch{}}r.prototype=new Error,e.default=r,t.exports=e.default})),al=pe(((e,t)=>{e.__esModule=!0;var s=Xe();e.default=function(r){r.registerHelper("blockHelperMissing",function(i,o){var n=o.inverse,a=o.fn;if(i===!0)return a(this);if(i===!1||i==null)return n(this);if(s.isArray(i))return i.length>0?(o.ids&&(o.ids=[o.name]),r.helpers.each(i,o)):n(this);if(o.data&&o.ids){var u=s.createFrame(o.data);u.contextPath=s.appendContextPath(o.data.contextPath,o.name),o={data:u}}return a(i,o)})},t.exports=e.default})),ll=pe(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=Xe(),i=s(gt());function o(n){try{var a=n.return;r.isFunction(a)&&a.call(n)}catch{}}e.default=function(n){n.registerHelper("each",function(a,u){if(!u)throw new i.default("Must pass iterator to #each");var h=u.fn,p=u.inverse,l=0,f="",c=void 0,d=void 0;u.data&&u.ids&&(d=r.appendContextPath(u.data.contextPath,u.ids[0])+"."),r.isFunction(a)&&(a=a.call(this)),u.data&&(c=r.createFrame(u.data));function g(m,b,k,w){c&&(c.key=m,c.index=b,c.first=b===0,c.last=!!k,d&&(c.contextPath=d+m)),f=f+h(w,{data:c,blockParams:r.blockParams([w,m],[d+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 _=a[Symbol.iterator](),S=_.next();!S.done;){var y=_.next();try{g(l,l,y.done,S.value)}catch(m){throw y.done||o(_),m}S=y,l++}else(function(){var m=void 0;Object.keys(a).forEach(function(b){m!==void 0&&g(m,l-1,!1,a[m]),m=b,l++}),m!==void 0&&g(m,l-1,!0,a[m])})();return l===0&&(f=p(this)),f})},t.exports=e.default})),cl=pe(((e,t)=>{e.__esModule=!0;function s(i){return i&&i.__esModule?i:{default:i}}var r=s(gt());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})),ul=pe(((e,t)=>{e.__esModule=!0;function s(o){return o&&o.__esModule?o:{default:o}}var r=Xe(),i=s(gt());e.default=function(o){o.registerHelper("if",function(n,a){if(arguments.length!=2)throw new i.default("#if requires exactly one argument");return r.isFunction(n)&&(n=n.call(this)),!a.hash.includeZero&&!n||r.isEmpty(n)?a.inverse(this):a.fn(this)}),o.registerHelper("unless",function(n,a){if(arguments.length!=2)throw new i.default("#unless requires exactly one argument");return o.helpers.if.call(this,n,{fn:a.inverse,inverse:a.fn,hash:a.hash})})},t.exports=e.default})),hl=pe(((e,t)=>{e.__esModule=!0,e.default=function(s){s.registerHelper("log",function(){for(var r=[void 0],i=arguments[arguments.length-1],o=0;o<arguments.length-1;o++)r.push(arguments[o]);var n=1;i.hash.level!=null?n=i.hash.level:i.data&&i.data.level!=null&&(n=i.data.level),r[0]=n,s.log.apply(s,r)})},t.exports=e.default})),pl=pe(((e,t)=>{e.__esModule=!0,e.default=function(s){s.registerHelper("lookup",function(r,i,o){return r&&o.lookupProperty(r,i)})},t.exports=e.default})),fl=pe(((e,t)=>{e.__esModule=!0;function s(o){return o&&o.__esModule?o:{default:o}}var r=Xe(),i=s(gt());e.default=function(o){o.registerHelper("with",function(n,a){if(arguments.length!=2)throw new i.default("#with requires exactly one argument");r.isFunction(n)&&(n=n.call(this));var u=a.fn;if(r.isEmpty(n))return a.inverse(this);var h=a.data;return a.data&&a.ids&&(h=r.createFrame(a.data),h.contextPath=r.appendContextPath(a.data.contextPath,a.ids[0])),u(n,{data:h,blockParams:r.blockParams([n],[h&&h.contextPath])})})},t.exports=e.default})),Zi=pe((e=>{e.__esModule=!0,e.registerDefaultHelpers=h,e.moveHelperToHooks=p;function t(l){return l&&l.__esModule?l:{default:l}}var s=t(al()),r=t(ll()),i=t(cl()),o=t(ul()),n=t(hl()),a=t(pl()),u=t(fl());function h(l){s.default(l),r.default(l),i.default(l),o.default(l),n.default(l),a.default(l),u.default(l)}function p(l,f,c){l.helpers[f]&&(l.hooks[f]=l.helpers[f],c||(l.helpers[f]=void 0))}})),dl=pe(((e,t)=>{e.__esModule=!0;var s=Xe();e.default=function(r){r.registerDecorator("inline",function(i,o,n,a){var u=i;return o.partials||(o.partials={},u=function(h,p){var l=n.partials;n.partials=s.extend({},l,o.partials);var f=i(h,p);return n.partials=l,f}),o.partials[a.args[0]]=a.fn,u})},t.exports=e.default})),gl=pe((e=>{e.__esModule=!0,e.registerDefaultDecorators=r;function t(i){return i&&i.__esModule?i:{default:i}}var s=t(dl());function r(i){s.default(i)}})),Qi=pe(((e,t)=>{e.__esModule=!0;var s=Xe(),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(o){if(typeof o=="string"){var n=s.indexOf(r.methodMap,o.toLowerCase());n>=0?o=n:o=parseInt(o,10)}return o},log:function(o){if(o=r.lookupLevel(o),typeof console<"u"&&r.lookupLevel(r.level)<=o){var n=r.methodMap[o];console[n]||(n="log");for(var a=arguments.length,u=Array(a>1?a-1:0),h=1;h<a;h++)u[h-1]=arguments[h];console[n].apply(console,u)}}};e.default=r,t.exports=e.default})),Ji=pe((e=>{e.__esModule=!0,e.createProtoAccessControl=o,e.resultIsAllowed=n,e.isPrototypeConstructor=a,e.resetLoggedProperties=p;function t(l){return l&&l.__esModule?l:{default:l}}var s=Xe(),r=t(Qi()),i=Object.create(null);function o(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 n(l,f,c){return u(typeof l=="function"?f.methods:f.properties,c)}function a(l,f,c){return f==="constructor"&&typeof c=="function"&&l===c.prototype}function u(l,f){return l.whitelist[f]!==void 0?l.whitelist[f]===!0:l.defaultValue!==void 0?l.defaultValue:(h(f),!1)}function h(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 p(){Object.keys(i).forEach(function(l){delete i[l]})}})),Nr=pe((e=>{e.__esModule=!0,e.HandlebarsEnvironment=c;function t(g){return g&&g.__esModule?g:{default:g}}var s=Xe(),r=t(gt()),i=Zi(),o=gl(),n=t(Qi()),a=Ji(),u="4.7.10";e.VERSION=u;var h=8;e.COMPILER_REVISION=h;var p=7;e.LAST_COMPATIBLE_COMPILER_REVISION=p;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,_){this.helpers=g||{},this.partials=v||{},this.decorators=_||{},i.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}c.prototype={constructor:c,logger:n.default,log:n.default.log,registerHelper:function(v,_){if(s.toString.call(v)===f){if(_)throw new r.default("Arg not supported with multiple helpers");s.extend(this.helpers,v)}else this.helpers[v]=_},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,_){if(s.toString.call(v)===f)s.extend(this.partials,v);else{if(typeof _>"u")throw new r.default(\'Attempting to register a partial called "\'+v+\'" as undefined\');this.partials[v]=_}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,_){if(s.toString.call(v)===f){if(_)throw new r.default("Arg not supported with multiple decorators");s.extend(this.decorators,v)}else this.decorators[v]=_},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){a.resetLoggedProperties()}};var d=n.default.log;e.log=d,e.createFrame=s.createFrame,e.logger=n.default})),ml=pe(((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})),vl=pe((e=>{e.__esModule=!0,e.wrapHelper=t;function t(s,r){return typeof s!="function"?s:function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=r(o),s.apply(this,arguments)}}})),yl=pe((e=>{e.__esModule=!0,e.checkRevision=h,e.template=p,e.wrapProgram=l,e.resolvePartial=f,e.invokePartial=c,e.noop=d;function t(m){return m&&m.__esModule?m:{default:m}}function s(m){if(m&&m.__esModule)return m;var b={};if(m!=null)for(var k in m)Object.prototype.hasOwnProperty.call(m,k)&&(b[k]=m[k]);return b.default=m,b}var r=s(Xe()),i=t(gt()),o=Nr(),n=Zi(),a=vl(),u=Ji();function h(m){var b=m&&m[0]||1,k=o.COMPILER_REVISION;if(!(b>=o.LAST_COMPATIBLE_COMPILER_REVISION&&b<=o.COMPILER_REVISION))if(b<o.LAST_COMPATIBLE_COMPILER_REVISION){var w=o.REVISION_CHANGES[k],A=o.REVISION_CHANGES[b];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 ("+A+").")}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 p(m,b){if(!b)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,b.VM.checkRevision(m.compiler);var k=m.compiler&&m.compiler[0]===7;function w(E,L,P){P.hash&&(L=r.extend({},L,P.hash),P.ids&&(P.ids[0]=!0)),E=b.VM.resolvePartial.call(this,E,L,P),P.hooks=this.hooks,P.protoAccessControl=this.protoAccessControl;var D=b.VM.invokePartial.call(this,E,L,P);if(D==null&&r.isFunction(E))throw new i.default("The partial "+P.name+" returned no output: partials must return a string");if(D==null&&b.compile){if(typeof E!="string")throw new i.default("The partial "+P.name+" could not be compiled: partials must be strings or functions returning strings");P.partials[P.name]=b.compile(E,m.compilerOptions,b),D=P.partials[P.name](L,P)}if(D!=null){if(P.indent){for(var B=D.split(`\n`),V=0,x=B.length;V<x&&!(!B[V]&&V+1===x);V++)B[V]=P.indent+B[V];D=B.join(`\n`)}return D}else throw new i.default("The partial "+P.name+" could not be compiled when running in runtime-only mode")}var A={strict:function(L,P,D){if(!L||!(P in L))throw new i.default(\'"\'+P+\'" not defined in \'+L,{loc:D});return A.lookupProperty(L,P)},lookupProperty:function(L,P){var D=L[P];if(D==null||Object.prototype.hasOwnProperty.call(L,P)&&!u.isPrototypeConstructor(L,P,D)||u.resultIsAllowed(D,A.protoAccessControl,P))return D},lookup:function(L,P){for(var D=L.length,B=0;B<D;B++){var V=L[B]&&A.lookupProperty(L[B],P);if(V!=null)return V}},lambda:function(L,P){return typeof L=="function"?L.call(P):L},escapeExpression:r.escapeExpression,invokePartial:w,fn:function(L){var P=m[L];return P.decorator=m[L+"_d"],P},programs:[],program:function(L,P,D,B,V){var x=this.programs[L],N=this.fn(L);return P||V||B||D?x=l(this,L,N,P,D,B,V):x||(x=this.programs[L]=l(this,L,N)),x},data:function(L,P){for(;L&&P--;)L=L._parent;return L},mergeIfNeeded:function(L,P){var D=L||P;return L&&P&&L!==P&&(D=r.extend({},P,L)),D},nullContext:Object.seal({}),noop:b.VM.noop,compilerInfo:m.compiler};function O(E){var L=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],P=L.data;O._setup(L),!L.partial&&m.useData&&(P=v(E,P));var D=void 0,B=m.useBlockParams?[]:void 0;m.useDepths&&(L.depths?D=E!=L.depths[0]?[E].concat(L.depths):L.depths:D=[E]);function V(x){return""+m.main(A,x,A.helpers,A.partials,P,B,D)}return V=_(m.main,V,A,L.depths||[],P,B),V(E,L)}return O.isTop=!0,O._setup=function(E){if(E.partial)A.protoAccessControl=E.protoAccessControl,A.helpers=E.helpers,A.partials=E.partials,A.decorators=E.decorators,A.hooks=E.hooks;else{var L={};S(L,b.helpers,A),S(L,E.helpers,A),A.helpers=L,m.usePartial&&(A.partials=A.mergeIfNeeded(E.partials,b.partials)),(m.usePartial||m.useDecorators)&&(A.decorators=r.extend({},b.decorators,E.decorators)),A.hooks={},A.protoAccessControl=u.createProtoAccessControl(E);var P=E.allowCallsToHelperMissing||k;n.moveHelperToHooks(A,"helperMissing",P),n.moveHelperToHooks(A,"blockHelperMissing",P)}},O._child=function(E,L,P,D){if(m.useBlockParams&&!P)throw new i.default("must pass block params");if(m.useDepths&&!D)throw new i.default("must pass parent depths");return l(A,E,m[E],L,0,P,D)},O}function l(m,b,k,w,A,O,E){function L(P){var D=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],B=E;return E&&P!=E[0]&&!(P===m.nullContext&&E[0]===null)&&(B=[P].concat(E)),k(m,P,m.helpers,m.partials,D.data||w,O&&[D.blockParams].concat(O),B)}return L=_(k,L,m,E,w,O),L.program=b,L.depth=E?E.length:0,L.blockParams=A||0,L}function f(m,b,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,b,k){var w=g(k.data,"partial-block");k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var A=void 0;if(k.fn&&k.fn!==d&&(function(){k.data=o.createFrame(k.data);var O=k.fn;A=k.data["partial-block"]=function(L){var P=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return P.data=o.createFrame(P.data),P.data["partial-block"]=w,O(L,P)},O.partials&&(k.partials=r.extend({},k.partials,O.partials))})(),m===void 0&&A&&(m=A),m===void 0)throw new i.default("The partial "+k.name+" could not be found");if(m instanceof Function)return m(b,k)}function d(){return""}function g(m,b){if(m&&Object.prototype.hasOwnProperty.call(m,b))return m[b]}function v(m,b){return(!b||!("root"in b))&&(b=b?o.createFrame(b):{},b.root=m),b}function _(m,b,k,w,A,O){if(m.decorator){var E={};b=m.decorator(b,E,k,w&&w[0],A,O,w),r.extend(b,E)}return b}function S(m,b,k){b&&Object.keys(b).forEach(function(w){var A=b[w];m[w]=y(A,k)})}function y(m,b){var k=b.lookupProperty;return a.wrapHelper(m,function(w){return w.lookupProperty=k,w})}})),Ki=pe(((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})),bl=pe(((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 d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d]);return c.default=f,c}var i=r(Nr()),o=s(ml()),n=s(gt()),a=r(Xe()),u=r(yl()),h=s(Ki());function p(){var f=new i.HandlebarsEnvironment;return a.extend(f,i),f.SafeString=o.default,f.Exception=n.default,f.Utils=a,f.escapeExpression=a.escapeExpression,f.VM=u,f.template=function(c){return u.template(c,f)},f}var l=p();l.create=p,h.default(l),l.default=l,e.default=l,t.exports=e.default})),ji=pe(((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})),_l=pe(((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(n,a,u,h,p,l,f){var c=l.length-1;switch(p){case 1:return l[c-1];case 2:this.$=h.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:h.stripComment(l[c]),strip:h.stripFlags(l[c],l[c]),loc:h.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[c],value:l[c],loc:h.locInfo(this._$)};break;case 11:this.$=h.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.$=h.prepareBlock(l[c-3],l[c-2],l[c-1],l[c],!1,this._$);break;case 14:this.$=h.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:h.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:h.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:h.stripFlags(l[c-5],l[c])};break;case 18:this.$={strip:h.stripFlags(l[c-1],l[c-1]),program:l[c]};break;case 19:var d=h.prepareBlock(l[c-2],l[c-1],l[c],l[c],!1,this._$),g=h.prepareProgram([d],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:h.stripFlags(l[c-2],l[c])};break;case 22:this.$=h.prepareMustache(l[c-3],l[c-2],l[c-1],l[c-4],h.stripFlags(l[c-4],l[c]),this._$);break;case 23:this.$=h.prepareMustache(l[c-3],l[c-2],l[c-1],l[c-4],h.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:h.stripFlags(l[c-4],l[c]),loc:h.locInfo(this._$)};break;case 25:this.$=h.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:h.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:h.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[c],loc:h.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:h.id(l[c-2]),value:l[c],loc:h.locInfo(this._$)};break;case 32:this.$=h.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:h.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[c]),original:Number(l[c]),loc:h.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[c]==="true",original:l[c]==="true",loc:h.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:h.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:h.locInfo(this._$)};break;case 40:this.$=l[c];break;case 41:this.$=l[c];break;case 42:this.$=h.preparePath(!0,l[c],this._$);break;case 43:this.$=h.preparePath(!1,l[c],this._$);break;case 44:l[c-2].push({part:h.id(l[c]),original:l[c],separator:l[c-1]}),this.$=l[c-2];break;case 45:this.$=[{part:h.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(n,a){throw new Error(n)},parse:function(n){var a=this,u=[0],h=[null],p=[],l=this.table,f="",c=0,d=0,g=0;this.lexer.setInput(n),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;p.push(v);var _=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function S(){var B=a.lexer.lex()||1;return typeof B!="number"&&(B=a.symbols_[B]||B),B}for(var y,m,b,k,w,A={},O,E,L,P;;){if(b=u[u.length-1],this.defaultActions[b]?k=this.defaultActions[b]:((y===null||typeof y>"u")&&(y=S()),k=l[b]&&l[b][y]),typeof k>"u"||!k.length||!k[0]){var D="";if(!g){P=[];for(O in l[b])this.terminals_[O]&&O>2&&P.push("\'"+this.terminals_[O]+"\'");this.lexer.showPosition?D="Parse error on line "+(c+1)+`:\n`+this.lexer.showPosition()+`\nExpecting `+P.join(", ")+", got \'"+(this.terminals_[y]||y)+"\'":D="Parse error on line "+(c+1)+": Unexpected "+(y==1?"end of input":"\'"+(this.terminals_[y]||y)+"\'"),this.parseError(D,{text:this.lexer.match,token:this.terminals_[y]||y,line:this.lexer.yylineno,loc:v,expected:P})}}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(k[0]){case 1:u.push(y),h.push(this.lexer.yytext),p.push(this.lexer.yylloc),u.push(k[1]),y=null,m?(y=m,m=null):(d=this.lexer.yyleng,f=this.lexer.yytext,c=this.lexer.yylineno,v=this.lexer.yylloc,g>0&&g--);break;case 2:if(E=this.productions_[k[1]][1],A.$=h[h.length-E],A._$={first_line:p[p.length-(E||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(E||1)].first_column,last_column:p[p.length-1].last_column},_&&(A._$.range=[p[p.length-(E||1)].range[0],p[p.length-1].range[1]]),w=this.performAction.call(A,f,d,c,this.yy,k[1],h,p),typeof w<"u")return w;E&&(u=u.slice(0,-1*E*2),h=h.slice(0,-1*E),p=p.slice(0,-1*E)),u.push(this.productions_[k[1]][0]),h.push(A.$),p.push(A._$),L=l[u[u.length-2]][u[u.length-1]],u.push(L);break;case 3:return!0}}return!0}};r.lexer=(function(){var o={EOF:1,parseError:function(a,u){if(this.yy.parser)this.yy.parser.parseError(a,u);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 u=a.length,h=a.split(/(?:\\r\\n?|\\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u-1),this.offset-=u;var p=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),h.length-1&&(this.yylineno-=h.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:h?(h.length===p.length?this.yylloc.first_column:0)+p[p.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-u]),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(),u=new Array(a.length+1).join("-");return a+this.upcomingInput()+`\n`+u+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,u,h,p,l;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),c=0;c<f.length&&(h=this._input.match(this.rules[f[c]]),!(h&&(!u||h[0].length>u[0].length)&&(u=h,p=c,!this.options.flex)));c++);return u?(l=u[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+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],a=this.performAction.call(this,this.yy,this,f[p],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 o.options={},o.performAction=function(a,u,h,p){function l(f,c){return u.yytext=u.yytext.substring(f,u.yyleng-c+f)}switch(h){case 0:if(u.yytext.slice(-2)==="\\\\\\\\"?(l(0,1),this.begin("mu")):u.yytext.slice(-1)==="\\\\"?(l(0,1),this.begin("emu")):this.begin("mu"),u.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(u.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 u.yytext=l(1,2).replace(/\\\\"/g,\'"\'),80;case 32:return u.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 u.yytext=u.yytext.replace(/\\\\([\\\\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},o.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\\/.)|]))))/,/^(?:\\[(\\\\\\]|[^\\]])*\\])/,/^(?:.)/,/^(?:$)/],o.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}},o})();function i(){this.yy={}}return i.prototype=r,r.Parser=i,new i})();e.default=s,t.exports=e.default})),en=pe((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})),tn=pe(((e,t)=>{e.__esModule=!0;function s(l){return l&&l.__esModule?l:{default:l}}var r=s(gt()),i=Xe(),o=en();function n(){this.parents=[]}function a(l,f){return i.indexOf(o.NODE_TYPES,f)!==-1||!(f in n.prototype)&&typeof l[f]=="function"}n.prototype={constructor:n,mutating:!1,acceptKey:function(f,c){var d=this.accept(f[c]);if(this.mutating){if(d&&!a(this,d.type))throw new r.default(\'Unexpected node type "\'+d.type+\'" found when accepting \'+c+" on "+f.type);f[c]=d}},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,d=f.length;c<d;c++)this.acceptKey(f,c),f[c]||(f.splice(c,1),c--,d--)},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:u,Decorator:u,BlockStatement:h,DecoratorBlock:h,PartialStatement:p,PartialBlockStatement:function(f){p.call(this,f),this.acceptKey(f,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:u,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 u(l){this.acceptRequired(l,"path"),this.acceptArray(l.params),this.acceptKey(l,"hash")}function h(l){u.call(this,l),this.acceptKey(l,"program"),this.acceptKey(l,"inverse")}function p(l){this.acceptRequired(l,"name"),this.acceptArray(l.params),this.acceptKey(l,"hash")}e.default=n,t.exports=e.default})),Sl=pe(((e,t)=>{e.__esModule=!0;function s(h){return h&&h.__esModule?h:{default:h}}var r=s(tn());function i(){var h=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=h}i.prototype=new r.default,i.prototype.Program=function(h){var p=!this.options.ignoreStandalone,l=!this.isRootSeen;this.isRootSeen=!0;for(var f=h.body,c=0,d=f.length;c<d;c++){var g=f[c],v=this.accept(g);if(v){var _=o(f,c,l),S=n(f,c,l),y=v.openStandalone&&_,m=v.closeStandalone&&S,b=v.inlineStandalone&&_&&S;v.close&&a(f,c,!0),v.open&&u(f,c,!0),p&&b&&(a(f,c),u(f,c)&&g.type==="PartialStatement"&&(g.indent=/(?:^|[^ \\t])([ \\t]+)$/.exec(f[c-1].original)[1])),p&&y&&(a((g.program||g.inverse).body),u(f,c)),p&&m&&(a(f,c),u((g.inverse||g.program).body))}}return h},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(h){this.accept(h.program),this.accept(h.inverse);var p=h.program||h.inverse,l=h.program&&h.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 d={open:h.openStrip.open,close:h.closeStrip.close,openStandalone:n(p.body),closeStandalone:o((f||p).body)};if(h.openStrip.close&&a(p.body,null,!0),l){var g=h.inverseStrip;g.open&&u(p.body,null,!0),g.close&&a(f.body,null,!0),h.closeStrip.open&&u(c.body,null,!0),!this.options.ignoreStandalone&&o(p.body)&&n(f.body)&&(u(p.body),a(f.body))}else h.closeStrip.open&&u(p.body,null,!0);return d},i.prototype.Decorator=i.prototype.MustacheStatement=function(h){return h.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(h){var p=h.strip||{};return{inlineStandalone:!0,open:p.open,close:p.close}};function o(h,p,l){p===void 0&&(p=h.length);var f=h[p-1],c=h[p-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 n(h,p,l){p===void 0&&(p=-1);var f=h[p+1],c=h[p+2];if(!f)return l;if(f.type==="ContentStatement")return(c||!l?/^\\s*?\\r?\\n/:/^\\s*?(\\r?\\n|$)/).test(f.original)}function a(h,p,l){var f=h[p==null?0:p+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 u(h,p,l){var f=h[p==null?h.length-1:p-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})),kl=pe((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=o,e.stripFlags=n,e.stripComment=a,e.preparePath=u,e.prepareMustache=h,e.prepareRawBlock=p,e.prepareBlock=l,e.prepareProgram=f,e.preparePartialBlock=c;function t(d){return d&&d.__esModule?d:{default:d}}var s=t(gt());function r(d,g){if(g=g.path?g.path.original:g,d.path.original!==g){var v={loc:d.path.loc};throw new s.default(d.path.original+" doesn\'t match "+g,v)}}function i(d,g){this.source=d,this.start={line:g.first_line,column:g.first_column},this.end={line:g.last_line,column:g.last_column}}function o(d){return/^\\[.*\\]$/.test(d)?d.substring(1,d.length-1):d}function n(d,g){return{open:d.charAt(2)==="~",close:g.charAt(g.length-3)==="~"}}function a(d){return d.replace(/^\\{\\{~?!-?-?/,"").replace(/-?-?~?\\}\\}$/,"")}function u(d,g,v){v=this.locInfo(v);for(var _=d?"@":"",S=[],y=0,m=0,b=g.length;m<b;m++){var k=g[m].part,w=g[m].original!==k;if(_+=(g[m].separator||"")+k,!w&&(k===".."||k==="."||k==="this")){if(S.length>0)throw new s.default("Invalid path: "+_,{loc:v});k===".."&&y++}else S.push(k)}return{type:"PathExpression",data:d,depth:y,parts:S,original:_,loc:v}}function h(d,g,v,_,S,y){var m=_.charAt(3)||_.charAt(2),b=m!=="{"&&m!=="&";return{type:/\\*/.test(_)?"Decorator":"MustacheStatement",path:d,params:g,hash:v,escaped:b,strip:S,loc:this.locInfo(y)}}function p(d,g,v,_){r(d,v),_=this.locInfo(_);var S={type:"Program",body:g,strip:{},loc:_};return{type:"BlockStatement",path:d.path,params:d.params,hash:d.hash,program:S,openStrip:{},inverseStrip:{},closeStrip:{},loc:_}}function l(d,g,v,_,S,y){_&&_.path&&r(d,_);var m=/\\*/.test(d.open);g.blockParams=d.blockParams;var b=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=_.strip),k=v.strip,b=v.program}return S&&(S=b,b=g,g=S),{type:m?"DecoratorBlock":"BlockStatement",path:d.path,params:d.params,hash:d.hash,program:g,inverse:b,openStrip:d.strip,inverseStrip:k,closeStrip:_&&_.strip,loc:this.locInfo(y)}}function f(d,g){if(!g&&d.length){var v=d[0].loc,_=d[d.length-1].loc;v&&_&&(g={source:v.source,start:{line:v.start.line,column:v.start.column},end:{line:_.end.line,column:_.end.column}})}return{type:"Program",body:d,strip:{},loc:g}}function c(d,g,v,_){return r(d,v),{type:"PartialBlockStatement",name:d.path,params:d.params,hash:d.hash,program:g,openStrip:d.strip,closeStrip:v&&v.strip,loc:this.locInfo(_)}}})),wl=pe((e=>{e.__esModule=!0,e.parseWithoutProcessing=u,e.parse=h;function t(p){if(p&&p.__esModule)return p;var l={};if(p!=null)for(var f in p)Object.prototype.hasOwnProperty.call(p,f)&&(l[f]=p[f]);return l.default=p,l}function s(p){return p&&p.__esModule?p:{default:p}}var r=s(_l()),i=s(Sl()),o=t(kl()),n=Xe();e.parser=r.default;var a={};n.extend(a,o);function u(p,l){return p.type==="Program"?p:(r.default.yy=a,a.locInfo=function(f){return new a.SourceLocation(l&&l.srcName,f)},r.default.parse(p))}function h(p,l){var f=u(p,l);return new i.default(l).accept(f)}})),xl=pe((e=>{e.__esModule=!0,e.Compiler=a,e.precompile=u,e.compile=h;function t(S){return S&&S.__esModule?S:{default:S}}var s=t(gt()),r=Xe(),i=t(ji()),o=en(),n=[].slice;function a(){}a.prototype={compiler:a,equals:function(y){var m=this.opcodes.length;if(y.opcodes.length!==m)return!1;for(var b=0;b<m;b++){var k=this.opcodes[b],w=y.opcodes[b];if(k.opcode!==w.opcode||!v(k.args,w.args))return!1}m=this.children.length;for(var b=0;b<m;b++)if(!this.children[b].equals(y.children[b]))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),b=this.guid++;return this.usePartial=this.usePartial||m.usePartial,this.children[b]=m,this.useDepths=this.useDepths||m.useDepths,b},accept:function(y){if(r.indexOf(o.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,b=m.length,k=0;k<b;k++)this.accept(m[k]);return this.options.blockParams.shift(),this.isSimple=b===1,this.blockParams=y.blockParams?y.blockParams.length:0,this},BlockStatement:function(y){_(y);var m=y.program,b=y.inverse;m=m&&this.compileProgram(m),b=b&&this.compileProgram(b);var k=this.classifySexpr(y);k==="helper"?this.helperSexpr(y,m,b):k==="simple"?(this.simpleSexpr(y),this.opcode("pushProgram",m),this.opcode("pushProgram",b),this.opcode("emptyHash"),this.opcode("blockValue",y.path.original)):(this.ambiguousSexpr(y,m,b),this.opcode("pushProgram",m),this.opcode("pushProgram",b),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(y){var m=y.program&&this.compileProgram(y.program),b=this.setupFullMustacheParams(y,m,void 0),k=y.path;this.useDecorators=!0,this.opcode("registerDecorator",b.length,k.original)},PartialStatement:function(y){this.usePartial=!0;var m=y.program;m&&(m=this.compileProgram(y.program));var b=y.params;if(b.length>1)throw new s.default("Unsupported number of partial arguments: "+b.length,y);b.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):b.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 A=y.indent||"";this.options.preventIndent&&A&&(this.opcode("appendContent",A),A=""),this.opcode("invokePartial",w,k,A),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 p(y,"value must be a string");y.value&&this.opcode("appendContent",y.value)},CommentStatement:function(){},SubExpression:function(y){_(y);var m=this.classifySexpr(y);m==="simple"?this.simpleSexpr(y):m==="helper"?this.helperSexpr(y):this.ambiguousSexpr(y)},ambiguousSexpr:function(y,m,b){var k=y.path,w=k.parts[0],A=m!=null||b!=null;this.opcode("getContext",l(k)),this.opcode("pushProgram",m),this.opcode("pushProgram",b),k.strict=!0,this.accept(k),this.opcode("invokeAmbiguous",w,A)},simpleSexpr:function(y){var m=y.path;m.strict=!0,this.accept(m),this.opcode("resolvePossibleLambda")},helperSexpr:function(y,m,b){var k=this.setupFullMustacheParams(y,m,b),w=y.path,A=w.parts[0];if(this.options.knownHelpers[A])this.opcode("invokeKnownHelper",k.length,A);else{if(this.options.knownHelpersOnly)throw new s.default("You specified knownHelpersOnly, but used the unknown helper "+A,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),b=d(y);this.addDepth(m),this.opcode("getContext",m);var k=b[0],w=i.default.helpers.scopedId(y),A=!m&&!w&&this.blockParamIndex(k);A?this.opcode("lookupBlockParam",A,b):k?y.data?(this.options.data=!0,this.opcode("lookupData",m,b,y.strict)):this.opcode("lookupOnContext",b,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,b=0,k=void 0;if(!r.isArray(m))throw p(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 p(y,"pair keys must be strings");for(this.opcode("pushHash");b<k;b++)this.pushParam(m[b].value);for(;b--;)this.opcode("assignToHash",m[b].key);this.opcode("popHash")},opcode:function(y){this.opcodes.push({opcode:y,args:n.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(y){y&&(this.useDepths=!0)},classifySexpr:function(y){d(y.path);var m=i.default.helpers.simpleId(y.path),b=m&&!!this.blockParamIndex(y.path.parts[0]),k=!b&&i.default.helpers.helperExpression(y),w=!b&&(k||m);if(w&&!k){var A=y.path.parts[0],O=this.options;O.knownHelpers[A]?k=!0:O.knownHelpersOnly&&(w=!1)}return k?"helper":w?"ambiguous":"simple"},pushParams:function(y){for(var m=0,b=y.length;m<b;m++)this.pushParam(y[m])},pushParam:function(y){f(y);var m=y.value!=null?y.value:y.original||"",b=l(y);if(this.stringParams)typeof m!="number"&&typeof m!="boolean"&&(m=String(m)),m.replace&&(m=m.replace(/^(\\.?\\.\\/)*/g,"").replace(/\\//g,".")),b&&this.addDepth(b),this.opcode("getContext",b),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)&&!b&&(k=this.blockParamIndex(d(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,b,k){var w=y.params;return this.pushParams(w),this.opcode("pushProgram",m),this.opcode("pushProgram",b),y.hash?this.accept(y.hash):this.opcode("emptyHash",k),w},blockParamIndex:function(y){for(var m=0,b=this.options.blockParams.length;m<b;m++){var k=this.options.blockParams[m],w=k&&r.indexOf(k,y);if(k&&w>=0)return[m,w]}}};function u(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 b=m.parse(S,y),k=new m.Compiler().compile(b,y);return new m.JavaScriptCompiler().compile(k,y)}function h(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 b=void 0;function k(){var A=m.parse(S,y),O=new m.Compiler().compile(A,y),E=new m.JavaScriptCompiler().compile(O,y,void 0,!0);return m.template(E)}function w(A,O){return b||(b=k()),b.call(this,A,O)}return w._setup=function(A){return b||(b=k()),b._setup(A)},w._child=function(A,O,E,L){return b||(b=k()),b._child(A,O,E,L)},w}function p(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 p(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 p(S,"value must be a string");if(S.type==="NumberLiteral"&&typeof y!="number")throw p(S,"value must be a number");if(S.type==="BooleanLiteral"&&typeof y!="boolean")throw p(S,"value must be a boolean")}function c(S,y,m){if(!r.isArray(y))throw p(S,m+" must be an array");for(var b=0;b<y.length;b++)if(typeof y[b]!="string")throw p(S,m+" must only contain strings");return y}function d(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 _(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}}}})),Tl=pe((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,o=97,n=122,a=48,u=57,h=43,p=47,l=26,f=52;return r<=s&&s<=i?s-r:o<=s&&s<=n?s-o+l:a<=s&&s<=u?s-a+f:s==h?62:s==p?63:-1}})),sn=pe((e=>{var t=Tl(),s=5,r=1<<s,i=r-1,o=r;function n(u){return u<0?(-u<<1)+1:(u<<1)+0}function a(u){var h=(u&1)===1,p=u>>1;return h?-p:p}e.encode=function(h){var p="",l,f=n(h);do l=f&i,f>>>=s,f>0&&(l|=o),p+=t.encode(l);while(f>0);return p},e.decode=function(h,p,l){var f=h.length,c=0,d=0,g,v;do{if(p>=f)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(h.charCodeAt(p++)),v===-1)throw new Error("Invalid base64 digit: "+h.charAt(p-1));g=!!(v&o),v&=i,c=c+(v<<d),d+=s}while(g);l.value=a(c),l.rest=p}})),ms=pe((e=>{function t(m,b,k){if(b in m)return m[b];if(arguments.length===3)return k;throw new Error(\'"\'+b+\'" is a required argument.\')}e.getArg=t;var s=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,r=/^data:.+\\,.+$/;function i(m){var b=m.match(s);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=i;function o(m){var b="";return m.scheme&&(b+=m.scheme+":"),b+="//",m.auth&&(b+=m.auth+"@"),m.host&&(b+=m.host),m.port&&(b+=":"+m.port),m.path&&(b+=m.path),b}e.urlGenerate=o;function n(m){var b=m,k=i(m);if(k){if(!k.path)return m;b=k.path}for(var w=e.isAbsolute(b),A=b.split(/\\/+/),O,E=0,L=A.length-1;L>=0;L--)O=A[L],O==="."?A.splice(L,1):O===".."?E++:E>0&&(O===""?(A.splice(L+1,E),E=0):(A.splice(L,2),E--));return b=A.join("/"),b===""&&(b=w?"/":"."),k?(k.path=b,o(k)):b}e.normalize=n;function a(m,b){m===""&&(m="."),b===""&&(b=".");var k=i(b),w=i(m);if(w&&(m=w.path||"/"),k&&!k.scheme)return w&&(k.scheme=w.scheme),o(k);if(k||b.match(r))return b;if(w&&!w.host&&!w.path)return w.host=b,o(w);var A=b.charAt(0)==="/"?b:n(m.replace(/\\/+$/,"")+"/"+b);return w?(w.path=A,o(w)):A}e.join=a,e.isAbsolute=function(m){return m.charAt(0)==="/"||s.test(m)};function u(m,b){m===""&&(m="."),m=m.replace(/\\/$/,"");for(var k=0;b.indexOf(m+"/")!==0;){var w=m.lastIndexOf("/");if(w<0||(m=m.slice(0,w),m.match(/^([^\\/]+:\\/)?\\/*$/)))return b;++k}return Array(k+1).join("../")+b.substr(m.length+1)}e.relative=u;var h=(function(){return!("__proto__"in Object.create(null))})();function p(m){return m}function l(m){return c(m)?"$"+m:m}e.toSetString=h?p:l;function f(m){return c(m)?m.slice(1):m}e.fromSetString=h?p:f;function c(m){if(!m)return!1;var b=m.length;if(b<9||m.charCodeAt(b-1)!==95||m.charCodeAt(b-2)!==95||m.charCodeAt(b-3)!==111||m.charCodeAt(b-4)!==116||m.charCodeAt(b-5)!==111||m.charCodeAt(b-6)!==114||m.charCodeAt(b-7)!==112||m.charCodeAt(b-8)!==95||m.charCodeAt(b-9)!==95)return!1;for(var k=b-10;k>=0;k--)if(m.charCodeAt(k)!==36)return!1;return!0}function d(m,b,k){var w=v(m.source,b.source);return w!==0||(w=m.originalLine-b.originalLine,w!==0)||(w=m.originalColumn-b.originalColumn,w!==0||k)||(w=m.generatedColumn-b.generatedColumn,w!==0)||(w=m.generatedLine-b.generatedLine,w!==0)?w:v(m.name,b.name)}e.compareByOriginalPositions=d;function g(m,b,k){var w=m.generatedLine-b.generatedLine;return w!==0||(w=m.generatedColumn-b.generatedColumn,w!==0||k)||(w=v(m.source,b.source),w!==0)||(w=m.originalLine-b.originalLine,w!==0)||(w=m.originalColumn-b.originalColumn,w!==0)?w:v(m.name,b.name)}e.compareByGeneratedPositionsDeflated=g;function v(m,b){return m===b?0:m===null?1:b===null?-1:m>b?1:-1}function _(m,b){var k=m.generatedLine-b.generatedLine;return k!==0||(k=m.generatedColumn-b.generatedColumn,k!==0)||(k=v(m.source,b.source),k!==0)||(k=m.originalLine-b.originalLine,k!==0)||(k=m.originalColumn-b.originalColumn,k!==0)?k:v(m.name,b.name)}e.compareByGeneratedPositionsInflated=_;function S(m){return JSON.parse(m.replace(/^\\)]}\'[^\\n]*\\n/,""))}e.parseSourceMapInput=S;function y(m,b,k){if(b=b||"",m&&(m[m.length-1]!=="/"&&b[0]!=="/"&&(m+="/"),b=m+b),k){var w=i(k);if(!w)throw new Error("sourceMapURL could not be parsed");if(w.path){var A=w.path.lastIndexOf("/");A>=0&&(w.path=w.path.substring(0,A+1))}b=a(o(w),b)}return n(b)}e.computeSourceURL=y})),rn=pe((e=>{var t=ms(),s=Object.prototype.hasOwnProperty,r=typeof Map<"u";function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(n,a){for(var u=new i,h=0,p=n.length;h<p;h++)u.add(n[h],a);return u},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(n,a){var u=r?n:t.toSetString(n),h=r?this.has(n):s.call(this._set,u),p=this._array.length;(!h||a)&&this._array.push(n),h||(r?this._set.set(n,p):this._set[u]=p)},i.prototype.has=function(n){if(r)return this._set.has(n);var a=t.toSetString(n);return s.call(this._set,a)},i.prototype.indexOf=function(n){if(r){var a=this._set.get(n);if(a>=0)return a}else{var u=t.toSetString(n);if(s.call(this._set,u))return this._set[u]}throw new Error(\'"\'+n+\'" is not in the set.\')},i.prototype.at=function(n){if(n>=0&&n<this._array.length)return this._array[n];throw new Error("No element indexed by "+n)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),Cl=pe((e=>{var t=ms();function s(i,o){var n=i.generatedLine,a=o.generatedLine,u=i.generatedColumn,h=o.generatedColumn;return a>n||a==n&&h>=u||t.compareByGeneratedPositionsInflated(i,o)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(o,n){this._array.forEach(o,n)},r.prototype.add=function(o){s(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r})),nn=pe((e=>{var t=sn(),s=ms(),r=rn().ArraySet,i=Cl().MappingList;function o(n){n||(n={}),this._file=s.getArg(n,"file",null),this._sourceRoot=s.getArg(n,"sourceRoot",null),this._skipValidation=s.getArg(n,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}o.prototype._version=3,o.fromSourceMap=function(a){var u=a.sourceRoot,h=new o({file:a.file,sourceRoot:u});return a.eachMapping(function(p){var l={generated:{line:p.generatedLine,column:p.generatedColumn}};p.source!=null&&(l.source=p.source,u!=null&&(l.source=s.relative(u,l.source)),l.original={line:p.originalLine,column:p.originalColumn},p.name!=null&&(l.name=p.name)),h.addMapping(l)}),a.sources.forEach(function(p){var l=p;u!==null&&(l=s.relative(u,p)),h._sources.has(l)||h._sources.add(l);var f=a.sourceContentFor(p);f!=null&&h.setSourceContent(p,f)}),h},o.prototype.addMapping=function(a){var u=s.getArg(a,"generated"),h=s.getArg(a,"original",null),p=s.getArg(a,"source",null),l=s.getArg(a,"name",null);this._skipValidation||this._validateMapping(u,h,p,l),p!=null&&(p=String(p),this._sources.has(p)||this._sources.add(p)),l!=null&&(l=String(l),this._names.has(l)||this._names.add(l)),this._mappings.add({generatedLine:u.line,generatedColumn:u.column,originalLine:h!=null&&h.line,originalColumn:h!=null&&h.column,source:p,name:l})},o.prototype.setSourceContent=function(a,u){var h=a;this._sourceRoot!=null&&(h=s.relative(this._sourceRoot,h)),u!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(h)]=u):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(h)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},o.prototype.applySourceMap=function(a,u,h){var p=u;if(u==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.`);p=a.file}var l=this._sourceRoot;l!=null&&(p=s.relative(l,p));var f=new r,c=new r;this._mappings.unsortedForEach(function(d){if(d.source===p&&d.originalLine!=null){var g=a.originalPositionFor({line:d.originalLine,column:d.originalColumn});g.source!=null&&(d.source=g.source,h!=null&&(d.source=s.join(h,d.source)),l!=null&&(d.source=s.relative(l,d.source)),d.originalLine=g.line,d.originalColumn=g.column,g.name!=null&&(d.name=g.name))}var v=d.source;v!=null&&!f.has(v)&&f.add(v);var _=d.name;_!=null&&!c.has(_)&&c.add(_)},this),this._sources=f,this._names=c,a.sources.forEach(function(d){var g=a.sourceContentFor(d);g!=null&&(h!=null&&(d=s.join(h,d)),l!=null&&(d=s.relative(l,d)),this.setSourceContent(d,g))},this)},o.prototype._validateMapping=function(a,u,h,p){if(u&&typeof u.line!="number"&&typeof u.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&&!u&&!h&&!p)){if(a&&"line"in a&&"column"in a&&u&&"line"in u&&"column"in u&&a.line>0&&a.column>=0&&u.line>0&&u.column>=0&&h)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:a,source:h,original:u,name:p}))}},o.prototype._serializeMappings=function(){for(var a=0,u=1,h=0,p=0,l=0,f=0,c="",d,g,v,_,S=this._mappings.toArray(),y=0,m=S.length;y<m;y++){if(g=S[y],d="",g.generatedLine!==u)for(a=0;g.generatedLine!==u;)d+=";",u++;else if(y>0){if(!s.compareByGeneratedPositionsInflated(g,S[y-1]))continue;d+=","}d+=t.encode(g.generatedColumn-a),a=g.generatedColumn,g.source!=null&&(_=this._sources.indexOf(g.source),d+=t.encode(_-f),f=_,d+=t.encode(g.originalLine-1-p),p=g.originalLine-1,d+=t.encode(g.originalColumn-h),h=g.originalColumn,g.name!=null&&(v=this._names.indexOf(g.name),d+=t.encode(v-l),l=v)),c+=d}return c},o.prototype._generateSourcesContent=function(a,u){return a.map(function(h){if(!this._sourcesContents)return null;u!=null&&(h=s.relative(u,h));var p=s.toSetString(h);return Object.prototype.hasOwnProperty.call(this._sourcesContents,p)?this._sourcesContents[p]:null},this)},o.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},o.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=o})),Pl=pe((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(s,r,i,o,n,a){var u=Math.floor((r-s)/2)+s,h=n(i,o[u],!0);return h===0?u:h>0?r-u>1?t(u,r,i,o,n,a):a==e.LEAST_UPPER_BOUND?r<o.length?r:-1:u:u-s>1?t(s,u,i,o,n,a):a==e.LEAST_UPPER_BOUND?u:s<0?-1:s}e.search=function(r,i,o,n){if(i.length===0)return-1;var a=t(-1,i.length,r,i,o,n||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&o(i[a],i[a-1],!0)===0;)--a;return a}})),El=pe((e=>{function t(i,o,n){var a=i[o];i[o]=i[n],i[n]=a}function s(i,o){return Math.round(i+Math.random()*(o-i))}function r(i,o,n,a){if(n<a){var u=s(n,a),h=n-1;t(i,u,a);for(var p=i[a],l=n;l<a;l++)o(i[l],p)<=0&&(h+=1,t(i,h,l));t(i,h+1,l);var f=h+1;r(i,o,n,f-1),r(i,o,f+1,a)}}e.quickSort=function(i,o){r(i,o,0,i.length-1)}})),Al=pe((e=>{var t=ms(),s=Pl(),r=rn().ArraySet,i=sn(),o=El().quickSort;function n(p,l){var f=p;return typeof p=="string"&&(f=t.parseSourceMapInput(p)),f.sections!=null?new h(f,l):new a(f,l)}n.fromSourceMap=function(p,l){return a.fromSourceMap(p,l)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(l,f){var c=l.charAt(f);return c===";"||c===","},n.prototype._parseMappings=function(l,f){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(l,f,c){var d=f||null,g=c||n.GENERATED_ORDER,v;switch(g){case n.GENERATED_ORDER:v=this._generatedMappings;break;case n.ORIGINAL_ORDER:v=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var _=this.sourceRoot;v.map(function(S){var y=S.source===null?null:this._sources.at(S.source);return y=t.computeSourceURL(_,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,d)},n.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 d=[],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 _=v.originalLine;v&&v.originalLine===_;)d.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;)d.push({line:t.getArg(v,"generatedLine",null),column:t.getArg(v,"generatedColumn",null),lastColumn:t.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++g]}return d},e.SourceMapConsumer=n;function a(p,l){var f=p;typeof p=="string"&&(f=t.parseSourceMapInput(p));var c=t.getArg(f,"version"),d=t.getArg(f,"sources"),g=t.getArg(f,"names",[]),v=t.getArg(f,"sourceRoot",null),_=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)),d=d.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(d,!0),this._absoluteSources=this._sources.toArray().map(function(m){return t.computeSourceURL(v,m,l)}),this.sourceRoot=v,this.sourcesContent=_,this._mappings=S,this._sourceMapURL=l,this.file=y}a.prototype=Object.create(n.prototype),a.prototype.consumer=n,a.prototype._findSourceIndex=function(p){var l=p;if(this.sourceRoot!=null&&(l=t.relative(this.sourceRoot,l)),this._sources.has(l))return this._sources.indexOf(l);for(var f=0;f<this._absoluteSources.length;++f)if(this._absoluteSources[f]==p)return f;return-1},a.fromSourceMap=function(l,f){var c=Object.create(a.prototype),d=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(),_=c.__generatedMappings=[],S=c.__originalMappings=[],y=0,m=v.length;y<m;y++){var b=v[y],k=new u;k.generatedLine=b.generatedLine,k.generatedColumn=b.generatedColumn,b.source&&(k.source=g.indexOf(b.source),k.originalLine=b.originalLine,k.originalColumn=b.originalColumn,b.name&&(k.name=d.indexOf(b.name)),S.push(k)),_.push(k)}return o(c.__originalMappings,t.compareByOriginalPositions),c},a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function u(){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,d=0,g=0,v=0,_=0,S=0,y=l.length,m=0,b={},k={},w=[],A=[],O,E,L,P,D;m<y;)if(l.charAt(m)===";")c++,m++,d=0;else if(l.charAt(m)===",")m++;else{for(O=new u,O.generatedLine=c,P=m;P<y&&!this._charIsMappingSeparator(l,P);P++);if(E=l.slice(m,P),L=b[E],L)m+=E.length;else{for(L=[];m<P;)i.decode(l,m,k),D=k.value,m=k.rest,L.push(D);if(L.length===2)throw new Error("Found a source, but no line and column");if(L.length===3)throw new Error("Found a source and line, but no column");b[E]=L}O.generatedColumn=d+L[0],d=O.generatedColumn,L.length>1&&(O.source=_+L[1],_+=L[1],O.originalLine=g+L[2],g=O.originalLine,O.originalLine+=1,O.originalColumn=v+L[3],v=O.originalColumn,L.length>4&&(O.name=S+L[4],S+=L[4])),A.push(O),typeof O.originalLine=="number"&&w.push(O)}o(A,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,o(w,t.compareByOriginalPositions),this.__originalMappings=w},a.prototype._findMapping=function(l,f,c,d,g,v){if(l[c]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+l[c]);if(l[d]<0)throw new TypeError("Column must be greater than or equal to 0, got "+l[d]);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",n.GREATEST_LOWER_BOUND));if(c>=0){var d=this._generatedMappings[c];if(d.generatedLine===f.generatedLine){var g=t.getArg(d,"source",null);g!==null&&(g=this._sources.at(g),g=t.computeSourceURL(this.sourceRoot,g,this._sourceMapURL));var v=t.getArg(d,"name",null);return v!==null&&(v=this._names.at(v)),{source:g,line:t.getArg(d,"originalLine",null),column:t.getArg(d,"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 d=l;this.sourceRoot!=null&&(d=t.relative(this.sourceRoot,d));var g;if(this.sourceRoot!=null&&(g=t.urlParse(this.sourceRoot))){var v=d.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("/"+d))return this.sourcesContent[this._sources.indexOf("/"+d)]}if(f)return null;throw new Error(\'"\'+d+\'" 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")},d=this._findMapping(c,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(l,"bias",n.GREATEST_LOWER_BOUND));if(d>=0){var g=this._originalMappings[d];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 h(p,l){var f=p;typeof p=="string"&&(f=t.parseSourceMapInput(p));var c=t.getArg(f,"version"),d=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=d.map(function(v){if(v.url)throw new Error("Support for url field in sections not implemented.");var _=t.getArg(v,"offset"),S=t.getArg(_,"line"),y=t.getArg(_,"column");if(S<g.line||S===g.line&&y<g.column)throw new Error("Section offsets must be ordered and non-overlapping.");return g=_,{generatedOffset:{generatedLine:S+1,generatedColumn:y+1},consumer:new n(t.getArg(v,"map"),l)}})}h.prototype=Object.create(n.prototype),h.prototype.constructor=n,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var p=[],l=0;l<this._sections.length;l++)for(var f=0;f<this._sections[l].consumer.sources.length;f++)p.push(this._sections[l].consumer.sources[f]);return p}}),h.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 _=g.generatedLine-v.generatedOffset.generatedLine;return _||g.generatedColumn-v.generatedOffset.generatedColumn}),d=this._sections[c];return d?d.consumer.originalPositionFor({line:f.generatedLine-(d.generatedOffset.generatedLine-1),column:f.generatedColumn-(d.generatedOffset.generatedLine===f.generatedLine?d.generatedOffset.generatedColumn-1:0),bias:l.bias}):{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(l){return l.consumer.hasContentsOfAllSources()})},h.prototype.sourceContentFor=function(l,f){for(var c=0;c<this._sections.length;c++){var d=this._sections[c].consumer.sourceContentFor(l,!0);if(d)return d}if(f)return null;throw new Error(\'"\'+l+\'" is not in the SourceMap.\')},h.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 d=c.consumer.generatedPositionFor(l);if(d)return{line:d.line+(c.generatedOffset.generatedLine-1),column:d.column+(c.generatedOffset.generatedLine===d.line?c.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},h.prototype._parseMappings=function(l,f){this.__generatedMappings=[],this.__originalMappings=[];for(var c=0;c<this._sections.length;c++)for(var d=this._sections[c],g=d.consumer._generatedMappings,v=0;v<g.length;v++){var _=g[v],S=d.consumer._sources.at(_.source);S=t.computeSourceURL(d.consumer.sourceRoot,S,this._sourceMapURL),this._sources.add(S),S=this._sources.indexOf(S);var y=null;_.name&&(y=d.consumer._names.at(_.name),this._names.add(y),y=this._names.indexOf(y));var m={source:S,generatedLine:_.generatedLine+(d.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(d.generatedOffset.generatedLine===_.generatedLine?d.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.originalColumn,name:y};this.__generatedMappings.push(m),typeof m.originalLine=="number"&&this.__originalMappings.push(m)}o(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),o(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=h})),Ll=pe((e=>{var t=nn().SourceMapGenerator,s=ms(),r=/(\\r?\\n)/,i=10,o="$$$isSourceNode$$$";function n(a,u,h,p,l){this.children=[],this.sourceContents={},this.line=a??null,this.column=u??null,this.source=h??null,this.name=l??null,this[o]=!0,p!=null&&this.add(p)}n.fromStringWithSourceMap=function(u,h,p){var l=new n,f=u.split(r),c=0,d=function(){return y()+(y()||"");function y(){return c<f.length?f[c++]:void 0}},g=1,v=0,_=null;return h.eachMapping(function(y){if(_!==null)if(g<y.generatedLine)S(_,d()),g++,v=0;else{var m=f[c]||"",b=m.substr(0,y.generatedColumn-v);f[c]=m.substr(y.generatedColumn-v),v=y.generatedColumn,S(_,b),_=y;return}for(;g<y.generatedLine;)l.add(d()),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}_=y},this),c<f.length&&(_&&S(_,d()),l.add(f.splice(c).join(""))),h.sources.forEach(function(y){var m=h.sourceContentFor(y);m!=null&&(p!=null&&(y=s.join(p,y)),l.setSourceContent(y,m))}),l;function S(y,m){if(y===null||y.source===void 0)l.add(m);else{var b=p?s.join(p,y.source):y.source;l.add(new n(y.originalLine,y.originalColumn,b,m,y.name))}}},n.prototype.add=function(u){if(Array.isArray(u))u.forEach(function(h){this.add(h)},this);else if(u[o]||typeof u=="string")u&&this.children.push(u);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+u);return this},n.prototype.prepend=function(u){if(Array.isArray(u))for(var h=u.length-1;h>=0;h--)this.prepend(u[h]);else if(u[o]||typeof u=="string")this.children.unshift(u);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+u);return this},n.prototype.walk=function(u){for(var h,p=0,l=this.children.length;p<l;p++)h=this.children[p],h[o]?h.walk(u):h!==""&&u(h,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(u){var h,p,l=this.children.length;if(l>0){for(h=[],p=0;p<l-1;p++)h.push(this.children[p]),h.push(u);h.push(this.children[p]),this.children=h}return this},n.prototype.replaceRight=function(u,h){var p=this.children[this.children.length-1];return p[o]?p.replaceRight(u,h):typeof p=="string"?this.children[this.children.length-1]=p.replace(u,h):this.children.push("".replace(u,h)),this},n.prototype.setSourceContent=function(u,h){this.sourceContents[s.toSetString(u)]=h},n.prototype.walkSourceContents=function(u){for(var h=0,p=this.children.length;h<p;h++)this.children[h][o]&&this.children[h].walkSourceContents(u);for(var l=Object.keys(this.sourceContents),h=0,p=l.length;h<p;h++)u(s.fromSetString(l[h]),this.sourceContents[l[h]])},n.prototype.toString=function(){var u="";return this.walk(function(h){u+=h}),u},n.prototype.toStringWithSourceMap=function(u){var h={code:"",line:1,column:0},p=new t(u),l=!1,f=null,c=null,d=null,g=null;return this.walk(function(v,_){h.code+=v,_.source!==null&&_.line!==null&&_.column!==null?((f!==_.source||c!==_.line||d!==_.column||g!==_.name)&&p.addMapping({source:_.source,original:{line:_.line,column:_.column},generated:{line:h.line,column:h.column},name:_.name}),f=_.source,c=_.line,d=_.column,g=_.name,l=!0):l&&(p.addMapping({generated:{line:h.line,column:h.column}}),f=null,l=!1);for(var S=0,y=v.length;S<y;S++)v.charCodeAt(S)===i?(h.line++,h.column=0,S+1===y?(f=null,l=!1):l&&p.addMapping({source:_.source,original:{line:_.line,column:_.column},generated:{line:h.line,column:h.column},name:_.name})):h.column++}),this.walkSourceContents(function(v,_){p.setSourceContent(v,_)}),{code:h.code,map:p}},e.SourceNode=n})),Rl=pe((e=>{e.SourceMapGenerator=nn().SourceMapGenerator,e.SourceMapConsumer=Al().SourceMapConsumer,e.SourceNode=Ll().SourceNode})),Il=pe((e=>{e.__esModule=!0,e.safeJsonLiteral=n;var t=Xe(),s=/[\\x00-\\x1f\\\\"\\u2028\\u2029<\\ud800-\\udfff]/,r=/<(?=!--|\\/?script)/gi;function i(p){return p.replace(r,"\\\\u003C")}function o(p){return"\\\\u"+p.charCodeAt(0).toString(16)}function n(p){return i(JSON.stringify(p).replace(/\\u2028/g,"\\\\u2028").replace(/\\u2029/g,"\\\\u2029").replace(/[\\ud800-\\udfff]/g,o))}var a=void 0;try{(typeof define!="function"||!define.amd)&&(a=Rl().SourceNode)}catch{}a||(a=function(p,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 u(p,l,f){if(t.isArray(p)){for(var c=[],d=0,g=p.length;d<g;d++)c.push(l.wrap(p[d],f));return c}else if(typeof p=="boolean"||typeof p=="number")return p+"";return p}function h(p){this.srcFile=p,this.source=[]}h.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=u(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)?n(l):\'"\'+l+\'"\'},objectLiteral:function(l){var f=this,c=[];Object.keys(l).forEach(function(g){var v=u(l[g],f);v!=="undefined"&&c.push([f.quotedString(g),":",v])});var d=this.generateList(c);return d.prepend("{"),d.add("}"),d},generateList:function(l){for(var f=this.empty(),c=0,d=l.length;c<d;c++)c&&f.add(","),f.add(u(l[c],this));return f},generateArray:function(l){var f=this.generateList(l);return f.prepend("["),f.add("]"),f}},e.default=h})),Ol=pe(((e,t)=>{e.__esModule=!0;function s(f){return f&&f.__esModule?f:{default:f}}var r=Nr(),i=s(gt()),o=Xe(),n=Il(),a=s(n);function u(f){this.value=f}function h(){}h.prototype={nameLookup:function(c,d){return this.internalNameLookup(c,d)},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,d,g){return o.isArray(c)||(c=[c]),c=this.source.wrap(c,d),this.environment.isSimple?["return ",c,";"]:g?["buffer += ",c,";"]:(c.appendToBuffer=!0,c)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(c,d){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",c,",",this.quotedString(d),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(c,d,g,v){this.environment=c,this.options=d,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,d),this.useDepths=this.useDepths||c.useDepths||c.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||c.useBlockParams;var _=c.opcodes,S=void 0,y=void 0,m=void 0,b=void 0;for(m=0,b=_.length;m<b;m++)S=_[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 A=this.context,O=A.programs,E=A.decorators;for(m=0,b=O.length;m<b;m++)w[m]=O[m],E[m]&&(w[m+"_d"]=E[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),d.srcName?(w=w.toStringWithSourceMap({file:d.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 d=this,g="",v=this.stackVars.concat(this.registers.list);v.length>0&&(g+=", "+v.join(", "));var _=0;Object.keys(this.aliases).forEach(function(m){var b=d.aliases[m];b.children&&b.referenceCount>1&&(g+=", alias"+ ++_+"="+m,b.children[0]="alias"+_)}),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 d=this.environment.isSimple,g=!this.forceBuffer,v=void 0,_=void 0,S=void 0,y=void 0;return this.source.each(function(m){m.appendToBuffer?(S?m.prepend(" + "):S=m,y=m):(S&&(_?S.prepend("buffer += "):v=!0,y.add(";"),S=y=void 0),_=!0,d||(g=!1))}),g?S?(S.prepend("return "),y.add(";")):_||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 d=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(d,"call",g))},ambiguousBlockValue:function(){var c=this.aliasable("container.hooks.blockHelperMissing"),d=[this.contextName(0)];this.setupHelperArgs("",0,d,!0),this.flushInline();var g=this.topStack();d.splice(1,0,g),this.pushSource(["if (!",this.lastHelper,") { ",g," = ",this.source.functionCall(c,"call",d),"}"])},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(d){return[" != null ? ",d,\' : ""\']}),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,d,g,v){var _=0;!v&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(c[_++])):this.pushContext(),this.resolvePath("context",c,_,d,g)},lookupBlockParam:function(c,d){this.useBlockParams=!0,this.push(["blockParams[",c[0],"][",c[1],"]"]),this.resolvePath("context",d,1)},lookupData:function(c,d,g){c?this.pushStackLiteral("container.data(data, "+c+")"):this.pushStackLiteral("data"),this.resolvePath("data",d,0,!0,g)},resolvePath:function(c,d,g,v,_){var S=this;if(this.options.strict||this.options.assumeObjects){this.push(l(this.options.strict&&_,this,d,g,c));return}for(var y=d.length,m=function(k){S.replaceStack(function(w){var A=S.nameLookup(w,d[k],c);return v?[" && ",A]:[" != null ? ",A," : ",w]})},b=g;b<y;b++)m(b)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(c,d){this.pushContext(),this.pushString(d),d!=="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,d){var g=this.nameLookup("decorators",d,"decorator"),v=this.setupHelperArgs(d,c);this.decorators.push(["var decorator = ",g,";"]),this.decorators.push([\'if (typeof decorator !== "function") { throw new Error(\',this.quotedString(\'Missing decorator: "\'+d+\'"\'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",v])," || fn;"])},invokeHelper:function(c,d,g){var v=this.popStack(),_=this.setupHelper(c,d),S=[];g&&S.push(_.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",_.callParams);this.push(m)},itemsSeparatedBy:function(c,d){var g=[];g.push(c[0]);for(var v=1;v<c.length;v++)g.push(d,c[v]);return g},invokeKnownHelper:function(c,d){var g=this.setupHelper(c,d);this.push(this.source.functionCall(g.name,"call",g.callParams))},invokeAmbiguous:function(c,d){this.useRegister("helper");var g=this.popStack();this.emptyHash();var v=this.setupHelper(0,c,d),_=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",c,"helper")," || ",g,")"];this.options.strict||(_[0]="(helper = ",_.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",_,v.paramsInit?["),(",v.paramsInit]:[],"),","(typeof helper === ",this.aliasable(\'"function"\')," ? ",this.source.functionCall("helper","call",v.callParams)," : helper))"])},invokePartial:function(c,d,g){var v=[],_=this.setupParams(d,1,v);c&&(d=this.popStack(),delete _.name),g&&(_.indent=this.quotedString(g)),_.helpers="helpers",_.partials="partials",_.decorators="container.decorators",c?v.unshift(d):v.unshift(this.nameLookup("partials",d,"partial")),this.options.compat&&(_.depths="depths"),_=this.objectLiteral(_),v.push(_),this.push(this.source.functionCall("container.invokePartial","",v))},assignToHash:function(c){var d=this.popStack(),g=void 0,v=void 0,_=void 0;this.trackIds&&(_=this.popStack()),this.stringParams&&(v=this.popStack(),g=this.popStack());var S=this.hash;g&&(S.contexts[c]=g),v&&(S.types[c]=v),_&&(S.ids[c]=_),S.values[c]=d},pushId:function(c,d,g){c==="BlockParam"?this.pushStackLiteral("blockParams["+d[0]+"].path["+d[1]+"]"+(g?" + "+this.quotedString("."+g):"")):c==="PathExpression"?this.pushString(d):c==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:h,compileChildren:function(c,d){for(var g=c.children,v=void 0,_=void 0,S=0,y=g.length;S<y;S++){v=g[S],_=new this.compiler;var m=this.matchExistingProgram(v);if(m==null){var b=this.context.programs.push("")-1;v.index=b,v.name="program"+b,this.context.programs[b]=_.compile(v,d,this.context,!this.precompile),this.context.decorators[b]=_.decorators,this.context.environments[b]=v,this.useDepths=this.useDepths||_.useDepths,this.useBlockParams=this.useBlockParams||_.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 d=0,g=this.context.environments.length;d<g;d++){var v=this.context.environments[d];if(v&&v.equals(c))return v}},programExpression:function(c){var d=this.environment.children[c],g=[d.index,"data",d.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 u||(c=this.source.wrap(c)),this.inlineStack.push(c),c},pushStackLiteral:function(c){this.push(new u(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 d=["("],g=void 0,v=void 0,_=void 0;if(!this.isInline())throw new i.default("replaceStack on non-inline");var S=this.popStack(!0);if(S instanceof u)g=[S.value],d=["(",g],_=!0;else{v=!0;var y=this.incrStack();d=["((",this.push(y)," = ",S,")"],g=this.topStack()}var m=c.call(this,g);_||this.popStack(),v&&this.stackSlot--,this.push(d.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 d=0,g=c.length;d<g;d++){var v=c[d];if(v instanceof u)this.compileStack.push(v);else{var _=this.incrStack();this.pushSource([_," = ",v,";"]),this.compileStack.push(_)}}},isInline:function(){return this.inlineStack.length},popStack:function(c){var d=this.isInline(),g=(d?this.inlineStack:this.compileStack).pop();if(!c&&g instanceof u)return g.value;if(!d){if(!this.stackSlot)throw new i.default("Invalid stack pop");this.stackSlot--}return g},topStack:function(){var c=this.isInline()?this.inlineStack:this.compileStack,d=c[c.length-1];return d instanceof u?d.value:d},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 d=this.aliases[c];return d?(d.referenceCount++,d):(d=this.aliases[c]=this.source.wrap(c),d.aliasable=!0,d.referenceCount=1,d)},setupHelper:function(c,d,g){var v=[];return{params:v,paramsInit:this.setupHelperArgs(d,c,v,g),name:this.nameLookup("helpers",d,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(v)}},setupParams:function(c,d,g){var v={},_=[],S=[],y=[],m=!g,b=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 A=d;A--;)b=this.popStack(),g[A]=b,this.trackIds&&(y[A]=this.popStack()),this.stringParams&&(S[A]=this.popStack(),_[A]=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(_)),this.options.data&&(v.data="data"),this.useBlockParams&&(v.blockParams="blockParams"),v},setupHelperArgs:function(c,d,g,v){var _=this.setupParams(c,d,g);return _.loc=p(this),_=this.objectLiteral(_),v?(this.useRegister("options"),g.push("options"),["options=",_]):g?(g.push(_),""):_}},(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=h.RESERVED_WORDS={},d=0,g=f.length;d<g;d++)c[f[d]]=!0})(),h.isValidJavaScriptVariableName=function(f){return!h.RESERVED_WORDS[f]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(f)};function p(f){var c=f.source.currentLocation;return c?n.safeJsonLiteral(c):"undefined"}function l(f,c,d,g,v){var _=c.popStack(),S=d.length;f&&S--;for(var y=g;y<S;y++)_=c.nameLookup(_,d[y],v);return f?[c.aliasable("container.strict"),"(",_,", ",c.quotedString(d[S]),", ",p(c)," )"]:_}e.default=h,t.exports=e.default})),Ml=pe(((e,t)=>{e.__esModule=!0;function s(c){return c&&c.__esModule?c:{default:c}}var r=s(bl()),i=s(ji()),o=wl(),n=xl(),a=s(Ol()),u=s(tn()),h=s(Ki()),p=r.default.create;function l(){var c=p();return c.compile=function(d,g){return n.compile(d,g,c)},c.precompile=function(d,g){return n.precompile(d,g,c)},c.AST=i.default,c.Compiler=n.Compiler,c.JavaScriptCompiler=a.default,c.Parser=o.parser,c.parse=o.parse,c.parseWithoutProcessing=o.parseWithoutProcessing,c}var f=l();f.create=l,h.default(f),f.Visitor=u.default,f.default=f,e.default=f,t.exports=e.default})),Je=jo(Ml(),1),Dr={"=":"eq","==":"eq","!=":"ne",">":"gt","<":"lt",">=":"gte","<=":"lte"},Nl=["==","!=",">=","<=","&&","||","=",">","<","!"],Dl=["and","or","not"],Bl=["true","false","null","undefined"],$l=new Set([...` \\r\n!"\'()<>=&|{}~`]),tt=class extends Error{};function Hl(e){const t=[];let s=0;for(;s<e.length;){const r=e[s];if(/\\s/.test(r)){s++;continue}if(r==="("||r===")"){t.push({type:r,text:r}),s++;continue}if(r===\'"\'||r==="\'"){let a=s+1;for(;a<e.length&&e[a]!==r;)e[a]==="\\\\"&&a++,a++;if(a>=e.length)throw new tt("unterminated string");t.push({type:"value",text:e.slice(s,a+1)}),s=a+1;continue}const i=Nl.find(a=>e.startsWith(a,s));if(i){t.push({type:"op",text:i}),s+=i.length;continue}let o=s;for(;o<e.length&&!$l.has(e[o]);){if(e[o]==="["){const a=e.indexOf("]",o);if(a===-1)throw new tt("missing \']\'");o=a}o++}if(o===s)throw new tt(`unexpected \'${r}\'`);const n=e.slice(s,o);Dl.includes(n)?t.push({type:"op",text:n}):Bl.includes(n)||/^-?\\d+(\\.\\d+)?$/.test(n)?t.push({type:"value",text:n}):t.push({type:"ident",text:n}),s=o}return t}var ql=class{constructor(e){this.tokens=e,this.pos=0,this.usedInfix=!1}peek(e=0){return this.tokens[this.pos+e]}next(){return this.tokens[this.pos++]}isOp(e,...t){return e?.type==="op"&&t.includes(e.text)}startsPrimary(e){return e?.type==="ident"||e?.type==="value"||e?.type==="("}describe(e){return e?`\'${e.text}\'`:"end of expression"}parseCondition(){const e=[this.parseOr()];for(;this.peek()?.type==="ident"&&this.isOp(this.peek(1),"=");)e.push(this.parseHashPair());if(this.peek())throw new tt(`unexpected ${this.describe(this.peek())}`);return e}parseHashPair(){const e=this.next().text;return this.next(),{kind:"raw",text:`${e}=${Br(this.parsePrimary())}`}}parseOr(){return this.parseChain(["or","||"],"or",()=>this.parseAnd())}parseAnd(){return this.parseChain(["and","&&"],"and",()=>this.parseNot())}parseChain(e,t,s){const r=[s()];for(;this.isOp(this.peek(),...e);){const i=this.next().text;if(!this.peek())throw new tt(`expected a value after \'${i}\'`);r.push(s())}return r.length===1?r[0]:(this.usedInfix=!0,{kind:"call",name:t,args:r})}parseNot(){if(this.isOp(this.peek(),"not","!")){const e=this.next().text;if(!this.peek())throw new tt(`expected a value after \'${e}\'`);return this.usedInfix=!0,{kind:"call",name:"not",args:[this.parseNot()]}}return this.parseComparison()}parseComparison(){const e=this.parsePrimary(),t=this.peek();if(t?.type!=="op"||!(t.text in Dr))return e;if(this.next(),!this.peek())throw new tt(`expected a value after \'${t.text}\'`);const s=this.parsePrimary(),r=this.peek();if(r?.type==="op"&&r.text in Dr)throw new tt(`comparisons can\'t be chained (at \'${r.text}\'), use "and" to combine them`);return this.usedInfix=!0,{kind:"call",name:Dr[t.text],args:[e,s]}}parsePrimary(){const e=this.peek();if(e?.type==="ident"||e?.type==="value")return this.next(),{kind:"raw",text:e.text};if(e?.type==="("){this.next();const t=this.isHelperCall()?this.parseHelperCall():this.parseOr();if(this.peek()?.type!==")")throw new tt(`expected \')\' but found ${this.describe(this.peek())}`);return this.next(),t}if(this.isOp(e,"not","!")){const t=e?.text==="!"?"!value":"not value";throw new tt(`\'${e?.text}\' must be inside parentheses here, e.g. (${t})`)}throw e?.type==="op"?new tt(`expected a value before \'${e.text}\'`):new tt(e?`unexpected ${this.describe(e)}`:"expected a value")}isHelperCall(){const e=this.peek(),t=this.peek(1);return this.isOp(e,"and","or")?!0:e?.type==="ident"&&this.startsPrimary(t)}parseHelperCall(){const e=this.next().text,t=[];for(;this.peek()&&this.peek()?.type!==")";)this.peek()?.type==="ident"&&this.isOp(this.peek(1),"=")?t.push(this.parseHashPair()):t.push(this.parsePrimary());return{kind:"call",name:e,args:t}}};function Br(e){return e.kind==="raw"?e.text:`(${e.name} ${e.args.map(Br).join(" ")})`}function Fl(e){let t;try{t=Hl(e)}catch{return null}const s=t.some(n=>n.type==="op"),r=new ql(t);let i,o=null;try{i=r.parseCondition()}catch(n){if(!s||!(n instanceof tt))return null;o=n,i=[]}if(o)throw new Error(`Invalid condition "${e.trim()}": ${o.message}`);return r.usedInfix?i.map(Br).join(" "):null}var $r=/(\\\\*)\\{\\{(~?\\s*)(#if|#unless|else\\s+if|else\\s+unless)(?=[\\s(!])/g;function Vl(e,t){let s=null;for(let r=t;r<e.length;r++){const i=e[r];if(s)i==="\\\\"?r++:i===s&&(s=null);else if(i===\'"\'||i==="\'")s=i;else{if(e.startsWith("~}}",r))return r;if(e.startsWith("}}",r))return r}}return-1}function zl(e){if(!e.includes("{{"))return e;let t="",s=0;$r.lastIndex=0;let r;for(;(r=$r.exec(e))!==null;){if(r[1].length%2===1)continue;const i=r.index+r[0].length,o=Vl(e,i);if(o===-1)break;const n=Fl(e.slice(i,o));n!==null&&(t+=e.slice(s,i)+" "+n,s=o),$r.lastIndex=o}return t+e.slice(s)}var Ul=class{constructor(e,t,s){this.getStory=e,this.state=t,this.getCurrentSection=s,this.handlebars=Je.default.create(),this.handlebars.registerHelper("embed",n=>{const a=this.getCurrentSection();if(a.passages&&n in a.passages)return new Je.default.SafeString(this.process(a.passages[n].text||"",!0));const u=this.getStory();if(n in u.sections)return new Je.default.SafeString(this.process(u.sections[n].text||"",!0))}),this.handlebars.registerHelper("seen",n=>this.state.getSeen(n)),this.handlebars.registerHelper("get",n=>this.state.get(n)),this.handlebars.registerHelper("at",n=>{const a=this.state.get("_section");return Array.isArray(n)?n.includes(a):a===n});const r=n=>n&&typeof n=="object"&&typeof n.toString=="function"&&!Array.isArray(n)?n.toString():n;this.handlebars.registerHelper("set",(n,a)=>(this.state.set(n,r(a)),"")),this.handlebars.registerHelper("unset",n=>(this.state.set(n,!1),"")),this.handlebars.registerHelper("inc",(n,a)=>{const u=typeof a=="number"?a:1,h=this.state.get(n)||0;return this.state.set(n,h+u),""}),this.handlebars.registerHelper("dec",(n,a)=>{const u=typeof a=="number"?a:1,h=this.state.get(n)||0;return this.state.set(n,h-u),""}),this.handlebars.registerHelper("and",(...n)=>n.slice(0,-1).every(Boolean)),this.handlebars.registerHelper("or",(...n)=>n.slice(0,-1).some(Boolean)),this.handlebars.registerHelper("not",n=>!n),this.handlebars.registerHelper("eq",(n,a)=>n==a),this.handlebars.registerHelper("ne",(n,a)=>n!=a),this.handlebars.registerHelper("gt",(n,a)=>n>a),this.handlebars.registerHelper("lt",(n,a)=>n<a),this.handlebars.registerHelper("gte",(n,a)=>n>=a),this.handlebars.registerHelper("lte",(n,a)=>n<=a),this.handlebars.registerHelper("array",function(...n){return n.pop(),n}),this.handlebars.registerHelper("append",(n,a)=>{const u=this.state.get(n)||[],h=Array.isArray(u)?[...u]:[u],p=r(a);return Array.isArray(p)?h.push(...p.map(r)):h.push(p),this.state.set(n,h),""}),this.handlebars.registerHelper("prepend",(n,a)=>{const u=this.state.get(n)||[],h=Array.isArray(u)?[...u]:[u],p=r(a);return Array.isArray(p)?h.unshift(...p.map(r)):h.unshift(p),this.state.set(n,h),""}),this.handlebars.registerHelper("pop",n=>{const a=this.state.get(n)||[];if(!Array.isArray(a)||a.length===0)return"";const u=[...a],h=u.shift();return this.state.set(n,u),h}),this.handlebars.registerHelper("remove",(n,a)=>{const u=this.state.get(n)||[];if(!Array.isArray(u))return"";const h=r(a),p=u.findIndex(l=>r(l)===h);if(p!==-1){const l=[...u];l.splice(p,1),this.state.set(n,l)}return""}),this.handlebars.registerHelper("contains",(n,a)=>{let u;if(typeof n=="string"){const p=this.state.get(n);u=Array.isArray(p)?p:[]}else if(Array.isArray(n))u=n;else return!1;const h=r(a);return u.some(p=>r(p)===h)}),this.handlebars.registerHelper("length",n=>{let a;if(typeof n=="string"){const u=this.state.get(n);a=Array.isArray(u)?u:[]}else if(Array.isArray(n))a=n;else return 0;return a.length});const i=n=>{let a="";const u=n.hash.set||"";return u&&(a+=` data-set=\'${JSON.stringify(u.split(",").map(h=>h.trim()))}\'`),a},o=n=>String(n).replace(/&/g,"&amp;").replace(/"/g,"&quot;");this.handlebars.registerHelper("section",(n,a)=>{const u=a.hash.text||n;return new Je.default.SafeString(`<a class="squiffy-link link-section" data-section="${o(n)}"${i(a)} role="link" tabindex="0">${u}</a>`)}),this.handlebars.registerHelper("passage",(n,a)=>{const u=a.hash.text||n;return new Je.default.SafeString(`<a class="squiffy-link link-passage" data-passage="${o(n)}"${i(a)} role="link" tabindex="0">${u}</a>`)})}process(e,t){try{return e=this.handlebars.compile(zl(e))(this.state.getStore()),t?Or(e,{async:!1}).trim():Mr(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>`}}},Wl=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)}})}},Xl=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 on(e,t){return!e&&!t?!0:!e||!t||e.length!==t.length?!1:e.every((s,r)=>s===t[r])}function Yl(e,t,s,r,i,o){function n(p){return p.replace(/\'/g,"\\\\\'")}function a(p){return s.querySelectorAll(`[data-source=\'[[${n(p)}]]\']`)}function u(p,l){return s.querySelectorAll(`[data-source=\'[[${n(p)}]][${n(l)}]\']`)}function h(p,l){const f=Array.from(p.querySelectorAll("a.link-passage.disabled")).map(c=>c.getAttribute("data-passage"));p.innerHTML=l;for(const c of f){const d=p.querySelector(`a.link-passage[data-passage="${c}"]`);d&&i(d)}}for(const p of Object.keys(e.sections)){const l=a(p);if(l.length){const f=t.sections[p];if(f){const c=e.sections[p],d=!on(c.attributes,f.attributes),g=f.text!=c.text;if(d&&o(f.attributes||[]),g||d)for(const v of l)h(v,r(f.text||"",f))}else for(const c of l)c.closest(".squiffy-output-section")?.remove()}if(e.sections[p].passages)for(const f of Object.keys(e.sections[p].passages)){const c=u(p,f);if(!c.length)continue;const d=t.sections[p]?.passages&&t.sections[p]?.passages[f];if(d){const g=e.sections[p].passages[f],v=!on(g.attributes,d.attributes),_=d.text!=g.text;if(v&&o(d.attributes||[]),_||v)for(const S of c)h(S,r(d.text||"",t.sections[p]))}else for(const g of c)g.closest(".squiffy-output-passage")?.remove()}}}var Gl=class{constructor(e,t,s,r,i,o,n,a,u,h,p){this.plugins=[],this.outputElement=e,this.textProcessor=t,this.state=s,this.linkHandler=r,this.getSectionText=i,this.getPassageText=o,this.processText=n,this.addTransition=a,this.animation=u,this.emitter=h,this.resolveAssetsInHtml=p}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,resolveAssetsInHtml:this.resolveAssetsInHtml,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 an(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 Zl(){return{name:"replaceLabel",init(e){e.registerHelper("label",function(t,s){return new Je.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 o=r.includes(`\n\n`)?Mr(r,{async:!1}).trim():Or(r,{async:!1}).trim();e.addTransition(()=>an(i,o))}return""})}}}function Ql(){const e=i=>i.replace(/&/g,"&amp;").replace(/\'/g,"&#39;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=(i,o,n,a)=>{const u=n.map(c=>c.toString()),h=r(u,null),p=a.hash.set||"";p&&i.set(p,h[0]);const l=e(JSON.stringify(h.slice(1))||""),f=a.hash.show=="next"?h[1]:h[0];return new Je.default.SafeString(`<a class="squiffy-link" data-handler="${o}" data-value="${e(h[0])}" data-show="${a.hash.show||""}" data-options=\'${l}\' data-attribute="${p}" role="link">${f}</a>`)},s=(i,o,n)=>{const a={},u=JSON.parse(o.getAttribute("data-options")??"[]")||[],h=r(u,n?o.getAttribute("data-value"):"");o.innerHTML=o.getAttribute("data-show")=="next"?h[1]:h[0],o.setAttribute("data-value",h[0]),o.setAttribute("data-options",JSON.stringify(h.slice(1))||""),h[1]||(a.disableLink=!0);const p=o.getAttribute("data-attribute");return p&&i.set(p,o.getAttribute("data-value")),window.getSelection()?.removeAllRanges(),a},r=(i,o)=>{const n=i[0],a=i.slice(1);return o&&a.push(o),[n,...a]};return{name:"rotateSequence",init(i){i.registerHelper("rotate",(o,n)=>t(i,"rotate",o,n)),i.registerHelper("sequence",(o,n)=>t(i,"sequence",o,n)),i.registerLinkHandler("rotate",o=>s(i,o,!0)),i.registerLinkHandler("sequence",o=>s(i,o,!1))}}}function Jl(){return{name:"random",init(e){e.registerHelper("random",(t,s)=>{const r=t.map(n=>n.toString()),i=r[Math.floor(Math.random()*r.length)],o=s.hash.set||"";return o&&e.set(o,i),new Je.default.SafeString(i)})}}}function Kl(){let e;return{name:"live",init(t){e=t,e.registerHelper("live",(r,i)=>{const o=i.hash.section||"";if(o)return new Je.default.SafeString(`<span class="squiffy-live" data-attribute="${r}" data-section="${o}"></span>`);const n=i.hash.passage||"";return n?new Je.default.SafeString(`<span class="squiffy-live" data-attribute="${r}" data-passage="${n}"></span>`):new Je.default.SafeString(`<span class="squiffy-live" data-attribute="${r}"></span>`)});const s=async r=>{const i=[],o=`.squiffy-live[data-attribute="${CSS.escape(r.attribute)}"]`;for(const n of e.outputElement.querySelectorAll(o)){const a=n.innerHTML;let u="";if(n.dataset.section){const h=e.getSectionText(n.dataset.section);h&&(u=e.processText(h,!0))}else if(n.dataset.passage){const h=e.getPassageText(n.dataset.passage);h&&(u=e.processText(h,!0))}else u=r.value;a!==u&&i.push(an(n,u))}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 jl(){let e;const t=r=>{const i={};for(const[o,n]of Object.entries(r)){if(n==null){i[o]=n;continue}try{i[o]=JSON.parse(n)}catch{i[o]=n}}return i},s=r=>{for(const i of r.querySelectorAll(".squiffy-animate")){const o=t(i.dataset);if(!o.content)continue;const n=o.content.includes(`\n\n`)?Mr(o.content,{async:!1}):Or(o.content,{async:!1});if(i.innerHTML=e.resolveAssetsInHtml(n.trim()),!o.name)continue;const a=i.innerHTML;let u=[];const h=()=>{for(const f of u)e.animation.removeLinkAnimation(f);u=[...i.querySelectorAll("a")];for(const f of u)e.animation.addLinkAnimation(f,l)},p=()=>{if(o.trigger!=="link"){i.innerHTML=a;return}const f=u;i.innerHTML=a,h(),u.forEach((c,d)=>{const g=f[d];if(!g)return;g.classList.contains("disabled")&&c.classList.add("disabled");const v=g.getAttribute("tabindex");v!==null&&c.setAttribute("tabindex",v)})},l=()=>{o.loop?e.animation.runAnimation(o.name,i,o,()=>{},!0):(e.animation.isInitiallyHidden(o.name)&&(i.style.opacity="0"),e.addTransition(()=>new Promise(f=>{i.style.opacity="",e.animation.runAnimation(o.name,i,o,()=>{i.classList.remove("squiffy-animate"),p(),f()},!1)})))};o.trigger==="link"?h():l()}};return{name:"animate",init(r){e=r,e.registerHelper("animate",function(i,o){const n=o.fn(this),a={name:i,content:n,...o.hash},u=Object.entries(a).map(([p,l])=>` data-${Je.default.escapeExpression(p)}="${Je.default.escapeExpression(JSON.stringify(l))}"`).join(""),h=n.includes(`\n\n`)?"div":"span";return new Je.default.SafeString(`<${h} class="squiffy-animate"${u}></${h}>`)})},onWrite(r){s(r)},onLoad(){s(e.outputElement)}}}var vs={ReplaceLabel:Zl,RotateSequencePlugin:Ql,RandomPlugin:Jl,LivePlugin:Kl,AnimatePlugin:jl},ec=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,{}]}},_t=typeof window<"u",Ye=_t?window:null,J=_t?document:null,Le={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},ge={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},st={NONE:0,AUTO:1,FORCE:2},He={replace:0,none:1,blend:2},ln=Symbol(),Vt=Symbol(),Hr=Symbol(),ys=Symbol(),cn=Symbol(),Re=1e-11,mt=1e12,Ge=1e3,Hu="var(",Vs=[],qr=(()=>{const e=new Map;return e.set("x","translateX"),e.set("y","translateY"),e.set("z","translateZ"),e})(),zt=["perspective","translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],un=zt.reduce((e,t)=>({...e,[t]:t+"("}),{}),ne=()=>{},tc=e=>e,sc=/\\)\\s*[-.\\d]/,rc=/(^#([\\da-f]{3}){1,2}$)|(^#([\\da-f]{4}){1,2}$)/i,ic=/rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/i,nc=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,oc=/hsl\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*\\)/i,ac=/hsla\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,hn=/[-+]?\\d*\\.?\\d+(?:e[-+]?\\d)?/gi,pn=/^([-+]?\\d*\\.?\\d+(?:e[-+]?\\d+)?)([a-z]+|%)$/i,lc=/([a-z])([A-Z])/g,fn=/(\\*=|\\+=|-=)/,cc=/var\\(\\s*(--[\\w-]+)(?:\\s*,\\s*([^)]+))?\\s*\\)/,bs={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:Ge,delay:0,loopDelay:0,ease:"out(2)",composition:He.replace,modifier:tc,onBegin:ne,onBeforeUpdate:ne,onUpdate:ne,onLoop:ne,onPause:ne,onComplete:ne,onRender:ne},Ie={current:null,root:J},U={defaults:bs,precision:4,timeScale:1,tickThreshold:200,editor:null},dn={version:"4.5.0",engine:null};_t&&(Ye.AnimeJS||(Ye.AnimeJS=[]),Ye.AnimeJS.push(dn));var zs=e=>e.replace(lc,"$1-$2").toLowerCase(),Ne=(e,t)=>e.indexOf(t)===0,Rt=Date.now,qe=Array.isArray,De=e=>e&&e.constructor===Object,Ve=e=>typeof e=="number"&&!isNaN(e),Be=e=>typeof e=="string",Ae=e=>typeof e=="function",$=e=>typeof e>"u",Ut=e=>$(e)||e===null,Us=e=>_t&&e instanceof SVGElement,gn=e=>rc.test(e),mn=e=>Ne(e,"rgb"),vn=e=>Ne(e,"hsl"),uc=e=>gn(e)||(mn(e)||vn(e))&&(e[e.length-1]===")"||!sc.test(e)),ss=e=>!U.defaults.hasOwnProperty(e),hc=["opacity","rotate","overflow","color"],pc=(e,t)=>{if(hc.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}},Wt=e=>Be(e)?parseFloat(e):e,Xt=Math.pow,at=Math.sqrt,Fr=Math.sin,Vr=Math.cos,lt=Math.abs,Ws=Math.exp,fc=Math.ceil,rs=Math.floor,dc=Math.asin,yn=Math.max,Xs=Math.atan2,St=Math.PI,zr=Math.round,G=(e,t,s)=>e<t?t:e>s?s:e,F=(e,t)=>{if(t<0)return e;if(!t)return zr(e);const s=10**t;return zr(e*s)/s},Yt=(e,t)=>qe(t)?t.reduce((s,r)=>lt(r-e)<lt(s-e)?r:s):t?zr(e/t)*t:e,It=(e,t,s)=>s===1?t:s===0?e:e+(t-e)*s,Ys=e=>e===1/0?mt:e===-1/0?-mt:e,is=e=>e<=1e-11?Re:Ys(F(e,11)),We=e=>qe(e)?[...e]:e,ct=(e,t)=>{const s={...e};for(let r in t){const i=e[r];s[r]=$(i)?t[r]:i}return s},ke=(e,t,s,r="_prev",i="_next")=>{let o=e._head,n=i;for(s&&(o=e._tail,n=r);o;){const a=o[n];t(o),o=a}},vt=(e,t,s="_prev",r="_next")=>{const i=t[s],o=t[r];i?i[r]=o:e._head=o,o?o[s]=i:e._tail=i,t[s]=null,t[r]=null},yt=(e,t,s,r="_prev",i="_next")=>{let o=e._tail;for(;o&&s&&s(o,t);)o=o[r];const n=o?o[i]:e._head;o?o[i]=t:e._head=t,n?n[r]=t:e._tail=t,t[r]=o,t[i]=n},gc=(e,t,s)=>{const r=e.style.transform;if(r){const i=e[ys];let o=0;const n=r.length;let a;for(;o<n;){for(;o<n&&r.charCodeAt(o)===32;)o++;if(o>=n)break;const h=o;for(;o<n&&r.charCodeAt(o)!==40;)o++;if(o>=n)break;const p=r.substring(h,o);let l=1;const f=o+1;let c=-1,d=-1;for(o++;o<n&&l>0;){const v=r.charCodeAt(o);v===40?l++:v===41?l--:v===44&&l===1&&(c===-1?c=o:d===-1&&(d=o)),o++}const g=o-1;p==="translate"||p==="translate3d"?(c===-1?i.translateX=r.substring(f,g).trim():(i.translateX=r.substring(f,c).trim(),d===-1?i.translateY=r.substring(c+1,g).trim():(i.translateY=r.substring(c+1,d).trim(),i.translateZ=r.substring(d+1,g).trim())),a=r.substring(f,g)):p==="scale"||p==="scale3d"?c===-1?i.scale=r.substring(f,g).trim():(i.scaleX=r.substring(f,c).trim(),d===-1?i.scaleY=r.substring(c+1,g).trim():(i.scaleY=r.substring(c+1,d).trim(),i.scaleZ=r.substring(d+1,g).trim())):i[p]=r.substring(f,g)}if(t==="translate3d"&&a)return s&&(s[t]=a),a;const u=i[t];if(!$(u))return s&&(s[t]=u),u}return t==="translate3d"?"0px, 0px, 0px":t==="rotate3d"?"0, 0, 0, 0deg":Ne(t,"scale")?"1":Ne(t,"rotate")||Ne(t,"skew")?"0deg":"0px"},bn=e=>{let t="";for(let s=0,r=zt.length;s<r;s++){const i=zt[s],o=e[i];if(o!==void 0){if(i==="translateX"){const n=e.translateY;if(n!==void 0){const a=e.translateZ;a!==void 0?(t+=`translate3d(${o},${n},${a}) `,s+=2):(t+=`translate(${o},${n}) `,s+=1);continue}}if(i==="scaleX"&&e.scale===void 0){const n=e.scaleY;if(n!==void 0){const a=e.scaleZ;a!==void 0?(t+=`scale3d(${o},${n},${a}) `,s+=2):(t+=`scale(${o},${n}) `,s+=1);continue}}t+=`${un[i]}${o}) `}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},Ur=[];function _n(e,t){if(!e)return null;const s=Ur.length;e:for(let r=0;r<s;r++){const i=Ur[r];if(i.detect&&!i.detect(e))continue;const o=i.targetAdapters;for(let n=0,a=o.length;n<a;n++){const u=o[n];if(u.detect(e)){const h=u.props[t];if(h&&(!h.gate||h.gate(e)))return h;break e}}}for(let r=0;r<s;r++){const i=Ur[r];if(i.detect&&!i.detect(e))continue;const o=i.propertyResolvers;for(let n=0,a=o.length;n<a;n++){const u=o[n](e,t);if(u)return u}}return null}var mc=e=>{const t=ic.exec(e)||nc.exec(e),s=$(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],s]},vc=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]},Wr=(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),yc=e=>{const t=oc.exec(e)||ac.exec(e),s=+t[1]/360,r=+t[2]/100,i=+t[3]/100,o=$(t[4])?1:+t[4];let n,a,u;if(r===0)n=a=u=i;else{const h=i<.5?i*(1+r):i+r-i*r,p=2*i-h;n=F(Wr(p,h,s+1/3)*255,0),a=F(Wr(p,h,s)*255,0),u=F(Wr(p,h,s-1/3)*255,0)}return[n,a,u,o]},bc=e=>mn(e)?mc(e):gn(e)?vc(e):vn(e)?yc(e):[0,0,0,1],W=(e,t)=>$(e)?t:e,Sn=(e,t)=>{const s=e.match(cc),r=t[Vt]?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,o)=>{if(Ae(e)){if(!i){const a=e(t,s,r,o);return isNaN(+a)?a||0:+a}const n=()=>{const a=e(t,s,r,o);return isNaN(+a)?a||0:+a};return i.func=n,n()}if(Be(e)&&Ne(e,"var(")){if(!i)return Sn(e,t);const n=()=>Sn(e,t);return i.func=n,n()}return e},Xr=(e,t)=>e[Vt]?e[Hr]&&pc(e,t)?Le.ATTRIBUTE:zt.includes(t)||qr.get(t)?Le.TRANSFORM:Ne(t,"--")?Le.CSS_VAR:t in e.style?Le.CSS:t in e?Le.OBJECT:Le.ATTRIBUTE:Le.OBJECT,kn=(e,t,s)=>{const r=e.style[t];r&&s&&(s[t]=r);const i=r||getComputedStyle(e[cn]||e).getPropertyValue(t);return i==="auto"?"0":i},Gt=(e,t,s,r)=>{const i=$(s)?Xr(e,t):s,o=_n(e,t);if(o){const n=o.get(e);return n&&r&&(r[t]=n),n??0}if(i===Le.OBJECT){const n=e[t];return n&&r&&(r[t]=n),n||0}if(i===Le.ATTRIBUTE){const n=e.getAttribute(t);return n&&r&&(r[t]=n),n}return i===Le.TRANSFORM?gc(e,t,r):i===Le.CSS_VAR?kn(e,t,r).trimStart():kn(e,t,r)},Zt=(e,t,s)=>s==="-"?e-t:s==="+"?e+t:e*t,Yr=()=>({t:ge.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ke=(e,t)=>{if(t.t=ge.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:pn.exec(r);if(i)return t.t=ge.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(uc(r))return t.t=ge.COLOR,t.d=bc(r),t;{const o=r.match(hn);return t.t=ge.COMPLEX,t.d=o?o.map(Number):[],t.s=r.split(hn)||[],t}},wn=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=We(e._toNumbers),t.s=We(e._strings),t),ze=Yr(),xn=(e,t,s)=>{const r=e._modifier,i=e._fromNumbers,o=e._toNumbers,n=e._strings;let a=n[0];for(let u=0,h=o.length;u<h;u++){const p=r(F(It(i[u],o[u],t),s)),l=n[u+1];a+=`${l?p+l:p}`,e._numbers[u]=p}return a},Gs=(e,t,s,r,i)=>{const o=e.parent,n=e.duration,a=e.completed,u=e.iterationDuration,h=e.iterationCount,p=e._currentIteration,l=e._loopDelay,f=e._reversed,c=e._alternate,d=e._hasChildren,g=e._delay,v=e._currentTime,_=g+u,S=t-g,y=G(v,-g,n),m=G(S,-g,n),b=S-v,k=m>0,w=m>=n,A=n<=Re,O=i===st.FORCE;let E=0,L=S,P=0;if(h>1){const N=u+(w?0:l),I=~~(m/N);e._currentIteration=G(I,0,h),w&&e._currentIteration--,E=e._currentIteration%2,L=m-I*N||0}const D=f^(c&&E),B=e._ease;let V=w?D?0:n:D?u-L:L;B&&(V=u*B(V/u)||0);const x=(o?o.backwards:S<v)?!D:!!D;if(e._currentTime=S,e._iterationTime=V,e.backwards=x,k&&!e.began?(e.began=!0,!s&&!(o&&(x||!o.began))&&e.onBegin(e)):S<=0&&(e.began=!1),!s&&!d&&k&&e._currentIteration!==p&&e.onLoop(e),O||i===st.AUTO&&(t>=(o&&g>0?0:g)&&t<=_||t<=g&&y>g||t>=_&&y!==n)||V>=_&&y!==n||V<=g&&y>0&&!w||t<=y&&y===n&&a||w&&!a&&A){if(k&&(e.computeDeltaTime(y),s||e.onBeforeUpdate(e)),!d){const N=O||(x?b*-1:b)>=U.tickThreshold,I=F(e._offset+(o?o._offset:0)+g+V,12);let R=e._head,q,K,Z,z,j=0;for(;R;){const oe=R._composition,X=R._currentTime,ve=R._changeDuration,se=R._absoluteStartTime+R._changeDuration,re=R._nextRep,Q=R._prevRep,ue=oe!==He.none,xe=Q?Q._absoluteStartTime+Q._changeDuration:0,we=Q&&Q.parent!==R.parent,he=!re||re._isOverridden?se:re.parent===R.parent?se+re._delay:re._absoluteStartTime<re._absoluteUpdateStartTime?re._absoluteStartTime:re._absoluteUpdateStartTime;if((N||(X!==ve||I<=he||Q&&!we&&(!re||re.parent!==R.parent))&&(X!==0||I>=R._absoluteStartTime||we&&!R._hasFromValue&&!Q._isOverridden&&I>=xe||re&&!re._isOverridden&&re.parent===R.parent&&re._currentTime!==0&&V<re._startTime))&&(!Q||we||V>=R._startTime)&&(!ue||!R._isOverridden&&(!R._isOverlapped||I<=se)&&(!re||re._isOverridden||I<=he)&&(!Q||Q._isOverridden||(we?I>=R._absoluteStartTime||!R._hasFromValue&&I>=xe:I>=xe+R._delay)))){const ee=R._currentTime=G(V-R._startTime,0,ve),te=R._ease(ee/R._updateDuration),ye=R._modifier,Te=R._valueType,Ce=R._tweenType,be=Ce===Le.OBJECT,ae=Te===ge.NUMBER,me=ae&&be||te===0||te===1?-1:U.precision;let de,C;if(ae)de=C=ye(F(It(R._fromNumber,R._toNumber,te),me));else if(Te===ge.UNIT)C=ye(F(It(R._fromNumber,R._toNumber,te),me)),de=`${C}${R._unit}`;else if(Te===ge.COLOR){const T=R._numbers,M=R._fromNumbers,H=R._toNumbers,Y=1-te,le=M[0],_e=M[1],Me=M[2],wt=H[0],Fe=H[1],Bt=H[2];T[0]=ye(Math.sqrt(le*le*Y+wt*wt*te)),T[1]=ye(Math.sqrt(_e*_e*Y+Fe*Fe*te)),T[2]=ye(Math.sqrt(Me*Me*Y+Bt*Bt*te)),T[3]=ye(It(M[3],H[3],te)),(!R._setter||r)&&(de=`rgba(${F(T[0],0)},${F(T[1],0)},${F(T[2],0)},${T[3]})`)}else Te===ge.COMPLEX&&(de=xn(R,te,me));if(ue&&(R._number=C),!r&&oe!==He.blend){const T=R.property;q=R.target,R._setter?R._setter(q,C,R):be?q[T]=de:Ce===Le.ATTRIBUTE?q.setAttribute(T,de):(K=q.style,Ce===Le.TRANSFORM?(q!==Z&&(Z=q,z=q[ys]),z[T]=de,j=1):Ce===Le.CSS?K[T]=de:Ce===Le.CSS_VAR&&K.setProperty(T,de)),k&&(P=1)}else R._value=de}else X&&Q&&!we&&V<R._startTime&&(R._currentTime=0);j&&R._renderTransforms&&(K.transform=bn(z),j=0),R=R._next}!s&&P&&e.onRender(e)}!s&&k&&e.onUpdate(e)}return o&&A?!s&&(o.began&&!x&&S>0&&!a||x&&S<=1e-11&&a)&&(e.onComplete(e),e.completed=!x):k&&w?h===1/0?e._startTime+=e.duration:e._currentIteration>=h-1&&(e.paused=!0,!a&&!d&&(e.completed=!0,!s&&!(o&&(x||!o.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,P},Qt=(e,t,s,r,i)=>{const o=e._currentIteration;if(Gs(e,t,s,r,i),e._hasChildren){const n=e,a=n.backwards,u=r?t:n._iterationTime,h=Rt();let p=0,l=!0;if(!r&&n._currentIteration!==o){const f=n.iterationDuration;ke(n,c=>{if(!a)!c.completed&&!c.backwards&&c._currentTime<c.iterationDuration&&Gs(c,f,s,1,st.FORCE),c.began=!1,c.completed=!1;else{const d=c.duration,g=c._offset+c._delay,v=g+d;!s&&d<=1e-11&&(!g||v===f)&&c.onComplete(c)}}),s||n.onLoop(n)}ke(n,f=>{const c=F((u-f._offset)*f._speed,12);if(a&&c>f._delay+f.duration)return;const d=f._fps<n._fps?f.requestTick(h):i;p+=Gs(f,c,s,r,d),!f.completed&&l&&(l=!1)},a),!s&&p&&n.onRender(n),(l||a)&&n._currentTime>=n.duration&&(n.paused=!0,n.completed||(n.completed=!0,s||(n.onComplete(n),n._resolve(n))))}},Tn={},Gr=(e,t,s)=>{if(s===Le.TRANSFORM){const r=qr.get(e);return r||e}else if(s===Le.CSS||s===Le.ATTRIBUTE&&Us(t)&&e in t.style){const r=Tn[e];if(r)return r;{const i=e&&zs(e);return Tn[e]=i,i}}else return e},Zs=(e,t=!1)=>{if(e._hasChildren)ke(e,s=>Zs(s,t),!0);else{const s=e;s.pause(),ke(s,r=>{const i=r.property,o=r.target,n=r._tweenType,a=r._inlineValue,u=Ut(a)||a==="";if(r._setter){if(!t&&!u){if(Ke(a,ze),ze.d){const h=ze.d,p=r._numbers;for(let l=0,f=h.length;l<f;l++)p[l]=h[l]}else r._number=ze.n;r._setter(r.target,r._number,r)}}else if(n===Le.OBJECT)!t&&!u&&(o[i]=a);else if(o[Vt])if(n===Le.ATTRIBUTE)t||(u?o.removeAttribute(i):o.setAttribute(i,a));else{const h=o.style;if(n===Le.TRANSFORM){const p=o[ys];u?delete p[i]:p[i]=a,r._renderTransforms&&(Object.keys(p).length?h.transform=bn(p):h.removeProperty("transform"))}else u?h.removeProperty(zs(i)):h[i]=a}o[Vt]&&s._tail===r&&s.targets.forEach(h=>{h.getAttribute&&h.getAttribute("style")===""&&h.removeAttribute("style")})})}return e},Cn=e=>Zs(e,!0),Pn=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=Ge/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=Ge/s;s>bs.frameRate&&(bs.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?st.NONE:(this._lastTickTime=s>=t?e-s%t:e,st.AUTO)}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},ns={animation:null,update:ne},_c=e=>{let t=ns.animation;return t||(t={duration:Re,computeDeltaTime:ne,_offset:0,_delay:0,_head:null,_tail:null},ns.animation=t,ns.update=()=>{e.forEach(s=>{for(let r in s){const i=s[r],o=i._head;if(o){const n=o._valueType,a=n===ge.COMPLEX||n===ge.COLOR?We(o._fromNumbers):null;let u=o._fromNumber,h=i._tail;for(;h&&h!==o;){if(a)for(let p=0,l=h._numbers.length;p<l;p++)a[p]+=h._numbers[p];else u+=h._number;h=h._prevAdd}o._toNumber=u,o._toNumbers=a}}}),Gs(t,1,1,0,st.FORCE)}),t},En=_t?requestAnimationFrame:setImmediate,Sc=_t?cancelAnimationFrame:clearImmediate,kc=class extends Pn{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=bs,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=Rt();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?(vt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Qt(r,(e-r._startTime)*r._speed*t,0,0,r._fps<s?r.requestTick(e):st.AUTO),r=i}ns.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(Rt()),this.reqId=En(An)),this}pause(){if(this.reqId)return this.paused=!0,wc()}resume(){if(this.paused)return this.paused=!1,ke(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(U.timeScale===1?1:Ge)}set speed(e){const t=e*U.timeScale;this._speed!==t&&(this._speed=t,ke(this,s=>s.speed=s._speed))}get timeUnit(){return U.timeScale===1?"ms":"s"}set timeUnit(e){const s=e==="s",r=s?.001:1;if(U.timeScale!==r){U.timeScale=r,U.tickThreshold=200*r;const i=s?.001:Ge;this.defaults.duration*=i,this._speed*=i}}get precision(){return U.precision}set precision(e){U.precision=e}},Ue=(()=>{const e=new kc(Rt());return _t&&(dn.engine=e,J.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(J.hidden?e.pause():e.resume())})),e})(),An=()=>{Ue._head?(Ue.reqId=En(An),Ue.update()):Ue.reqId=0},wc=()=>(Sc(Ue.reqId),Ue.reqId=0,Ue),Qs={_rep:new WeakMap,_add:new Map},Zr=(e,t,s="_rep")=>{const r=Qs[s];let i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},xc=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,Js=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=Re,e._currentTime=Re},Ln=(e,t)=>{const s=e._composition;if(s===He.replace){const r=e._absoluteStartTime;yt(t,e,xc,"_prevRep","_nextRep");const i=e._prevRep;if(i){const o=i.parent,n=i._absoluteEndTime;if(e.parent.id!==o.id&&o.iterationCount>1&&n+(o.duration-o.iterationDuration)>r){Js(i);let h=i._prevRep;for(;h&&h.parent.id===o.id;)Js(h),h=h._prevRep}const a=e._absoluteUpdateStartTime;if(n>a){const h=i._startTime,p=n-(h+i._updateDuration),l=F(a-p-h,12);i._changeDuration=l,i._currentTime=l,i._isOverlapped=1,l<1e-11&&Js(i)}const u=e.parent.parent;if(!u||u!==o.parent){let h=!0;if(ke(o,p=>{p._isOverlapped||(h=!1)}),h){const p=o.parent;if(p){let l=!0;ke(p,f=>{f!==o&&ke(f,c=>{c._isOverlapped||(l=!1)})}),l&&p.cancel()}else o.cancel()}}}}else if(s===He.blend){const r=Zr(e.target,e.property,"_add"),i=_c(Qs._add);let o=r._head;o||(o={...e},o._composition=He.replace,o._updateDuration=Re,o._startTime=0,o._numbers=We(e._fromNumbers),o._number=0,o._next=null,o._prev=null,yt(r,o),yt(i,o));const n=e._toNumber;if(e._fromNumber=o._fromNumber-n,e._toNumber=0,e._numbers=We(e._fromNumbers),e._number=0,o._fromNumber=n,e._toNumbers.length){const a=We(e._toNumbers);a.forEach((u,h)=>{e._fromNumbers[h]=o._fromNumbers[h]-u,e._toNumbers[h]=0}),o._fromNumbers=a}yt(r,e,null,"_prevAdd","_nextAdd")}return e},Rn=e=>{const t=e._composition;if(t!==He.none){const s=e.target,r=e.property,i=Qs._rep.get(s)[r];if(vt(i,e,"_prevRep","_nextRep"),t===He.blend){const o=Qs._add,n=o.get(s);if(!n)return;const a=n[r],u=ns.animation;vt(a,e,"_prevAdd","_nextAdd");const h=a._head;if(h&&h===a._tail){vt(a,h,"_prevAdd","_nextAdd"),vt(u,h);let p=!0;for(let l in n)if(n[l]._head){p=!1;break}p&&o.delete(s)}}}return e},In=(e,t,s)=>{let r=!1;return ke(t,i=>{const o=i.target;if(e.includes(o)){const n=i.property,a=i._tweenType,u=Gr(s,o,a);(!u||u&&u===n)&&(i.parent._tail===i&&i._tweenType===Le.TRANSFORM&&i._prev&&i._prev._tweenType===Le.TRANSFORM&&(i._prev._renderTransforms=1),vt(t,i),Rn(i),r=!0)}},!0),r},Tt=(e,t,s)=>{const r=t||Ue;let i;if(r._hasChildren){let o=0;ke(r,n=>{if(!n._hasChildren)if(i=In(e,n,s),i&&!n._head)n.cancel(),vt(r,n);else{const a=n._offset+n._delay+n.duration;a>o&&(o=a)}n._head?Tt(e,n,s):n._hasChildren=!1},!0),$(r.iterationDuration)||(r.iterationDuration=o)}else i=In(e,r,s);i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())},On=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Qr=e=>(e._cancelled&&(e._hasChildren?ke(e,Qr):ke(e,t=>{t._composition!==He.none&&Ln(t,Zr(t.target,t.property))}),e._cancelled=0),e),Mn=0,Tc=(e,t)=>e._priority>t._priority,rt=class extends Pn{constructor(e={},t=null,s=0){super(0),++Mn;const{id:r,delay:i,duration:o,reversed:n,alternate:a,loop:u,loopDelay:h,autoplay:p,frameRate:l,playbackRate:f,priority:c,onComplete:d,onLoop:g,onPause:v,onBegin:_,onBeforeUpdate:S,onUpdate:y}=e;Ie.current&&Ie.current.register(this);const m=t?0:Ue._lastTickTime,b=t?t.defaults:U.defaults,k=Ae(i)||$(i)?b.delay:+i,w=Ae(o)||$(o)?1/0:+o,A=W(u,b.loop),O=W(h,b.loopDelay);let E=A===!0||A===1/0||A<0?1/0:A+1,L=0;t?L=s:(Ue.reqId||Ue.requestTick(Rt()),L=(Ue._lastTickTime-Ue._startTime)*U.timeScale),this.id=$(r)?Mn:r,this.parent=t,this.duration=Ys((w+O)*E-O)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||b.onBegin,this.onBeforeUpdate=S||b.onBeforeUpdate,this.onUpdate=y||b.onUpdate,this.onLoop=g||b.onLoop,this.onPause=v||b.onPause,this.onComplete=d||b.onComplete,this.iterationDuration=w,this.iterationCount=E,this._autoplay=t?!1:W(p,b.autoplay),this._offset=L,this._delay=k,this._loopDelay=O,this._iterationTime=0,this._currentIteration=0,this._resolve=ne,this._running=!1,this._reversed=+W(n,b.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=W(a,b.alternate),this._prev=null,this._next=null,this._lastTickTime=m,this._startTime=m,this._lastTime=m,this._fps=W(l,b.frameRate),this._speed=W(f,b.playbackRate),this._priority=+W(c,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return G(F(this._currentTime,U.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,U.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 Qr(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Qt(this,0,1,~~e,st.FORCE),On(this),this._hasChildren&&ke(this,On),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Qt(this,this.duration,1,~~e,st.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!$(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Ue._speed);return this._startTime=Rt()-(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?Qt(this,Re,0,0,st.FORCE):(this._running||(yt(Ue,this,Tc),Ue._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Ue.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,s=0){Qr(this),this.completed=!1;const r=this.paused;return this.paused=!0,Qt(this,e+this._delay,~~t,~~s,st.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,s=this.iterationDuration,r=t===1/0?rs(mt/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?ke(this,e=>e.cancel(),!0):ke(this,Rn),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,s=is(e);if(t===s)return this;const r=e/t,i=e<=Re;return this.duration=i?Re:s,this.iterationDuration=i?Re:is(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Qt(this,0,1,0,st.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=ne){const t=this.then,s=()=>{this.then=null,e(this),this.then=t,this._resolve=ne};return new Promise(r=>(this._resolve=()=>r(s()),this.completed&&this._resolve(),this))}},Cc=e=>new rt(e,null,0).init();function Jr(e){const t=Be(e)?Ie.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function it(e){if(Ut(e))return[];if(!_t)return qe(e)&&e.flat(1/0)||[e];if(qe(e)){const s=e.flat(1/0),r=[];for(let i=0,o=s.length;i<o;i++){const n=s[i];if(!Ut(n)){const a=Jr(n);if(a)for(let u=0,h=a.length;u<h;u++){const p=a[u];if(!Ut(p)){let l=!1;for(let f=0,c=r.length;f<c;f++)if(r[f]===p){l=!0;break}l||r.push(p)}}else{let u=!1;for(let h=0,p=r.length;h<p;h++)if(r[h]===n){u=!0;break}u||r.push(n)}}}return r}const t=Jr(e);return t?Array.from(t):[e]}function Ot(e){const t=it(e),s=t.length;for(let r=0;r<s;r++){const i=t[r];if(!i[ln]){i[ln]=!0;const o=Us(i);(i.nodeType||o)&&(i[Vt]=!0,i[Hr]=o,i[ys]={})}}return t}var Kr={deg:1,rad:180/St,turn:360},Nn={},Ks=(e,t,s,r=!1)=>{const i=t.u,o=t.n;if(t.t===ge.UNIT&&i===s)return t;const n=o+i+s,a=Nn[n];if(!$(a)&&!r)t.n=a;else{let u;if(i in Kr)u=o*Kr[i]/Kr[s];else{const p=e.cloneNode(),l=e.parentNode,f=l&&l!==J?l:J.body;f.appendChild(p);const c=p.style;c.width=100+i;const d=p.offsetWidth||100;c.width=100+s;const g=d/(p.offsetWidth||100);f.removeChild(p),u=g*o}t.n=u,Nn[n]=u}return t.t,ge.UNIT,t.u=s,t},nt=e=>e,_s=(e=1.68)=>t=>Xt(t,+e),jr={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},Pc=St/2,Dn=St*2,Bn={"":_s,Quad:_s(2),Cubic:_s(3),Quart:_s(4),Quint:_s(5),Sine:e=>1-Vr(e*Pc),Circ:e=>1-at(1-e*e),Expo:e=>e?Xt(2,10*e-10):0,Bounce:e=>{let t,s=4;for(;e<((t=Xt(2,--s))-1)/11;);return 1/Xt(4,3-s)-7.5625*Xt((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/Dn*dc(1/s),o=Dn/r;return n=>n===0||n===1?n:-s*Xt(2,-10*(1-n))*Fr((1-n-i)*o)}},Ct=(()=>{const e={linear:nt,none:nt};for(let t in jr)for(let s in Bn){const r=Bn[s],i=jr[t];e[t+s]=s===""||s==="Back"||s==="Elastic"?(o,n)=>i(r(o,n)):i(r)}return e})(),js={linear:nt,none:nt},$n=e=>{if(js[e])return js[e];if(e.indexOf("(")<=-1){const t=jr[e]||e.includes("Back")||e.includes("Elastic")?Ct[e]():Ct[e];return t?js[e]=t:nt}else{const t=e.slice(0,-1).split("("),s=Ct[t[0]];return s?js[e]=s(...t[1].split(",")):nt}},Hn=["steps(","irregular(","linear(","cubicBezier("],Pt=e=>{if(Be(e)){for(let t=0,s=Hn.length;t<s;t++)if(Ne(e,Hn[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}\\``),nt}return Ae(e)?e:Be(e)?$n(e):nt},ie=Yr(),fe=Yr(),os={},er={func:null},tr={func:null},sr=[null],as=[null,null],rr={to:null},Ec=0,qn=0,Mt,kt,Ac=(e,t)=>{const s={};if(qe(e)){const r=[].concat(...e.map(i=>Object.keys(i))).filter(ss);for(let i=0,o=r.length;i<o;i++){const n=r[i];s[n]=e.map(a=>{const u={};for(let h in a){const p=a[h];ss(h)?h===n&&(u.to=p):u[h]=p}return u})}}else{const r=W(t.duration,U.defaults.duration);Object.keys(e).map(i=>({o:parseFloat(i)/100,p:e[i]})).sort((i,o)=>i.o-o.o).forEach(i=>{const o=i.o,n=i.p;for(let a in n)if(ss(a)){let u=s[a];u||(u=s[a]=[]);const h=o*r;let p=u.length,l=u[p-1];const f={to:n[a]};let c=0;for(let d=0;d<p;d++)c+=u[d].duration;p===1&&(f.from=l.to),n.ease&&(f.ease=n.ease),f.duration=h-(p?c:0),u.push(f)}return i});for(let i in s){const o=s[i];let n;for(let a=0,u=o.length;a<u;a++){const h=o[a],p=h.ease;h.ease=n||void 0,n=p}o[0].duration||o.shift()}}return s},Et=class extends rt{constructor(e,t,s,r,i=!1,o=0,n){super(t,s,r),this._head,this._tail,++qn;const a=Ot(e),u=a.length,h=t.keyframes,p=h?ct(Ac(h,t),t):t,{id:l,delay:f,duration:c,ease:d,playbackEase:g,modifier:v,composition:_,onRender:S}=p,y=s?s.defaults:U.defaults,m=W(d,y.ease),b=W(g,y.playbackEase),k=b?Pt(b):null,w=!$(m.ease),A=w?m.ease:W(d,k?"linear":y.ease),O=w?m.settlingDuration:W(c,y.duration),E=W(f,y.delay),L=v||y.modifier,P=$(_)&&u>=1e3?He.none:$(_)?y.composition:_,D=this._offset+(s?s._offset:0);w&&(m.parent=this);let B=NaN,V=NaN,x=0,N=0;for(let I=0;I<u;I++){const R=a[I],q=o||I,K=n||a;let Z=NaN,z=NaN;for(let j in p)if(ss(j)){const oe=Xr(R,j),X=_n(R,j),ve=Gr(j,R,oe);let se=p[j];const re=qe(se);if(i&&!re&&(as[0]=se,as[1]=se,se=as),re){const ee=se.length,te=!De(se[0]);ee===2&&te?(rr.to=se,sr[0]=rr,Mt=sr):ee>2&&te?(Mt=[],se.forEach((ye,Te)=>{Te?Te===1?(as[1]=ye,Mt.push(as)):Mt.push(ye):as[0]=ye})):Mt=se}else sr[0]=se,Mt=sr;let Q=null,ue=null,xe=NaN,we=0,he=0;for(let ee=Mt.length;he<ee;he++){const te=Mt[he];De(te)?kt=te:(rr.to=te,kt=rr),er.func=null,tr.func=null;const ye=Oe(W(kt.composition,P),R,q,K,null,null),Te=Ve(ye)?ye:He[ye];!Q&&Te!==He.none&&(Q=Zr(R,ve));const Ce=Q?Q._tail:null,be=s&&Ce&&Ce.parent.parent===s?Ce:ue,ae=Oe(kt.to,R,q,K,er,be);let me;De(ae)&&!$(ae.to)?(kt=ae,me=ae.to):me=ae;const de=Oe(kt.from,R,q,K,tr,be),C=kt.ease||A,T=Oe(C,R,q,K,null,be),M=Ae(T)||Be(T)?T:C,H=!$(M)&&!$(M.ease),Y=H?M.ease:M,le=H?M.settlingDuration:Oe(W(kt.duration,ee>1?Oe(O,R,q,K,null,be)/ee:O),R,q,K,null,be),_e=Oe(W(kt.delay,he?0:E),R,q,K,null,be),Me=kt.modifier||L,wt=!$(de),Fe=!$(me),Bt=qe(me),Lu=Bt||wt&&Fe,Ru=ue?we:0,ki=ue?we+_e:_e,wi=F(D+ki,12),Iu=F(D+Ru,12);!N&&(wt||Bt)&&(N=1);let pt=ue;if(Te!==He.none){let Se=Q._head;for(;Se&&Se._absoluteStartTime<=wi;)if(Se._isOverridden||(pt=Se),Se=Se._nextRep,Se&&Se._absoluteStartTime>=wi)for(;Se;)Js(Se),Se=Se._nextRep}if(Lu){Ke(Bt?Oe(me[0],R,q,K,tr,be):de,ie),Ke(Bt?Oe(me[1],R,q,K,er,be):me,fe);const Se=Gt(R,ve,oe,os);ie.t===ge.NUMBER&&(pt?pt._valueType===ge.UNIT&&(ie.t=ge.UNIT,ie.u=pt._unit):(Ke(Se,ze),ze.t===ge.UNIT&&(ie.t=ge.UNIT,ie.u=ze.u)))}else Fe?Ke(me,fe):ue?wn(ue,fe):Ke(s&&pt&&pt.parent.parent===s?pt._value:Gt(R,ve,oe,os),fe),wt?Ke(de,ie):ue?wn(ue,ie):Ke(s&&pt&&pt.parent.parent===s?pt._value:Gt(R,ve,oe,os),ie);if(ie.o&&(ie.n=Zt(pt?pt._toNumber:Ke(Gt(R,ve,oe,os),ze).n,ie.n,ie.o)),fe.o&&(fe.n=Zt(ie.n,fe.n,fe.o)),ie.t!==fe.t){if(ie.t===ge.COMPLEX||fe.t===ge.COMPLEX){const Se=ie.t===ge.COMPLEX?ie:fe,Qe=ie.t===ge.COMPLEX?fe:ie;Qe.t=ge.COMPLEX,Qe.s=We(Se.s),Qe.d=Se.d.map(()=>Qe.n)}else if(ie.t===ge.UNIT||fe.t===ge.UNIT){const Se=ie.t===ge.UNIT?ie:fe,Qe=ie.t===ge.UNIT?fe:ie;Qe.t=ge.UNIT,Qe.u=Se.u}else if(ie.t===ge.COLOR||fe.t===ge.COLOR){const Se=ie.t===ge.COLOR?ie:fe,Qe=ie.t===ge.COLOR?fe:ie;Qe.t=ge.COLOR,Qe.d=Se.d.map(()=>0)}}if(ie.u!==fe.u){let Se=fe.u?ie:fe;Se=Ks(R,Se,fe.u?fe.u:ie.u,!1)}if(fe.d&&ie.d&&fe.d.length!==ie.d.length){const Se=ie.d.length>fe.d.length?ie:fe,Qe=Se===ie?fe:ie;Qe.d=Se.d.map((qu,Yo)=>$(Qe.d[Yo])?0:Qe.d[Yo]),Qe.s=We(Se.s)}const xi=F(+le||1e-11,12);let Uo=os[ve];Ut(Uo)||(os[ve]=null);const Ou=X?X.set:null;we=F(ki+xi,12);const Sr=ie.d,Wo=fe.d,Xo=fe.s,ot={parent:this,id:Ec++,property:ve,target:R,_value:null,_toFunc:er.func,_fromFunc:tr.func,_ease:Pt(Y),_fromNumbers:Sr?We(Sr):Vs,_toNumbers:Wo?We(Wo):Vs,_strings:Xo?We(Xo):Vs,_fromNumber:ie.n,_toNumber:fe.n,_numbers:Sr?We(Sr):Vs,_number:ie.n,_unit:fe.u,_modifier:Me,_currentTime:0,_startTime:ki,_delay:+_e,_updateDuration:xi,_changeDuration:xi,_absoluteStartTime:wi,_absoluteUpdateStartTime:Iu,_absoluteEndTime:F(D+we,12),_hasFromValue:wt||Bt?1:0,_tweenType:oe,_setter:Ou,_valueType:fe.t,_composition:Te,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Uo,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};Te!==He.none&&Ln(ot,Q);const Ti=ot._valueType;if(Ti===ge.COMPLEX)ot._value=xn(ot,1,-1);else if(Ti===ge.UNIT)ot._value=`${Me(ot._toNumber)}${ot._unit}`;else if(Ti===ge.COLOR){const Se=fe.d;ot._value=`rgba(${F(Se[0],0)},${F(Se[1],0)},${F(Se[2],0)},${Se[3]})`}else ot._value=Me(ot._toNumber);isNaN(xe)&&(xe=ot._startTime),ue=ot,x++,yt(this,ot)}(isNaN(V)||xe<V)&&(V=xe),(isNaN(B)||we>B)&&(B=we),oe===Le.TRANSFORM&&(Z=x-he,z=x)}if(!isNaN(Z)){let j=0;ke(this,oe=>{j>=Z&&j<z&&(oe._renderTransforms=1,oe._composition===He.blend&&ke(ns.animation,X=>{X.id===oe.id&&(X._renderTransforms=1)})),j++})}}u||console.warn("No target found. Make sure the element you\'re trying to animate is accessible before creating your animation."),V?(ke(this,I=>{I._startTime-I._delay||(I._delay-=V),I._startTime-=V}),B-=V):V=0,B||(B=Re,this.iterationCount=0),this.targets=a,this.id=$(l)?qn:l,this.duration=B===1e-11?Re:Ys((B+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=S||y.onRender,this._ease=k,this._delay=V,this.iterationDuration=B,!this._autoplay&&N&&this.onRender(this)}stretch(e){const t=this.duration;if(t===is(e))return this;const s=e/t;return ke(this,r=>{r._updateDuration=is(r._updateDuration*s),r._changeDuration=is(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 ke(this,e=>{const t=e._toFunc,s=e._fromFunc;(t||s)&&(s?(Ke(s(),ie),ie.u!==e._unit&&e.target[Vt]&&Ks(e.target,ie,e._unit,!0),e._fromNumbers=We(ie.d),e._fromNumber=ie.n):t&&(Ke(Gt(e.target,e.property,e._tweenType),ze),e._fromNumbers=We(ze.d),e._fromNumber=ze.n),t&&(Ke(t(),fe),e._toNumbers=We(fe.d),e._strings=We(fe.s),e._toNumber=fe.o?Zt(e._fromNumber,fe.n,fe.o):fe.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),Zs(this)}then(e){return super.then(e)}},Ss=(e,t)=>U.editor?U.editor.addAnimation(e,t):new Et(e,t,null,0,!1).init(),Lc=(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}},ks=(e,t)=>{let s=e.iterationDuration;if(s===1e-11&&(s=0),$(t))return s;if(Ve(+t))return+t;const r=t,i=e?e.labels:null,o=!Ut(i),n=Lc(e,r),a=!$(n),u=fn.exec(r);if(u){const h=u[0],p=r.split(h),l=o&&p[0]?i[p[0]]:s,f=a?n:o?l:s,c=+p[1];return Zt(f,c,h[0])}else return a?n:o?$(i[r])?s:i[r]:s};function Rc(e){return Ys((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function ei(e,t,s,r,i,o){const n=Ve(e.duration)&&e.duration<=1e-11?s-Re:s;t.composition&&Qt(t,n,1,1,st.AUTO);const a=r?new Et(r,e,t,n,!1,i,o):new rt(e,t,n);return t.composition&&a.init(!0),yt(t,a),ke(t,u=>{const h=u._offset+u._delay+u.duration;h>t.iterationDuration&&(t.iterationDuration=h)}),t.duration=Rc(t),t}var Fn=0,Vn=class extends rt{constructor(e={}){super(e,null,0),++Fn,this.id=$(e.id)?Fn:e.id,this.duration=0,this.labels={};const t=e.defaults,s=U.defaults;this.defaults=t?ct(t,s):s,this.composition=W(e.composition,!0),this.onRender=e.onRender||s.onRender;const r=W(e.playbackEase,s.playbackEase);this._ease=r?Pt(r):null,this.iterationDuration=0}add(e,t,s){const r=De(t),i=De(e);if(r||i){if(this._hasChildren=!0,r){const o=t,n=U.editor&&U.editor.addTimelineChild,a=s&&s.type==="Stagger"&&U.editor,u=Ae(s)?s:null;if(u||a){const h=it(e),p=this.duration,l=this.iterationDuration,f=o.id;let c=0;const d=h.length,g=n?n(e,o,this.id,s,d):null,v=u||U.editor.resolveStagger(s.defaultValue);h.forEach(_=>{const S={...g||o};this.duration=p,this.iterationDuration=l,$(f)||(S.id=f+"-"+c);const y=ks(this,v(_,c,h,null,this));ei(S,this,y,_,c,h),c++})}else{const h=n?n(e,o,this.id,s):o,p=s&&s.type?s.defaultValue:s;ei(h,this,ks(this,p),e)}}else ei(e,this,ks(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if($(e)||e&&$(e.pause))return this;e.pause();const s=+(e.effect?e.effect.getTiming().duration:e.duration);!$(e)&&!$(e.persist)&&(e.persist=!0);const r=U.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);const o=this.add(e,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},t);return r&&(r.addTimelineChild=i),o}set(e,t,s){return $(t)?this:(t.duration=Re,t.composition=He.replace,this.add(e,t,s))}call(e,t){return $(e)||e&&!Ae(e)?this:(U.editor&&U.editor.addTimelineCall&&(t=U.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return $(e)||e&&!Be(e)?this:(U.editor&&U.editor.addTimelineLabel&&(t=U.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=ks(this,t),this)}remove(e,t){return Tt(it(e),this,t),this}stretch(e){const t=this.duration;if(t===is(e))return this;const s=e/t,r=this.labels;ke(this,i=>i.stretch(i.duration*s));for(let i in r)r[i]*=s;return super.stretch(e)}refresh(){return ke(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),ke(this,e=>e.revert,!0),Zs(this)}then(e){return super.then(e)}},zn=e=>U.editor?U.editor.addTimeline(e):new Vn(e).init(),ti=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 u in this.animations)if(!this.animations[u].paused&&a){a=!1;break}a&&this.callbacks.complete()},i={onBegin:s,onComplete:r,onPause:r},o={v:1,autoplay:!1},n={};if(this.targets=[],this.animations={},this.callbacks=null,!($(e)||$(t))){for(let a in t){const u=t[a];ss(a)?n[a]=u:Ne(a,"on")?o[a]=u:i[a]=u}this.callbacks=new Et({v:0},o);for(let a in n){const u=n[a],h=De(u);let p={},l="+=0";if(h){const d=u.unit;Be(d)&&(l+=d)}else p.duration=u;p[a]=h?ct({to:l},u):l;const f=ct(i,p);f.composition=He.replace,f.autoplay=!1;const c=this.animations[a]=new Et(e,f,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[a]=(d,g,v)=>{const _=c._head;if($(d)&&_){const S=_._numbers;return S&&S.length?S:_._modifier(_._number)}else return ke(c,S=>{if(qe(d))for(let y=0,m=d.length;y<m;y++)$(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;$(v)||(S._ease=Pt(v)),S._currentTime=0}),$(g)||c.stretch(g),c.reset(!0).resume(),this}}}}revert(){for(let e in this.animations)this[e]=ne,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}},Ic=(e,t)=>new ti(e,t),Oc=Jt({clamp:()=>G,damp:()=>qc,degToRad:()=>$c,lerp:()=>It,mapRange:()=>ws,padEnd:()=>Dc,padStart:()=>Nc,radToDeg:()=>Hc,round:()=>F,roundPad:()=>Mc,snap:()=>Yt,wrap:()=>Bc}),Mc=(e,t)=>(+e).toFixed(t),Nc=(e,t,s)=>`${e}`.padStart(t,s),Dc=(e,t,s)=>`${e}`.padEnd(t,s),Bc=(e,t,s)=>((e-t)%(s-t)+(s-t))%(s-t)+t,ws=(e,t,s,r,i)=>r+(e-t)/(s-t)*(i-r),$c=e=>e*Math.PI/180,Hc=e=>e*180/Math.PI,qc=(e,t,s,r)=>r?r===1?t:It(e,t,1-Math.exp(-r*s*.1)):e,je=Ge*10,ir=class{constructor(e={}){const t=!$(e.bounce)||!$(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/Ge,this.maxIterations=this.maxDuration/this.timeStep/Ge,this.bn=G(W(e.bounce,.5),-1,1),this.pd=G(W(e.duration,628),10*U.timeScale,je*U.timeScale),this.m=G(W(e.mass,1),1,je),this.s=G(W(e.stiffness,100),Re,je),this.d=G(W(e.damping,10),Re,je),this.v=G(W(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||ne,t&&this.calculateSDFromBD(),this.compute(),this.ease=s=>{const r=s*this.settlingDuration,i=this.completed,o=this.pd;return r>=o&&!i&&(this.completed=!0,this.onComplete(this.parent)),r<o&&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 o=e;return t<1?o=Ws(-o*t*s)*(1*Vr(r*o)+i*Fr(r*o)):t===1?o=(1+i*o)*Ws(-o*s):o=((1+i)*Ws((-t*s+r)*o)+(1-i)*Ws((-t*s-r)*o))/2,1-o}calculateSDFromBD(){const e=U.timeScale===1?this.pd/Ge:this.pd;this.m=1,this.v=0,this.s=Xt(2*St/e,2),this.bn>=0?this.d=(1-this.bn)*4*St/e:this.d=4*St/(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*St/at(this.s);this.pd=e*(U.timeScale===1?Ge:1),this.d/(2*at(this.s))<=1?this.bn=1-this.d*e/(4*St):this.bn=4*St/(this.d*e)-1,this.bn=F(G(this.bn,-1,1),3),this.pd=F(G(this.pd,10*U.timeScale,je*U.timeScale),3)}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:s,timeStep:r,m:i,d:o,s:n,v:a}=this,u=this.w0=G(at(n/i),Re,Ge),h=this.zeta=o/(2*at(n*i));h<1?(this.wd=u*at(1-h*h),this.b=(h*u+-a)/this.wd):h===1?(this.wd=0,this.b=-a+u):(this.wd=u*at(h*h-1),this.b=(h*u+-a)/this.wd);let p=0,l=0,f=0;for(;l<=e&&f<=t;)lt(1-this.solve(p))<s?l++:l=0,this.solverDuration=p,p+=r,f++;this.settlingDuration=F(this.solverDuration*Ge,0)*U.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=G(W(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=G(W(e,1),10*U.timeScale,je*U.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=G(W(e,100),Re,je),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=G(W(e,10),Re,je),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=G(W(e,1),1,je),this.compute()}get velocity(){return this.v}set velocity(e){this.v=G(W(e,0),-je,je),this.compute()}},nr=e=>new ir(e),Un=e=>(console.warn("createSpring() is deprecated use spring() instead"),new ir(e)),si={_head:null,_tail:null},ri=(e,t,s)=>{let r=si._head,i;for(;r;){const o=r._next,n=r.$el===e,a=!t||r.property===t,u=!s||r.parent===s;if(n&&a&&u){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),vt(si,r);const h=r.parent;h&&(h._completed++,h.animations.length===h._completed&&(h.completed=!0,h.paused=!0,h.muteCallbacks||(h.onComplete(h),h._resolve(h))))}r=o}return i},Wn=(e,t,s,r,i)=>{const o=t.animate(r,i),n=i.delay+ +i.duration*i.iterations;o.playbackRate=e._speed,e.paused&&o.pause(),e.duration<n&&(e.duration=n,e.controlAnimation=o),e.animations.push(o),ri(t,s),yt(si,{parent:e,animation:o,$el:t,property:s,_next:null,_prev:null});const a=()=>ri(t,s,e);return o.oncancel=a,o.onremove=a,e.persist||(o.onfinish=a),o};function Nt(e,t,s){const r=Ot(e);if(!r.length)return;const[i]=r,o=Xr(i,t),n=Gr(t,i,o);let a=Gt(i,n);if($(s))return a;if(Ke(a,ze),ze.t===ge.NUMBER||ze.t===ge.UNIT){if(s===!1)return ze.n;{const u=Ks(i,ze,s,!1);return`${F(u.n,U.precision)}${u.u}`}}}var At=(e,t)=>{if(!$(t))return U.editor&&U.editor.addSet?U.editor.addSet(e,t):(t.duration=Re,t.composition=W(t.composition,He.none),new Et(e,t,null,0,!0).resume())},Xn=(e,t,s)=>{const r=it(e);for(let i=0,o=r.length;i<o;i++)ri(r[i],s,t&&t.controlAnimation&&t);return Tt(r,t,s),r},Dt=e=>{e.cancelable&&e.preventDefault()},Fc=class{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:ne,remove:ne}}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}}},Vc=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})}},Ze=(e,t)=>e&&Ae(e)?e(t):e,or=0,Yn=class{constructor(e,t={}){if(!e)return;Ie.current&&Ie.current.register(this);const s=t.x,r=t.y,i=t.trigger,o=t.modifier,n=t.releaseEase,a=n&&Pt(n),u=!$(n)&&!$(n.ease),h=De(s)&&!$(s.mapTo)?s.mapTo:"translateX",p=De(r)&&!$(r.mapTo)?r.mapTo:"translateY",l=Ze(t.container,this);this.containerArray=qe(l)?l:null,this.$container=l&&!this.containerArray?it(l)[0]:J.body,this.useWin=this.$container===J.body,this.$scrollContainer=this.useWin?Ye:this.$container,this.$target=De(e)?new Fc(e):it(e)[0],this.$trigger=it(i||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.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=u?n:nr({mass:W(t.releaseMass,1),stiffness:W(t.releaseStiffness,80),damping:W(t.releaseDamping,20)}),this.releaseYSpring=u?n:nr({mass:W(t.releaseMass,1),stiffness:W(t.releaseStiffness,80),damping:W(t.releaseDamping,20)}),this.releaseEase=a||Ct.outQuint,this.hasReleaseSpring=u,this.onGrab=t.onGrab||ne,this.onDrag=t.onDrag||ne,this.onRelease=t.onRelease||ne,this.onUpdate=t.onUpdate||ne,this.onSettle=t.onSettle||ne,this.onSnap=t.onSnap||ne,this.onResize=t.onResize||ne,this.onAfterResize=t.onAfterResize||ne,this.disabled=[0,0];const f={};if(o&&(f.modifier=o),$(s)||s===!0)f[h]=0;else if(De(s)){const c=s,d={};c.modifier&&(d.modifier=c.modifier),c.composition&&(d.composition=c.composition),f[h]=d}else s===!1&&(f[h]=0,this.disabled[0]=1);if($(r)||r===!0)f[p]=0;else if(De(r)){const c=r,d={};c.modifier&&(d.modifier=c.modifier),c.composition&&(d.composition=c.composition),f[p]=d}else r===!1&&(f[p]=0,this.disabled[1]=1);this.animate=new ti(this.$target,f),this.xProp=h,this.yProp=p,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=[-mt,mt,mt,-mt],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=Rt(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new Vc(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new rt({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 rt({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!$(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]?h:p,this.animate.callbacks.onRender=()=>{const c=this.updated,d=!(this.grabbed&&c)&&this.released,g=this.x,v=this.y,_=g-this.coords[2],S=v-this.coords[3];this.deltaX=_,this.deltaY=S,this.coords[2]=g,this.coords[3]=v,c&&(_||S)&&this.onUpdate(this),d?(this.computeVelocity(_,S),this.angle=Xs(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 rt({autoplay:!1,duration:150*U.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),De(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const s=this.velocityTime,r=Rt(),i=r-s;if(i<17)return this.velocity;this.velocityTime=r;const o=this.velocityStack,n=this.velocityMultiplier,a=this.minVelocity,u=this.maxVelocity,h=this.velocityStackIndex;o[h]=F(G(at(e*e+t*t)/i*n,a,u),5);const p=yn(o[0],o[1],o[2]);return this.velocity=p,this.velocityStackIndex=(h+1)%3,p}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]=Yt(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]=Yt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return F(this.animate[this.xProp](),U.precision)}set x(e){this.setX(e,!1)}get y(){return F(this.animate[this.yProp](),U.precision)}set y(e){this.setY(e,!1)}get progressX(){return ws(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(ws(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return ws(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(ws(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=F(this.useWin?Ye.scrollX:this.$container.scrollLeft,0),t=F(this.useWin?Ye.scrollY:this.$container.scrollTop,0),[s,r,i,o]=this.containerPadding,n=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+s-n,this.scrollBounds[1]=e-this.targetBounds[1]-r+n,this.scrollBounds[2]=t-this.targetBounds[2]-i+n,this.scrollBounds[3]=e-this.targetBounds[3]+o-n}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 o=this.window[0]=Ye.innerWidth,n=this.window[1]=Ye.innerHeight,a=this.useWin,u=e.scrollWidth,h=e.scrollHeight,p=this.fixed,l=e.getBoundingClientRect(),[f,c,d,g]=this.containerPadding;this.dragArea[0]=a?0:l.left,this.dragArea[1]=a?0:l.top,this.scrollView[0]=a?G(u,o,u):u,this.scrollView[1]=a?G(h,n,h):h,this.updateScrollCoords();const{width:v,height:_,left:S,top:y,right:m,bottom:b}=e.getBoundingClientRect();this.dragArea[2]=F(a?G(v,o,o):v,0),this.dragArea[3]=F(a?G(_,n,n):_,0);const k=Nt(e,"overflow"),w=k==="visible",A=k==="hidden";if(this.canScroll=p?!1:this.contained&&(e===J.body&&w||!A&&!w)&&(u>this.dragArea[2]+g-c||h>this.dragArea[3]+f-d)&&(!this.containerArray||this.containerArray&&!qe(this.containerArray)),this.contained){const O=this.scroll.x,E=this.scroll.y,L=this.canScroll,P=this.$target.getBoundingClientRect(),D=L?a?0:e.scrollLeft:0,B=L?a?0:e.scrollTop:0,V=L?this.scrollView[0]-D-v:0,x=L?this.scrollView[1]-B-_:0;this.targetBounds[0]=F(P.top+E-(a?0:y),0),this.targetBounds[1]=F(P.right+O-(a?o:m),0),this.targetBounds[2]=F(P.bottom+E-(a?n:b),0),this.targetBounds[3]=F(P.left+O-(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]-d,this.containerBounds[3]=this.containerArray[3]+g):(this.containerBounds[0]=-F(P.top-(p?G(y,0,n):y)+B-f,0),this.containerBounds[1]=-F(P.right-(p?G(m,0,o):m)-V+c,0),this.containerBounds[2]=-F(P.bottom-(p?G(b,0,n):b)-x+d,0),this.containerBounds[3]=-F(P.left-(p?G(S,0,o):S)+D-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,o,n]=e,[a,u]=this.disabled,h=!a&&t<n||!a&&t>i,p=!u&&s<r||!u&&s>o;return h&&!p?1:!h&&p?2:h&&p?3:0}refresh(){const e=this.parameters,t=e.x,s=e.y,r=Ze(e.container,this),i=Ze(e.containerPadding,this)||0,o=qe(i)?i:[i,i,i,i],n=this.x,a=this.y,u=Ze(e.cursor,this),h={onHover:"grab",onGrab:"grabbing"};if(u){const{onHover:v,onGrab:_}=u;v&&(h.onHover=v),_&&(h.onGrab=_)}const p=Ze(e.dragThreshold,this),l={mouse:3,touch:7};if(Ve(p))l.mouse=p,l.touch=p;else if(p){const{mouse:v,touch:_}=p;$(v)||(l.mouse=v),$(_)||(l.touch=_)}this.containerArray=qe(r)?r:null,this.$container=r&&!this.containerArray?it(r)[0]:J.body,this.useWin=this.$container===J.body,this.$scrollContainer=this.useWin?Ye:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=W(o,[0,0,0,0]),this.containerFriction=G(W(Ze(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=G(W(Ze(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ze(De(t)&&!$(t.snap)?t.snap:e.snap,this),this.snapY=Ze(De(s)&&!$(s.snap)?s.snap:e.snap,this),this.scrollSpeed=W(Ze(e.scrollSpeed,this),1.5),this.scrollThreshold=W(Ze(e.scrollThreshold,this),20),this.dragSpeed=W(Ze(e.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?l.mouse:l.touch,this.minVelocity=W(Ze(e.minVelocity,this),0),this.maxVelocity=W(Ze(e.maxVelocity,this),50),this.velocityMultiplier=W(Ze(e.velocityMultiplier,this),1),this.cursor=u===!1?!1:h,this.updateBoundingValues();const[f,c,d,g]=this.containerBounds;this.setX(G(n,g,c),!0),this.setY(G(a,f,d),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[_,S,y,m]=this.containerPadding,[b,k]=this.scrollView,w=this.dragArea[2],A=this.dragArea[3],O=this.scroll.x,E=this.scroll.y,L=this.$container.scrollWidth,P=this.$container.scrollHeight,D=this.useWin?G(L,this.window[0],L):L,B=this.useWin?G(P,this.window[1],P):P,V=b-D,x=k-B;this.dragged&&V>0&&(this.coords[0]-=V,this.scrollView[0]=D),this.dragged&&x>0&&(this.coords[1]-=x,this.scrollView[1]=B);const N=this.scrollSpeed*10,I=this.scrollThreshold,[R,q]=this.coords,[K,Z,z,j]=this.scrollBounds,oe=F(G((q-K+_)/I,-1,0)*N,0),X=F(G((R-Z-S)/I,0,1)*N,0),ve=F(G((q-z-y)/I,0,1)*N,0),se=F(G((R-j+m)/I,-1,0)*N,0);if(oe||ve||se||X){const[re,Q]=this.disabled;let ue=O,xe=E;re||(ue=F(G(O+(se||X),0,b-w),0),this.coords[0]-=O-ue),Q||(xe=F(G(E+(oe||ve),0,k-A),0),this.coords[1]-=E-xe),this.useWin?this.$scrollContainer.scrollBy(-(O-ue),-(E-xe)):this.$scrollContainer.scrollTo(ue,xe)}}const[e,t,s,r]=this.containerBounds,[i,o,n,a,u,h]=this.pointer;this.coords[0]+=(i-u)*this.dragSpeed,this.coords[1]+=(o-h)*this.dragSpeed,this.pointer[4]=i,this.pointer[5]=o;const[p,l]=this.coords,[f,c]=this.snapped,d=(1-this.containerFriction)*this.dragSpeed;this.setX(p>t?t+(p-t)*d:p<r?r+(p-r)*d:p,!1),this.setY(l>s?s+(l-s)*d:l<e?e+(l-e)*d:l,!1),this.computeVelocity(i-u,o-h),this.angle=Xs(o-a,i-n);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 Tt([this],null,"x"),Tt([this],null,"y"),Tt([this],null,"progressX"),Tt([this],null,"progressY"),Tt([this.scroll]),Tt([this.overshootCoords]),this}scrollInView(e,t=0,s=Ct.inOutQuad){this.updateScrollCoords();const r=this.destX,i=this.destY,o=this.scroll,n=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(n,r,i)){const[u,h,p,l]=n,f=F(G(i-u,-mt,0),0),c=F(G(r-h,0,mt),0),d=F(G(i-p,0,mt),0),g=F(G(r-l,-mt,0),0);new Et(o,{x:F(o.x+(g?g-t:c?c+t:0),0),y:F(o.y+(f?f-t:d?d+t:0),0),duration:$(e)?350*U.timeScale:e,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(o.x,o.y)}}).init().then(()=>{this.canScroll=a})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=At(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,s=Ct.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,i=this.y,[o,n,a,u]=this.containerPadding,h=this.scroll.y-this.targetBounds[0]+o+t,p=this.scroll.x-this.targetBounds[1]-n-t,l=this.scroll.y-this.targetBounds[2]-a-t,f=this.scroll.x-this.targetBounds[3]+u+t,c=this.isOutOfBounds([h,p,l,f],r,i);if(c){const[d,g]=this.disabled,v=G(Yt(r,this.snapX),f,p),_=G(Yt(i,this.snapY),h,l),S=$(e)?350*U.timeScale:e;!d&&(c===1||c===3)&&this.animate[this.xProp](v,S,s),!g&&(c===2||c===3)&&this.animate[this.yProp](_,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:o,y:n}=this.transforms.normalizePoint(r,i),[a,u,h,p]=this.containerBounds,l=(1-this.containerFriction)*this.dragSpeed,f=this.x,c=this.y;this.coords[0]=this.coords[2]=l?f>u?u+(f-u)/l:f<p?p+(f-p)/l:f:f,this.coords[1]=this.coords[3]=l?c>h?h+(c-h)/l:c<a?a+(c-a)/l:c:c,this.pointer[0]=o,this.pointer[1]=n,this.pointer[2]=o,this.pointer[3]=n,this.pointer[4]=o,this.pointer[5]=n,this.pointer[6]=o,this.pointer[7]=n,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);or=(d>or?d:or)+1,this.targetStyles=At(this.$target,{zIndex:or}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=At(J.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Ct.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:o}=this.transforms.normalizePoint(s,r),n=i-this.pointer[6],a=o-this.pointer[7];let u=e.target,h=!1,p=!1,l=!1;for(;t&&u&&u!==this.$trigger;){const f=Nt(u,"overflow-y");if(f!=="hidden"&&f!=="visible"){const{scrollTop:c,scrollHeight:d,clientHeight:g}=u;if(d>g){l=!0,h=c<=3,p=c>=d-g-3;break}}u=u.parentElement}l&&(!h&&!p||h&&a<0||p&&a>0)?(this.pointer[0]=i,this.pointer[1]=o,this.pointer[2]=i,this.pointer[3]=o,this.pointer[4]=i,this.pointer[5]=o,this.pointer[6]=i,this.pointer[7]=o):(Dt(e),this.triggerStyles||(this.triggerStyles=At(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Dt,{passive:!1}),this.$trigger.addEventListener("touchmove",Dt,{passive:!1}),this.$trigger.addEventListener("touchend",Dt),(this.dragged||!this.disabled[0]&&lt(n)>this.dragThreshold||!this.disabled[1]&&lt(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]=o,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,o,n,a]=this.pointer,[u,h,p,l]=this.containerBounds,[f,c]=this.snapped,d=this.releaseXSpring,g=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,m=this.y,b=this.computeVelocity(s-n,r-a),k=this.angle=Xs(r-o,s-i),w=b*150,A=(1-this.releaseContainerFriction)*this.dragSpeed,O=y+Vr(k)*w,E=m+Fr(k)*w,L=O>h?h+(O-h)*A:O<l?l+(O-l)*A:O,P=E>p?p+(E-p)*A:E<u?u+(E-u)*A:E,D=this.destX=G(F(Yt(L,this.snapX),5),l,h),B=this.destY=G(F(Yt(P,this.snapY),5),u,p),V=this.isOutOfBounds(this.containerBounds,O,E);let x=0,N=0,I=v,R=v,q=0;if(S.x=y,S.y=m,!e){const Z=D===h?y>h?-1:1:y<l?-1:1,z=F(y-D,0);d.velocity=t&&_?z?w*Z/lt(z):0:b;const{ease:j,settlingDuration:oe,restDuration:X}=d;x=y===D?0:_?oe:oe-X*U.timeScale,_&&(I=j),x>q&&(q=x)}if(!t){const Z=B===p?m>p?-1:1:m<u?-1:1,z=F(m-B,0);g.velocity=e&&_?z?w*Z/lt(z):0:b;const{ease:j,settlingDuration:oe,restDuration:X}=g;N=m===B?0:_?oe:oe-X*U.timeScale,_&&(R=j),N>q&&(q=N)}if(!_&&V&&A&&(x||N)){const Z=He.blend;new Et(S,{x:{to:L,duration:x*.65},y:{to:P,duration:N*.65},ease:v,composition:Z}).init(),new Et(S,{x:{to:D,duration:x},y:{to:B,duration:N},ease:v,composition:Z}).init(),this.overshootTicker.stretch(yn(x,N)).restart()}else e||this.animate[this.xProp](D,x,I),t||this.animate[this.yProp](B,N,R);this.scrollInView(q,this.scrollThreshold,v);let K=!1;D!==f&&(this.snapped[0]=D,this.snapX&&(K=!0)),B!==c&&this.snapY&&(this.snapped[1]=B,this.snapY&&(K=!0)),K&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Dt),this.$trigger.removeEventListener("touchmove",Dt),this.$trigger.removeEventListener("touchend",Dt),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=At(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":Dt(e)}}},zc=(e,t)=>new Yn(e,t),ii=(e=ne)=>new rt({duration:1*U.timeScale,onComplete:e},null,0).resume(),ar=e=>{let t;return((...s)=>{let r,i,o,n,a;t&&(r=t.currentIteration,i=t.iterationProgress,o=t.reversed,n=t._alternate,a=t._startTime,t.revert());const u=e(...s);return u&&!Ae(u)&&u.revert&&(t=u),$(i)||(t.currentIteration=r,t.iterationProgress=(n&&r%2?!o:o)?1-i:i,t._startTime=a),u||ne})},Gn=class{constructor(e={}){Ie.current&&Ie.current.register(this);const t=e.root;let s=J;t&&(s=t.current||t.nativeElement||it(t)[0]||J);const r=e.defaults,i=U.defaults,o=e.mediaQueries;if(this.defaults=r?ct(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={},o)for(let n in o){const a=Ye.matchMedia(o[n]);this.mediaQueryLists[n]=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=U.defaults;Ie.current=this,Ie.root=this.root,U.defaults=this.defaults;const i=this.mediaQueryLists;for(let n in i)this.matches[n]=i[n].matches;const o=e(this);return Ie.current=t,Ie.root=s,U.defaults=r,o}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);Ae(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,Ae(e)){const s=e;this.constructors.push(s),this.execute(()=>{const r=s(this);Ae(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...s)=>this.execute(()=>t(...s));return this}addOnce(e){if(this.once=!0,Ae(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const s=e;this.constructorsOnce[t]=s,this.execute(()=>{const r=s(this);Ae(r)&&this.revertConstructorsOnce.push(r)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,s=this.constructorsOnce[t];if(Ae(s))return s(this);const r=ar(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 o=e.length,n=t.length,a=s.length,u=r.length;for(;o--;)e[o].revert();for(;n--;)t[n](this);for(;a--;)s[a].revert();for(;u--;)r[u](this);for(let h in i)i[h].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={}}},Uc=e=>new Gn(e),Wc=()=>{const e=J.createElement("div");J.body.appendChild(e),e.style.height="100lvh";const t=e.offsetHeight;return J.body.removeChild(e),t},lr=(e,t)=>e&&Ae(e)?e(t):e,cr=new Map,Xc=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 rt({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;ke(this,s=>s.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new rt({autoplay:!1,frameRate:30,onUpdate:t=>{const s=t.deltaTime,r=this.prevScrollX,i=this.prevScrollY,o=this.scrollX,n=this.scrollY,a=r-o,u=i-n;this.prevScrollX=o,this.prevScrollY=n,a&&(this.backwardX=r>o),u&&(this.backwardY=i>n),this.velocity=F(s>0?Math.sqrt(a*a+u*u)/s:0,5)}}).init(),this.resizeTicker=new rt({autoplay:!1,duration:250*U.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new rt({autoplay:!1,duration:500*U.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?Ye:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=F(e?Ye.scrollX:t.scrollLeft,0),this.scrollY=F(e?Ye.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=Ye.innerWidth,this.winHeight=Wc()}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(){ke(this,e=>{e.ready&&e._debug&&e.removeDebug()}),this.updateBounds(),ke(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?Ye:this.element).removeEventListener("scroll",this),cr.delete(this.element)}},Yc=e=>{const t=e&&it(e)[0]||J.body;let s=cr.get(t);return s||(s=new Xc(t),cr.set(t,s)),s},xs=(e,t,s,r,i)=>{const o=t==="min",n=t==="max",{n:a,u}=Ke(t==="top"||t==="left"||t==="start"||o?0:t==="bottom"||t==="right"||t==="end"||n?"100%":t==="center"?"50%":t,ze);let h=a;return u==="%"?h=a/100*s:u&&(h=Ks(e,ze,"px",!0).n),n&&r<0&&(h+=r),o&&i>0&&(h+=i),h},ur=(e,t,s,r,i)=>{let o;if(Be(t)){const n=fn.exec(t);if(n){const a=n[0],u=a[0],h=t.split(a),p=h[0]==="min",l=h[0]==="max",f=xs(e,h[0],s,r,i),c=xs(e,h[1],s,r,i);if(p){const d=Zt(xs(e,"min",s),c,u);o=d<f?f:d}else if(l){const d=Zt(xs(e,"max",s),c,u);o=d>f?f:d}else o=Zt(f,c,u)}else o=xs(e,t,s,r,i)}else o=t;return F(o,0)},Zn=e=>{let t;const s=e.targets;for(let r=0,i=s.length;r<i;r++){const o=s[r];if(o[Vt]){t=o;break}}return t},Gc=0,Qn=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"],Jn=class{constructor(e={}){Ie.current&&Ie.current.register(this);const t=W(e.sync,"play pause"),s=t?Pt(t):null,r=t&&(t==="linear"||t===nt),i=t&&!(s===nt&&!r),o=t&&(Ve(t)||t===!0||r),n=t&&Be(t)&&!i&&!o,a=n?t.split(" ").map(h=>()=>{const p=this.linked;return p&&p[h]?p[h]():null}):null,u=n&&a.length>2;this.index=Gc++,this.id=$(e.id)?this.index:e.id,this.container=Yc(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=i||o||!!a,this.syncEase=i?s:null,this.syncSmooth=o?t===!0||r?1:t:null,this.onSyncEnter=a&&!u&&a[0]?a[0]:ne,this.onSyncLeave=a&&!u&&a[1]?a[1]:ne,this.onSyncEnterForward=a&&u&&a[0]?a[0]:ne,this.onSyncLeaveForward=a&&u&&a[1]?a[1]:ne,this.onSyncEnterBackward=a&&u&&a[2]?a[2]:ne,this.onSyncLeaveBackward=a&&u&&a[3]?a[3]:ne,this.onEnter=e.onEnter||ne,this.onLeave=e.onLeave||ne,this.onEnterForward=e.onEnterForward||ne,this.onLeaveForward=e.onLeaveForward||ne,this.onEnterBackward=e.onEnterBackward||ne,this.onLeaveBackward=e.onLeaveBackward||ne,this.onUpdate=e.onUpdate||ne,this.onResize=e.onResize||ne,this.onSyncComplete=e.onSyncComplete||ne,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=W(e.debug,!1),this._next=null,this._prev=null,yt(this.container,this),ii(()=>{if(!this.reverted){if(!this.target){const h=it(e.target)[0];this.target=h||J.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!$(e)&&!$(e.persist)&&(e.persist=!0),!this._params.target)){let t;$(e.targets)?ke(e,s=>{s.targets&&!t&&(t=Zn(s))}):t=Zn(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=W(lr(e.repeat,this),!0),this.horizontal=W(lr(e.axis,this),"y")==="x",this.enter=W(lr(e.enter,this),"end start"),this.leave=W(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,s=e.element.querySelector(":scope > .animejs-onscroll-debug"),r=J.createElement("div"),i=J.createElement("div"),o=J.createElement("div"),n=Qn[this.index%Qn.length],a=e.useWin,u=a?e.winWidth:e.width,h=a?e.winHeight:e.height,p=e.scrollWidth,l=e.scrollHeight,f=this.container.width>360?320:260,c=t?0:10,d=t?10:0,g=t?24:f/2,v=t?g:15,_=t?60:g,S=t?_:v,y=t?"repeat-x":"repeat-y",m=A=>t?"0px "+A+"px":A+"px 2px",b=A=>`linear-gradient(${t?90:0}deg, ${A} 2px, transparent 1px)`,k=(A,O,E,L,P)=>`position:${A};left:${O}px;top:${E}px;width:${L}px;height:${P}px;`;r.style.cssText=`${k("absolute",c,d,t?p: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?u:g,t?g:h)}`,s||(i.style.cssText+=`background:\n ${b("#FFFF")}${m(g-10)} / 100px 100px ${y},\n ${b("#FFF8")}${m(g-10)} / 10px 10px ${y};\n `),o.style.cssText=`${k("relative",0,0,t?p:g,t?g:l)}`,s||(o.style.cssText+=`background:\n ${b("#FFFF")}${m(0)} / ${t?"100px 10px":"10px 100px"} ${y},\n ${b("#FFF8")}${m(0)} / ${t?"10px 0px":"0px 10px"} ${y};\n `);const w=[" enter: "," leave: "];this.coords.forEach((A,O)=>{const E=O>1,L=(E?0:this.offset)+A,P=O%2,D=L<S,B=L>(E?t?u:h:t?p:l)-S,V=(E?P&&!D:!P&&!D)||B,x=J.createElement("div"),N=J.createElement("div"),I=t?V?"right":"left":V?"bottom":"top",R=V?(t?_:v)+(E?t?-1:B?0:-2:t?-1:-2):t?1:0;N.innerHTML=`${this.id}${w[P]}${this.thresholds[O]}`,x.style.cssText=`${k("absolute",0,0,_,v)}\n display: flex;\n flex-direction: ${t?"column":"row"};\n justify-content: flex-${E?"start":"end"};\n align-items: flex-${V?"end":"start"};\n border-${I}: 2px solid ${n};\n `,N.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&&!E?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${P?n:"rgba(0,0,0,.75)"};\n background-color: ${P?"rgba(0,0,0,.65)":n};\n border: 2px solid ${P?n:"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(N);let q=L-R+(t?1:0);x.style[t?"left":"top"]=`${q}px`,(E?i:o).appendChild(x)}),r.appendChild(i),r.appendChild(o),e.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,Nt(e.element,"position")==="static"&&(this.debugStyles=At(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 o,n=t;for(i&&(o=i.currentTime,i.seek(0,!0));n&&n!==s.element&&n!==J.body;){const P=Nt(n,"position")==="sticky"?At(n,{position:"static"}):!1;n=n.parentElement,P&&(e||(e=[]),e.push(P))}const a=t.getBoundingClientRect(),u=s.scale,h=(r?a.left+s.scrollX-s.left:a.top+s.scrollY-s.top)*u,p=(r?a.width:a.height)*u,l=r?s.width:s.height,f=(r?s.scrollWidth:s.scrollHeight)-l,c=this.enter,d=this.leave;let g="start",v="end",_="end",S="start";if(Be(c)){const P=c.split(" ");_=P[0],g=P.length>1?P[1]:g}else if(De(c)){const P=c;$(P.container)||(_=P.container),$(P.target)||(g=P.target)}else Ve(c)&&(_=c);if(Be(d)){const P=d.split(" ");S=P[0],v=P.length>1?P[1]:v}else if(De(d)){const P=d;$(P.container)||(S=P.container),$(P.target)||(v=P.target)}else Ve(d)&&(S=d);const y=ur(t,g,p),m=ur(t,v,p),b=y+h-l,k=m+h-f,w=ur(t,_,l,b,k),A=ur(t,S,l,b,k),O=y+h-w,E=m+h-A,L=E-O;this.offset=h,this.offsetStart=O,this.offsetEnd=E,this.distance=L<=0?0:L,this.thresholds=[g,v,_,S],this.coords=[y,m,w,A],e&&e.forEach(P=>P.revert()),i&&i.seek(o,!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),o=this.horizontal,n=this.container,a=this.scroll,u=a<=this.offsetStart,h=a>=this.offsetEnd,p=!u&&!h,l=a===this.offsetStart||a===this.offsetEnd,f=!this.hasEntered&&l,c=this._debug&&this.$debug;let d=!1,g=!1,v=this.progress;if(u&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),i){const _=e.progress;if(r&&Ve(r)){if(r<1){const S=_<v&&v===1?1e-4:_>v&&!v?-1e-4:0;v=F(It(_,v,It(.01,.2,r))+S,6)}}else s&&(v=s(v));d=v!==this.prevProgress,g=_===1,d&&!g&&r&&_&&n.wakeTicker.restart()}if(c){const _=o?n.scrollY:n.scrollX;c.style[o?"top":"left"]=_+10+"px"}(p&&!this.isInView||f&&!this.forceEnter&&!this.hasEntered)&&(p&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(c&&p&&(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)):p&&(this.forceEnter=!1)),(p||!p&&this.isInView)&&(d=!0),d&&(i&&e.seek(e.duration*v),this.onUpdate(this)),!p&&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 vt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}},Zc=(e={})=>new Jn(e),Kn=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,Qc=(e,t,s)=>{let r=0,i=1,o,n,a=0;do n=r+(i-r)/2,o=Kn(n,t,s)-e,o>0?i=n:r=n;while(lt(o)>1e-7&&++a<100);return n},jn=(e=.5,t=0,s=.5,r=1)=>e===t&&s===r?nt:i=>i===0||i===1?i:Kn(Qc(i,e,s),t,r),eo=(e=10,t)=>{const s=t?fc:rs;return r=>s(G(r,0,1)*e)*(1/e)},ni=(...e)=>{const t=e.length;if(!t)return nt;const s=t-1,r=e[0],i=e[s],o=[0],n=[Wt(r)];for(let a=1;a<s;a++){const u=e[a],h=Be(u)?u.trim().split(" "):[u],p=h[0],l=h[1];o.push($(l)?a/s:Wt(l)/100),n.push(Wt(p))}return n.push(Wt(i)),o.push(1),function(u){for(let h=1,p=o.length;h<p;h++){const l=o[h];if(u<=l){const f=o[h-1],c=n[h-1];return c+(n[h]-c)*(u-f)/(l-f)}}return n[n.length-1]}},to=(e=10,t=1)=>{const s=[0],r=e-1;for(let i=1;i<r;i++){const o=s[i-1],n=i/r,a=n+((i+1)/r-n)*Math.random(),u=n*(1-t)+a*t;s.push(G(u,o,1))}return s.push(1),ni(...s)},Jc=Jt({Spring:()=>ir,createSpring:()=>Un,cubicBezier:()=>jn,eases:()=>Ct,irregular:()=>to,linear:()=>ni,spring:()=>nr,steps:()=>eo}),hr=(e,t=100)=>{const s=[];for(let r=0;r<=t;r++)s.push(F(e(r/t),4));return`linear(${s.join(", ")})`},so={},ro=e=>{let t=so[e];if(t)return t;if(t="linear",Be(e)){if(Ne(e,"linear")||Ne(e,"cubic-")||Ne(e,"steps")||Ne(e,"ease"))t=e;else if(Ne(e,"cubicB"))t=zs(e);else{const s=$n(e);Ae(s)&&(t=s===nt?"linear":hr(s))}so[e]=t}else if(Ae(e)){const s=hr(e);s&&(t=s)}else e.ease&&(t=hr(e.ease));return t},io=["x","y","z"],Kc=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...io],jc=[...io,...zt.filter(e=>["X","Y","Z"].some(t=>e.endsWith(t)))],oi=null,Ts=(e,t,s,r,i)=>{let o=Be(t)?t:Oe(t,s,r,i,null,null);return Ve(o)?Kc.includes(e)||Ne(e,"translate")?`${o}px`:Ne(e,"rotate")||Ne(e,"skew")?`${o}deg`:`${o}`:o},no=(e,t,s,r,i,o)=>{let n="0";const a=$(r)?getComputedStyle(e)[t]:Ts(t,r,e,i,o);return $(s)?n=qe(r)?r.map(u=>Ts(t,u,e,i,o)):a:n=[Ts(t,s,e,i,o),a],n},oo=class{constructor(e,t){Ie.current&&Ie.current.register(this),Ut(oi)&&(_t&&($(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"))?oi=!1:(zt.forEach(f=>{const c=Ne(f,"skew"),d=Ne(f,"scale"),g=Ne(f,"rotate"),v=Ne(f,"translate"),_=g||c,S=_?"<angle>":d?"<number>":v?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+f,syntax:S,inherits:!1,initialValue:v?"0px":_?"0deg":d?"1":"0"})}catch{}}),oi=!0));const s=Ot(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=W(t.autoplay,U.defaults.autoplay),i=r&&r.link?r:!1,o=t.alternate&&t.alternate===!0,n=t.reversed&&t.reversed===!0,a=W(t.loop,U.defaults.loop),u=a===!0||a===1/0?1/0:Ve(a)?a+1:1,h=o?n?"alternate-reverse":"alternate":n?"reverse":"normal",p="both",l=U.timeScale===1?1:Ge;this.targets=s,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||U.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!r||i!==!1,this.reversed=n,this.persist=W(t.persist,U.defaults.persist),this.autoplay=r,this._speed=W(t.playbackRate,U.defaults.playbackRate),this._resolve=ne,this._completed=0,this._inlineStyles=[],s.forEach((f,c)=>{const d=f[ys],g=jc.some(E=>t.hasOwnProperty(E)),v=f.style,_=this._inlineStyles[c]={},S=W(t.ease,U.defaults.ease),y=Oe(S,f,c,s,null,null),m=Ae(y)||Be(y)?y:S,b=S.ease&&S,k=ro(m),w=(b?b.settlingDuration:Oe(W(t.duration,U.defaults.duration),f,c,s,null,null))*l,A=Oe(W(t.delay,U.defaults.delay),f,c,s,null,null)*l,O=W(t.composition,"replace");for(let E in t){if(!ss(E))continue;const L={},P={iterations:u,direction:h,fill:p,easing:k,duration:w,delay:A,composite:O},D=t[E],B=g?zt.includes(E)?E:qr.get(E):!1,V=B?"transform":E;_[V]||(_[V]=v[V]);let x;if(De(D)){const N=D,I=W(N.ease,k),R=I.ease&&I,q=N.to,K=N.from;if(P.duration=(R?R.settlingDuration:Oe(W(N.duration,w),f,c,s,null,null))*l,P.delay=Oe(W(N.delay,A),f,c,s,null,null)*l,P.composite=W(N.composition,O),P.easing=ro(I),x=no(f,E,K,q,c,s),B?(L[`--${B}`]=x,d[B]=x):L[E]=no(f,E,K,q,c,s),Wn(this,f,E,L,P),!$(K))if(!B)v[E]=L[E][0];else{const Z=`--${B}`;v.setProperty(Z,L[Z][0])}}else x=qe(D)?D.map(N=>Ts(E,N,f,c,s)):Ts(E,D,f,c,s),B?(L[`--${B}`]=x,d[B]=x):L[E]=x,Wn(this,f,E,L,P)}if(g){let E="";for(let L in d)E+=`${un[L]}var(--${L})) `;v.transform=E}}),i&&this.autoplay.link(this)}forEach(e){try{const t=Be(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=U.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(U.timeScale===1?1:Ge);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 o=r[i];$(o)||o===""?s.removeProperty(zs(i)):e.style[i]=o}e.getAttribute("style")===""&&e.removeAttribute("style")}),this}then(e=ne){const t=this.then,s=()=>{this.then=null,e(this),this.then=t,this._resolve=ne};return new Promise(r=>(this._resolve=()=>r(s()),this.completed&&this._resolve(),this))}},ao={animate:(e,t)=>new oo(e,t),convertEase:hr},eu=0,tu=0,pr=(e,t)=>!e||!t?!1:e===t||e.contains(t),ls=e=>{if(!e)return null;const t=e.style,s=t.transition||"";return t.setProperty("transition","none","important"),s},fr=(e,t)=>{if(!e)return;const s=e.style;t?s.transition=t:s.removeProperty("transition")},su=e=>{const t=e.layout.transitionMuteStore,s=e.$el,r=e.$measure;s&&!t.has(s)&&t.set(s,ls(s)),r&&!t.has(r)&&t.set(r,ls(r))},dr=e=>{e.forEach((t,s)=>fr(s,t)),e.clear()},ru={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},iu=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)},lo=(e,t,s,r)=>{let i=e.dataset.layoutId;i||(i=e.dataset.layoutId=`node-${tu++}`);const o=r||{};return o.$el=e,o.$measure=e,o.id=i,o.index=0,o.targets=null,o.delay=0,o.duration=0,o.ease=null,o.state=s,o.layout=s.layout,o.parentNode=t||null,o.isTarget=!1,o.isEntering=!1,o.isLeaving=!1,o.isInlined=!1,o.hasTransform=!1,o.inlineStyles=[],o.inlineTransforms=null,o.inlineTransition=null,o.branchAdded=!1,o.branchRemoved=!1,o.branchNotRendered=!1,o.sizeChanged=!1,o.hasVisibilitySwap=!1,o.hasDisplayNone=!1,o.hasVisibilityHidden=!1,o.measuredInlineTransform=null,o.measuredInlineTransition=null,o.measuredDisplay=null,o.measuredVisibility=null,o.measuredPosition=null,o.measuredHasDisplayNone=!1,o.measuredHasVisibilityHidden=!1,o.measuredIsVisible=!1,o.measuredIsRemoved=!1,o.measuredIsInsideRoot=!1,o.properties={transform:"none",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},o.layout.properties.forEach(n=>o.properties[n]=0),o._head=null,o._tail=null,o._prev=null,o._next=null,o},co=(e,t,s,r)=>{const i=e.$el,o=e.layout.root,n=o===i,a=e.properties,u=e.state.rootNode,h=e.parentNode,p=s.transform,l=i.style.transform,f=h?h.measuredIsRemoved:!1,c=s.position;n&&(e.layout.absoluteCoords=c==="fixed"||c==="absolute"),e.$measure=t,e.inlineTransforms=l,e.hasTransform=p&&p!=="none",e.measuredIsInsideRoot=pr(o,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 d=!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)d=!0;else{for(g=i.nextSibling;g&&(g.nodeType===Node.COMMENT_NODE||g.nodeType===Node.TEXT_NODE&&!g.textContent.trim());)g=g.nextSibling;d=g!==null&&g.nodeType===Node.TEXT_NODE}if(e.isInlined=d,e.hasTransform&&!r){const k=e.layout.transitionMuteStore;k.get(i)||(e.inlineTransition=ls(i)),t===i?i.style.transform="none":(k.get(t)||(e.measuredInlineTransition=ls(t)),e.measuredInlineTransform=t.style.transform,t.style.transform="none")}let v=0,_=0,S=0,y=0;if(!r){const k=t.getBoundingClientRect();v=k.left,_=k.top,S=k.width,y=k.height}for(let k in a){const w=k==="transform"?p:s[k]||s.getPropertyValue&&s.getPropertyValue(k);$(w)||(a[k]=w)}a.left=v,a.top=_,a.clientLeft=r?0:t.clientLeft,a.clientTop=r?0:t.clientTop;let m,b;if(n)e.layout.absoluteCoords?(m=v,b=_):(m=0,b=0);else{const k=h||u,w=k.properties.left,A=k.properties.top,O=k.properties.clientLeft,E=k.properties.clientTop;if(e.layout.absoluteCoords)m=v-w-O,b=_-A-E;else if(k===u){const L=u.properties.left,P=u.properties.top,D=u.properties.clientLeft,B=u.properties.clientTop;m=v-L-D,b=_-P-B}else m=v-w-O,b=_-A-E}return a.x=m,a.y=b,a.width=S,a.height=y,e},uo=(e,t)=>{if(t)for(let s in t)e.properties[s]=t[s]},Cs=(e,t)=>{const s=Oe(t.ease,e.$el,e.index,e.targets,null,null),r=Ae(s)?s:t.ease,i=!$(r)&&!$(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)},nu=e=>{const t=e.$el.style,s=e.inlineStyles;s.length=0,e.layout.recordedProperties.forEach(r=>{s.push(r,t[r]||"")})},ho=e=>{const t=e.$el.style,s=e.inlineStyles;for(let r=0,i=s.length;r<i;r+=2){const o=s[r],n=s[r+1];n&&n!==""?t[o]=n:(t[o]="",t.removeProperty(o))}},ou=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,o=e.measuredInlineTransform;o&&o!==""?i.transform=o:i.removeProperty("transform")}e.measuredInlineTransform=null,e.inlineTransition!==null&&(fr(e.$el,e.inlineTransition),e.inlineTransition=null),r!==e.$el&&e.measuredInlineTransition!==null&&(fr(r,e.measuredInlineTransition),e.measuredInlineTransition=null)},po=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)},ai=(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),fo=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,ls(e));const s=[e,t],r=this.layout.root;let i=null;for(;s.length;){const o=s.pop(),n=s.pop();if(!n||n.nodeType!==1||Us(n))continue;const a=o?o.measuredIsRemoved:!1,u=a?ru:getComputedStyle(n),h=a?!0:u.display==="none",p=a?!0:u.visibility==="hidden",l=!h&&!p,f=n.dataset.layoutId,c=pr(r,n);let d=f?this.nodes.get(f):null;if(d&&d.$el!==n){const v=pr(r,d.$el),_=d.measuredIsVisible,S=!v&&(c||!c&&!_&&l),y=v&&!_&&l;if(S)iu(d),d=lo(n,o,this,d);else if(y){co(d,n,u,a);let m=n.lastElementChild;for(;m;)s.push(m,d),m=m.previousElementSibling;i||(i=d);continue}else{let m=n.lastElementChild;for(;m;)s.push(m,o),m=m.previousElementSibling;i||(i=d);continue}}else d=lo(n,o,this,d);d.branchAdded=!1,d.branchRemoved=!1,d.branchNotRendered=!1,d.isTarget=!1,d.sizeChanged=!1,d.hasVisibilityHidden=p,d.hasDisplayNone=h,d.hasVisibilitySwap=p&&!d.measuredHasVisibilityHidden||h&&!d.measuredHasDisplayNone,this.nodes.set(d.id,d),d.parentNode=o||null,d._prev=null,d._next=null,o?(this.rootNodes.delete(d),o._head?(o._tail._next=d,d._prev=o._tail,o._tail=d):(o._head=d,o._tail=d)):this.rootNodes.add(d),co(d,d.$el,u,a);let g=n.lastElementChild;for(;g;)s.push(g,d),g=g.previousElementSibling;i||(i=d)}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,o=e.parentElement;for(;o&&o!==this.layout.root;){if(t.has(o)){i=this.ensureDetachedNode(o,t);break}o=o.parentElement}return this.registerElement(e,i)}record(){const e=this.layout,t=e.children,s=e.root,r=qe(t)?t:[t],i=[],o=t==="*"?s:Ie.root,n=[];let a=s.parentElement;for(;a&&a.nodeType===1;){const g=getComputedStyle(a);if(g.transform&&g.transform!=="none"){const v=a.style.transform||"",_=ls(a);n.push(a,v,_),a.style.transform="none"}a=a.parentElement}for(let g=0,v=r.length;g<v;g++){const _=r[g];i[g]=Be(_)?o.querySelectorAll(_):_}const u=Ot(i);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const p=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&&p.add(v)});const c=new Set,d=[];for(let g=0,v=u.length;g<v;g++){const _=u[g];if(!(!_||_.nodeType!==1||_===s)){if(!pr(s,_)){const S=_.dataset.layoutId;if(!S||!p.has(S))continue}c.has(_)||(c.add(_),d.push(_))}}for(let g=0,v=d.length;g<v;g++)this.ensureDetachedNode(d[g],c);for(let g=0,v=u.length;g<v;g++){const _=u[g],S=this.getNode(_);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(ou);for(let g=0,v=n.length;g<v;g+=3){const _=n[g],S=n[g+1],y=n[g+2];S&&S!==""?_.style.transform=S:_.style.removeProperty("transform"),fr(_,y)}return this}};function cs(e){const t={},s={};for(let r in e){const i=e[r],o=r==="ease";r==="duration"||r==="delay"||o?s[r]=i:t[r]=i}return[t,s]}var go=class{constructor(e,t={}){Ie.current&&Ie.current.register(this);const s=cs(t.swapAt),r=cs(t.enterFrom),i=cs(t.leaveTo),o=t.properties;if(t.duration=W(t.duration,350),t.delay=W(t.delay,0),t.ease=W(t.ease,"inOut(3.5)"),this.params=t,this.root=Ot(e)[0],this.id=t.id||eu++,this.children=t.children||"*",this.absoluteCoords=!1,this.swapAtParams=ct(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 n in s[0])this.properties.add(n);if(r[0])for(let n in r[0])this.properties.add(n);if(i[0])for(let n in i[0])this.properties.add(n);if(o)for(let n=0,a=o.length;n<a;n++)this.properties.add(o[n]);this.recordedProperties=new Set(["display","visibility","translate","position","left","top","marginLeft","marginTop","width","height","maxWidth","maxHeight","minWidth","minHeight"]),this.properties.forEach(n=>this.recordedProperties.add(n)),this.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new fo(this),this.newState=new fo(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),dr(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(()=>dr(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(ho),this}animate(e={}){const t={ease:W(e.ease,this.params.ease),delay:W(e.delay,this.params.delay),duration:W(e.duration,this.params.duration)},s={id:this.id},r=W(e.onComplete,this.params.onComplete),i=W(e.onPause,this.params.onPause);for(let x in bs)x!=="ease"&&x!=="duration"&&x!=="delay"&&($(e[x])?$(this.params[x])||(s[x]=this.params[x]):s[x]=e[x]);s.onComplete=()=>{const x=e.autoplay,N=U.editor;if(x&&x.linked||N&&N.showPanel){r&&r(this.timeline);return}this.transformAnimation&&this.transformAnimation.cancel(),g.forEachRootNode(I=>{po(I),ho(I)});for(let I=0,R=w.length;I<R;I++){const q=w[I];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")||dr(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(po),this.root.classList.remove("is-animated"),r&&r(this.timeline),i&&i(this.timeline))},s.composition=!1;const o=ct(ct(e.swapAt||{},this.swapAtParams),t),n=ct(ct(e.enterFrom||{},this.enterFromParams),t),a=ct(ct(e.leaveTo||{},this.leaveToParams),t),[u,h]=cs(o),[p,l]=cs(n),[f,c]=cs(a),d=this.oldState,g=this.newState,v=this.animating,_=this.swapping,S=this.entering,y=this.leaving,m=this.pendingRemoval;v.length=_.length=S.length=y.length=0,d.forEachRootNode(su),g.record(),g.forEachRootNode(nu);const b=[],k=[],w=[],A=[],O=g.rootNode,E=O.$el;g.forEachRootNode(x=>{const N=x.$el,I=x.id,R=x.parentNode,q=R?R.branchAdded:!1,K=R?R.branchRemoved:!1,Z=R?R.branchNotRendered:!1;let z=d.nodes.get(I);const j=!z;j?(z=ai(x,{},d),d.nodes.set(I,z),z.measuredIsRemoved=!0):z.measuredIsRemoved&&!x.measuredIsRemoved&&(ai(x,z,d),z.measuredIsRemoved=!0);const oe=z.parentNode,X=(oe?oe.id:null)!==(R?R.id:null),ve=z.$el!==x.$el,se=z.measuredIsRemoved,re=x.measuredIsRemoved;if(!z.measuredIsRemoved&&!re&&!j&&(X||ve)){const ye=z.properties.left,Te=z.properties.top,Ce=R||g.rootNode,be=Ce.id?d.nodes.get(Ce.id):null,ae=be?be.properties.left:Ce.properties.left,me=be?be.properties.top:Ce.properties.top,de=be?be.properties.clientLeft:Ce.properties.clientLeft,C=be?be.properties.clientTop:Ce.properties.clientTop;z.properties.x=ye-ae-de,z.properties.y=Te-me-C}x.hasVisibilitySwap&&(x.hasVisibilityHidden&&(x.$el.style.visibility="visible",x.$measure.style.visibility="hidden"),x.hasDisplayNone&&(x.$el.style.display=z.measuredDisplay||x.measuredDisplay||"",x.$measure.style.visibility="hidden"));const Q=m.has(N),ue=z.measuredIsVisible,xe=x.measuredIsVisible,we=!ue&&xe&&!Z,he=!re&&(se||Q)&&!q,ee=re&&!se&&!K,te=ee||re&&Q&&!K;x.branchAdded=q||he,x.branchRemoved=K||te,x.branchNotRendered=Z||re,re&&ue&&(x.$el.style.display=z.measuredDisplay,x.$el.style.visibility="visible",ai(z,x,g)),ee?(x.isTarget&&(y.push(N),x.isLeaving=!0),m.add(N)):!re&&Q&&m.delete(N),he&&!Z||we?(uo(z,p),x.isTarget&&(S.push(N),x.isEntering=!0)):te&&!Z&&uo(x,f),x!==O&&x.isTarget&&!x.isEntering&&!x.isLeaving&&v.push(N),b.push(N)});let L=0,P=0,D=0;g.forEachRootNode(x=>{const N=x.$el,I=x.parentNode,R=d.nodes.get(x.id),q=x.properties,K=R.properties;let Z=I!==O&&I;for(;Z&&!Z.isTarget&&Z!==O;)Z=Z.parentNode;x===O?(x.index=0,x.targets=v,Cs(x,t)):x.isEntering?(x.index=Z?Z.index:L,x.targets=Z?v:S,Cs(x,l),L++):x.isLeaving?(x.index=Z?Z.index:P,x.targets=Z?v:y,P++,Cs(x,c)):x.isTarget?(x.index=D++,x.targets=v,Cs(x,t)):(x.index=Z?Z.index:0,x.targets=v,Cs(x,h)),R.index=x.index,R.targets=x.targets;for(let X in q)q[X]=Oe(q[X],N,x.index,x.targets,null,null),K[X]=Oe(K[X],N,R.index,R.targets,null,null);const z=1,j=Math.abs(q.width-K.width)>z,oe=Math.abs(q.height-K.height)>z;if(x.sizeChanged=j||oe,x.isTarget&&(!x.measuredIsRemoved&&R.measuredIsVisible||x.measuredIsRemoved&&x.measuredIsVisible)){(q.transform!=="none"||K.transform!=="none")&&(x.hasTransform=!0,w.push(N));for(let X in q)if(X!=="transform"&&q[X]!==K[X]){k.push(N);break}}x.isTarget||(_.push(N),x.sizeChanged&&I&&I.isTarget&&I.sizeChanged&&(u.transform&&(x.hasTransform=!0,w.push(N)),A.push(N)))});const B={delay:x=>g.getNode(x).delay,duration:x=>g.getNode(x).duration,ease:x=>g.getNode(x).ease};if(s.defaults=B,this.timeline=zn(s),!k.length&&!w.length&&!_.length)return dr(this.transitionMuteStore),this.timeline.complete();if(b.length){this.root.classList.add("is-animated");for(let x=0,N=b.length;x<N;x++){const I=b[x],R=I.dataset.layoutId,q=d.nodes.get(R),K=g.nodes.get(R),Z=q.properties;K.isInlined||((q.measuredDisplay==="grid"||K.measuredDisplay==="grid")&&I.style.setProperty("display","block","important"),(I!==E||this.absoluteCoords)&&(I.style.position=this.absoluteCoords?"fixed":"absolute",I.style.left="0px",I.style.top="0px",I.style.marginLeft="0px",I.style.marginTop="0px",I.style.translate=`${Z.x}px ${Z.y}px`),I===E&&K.measuredPosition==="static"&&(I.style.position="relative",I.style.left="0px",I.style.top="0px")),I.style.width=`${Z.width}px`,I.style.height=`${Z.height}px`,I.style.minWidth="auto",I.style.minHeight="auto",I.style.maxWidth="none",I.style.maxHeight="none"}(d.scrollX!==window.scrollX||d.scrollY!==window.scrollY)&&requestAnimationFrame(()=>window.scrollTo(d.scrollX,d.scrollY));for(let x=0,N=k.length;x<N;x++){const I=k[x],R=I.dataset.layoutId,q=d.nodes.get(R),K=g.nodes.get(R),Z=q.properties,z=K.properties;let j=!1;const oe={composition:"none"};Z.width!==z.width&&(oe.width=[Z.width,z.width],j=!0),Z.height!==z.height&&(oe.height=[Z.height,z.height],j=!0),!K.hasTransform&&!K.isInlined&&(oe.translate=[`${Z.x}px ${Z.y}px`,`${z.x}px ${z.y}px`],j=!0),this.properties.forEach(X=>{const ve=Z[X],se=z[X];X!=="transform"&&ve!==se&&(oe[X]=[ve,se],j=!0)}),j&&this.timeline.add(I,oe,0)}}if(_.length){for(let x=0,N=_.length;x<N;x++){const I=_[x],R=d.getNode(I),q=R.properties;I.style.width=`${q.width}px`,I.style.height=`${q.height}px`,I.style.minWidth="auto",I.style.minHeight="auto",I.style.maxWidth="none",I.style.maxHeight="none",R.isInlined||(I.style.translate=`${q.x}px ${q.y}px`),this.properties.forEach(K=>{K!=="transform"&&(I.style[K]=`${d.getComputedValue(I,K)}`)})}for(let x=0,N=_.length;x<N;x++){const I=_[x],R=g.getNode(I),q=R.properties;this.timeline.call(()=>{I.style.width=`${q.width}px`,I.style.height=`${q.height}px`,I.style.minWidth="auto",I.style.minHeight="auto",I.style.maxWidth="none",I.style.maxHeight="none",R.isInlined||(I.style.translate=`${q.x}px ${q.y}px`),this.properties.forEach(K=>{K!=="transform"&&(I.style[K]=`${g.getComputedValue(I,K)}`)})},R.delay+R.duration/2)}if(A.length){const x=Pt(g.nodes.get(A[0].dataset.layoutId).ease),N=R=>1-x(1-R),I={};if(u)for(let R in u)R!=="transform"&&(I[R]=[{from:q=>d.getComputedValue(q,R),to:u[R]},{from:u[R],to:q=>g.getComputedValue(q,R),ease:N}]);this.timeline.add(A,I,0)}}const V=w.length;if(V){for(let x=0;x<V;x++){const N=w[x],I=g.getNode(N);I.isInlined||(N.style.translate=`${d.getComputedValue(N,"x")}px ${d.getComputedValue(N,"y")}px`),N.style.transform=d.getComputedValue(N,"transform"),A.includes(N)&&(I.ease=Oe(o.ease,N,I.index,I.targets,null,null),I.duration=Oe(o.duration,N,I.index,I.targets,null,null))}this.transformAnimation=ao.animate(w,{translate:x=>g.getNode(x).isInlined?"0px 0px":`${g.getComputedValue(x,"x")}px ${g.getComputedValue(x,"y")}px`,transform:x=>{const N=g.getComputedValue(x,"transform");if(!A.includes(x))return N;const I=d.getComputedValue(x,"transform"),R=g.getNode(x);return[I,Oe(u.transform,x,R.index,R.targets,null,null),N]},autoplay:!1,...B}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(e,t={}){return this.record(),e(this),this.animate(t)}},au=(e,t)=>new go(e,t),ut=Oc,gr={},lu=(e,t=0)=>(...s)=>t?r=>e(...s,r):r=>e(r,...s),mo=e=>(...t)=>{const s=e(...t);return new Proxy(ne,{apply:(r,i,[o])=>s(o),get:(r,i)=>{if(gr[i])return mo((...o)=>{const n=gr[i](...o);return a=>n(s(a))})}})},ht=(e,t,s=0)=>{const r=(...i)=>(i.length<t.length?mo(lu(t,s)):t)(...i);return gr[e]||(gr[e]=r),r},vo=ht("roundPad",ut.roundPad),yo=ht("padStart",ut.padStart),bo=ht("padEnd",ut.padEnd),_o=ht("wrap",ut.wrap),So=ht("mapRange",ut.mapRange),ko=ht("degToRad",ut.degToRad),wo=ht("radToDeg",ut.radToDeg),xo=ht("snap",ut.snap),To=ht("clamp",ut.clamp),Co=ht("round",ut.round),Po=ht("lerp",ut.lerp,1),Eo=ht("damp",ut.damp,1),Ps=(e=0,t=1,s=0)=>{const r=10**s;return Math.floor((Math.random()*(t-e+1/r)+e)*r)/r},cu=0,Es=(e,t=0,s=1,r=0)=>{let i=e===void 0?cu++:e;return(o=t,n=s,a=r)=>{i+=1831565813,i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61);const u=10**a;return Math.floor((((i^i>>>14)>>>0)/4294967296*(n-o+1/u)+o)*u)/u}},Ao=e=>e[Ps(0,e.length-1)],li=(e,t=Ps)=>{let s=e.length,r,i;for(;s;)i=t(0,--s),r=e[s],e[s]=e[i],e[i]=r;return e},As=(e,t={})=>{let s=[],r=0,i,o=null;const n=t.from,a=t.reversed,u=t.ease,h=!$(u),p=h&&!$(u.ease)?u.ease:h?Pt(u):null,l=t.grid,f=l===!0,c=t.axis,d=t.total,g=$(n)||n===0||n==="first",v=n==="center",_=n==="last",S=n==="random",y=qe(n),m=qe(e),b=t.use,k=Wt(m?e[0]:e),w=m?Wt(e[1]):0,A=pn.exec((m?e[1]:e)+""),O=t.start||0+(m?k:0),E=t.seed,L=!$(E)&&E!==!1?Es(E===!0?0:E):Ps,P=t.jitter,D=!$(P),B=qe(P),V=B?P[0]:P||0,x=B?P[1]:P||0;let N=g?0:Ve(n)?n:0;return(I,R,q,K,Z)=>{const[z]=Ot(I),j=$(d)?q.length:d,oe=$(b)?!1:Ae(b)?b(z,R,j):Gt(z,b),X=Ve(oe)||Be(oe)&&Ve(+oe)?+oe:R,ve=X>=0&&X<j?X:R;if(v&&(N=(j-1)/2),_&&(N=j-1),!s.length){if(f){let Q=!0,ue=!1,xe=1/0,we=1/0,he=1/0,ee=-1/0,te=-1/0,ye=-1/0;const Te=[],Ce=[],be=[];for(let ae=0;ae<j;ae++){const me=q[ae];let de=0,C=0,T=0,M=!1;if(me&&Ae(me.getBoundingClientRect)){const H=me.getBoundingClientRect();de=H.left+H.width/2,C=H.top+H.height/2,M=!0}else{const H=me;H&&Ve(H.x)&&Ve(H.y)&&(de=H.x,C=H.y,Ve(H.z)&&(T=H.z,ue=!0),M=!0)}if(!M){Q=!1;break}Te.push(de),Ce.push(C),be.push(T),de<xe&&(xe=de),C<we&&(we=C),T<he&&(he=T),de>ee&&(ee=de),C>te&&(te=C),T>ye&&(ye=T)}if(Q){let ae=Te[0],me=Ce[0],de=be[0];y?(ae=xe+n[0]*(ee-xe),me=we+n[1]*(te-we),de=ue?he+(n.length>=3?n[2]:.5)*(ye-he):0):v?(ae=(xe+ee)/2,me=(we+te)/2,de=(he+ye)/2):_?(ae=Te[j-1],me=Ce[j-1],de=be[j-1]):Ve(n)&&(ae=Te[n],me=Ce[n],de=be[n]);for(let T=0;T<j;T++){const M=ae-Te[T],H=me-Ce[T],Y=de-be[T];let le=at(M*M+H*H+(ue?Y*Y:0));c==="x"&&(le=-M),c==="y"&&(le=-H),c==="z"&&(le=-Y),s.push(le)}let C=1/0;for(let T=0;T<j;T++){const M=lt(s[T]);M>0&&M<C&&(C=M)}if(C>0&&C<1/0)for(let T=0;T<j;T++)s[T]=s[T]/C}else for(let ae=0;ae<j;ae++)s.push(lt(N-ae))}else for(let Q=0;Q<j;Q++)if(!l)s.push(lt(N-Q));else{const ue=l.length,xe=l[0]*l[1];let we,he,ee;y?(we=n[0]*(l[0]-1),he=n[1]*(l[1]-1),ee=ue===3?(n.length>=3?n[2]:.5)*(l[2]-1):0):v?(we=(l[0]-1)/2,he=(l[1]-1)/2,ee=ue===3?(l[2]-1)/2:0):(we=N%l[0],he=rs(N/l[0])%l[1],ee=ue===3?rs(N/xe):0);const te=Q%l[0],ye=rs(Q/l[0])%l[1],Te=ue===3?rs(Q/xe):0,Ce=we-te,be=he-ye,ae=ee-Te;let me=at(Ce*Ce+be*be+(ue===3?ae*ae:0));c==="x"&&(me=-Ce),c==="y"&&(me=-be),c==="z"&&(me=-ae),s.push(me)}r=s[0];for(let Q=1;Q<j;Q++)s[Q]>r&&(r=s[Q]);if(p||a)for(let Q=0;Q<j;Q++){let ue=s[Q];p&&(ue=p(ue/r)*r),a&&(ue=c?-ue:lt(r-ue)),s[Q]=ue}if(D){o=new Array(j);for(let Q=0;Q<j;Q++)o[Q]=L(-1,1,4)}S&&(s=li(s,L))}const se=m?(w-k)/r:k;$(i)&&(i=Z?ks(Z,$(t.start)?Z.iterationDuration:O):O);let re=i+(se*F(s[ve],2)||0);if(D){const Q=r?s[ve]/r:0,ue=V+(x-V)*Q;re=re+o[ve]*ue}return t.modifier&&(re=t.modifier(re)),A&&(re=`${re}${A[2]}`),re}},uu=Jt({$:()=>Ot,addChild:()=>yt,clamp:()=>To,cleanInlineStyles:()=>Cn,createSeededRandom:()=>Es,damp:()=>Eo,degToRad:()=>ko,forEachChildren:()=>ke,get:()=>Nt,keepTime:()=>ar,lerp:()=>Po,mapRange:()=>So,padEnd:()=>bo,padStart:()=>yo,radToDeg:()=>wo,random:()=>Ps,randomPick:()=>Ao,remove:()=>Xn,removeChild:()=>vt,round:()=>Co,roundPad:()=>vo,set:()=>At,shuffle:()=>li,snap:()=>xo,stagger:()=>As,sync:()=>ii,wrap:()=>_o}),Lo=e=>{const t=it(e)[0];return!t||!Us(t)?console.warn(`${e} is not a valid SVGGeometryElement`):t},ci=(e,t,s,r,i)=>{const o=s+r,n=i?Math.max(0,Math.min(o,t)):(o%t+t)%t;return e.getPointAtLength(n)},ui=(e,t,s=0)=>r=>{const i=+e.getTotalLength(),o=r[Hr],n=e.getCTM(),a=s===0;return{from:0,to:i,modifier:u=>{const h=u+s*i;if(t==="a"){const p=ci(e,i,h,-1,a),l=ci(e,i,h,1,a);return Xs(l.y-p.y,l.x-p.x)*180/St}else{const p=ci(e,i,h,0,a);return t==="x"?o||!n?p.x:p.x*n.a+p.y*n.c+n.e:o||!n?p.y:p.x*n.b+p.y*n.d+n.f}}}},Ro=(e,t=0)=>{const s=Lo(e);if(s)return{translateX:ui(s,"x",t),translateY:ui(s,"y",t),rotate:ui(s,"a",t)}},hu=e=>{let t=1;if(e&&e.getCTM){const s=e.getCTM();s&&(t=(at(s.a*s.a+s.b*s.b)+at(s.c*s.c+s.d*s.d))/2)}return t},pu=(e,t,s)=>{const r=Ge,i=getComputedStyle(e),o=i.strokeLinecap,n=i.vectorEffect==="non-scaling-stroke"?e:null;let a=o;const u=new Proxy(e,{get(h,p){const l=h[p];return p===cn?h:p==="setAttribute"?(...f)=>{if(f[0]==="draw"){const c=f[1].split(" "),d=+c[0],g=+c[1],v=hu(n),_=d*-r*v,S=g*r*v+_,y=r*v+(d===0&&g===1||d===1&&g===0?0:10*v)-S;if(o!=="butt"){const m=d===g?"butt":o;a!==m&&(h.style.strokeLinecap=`${m}`,a=m)}h.setAttribute("stroke-dashoffset",`${_}`),h.setAttribute("stroke-dasharray",`${S} ${y}`)}return Reflect.apply(l,h,f)}:Ae(l)?(...f)=>Reflect.apply(l,h,f):l}});return e.getAttribute("pathLength")!==`${r}`&&(e.setAttribute("pathLength",`${r}`),u.setAttribute("draw",`${t} ${s}`)),u},Io=(e,t=0,s=0)=>it(e).map(r=>pu(r,t,s)),Oo=(e,t=.33)=>(s,r,i,o)=>{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 n=Lo(e);if(!n)throw new Error("Can\'t morph to an invalid target. \'path2\' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(n.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can\'t morph a <${n.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const a=s.tagName==="path",u=a?" ":",",h=o?o._value:null;h&&s.setAttribute(a?"d":"points",h);let p="",l="";if(!t)p=s.getAttribute(a?"d":"points"),l=n.getAttribute(a?"d":"points");else{const f=s.getTotalLength(),c=n.getTotalLength(),d=Math.max(Math.ceil(f*t),Math.ceil(c*t));for(let g=0;g<d;g++){const v=g/(d-1),_=s.getPointAtLength(f*v),S=n.getPointAtLength(c*v),y=a?g===0?"M":"L":"";p+=y+F(_.x,3)+u+_.y+" ",l+=y+F(S.x,3)+u+S.y+" "}}return[p,l]},fu=Jt({createDrawable:()=>Io,createMotionPath:()=>Ro,morphTo:()=>Oo}),mr=typeof Intl<"u"&&Intl.Segmenter,du=/\\{value\\}/g,gu=/\\{i\\}/g,hi=/(\\s+)/,pi=/^\\s+$/,fi="line",Ls="word",Rs="char",Is="data-line",di=null,gi=null,vr=null,Mo=e=>e.isWordLike||e.segment===" "||Ve(+e.segment),mi=e=>e.setAttribute("aria-hidden","true"),yr=(e,t)=>[...e.querySelectorAll(`[data-${t}]:not([data-${t}] [data-${t}])`)],mu={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},No=e=>{if(!e.childElementCount&&!e.textContent.trim()){const t=e.parentElement;e.remove(),t&&No(t)}},Do=(e,t,s)=>{const r=e.getAttribute(Is);if(r!==null&&+r!==t||e.tagName==="BR"){s.add(e);const o=e.previousSibling,n=e.nextSibling;o&&o.nodeType===3&&pi.test(o.textContent)&&s.add(o),n&&n.nodeType===3&&pi.test(n.textContent)&&s.add(n)}let i=e.childElementCount;for(;i--;)Do(e.children[i],t,s);return s},vi=(e,t={})=>{let s="";t||(t={});const r=Be(t.class)?` class="${t.class}"`:"",i=W(t.clone,!1),o=W(t.wrap,!1),n=o?o===!0?"clip":o:i?"clip":!1;if(o&&(s+=`<span${n?` style="overflow:${n};"`:""}>`),s+=`<span${r}${i?\' style="position:relative;"\':""} data-${e}="{i}">`,i){const a=i==="left"?"-100%":i==="right"?"100%":"0",u=i==="top"?"-100%":i==="bottom"?"100%":"0";s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${u};left:${a};white-space:nowrap;">{value}</span>`}else s+="{value}";return s+="</span>",o&&(s+="</span>"),s},yi=(e,t,s,r,i,o,n,a,u)=>{const h=i===fi,p=i===Rs,l=`_${i}_`,f=Ae(e)?e(s):e,c=h?"block":"inline-block";vr.innerHTML=f.replace(du,`<i class="${l}"></i>`).replace(gu,`${p?u:h?n:a}`);const d=vr.content,g=d.firstElementChild,v=d.querySelector(`[data-${i}]`)||g,_=d.querySelectorAll(`i.${l}`),S=_.length;if(S){g.style.display=c,v.style.display=c,v.setAttribute(Is,`${n}`),h||(v.setAttribute("data-word",`${a}`),p&&v.setAttribute("data-char",`${u}`));let y=S;for(;y--;){const m=_[y],b=m.parentElement;b.style.display=c,h?b.innerHTML=s.innerHTML:b.replaceChild(s.cloneNode(!0),m)}t.push(v),r.appendChild(d)}else console.warn(\'The expression "{value}" is missing from the provided template.\');return o&&(g.style.outline=`1px dotted ${mu[i]}`),g},br=class{constructor(e,t={}){di||(di=mr?new mr([],{granularity:Ls}):{segment:c=>{const d=[],g=c.split(hi);for(let v=0,_=g.length;v<_;v++){const S=g[v];d.push({segment:S,isWordLike:!pi.test(S)})}return d}}),gi||(gi=mr?new mr([],{granularity:"grapheme"}):{segment:c=>[...c].map(d=>({segment:d}))}),!vr&&_t&&(vr=J.createElement("template")),Ie.current&&Ie.current.register(this);const{words:s,chars:r,lines:i,accessible:o,includeSpaces:n,debug:a}=t,u=(e=qe(e)?e[0]:e)&&e.nodeType?e:(Jr(e)||[])[0],h=i===!0?{}:i,p=s===!0||$(s)?{}:s,l=r===!0?{}:r;this.debug=W(a,!1),this.includeSpaces=W(n,!1),this.accessible=W(o,!0),this.linesOnly=h&&!p&&!l,this.lineTemplate=De(h)?vi(fi,h):h,this.wordTemplate=De(p)||this.linesOnly?vi(Ls,p):p,this.charTemplate=De(l)?vi(Rs,l):l,this.$target=u,this.html=u&&u.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&&(h||p||l)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const c=u.offsetWidth;c!==this.width&&(this.width=c,f())},150)}),this.lineTemplate&&!this.ready?J.fonts.ready.then(f):f(),u?this.resizeObserver.observe(u):console.warn("No Text Splitter target found.")}addEffect(e){if(!Ae(e))return console.warn("Effect must return a function."),this;const t=ar(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=>Ae(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,o=e.nodeType;if(o===3){const n=e.nodeValue;if(n.trim()){const a=[],u=this.words,h=this.chars,p=di.segment(n),l=J.createDocumentFragment();let f=null;for(const c of p){const d=c.segment,g=Mo(c);if(!f||g&&f&&Mo(f))a.push(d);else{const v=a.length-1,_=a[v];!hi.test(_)&&!hi.test(d)?a[v]+=d:a.push(d)}f=c}for(let c=0,d=a.length;c<d;c++){const g=a[c];if(g.trim()){const v=a[c+1],_=r&&v&&!v.trim(),S=g,y=s?gi.segment(S):null,m=s?J.createDocumentFragment():J.createTextNode(_?g+" ":g);if(s){const b=[...y];for(let k=0,w=b.length;k<w;k++){const A=b[k],O=k===w-1&&_?A.segment+" ":A.segment,E=J.createTextNode(O);yi(s,h,E,m,Rs,i,-1,u.length,h.length)}}t?yi(t,u,m,l,Ls,i,-1,u.length,h.length):s?l.appendChild(m):l.appendChild(J.createTextNode(g)),_&&c++}else{if(c&&r)continue;l.appendChild(J.createTextNode(g))}}e.parentNode.replaceChild(l,e)}}else if(o===1){const n=[...e.childNodes];for(let a=0,u=n.length;a<u;a++)this.splitNode(n[a])}}split(e=!1){const t=this.$target,s=!!this.cache&&!e,r=this.lineTemplate,i=this.wordTemplate,o=this.charTemplate,n=J.fonts.status!=="loading",a=r&&n;this.ready=!r||n,(a||e)&&this.effectsCleanups.forEach(l=>Ae(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=yr(t,Ls))),o&&(a||i)&&(this.chars=yr(t,Rs));const u=this.words.length?this.words:this.chars;let h,p=0;for(let l=0,f=u.length;l<f;l++){const c=u[l],{top:d,height:g}=c.getBoundingClientRect();!$(h)&&d-h>g*.5&&p++,c.setAttribute(Is,`${p}`);const v=c.querySelectorAll(`[${Is}]`);let _=v.length;for(;_--;)v[_].setAttribute(Is,`${p}`);h=d}if(a){const l=J.createDocumentFragment(),f=new Set,c=[];for(let d=0;d<p+1;d++){const g=t.cloneNode(!0);Do(g,d,new Set).forEach(v=>{const _=v.parentNode;_&&(v.nodeType===1&&f.add(_),_.removeChild(v))}),c.push(g)}f.forEach(No);for(let d=0,g=c.length;d<g;d++)yi(r,this.lines,c[d],l,fi,this.debug,d);t.innerHTML="",t.appendChild(l),i&&(this.words=yr(t,Ls)),o&&(this.chars=yr(t,Rs))}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(mi),this.words.forEach(mi),this.chars.forEach(mi)}return this.width=t.offsetWidth,(a||e)&&this.effects.forEach((l,f)=>this.effectsCleanups[f]=l(this)),this}refresh(){this.split(!0)}},Bo=(e,t)=>new br(e,t),Os=(e,t)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new br(e,t)),$o=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),o=e.charCodeAt(s+2);for(let n=i;n<=o;n++)t+=String.fromCharCode(n);s+=2}else t+=e[s];return t},Ho={lowercase:"a-z",uppercase:"A-Z",numbers:"0-9",symbols:"!%#_|*+=",braille:"⠀-⣿",blocks:"▀-▟",shades:"░-▓"},bi=new WeakMap,qo=(e={})=>{e||(e={});const t=e.chars,s=Pt(e.ease||"linear"),r=e.text,i=e.from,o=e.reversed||!1,n=e.perturbation||0,a=e.cursor,u=a===!0?"_":typeof a=="number"?String.fromCharCode(a):typeof a=="string"?a:"",h=u.length,p=e.seed||0,l=e.override!==void 0?e.override:!0,f=e.revealRate||60,c=1e3*U.timeScale/f,d=e.settleDuration||300*U.timeScale,g=e.settleRate||30,v=e.duration,_=e.revealDelay,S=e.delay,y=e.onChange||ne;return(m,b,k,w)=>{const A=typeof t=="function"?t(m,b,k):t||"a-zA-Z0-9!%#_",O=$o(Ho[A]||A),E=O.length-1,L=typeof v=="function"?v(m,b,k):v,P=typeof _=="function"?_(m,b,k):_||0,D=typeof S=="function"?S(m,b,k):S||0,B=p?Es(p):Es();bi.has(m)||bi.set(m,m.textContent);const V=w?w._value:m.textContent,x=r!==void 0?typeof r=="function"?r(m,b,k):r:w?w._value:bi.get(m),N=x===" "||x==="&nbsp;"?" ":x,I=V===" "?0:V.length,R=N.length,q=l===!0?O:typeof l=="string"&&l.length>0?$o(Ho[l]||l):null,K=q?q.length-1:0,Z=l===" "?" ":null,z=l===""?R:Math.max(I,R),j=L>0?L:(z-1)*c+d,oe=F((j+P)/U.timeScale,0)*U.timeScale,X=P>0?F(P/oe,12):0,ve=i===void 0||i==="auto"?R<I?"right":"left":i,se=new Int32Array(z);if(ve==="random"){for(let T=0;T<z;T++)se[T]=T;for(let T=z-1;T>0;T--){const M=B(0,T),H=se[T];se[T]=se[M],se[M]=H}}else{const T=ve==="right"?(l===""||!I?z:I)-1:ve==="center"?((l===""||!I?z:I)-1)/2:typeof ve=="number"?ve:0,M=Math.abs,H=new Array(z);for(let Y=0;Y<z;Y++)H[Y]=Y;H.sort((Y,le)=>M(Y-T)-M(le-T));for(let Y=0;Y<z;Y++)se[H[Y]]=Y}if(o){const T=z-1;for(let M=0;M<z;M++)se[M]=T-se[M]}const re=F(d/j,12),Q=F((1-re)/z,12),ue=h*Q,xe=F(1e3*U.timeScale/(g*oe),12),we=new Float32Array(z),he=new Float32Array(z),ee=n>0?n*re:0;for(let T=0;T<z;T++){const M=ee>0?(B(0,2e3)-1e3)/1e3*ee:0,H=ee>0?(B(0,2e3)-1e3)/1e3*ee:0;we[T]=se[T]*Q+M,he[T]=Math.ceil((we[T]+re+H)/xe)*xe}if(R<z&&ve!=="left"&&ve!=="right"&&ve!=="random"){let T=0;for(let Y=R;Y<z;Y++)he[Y]>T&&(T=he[Y]);const M=new Array(R);for(let Y=0;Y<R;Y++)M[Y]=Y;M.sort((Y,le)=>se[Y]-se[le]);const H=(1-T)/R;for(let Y=0;Y<R;Y++){const le=T+Y*H;le>he[M[Y]]&&(he[M[Y]]=le)}}const te=new Array(z);for(let T=0;T<z;T++)te[T]=O[B(0,E)];const ye=q?q===O?te:new Array(z):null;if(ye&&ye!==te)for(let T=0;T<z;T++)ye[T]=Z||q[B(0,q.length-1)];let Te=V;if(!w){if(l==="")Te="";else if(q){Te="";for(let T=0;T<I;T++)Te+=V[T]===" "?" ":ye[T]}}let Ce=-1,be=-1,ae="";const me=l!=="",de=!!q,C=h>0;return{from:0,to:1,duration:oe,delay:D,ease:"linear",modifier:T=>{if(T===Ce)return ae;if(Ce=T,D>0&&T<=0)return ae=V,V;if(T<=0)return ae=Te,Te;if(T>=1)return ae=N,N;ae="";const M=T/xe|0,H=M!==be;H&&(be=M);const Y=X>0?(T-X)/(1-X):T,le=Y>0?s(Y):0;for(let _e=0;_e<z;_e++){const Me=we[_e];if(le>=he[_e]){_e<R&&(ae+=N[_e]);continue}if(le<=0||le<Me){me&&_e<I&&(de?V[_e]===" "?ae+=" ":(H&&(ye[_e]=Z||q[B(0,K)]),ae+=ye[_e]):ae+=V[_e]);continue}_e<R&&N[_e]===" "||_e<I&&V[_e]===" "?ae+=" ":C&&le-Me<ue?ae+=u[h-1-((le-Me)/Q|0)]:(H&&(te[_e]=O[B(0,E)]),ae+=te[_e])}return H&&y(ae,le),ae}}}},vu=Jt({TextSplitter:()=>br,scrambleText:()=>qo,split:()=>Os,splitText:()=>Bo}),yu=Jt({$:()=>Ot,Animatable:()=>ti,AutoLayout:()=>go,Draggable:()=>Yn,JSAnimation:()=>Et,Scope:()=>Gn,ScrollObserver:()=>Jn,Spring:()=>ir,TextSplitter:()=>br,Timeline:()=>Vn,Timer:()=>rt,WAAPIAnimation:()=>oo,addChild:()=>yt,animate:()=>Ss,clamp:()=>To,cleanInlineStyles:()=>Cn,createAnimatable:()=>Ic,createDraggable:()=>zc,createDrawable:()=>Io,createLayout:()=>au,createMotionPath:()=>Ro,createScope:()=>Uc,createSeededRandom:()=>Es,createSpring:()=>Un,createTimeline:()=>zn,createTimer:()=>Cc,cubicBezier:()=>jn,damp:()=>Eo,degToRad:()=>ko,eases:()=>Ct,easings:()=>Jc,engine:()=>Ue,forEachChildren:()=>ke,get:()=>Nt,globals:()=>U,irregular:()=>to,keepTime:()=>ar,lerp:()=>Po,linear:()=>ni,mapRange:()=>So,morphTo:()=>Oo,onScroll:()=>Zc,padEnd:()=>bo,padStart:()=>yo,radToDeg:()=>wo,random:()=>Ps,randomPick:()=>Ao,remove:()=>Xn,removeChild:()=>vt,round:()=>Co,roundPad:()=>vo,scrambleText:()=>qo,scrollContainers:()=>cr,set:()=>At,shuffle:()=>li,snap:()=>xo,split:()=>Os,splitText:()=>Bo,spring:()=>nr,stagger:()=>As,steps:()=>eo,svg:()=>fu,sync:()=>ii,text:()=>vu,utils:()=>uu,waapi:()=>ao,wrap:()=>_o}),bu=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 o=this.animations[e];o?o.handler(t,s,r,i):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}removeLinkAnimation(e){this.linkAnimations.delete(e)}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}=Os(e,{words:!1,chars:!0}),o=t.fadeDuration||100,n=t.interval||100;Ss(i,{opacity:[0,1],easing:"linear",duration:o,delay:As(n,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation("toast",function(e,t,s,r){const{words:i}=Os(e,{words:!0,chars:!1}),o=t.fadeDuration||100,n=t.interval||200;Ss(i,{opacity:[0,1],y:[{to:["100%","0%"]}],easing:"linear",duration:o,delay:As(n,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation("fadeIn",function(e,t,s,r){const i=t.duration||500;Ss(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,o=null;r==="wave"?(e.classList.add("squiffy-continue-wave"),o=Os(e,{words:!1,chars:!0}).chars,i=Ss(o,{opacity:[1,.3,1],easing:"easeInOutSine",duration:1200,delay:As(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const n=()=>{if(e.classList.remove("squiffy-continue","squiffy-continue-wave",`squiffy-continue-${r}`),e.removeEventListener("click",n),i&&(i.pause(),o))for(const a of o)a.style.opacity="1";s()};e.addEventListener("click",n)})}},_u={animejs:yu},Fo="input:not([disabled]), textarea:not([disabled]), select:not([disabled])",Su="a.squiffy-link[data-section], a.squiffy-link[data-passage]";function Vo(e){if(!e)return!0;const t=e.querySelectorAll(Fo);for(const s of t)if(!s.checkValidity())return!1;return!0}function _i(e){if(!e)return;const t=Vo(e),s=e.querySelectorAll(Su);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 _r(e){if(!e)return;const t=e.querySelectorAll(Fo);for(const s of t)s.addEventListener("input",()=>_i(e)),s.addEventListener("change",()=>_i(e)),s.addEventListener("invalid",r=>{r.preventDefault(),s.classList.add("squiffy-invalid")}),s.addEventListener("input",()=>{s.checkValidity()&&s.classList.remove("squiffy-invalid")});_i(e)}var zo=["src","poster"],ku="data-squiffy-asset-",wu=[...zo,"srcset","style"].map(e=>`[${e}]`).join(","),xu=e=>/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")||e.startsWith("#"),Si=(e,t)=>{const s=e.trim();if(!s||xu(s))return e;let r=s;try{r=decodeURI(s)}catch{}return t(r)},Tu=(e,t)=>e.split(",").map(s=>{const r=s.match(/^(\\s*)(\\S+)(.*)$/s);return r?r[1]+Si(r[2],t)+r[3]:s}).join(","),Cu=(e,t)=>e.replace(/url\\(\\s*([\'"]?)(.*?)\\1\\s*\\)/gi,(s,r,i)=>{const o=Si(i,t);return o===i?s:`url("${o.replace(/["\\\\\\n]/g,n=>"\\\\"+(n===`\n`?"a ":n))}")`}),Pu=(e,t,s)=>{const r=ku+t,i=e.getAttribute(r)??e.getAttribute(t);if(i===null)return;let o;t==="srcset"?o=Tu(i,s):t==="style"?o=Cu(i,s):o=Si(i,s),o===i?e.removeAttribute(r):e.setAttribute(r,i),e.setAttribute(t,o)},Eu=e=>t=>{if(!e||!/\\b(src|srcset|poster|style)\\s*=/i.test(t))return t;const s=document.createElement("template");s.innerHTML=t;for(const r of s.content.querySelectorAll(wu))for(const i of[...zo,"srcset","style"])r.hasAttribute(i)&&Pu(r,i,e);return s.innerHTML},Au=async e=>{let t,s,r,i,o,n=0,a=!1;const u=new Wl,h=[];let p=!1;async function l(C){if(p||C.closest(".squiffy-output-section")!==r||C.classList.contains("disabled")||!Vo(r))return!1;const T=C.getAttribute("data-passage"),M=C.getAttribute("data-section");if(T!==null)return c(C),te("_turncount",ee("_turncount")+1),await v(C),T&&(o=null,await k(T)),u.emit("linkClick",{linkType:"passage"}),!0;if(M!==null)return await v(C),M&&await S(M),u.emit("linkClick",{linkType:"section"}),!0;const[H,Y,le]=Te.handleLink(C);return H?(le?.disableLink&&c(C),O(),u.emit("linkClick",{linkType:Y}),!0):!1}async function f(C){const T=C.target;T.classList.contains("squiffy-link")&&await l(T)}function c(C){C.classList.add("disabled"),C.setAttribute("tabindex","-1")}function d(C){C.classList.remove("disabled"),C.removeAttribute("tabindex")}async function g(C){if(C&&C.section in t.sections){await S(C.section),C.passage!==void 0&&ee("_section")==C.section&&await k(C.passage);return}E()||await S(t.start)}async function v(C){me.runLinkAnimation(C),await b();const T=C.getAttribute("data-set");if(T){const M=JSON.parse(T);for(const H of M)_(H)}}function _(C){C=C.replace(/^(\\w*\\s*):=(.*)$/,(M,H,Y)=>H+"="+N.processText(Y,!0));const T=/^([\\w]*)\\s*=\\s*(.*)$/.exec(C);if(T){const M=T[1];let H=T[2];H==="true"?te(M,!0):H==="false"?te(M,!1):isNaN(H)?(H.startsWith("@")&&(H=ee(H.substring(1))),te(M,H)):te(M,parseFloat(H))}else{const M=/^([\\w]*)\\s*([+\\-*/])=\\s*(.*)$/.exec(C);if(M){const H=M[1],Y=M[2];let le=M[3];le.startsWith("@")&&(le=ee(le.substring(1)));const _e=parseFloat(le);let Me=ee(H);Me===null&&(Me=0),Y=="+"&&(Me+=_e),Y=="-"&&(Me-=_e),Y=="*"&&(Me*=_e),Y=="/"&&(Me/=_e),te(H,Me)}else{let H=!0;C.startsWith("not ")&&(C=C.substring(4),H=!1),te(C,H)}}}async function S(C){const T=z();if(s=t.sections[C],!s)return;te("_section",C),he.setSeen(C);const M=t.sections[""];(M?.clear||s.clear)&&V(),P(C);const H=r;if(M&&(await m(M,"[[]]"),ee("_section")!==C)){H.remove();return}if(await m(s,`[[${C}]]`),ee("_section")!==C){H.remove();return}_r(r),te("_turncount",0),xe(),O();const Y=z();Y!=T&&u.emit("canGoBackChanged",{canGoBack:Y}),u.emit("navigated",{section:C})}function y(C,T=null){const M={get:ee,set:te,ui:{transition:ae,write:N.write,scrollToEnd:N.scrollToEnd},story:{go:S,seen:H=>he.getSeen(H)},element:oe,import:_u,...T};t.js[C](M,ee,te)}async function m(C,T){if(C.attributes&&await w(C.attributes),C.jsIndex!==void 0){const M=ee("_section");if(y(C.jsIndex),ee("_section")!==M)return}N.write(C.text||"",T),await b()}async function b(){p=!0,r.classList.add("links-disabled");for(const C of h)await C();h.length=0,p=!1,r.classList.remove("links-disabled")}async function k(C){const T=z();let M=s.passages&&s.passages[C];const H=t.sections[""];if(!M&&H&&H.passages&&(M=H.passages[C]),!M)throw`No passage named ${C} in the current section or master section`;he.setSeen(C);const Y=[],le=[];if(H&&H.passages){const Fe=H.passages[""];Fe&&(Y.push(Fe),le.push(()=>m(Fe,"[[]][]")))}const _e=s.passages&&s.passages[""];_e&&(Y.push(_e),le.push(()=>m(_e,`[[${ee("_section")}]][]`))),Y.push(M),le.push(()=>m(M,`[[${ee("_section")}]][${C}]`));const Me="@"+ee("_turncount");if(s.passages){if(Me in s.passages){const Fe=s.passages[Me];Y.push(Fe),le.push(()=>m(Fe,`[[${ee("_section")}]][${Me}]`))}if("@last"in s.passages&&ee("_turncount")>=(s.passageCount||0)){const Fe=s.passages["@last"];Y.push(Fe),le.push(()=>m(Fe,`[[${ee("_section")}]][${Me}]`))}}Y.some(Fe=>Fe.clear)&&(V(),D()),i=document.createElement("div"),i.classList.add("squiffy-output-passage"),i.setAttribute("data-passage",`${C}`),r.appendChild(i);for(const Fe of le)await Fe();_r(r),xe(),O();const wt=z();wt!=T&&u.emit("canGoBackChanged",{canGoBack:wt}),u.emit("navigated",{section:ee("_section"),passage:C})}async function w(C){for(const T of C)_(T)}function A(){he.reset(),se.scroll==="element"||se.scroll==="none"?(X.innerHTML="",g()):location.reload()}function O(){te("_output",X.innerHTML)}function E(){const C=()=>{t.uiJsIndex!==void 0&&y(t.uiJsIndex,{registerAnimation:me.registerAnimation.bind(me),registerHelper:ye.handlebars.registerHelper.bind(ye.handlebars),SafeString:ye.handlebars.SafeString})};he.load();const T=ee("_output");return T?(X.innerHTML=ve(T),R(),q(),o=X.querySelector(".squiffy-output-block:last-child"),s=t.sections[ee("_section")],C(),de.onLoad(),_r(r),!0):(C(),!1)}function L(){o=document.createElement("div"),o.classList.add("squiffy-output-block"),(i||r)?.appendChild(o)}function P(C){r&&(r.querySelectorAll("input, textarea, select").forEach(T=>{const M=T,H=M.getAttribute("data-attribute")||M.id;H&&te(H,M.value),M.disabled||(M.disabled=!0,M.setAttribute("data-squiffy-disabled",""))}),r.querySelectorAll("[contenteditable]").forEach(T=>{const M=T.getAttribute("data-attribute")||T.id;M&&te(M,T.innerHTML),T.getAttribute("contenteditable")!=="false"&&(T.setAttribute("contenteditable","false"),T.setAttribute("data-squiffy-disabled",""))})),i=null,D(C),L()}function D(C){r=document.createElement("div"),r.classList.add("squiffy-output-section"),r.setAttribute("data-section",C??ee("_section")),C||r.setAttribute("data-clear","true"),X.appendChild(r)}function B(){return X.querySelector(".squiffy-clear-stack")}function V(){let C=B();C||(C=document.createElement("div"),C.classList.add("squiffy-clear-stack"),C.style.display="none",X.prepend(C));const T=document.createElement("div");C.appendChild(T),a=!0;for(const M of[...X.children])M!==C&&T.appendChild(M)}function x(){const C=B();if(!C)return;for(const M of[...X.children])M!==C&&M.remove();const T=C.children[C.children.length-1];for(const M of[...T.children])X.appendChild(M);T.remove()}const N={write:(C,T)=>{n=X.scrollHeight;const M=N.renderHtml(C,!1).trim();o||L();const H=document.createElement("div");T&&H.setAttribute("data-source",T),H.innerHTML=M,de.onWrite(H),o.appendChild(H),_r(r),N.scrollToEnd()},clearScreen:()=>{V(),D()},scrollToEnd:()=>{if(se.scroll!=="none")if(a)if(a=!1,se.scroll==="element")r.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"});else{const C=Math.max(document.body.scrollTop,document.documentElement.scrollTop),T=X.getBoundingClientRect().top+C;T<C&&window.scrollTo({top:T,behavior:"smooth"})}else if(se.scroll==="element")X.lastElementChild?.scrollIntoView({block:"end",inline:"nearest",behavior:"smooth"});else{let C=n;const T=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(C>T){const M=document.documentElement.scrollHeight-window.innerHeight;C>M&&(C=M),window.scrollTo({top:C,behavior:"smooth"})}}},processText:(C,T)=>ye.process(C,T),renderHtml:(C,T)=>ve(N.processText(C,T))};function I(C){if(C.start!=t.start){t=C,he.reset(),X.innerHTML="",S(t.start);return}const T=t;t=C,Yl(T,C,X,(H,Y)=>{const le=s;s=Y;try{return N.renderHtml(H,!1)}finally{s=le}},c,H=>w(H)),R(),q()}function R(){const C=X.querySelectorAll(".squiffy-output-section:last-child");r=C[C.length-1];const T=r.getAttribute("data-section");s=t.sections[T]}function q(){i=r.querySelector(".squiffy-output-passage:last-child")}function K(){const C=B(),T=X.querySelectorAll(".squiffy-output-section").length+X.querySelectorAll(".squiffy-output-passage").length;return C?T+C.children.length:T}function Z(C){C.querySelectorAll("[data-squiffy-disabled]").forEach(T=>{T.hasAttribute("contenteditable")?T.setAttribute("contenteditable","true"):T.disabled=!1,T.removeAttribute("data-squiffy-disabled")})}function z(){return K()>1}function j(){if(p||!z())return;const C=B();if(i){const M=i.getAttribute("data-passage");we(i.getAttribute("data-undo")),i.remove();let H=!1,Y=!1;for(const le of X.children)if(le!==C){if(le.getAttribute("data-clear")=="true"&&le.children.length==0){H=!0;continue}Y=!0;break}H&&!Y&&(x(),R());for(const le of r.querySelectorAll("a.squiffy-link[data-passage]"))le.getAttribute("data-passage")==M&&d(le);q()}else{we(r.getAttribute("data-undo")),r.remove();let M=!1;for(const H of[...X.children])if(H!==C){M=!0;break}M||x(),R(),q(),Z(r)}z()||u.emit("canGoBackChanged",{canGoBack:!1});const T=i?.getAttribute("data-passage");u.emit("navigated",T?{section:ee("_section"),passage:T}:{section:ee("_section")})}const oe=e.element,X=document.createElement("div");oe.appendChild(X),t=e.story;const ve=Eu(e.resolveAssetUrl),se={scroll:e.scroll||"body",persist:e.persist===void 0?!0:e.persist,onSet:e.onSet||(()=>{})};let re="";se.persist&&(e.storyId!==void 0?re=e.storyId:window.location.protocol==="file:"?re=t.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."),se.persist=!1)),se.scroll==="element"&&(X.style.overflowY="auto"),X.addEventListener("click",f),X.addEventListener("keypress",async function(C){C.key==="Enter"&&await f(C)});let Q={};const ue=function(C,T){C!="_output"&&(C in Q||(Q[C]=T))},xe=function(){(i??r).setAttribute("data-undo",JSON.stringify(Q)),Q={}},we=function(C){if(!C)return;const T=JSON.parse(C);if(T)for(const M of Object.keys(T))he.setInternal(M,T[M],!1)},he=new Xl(se.persist,re,se.onSet,u,ue),ee=he.get.bind(he),te=he.set.bind(he),ye=new Ul(()=>t,he,()=>s),Te=new ec,Ce=C=>C in t.sections&&t.sections[C].text||null,be=C=>s.passages&&C in s.passages?s.passages[C].text||null:"passages"in t.sections[""]&&t.sections[""].passages&&C in t.sections[""].passages&&t.sections[""].passages[C].text||null,ae=C=>{h.push(C)},me=new bu,de=new Gl(X,ye,he,Te,Ce,be,N.renderHtml,ae,me,u,ve);return de.add(vs.ReplaceLabel()),de.add(vs.RotateSequencePlugin()),de.add(vs.RandomPlugin()),de.add(vs.LivePlugin()),de.add(vs.AnimatePlugin()),{begin:g,restart:A,get:ee,set:te,clickLink:l,update:I,goBack:j,on:(C,T)=>u.on(C,T),off:(C,T)=>u.off(C,T),once:(C,T)=>u.once(C,T)}};return kr.init=Au,kr})({});\n\n//# sourceMappingURL=squiffy.runtime.global.js.map', Xe = `/* Core Squiffy Runtime Styles. See https://squiffystory.com/styling/ for how to customise these. */
442
+ var xe = 'var squiffyRuntime=(function(Mr){Object.defineProperty(Mr,Symbol.toStringTag,{value:"Module"});var na=Object.create,Xs=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,aa=Object.getOwnPropertyNames,la=Object.getPrototypeOf,qi=Object.prototype.hasOwnProperty,pe=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),as=(e,t)=>{let s={};for(var r in e)Xs(s,r,{get:e[r],enumerable:!0});return t||Xs(s,Symbol.toStringTag,{value:"Module"}),s},ca=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=aa(t),n=0,o=i.length,c;n<o;n++)c=i[n],!qi.call(e,c)&&c!==s&&Xs(e,c,{get:(u=>t[u]).bind(null,c),enumerable:!(r=oa(t,c))||r.enumerable});return e},ua=(e,t,s)=>(s=e!=null?na(la(e)):{},ca(t||!e||!e.__esModule||!qi.call(e,"default")?Xs(s,"default",{value:e,enumerable:!0}):s,e));function Ss(e){"@babel/helpers - typeof";return Ss=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},Ss(e)}function ha(e,t){if(Ss(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(Ss(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pa(e){var t=ha(e,"string");return Ss(t)=="symbol"?t:t+""}function Le(e,t,s){return(t=pa(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function fa(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function da(e,t){fa(e,t),t.add(e)}function Ys(e,t,s){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:s;throw new TypeError("Private element is not present on this object")}var ls,Gs;function Nr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Yt=Nr();function Fi(e){Yt=e}var Gt={exec:()=>null};function Zt(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 ce(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(ze.caret,"$1"),s=s.replace(i,o),r},getRegex:()=>new RegExp(s,t)};return r}var Vi=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),ze={codeRemoveIndent:/^(?: {0,3}\\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \\t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,leadingSpaceTab:/^[ \\t]+/,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+)[ \\t]*)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \\t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\][ \\t]+\\S/,listReplaceTask:/^\\[[ xX]\\][ \\t]+/,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,numericCharacterReference:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,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:Zt(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ ][^\\\\n]*)?(?:\\\\n|$))`)),hrRegex:Zt(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\\\*[ ]*){3,})(?:\\\\n+|$)`)),fencesBeginRegex:Zt(e=>new RegExp(`^ {0,${e}}(?:\\`\\`\\`|~~~)`)),headingBeginRegex:Zt(e=>new RegExp(`^ {0,${e}}#{1,6}(?:\\\\s|$)`)),pedanticHeadingBeginRegex:Zt(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Zt(e=>new RegExp(`^ {0,${e}}(?:</?(?:${ws})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)`,"i")),blockquoteBeginRegex:Zt(e=>new RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\\d{1,9}[.)])[ \\t]+|>[ \\t]?))+/},ga=/^(?:[ \\t]*(?:\\n|$))+/,ma=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,va=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}(?:(?=`)\\1`*|(?=~)\\1~*) *(?=\\n|$)|$)/,ks=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,ya=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,Dr=/ {0,3}(?:[*+-]|\\d{1,9}[.)])/,zi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |fences|blockquote|heading|hr|html|table))+?)\\n {0,3}(=+|-+)[ \\t]*(?:\\n+|$)/,Ui=ce(zi).replace(/bull/g,Dr).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(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/\\|table/g,"").getRegex(),ba=ce(zi).replace(/bull/g,Dr).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(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).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|[ \\t]+\\n)[^\\n]+)*)/,_a=/^[^\\n]+/,$r=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\\\n]|\\n(?![ \\t]*\\n))+/,Sa=ce(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace("label",$r).replace("title",/(?:"(?:\\\\[\\s\\S]|[^"\\\\])*"|\'(?:\\\\[\\s\\S]|[^\'\\\\\\n]|\\n(?!\\n))*\'|\\((?:\\\\[\\s\\S]|[^()\\\\])*\\))/).getRegex(),ka=ce(/^(bull)([ \\t][^\\n]*?)?(?:\\n|$)/).replace(/bull/g,Dr).getRegex(),ws="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",Hr=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,wa=ce("^ {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)(?:[ \\\\t]+|\\\\n|/?>|$)[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$)|</[a-z][a-z0-9-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ ]*)+\\\\n|$))","i").replace("comment",Hr).replace("tag",ws).replace("attribute",/ +[a-zA-Z:_][\\w.:-]*(?: *= *"[^"\\n]*"| *= *\'[^\'\\n]*\'| *= *[^\\s"\'=<>`]+)?/).getRegex(),Wi=e=>ce(Br).replace("hr",ks).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"," {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)").replace("tag",ws).getRegex(),xa=Wi(/ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/),Ta=Wi(/ {0,3}(?:[*+-]|\\d{1,9}[.)])(?:[ \\t]|\\n|$)/),qr={blockquote:ce(/^( {0,3}> ?(?:(?![ \\t]*(?:\\n|$))(paragraph)|[^\\n]*)(?:\\n|$))+/).replace("paragraph",Ta).getRegex(),code:ma,def:Sa,fences:va,heading:ya,hr:ks,html:wa,lheading:Ui,list:ka,newline:ga,paragraph:xa,table:Gt,text:_a},Xi=ce("^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)").replace("hr",ks).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"," {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)").replace("tag",ws).getRegex(),Ca={...qr,lheading:ba,table:Xi,paragraph:ce(Br).replace("hr",ks).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("|lheading","").replace("table",Xi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\\\t]+[^ \\\\t\\\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)").replace("tag",ws).getRegex()},Pa={...qr,html:ce(`^ *(?:comment(?: *\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1>(?: *\\\\n{2,}|\\\\s*$)|<tag(?:"[^"]*"|\'[^\']*\'|\\\\s[^\'"/>\\\\s]*)*?/?>(?: *\\\\n{2,}|\\\\s*$))`).replace("comment",Hr).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:Gt,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:ce(Br).replace("hr",ks).replace("heading",` *#{1,6} *[^\n]`).replace("lheading",Ui).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ea=/^\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,Aa=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,Yi=/^( {2,}|\\\\)\\n(?!\\s*$)[ \\t]*/,La=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,Tt=/[\\p{P}\\p{S}]/u,cs=/[\\s\\p{P}\\p{S}]/u,xs=/[^\\s\\p{P}\\p{S}]/u,Ra=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,cs).getRegex(),Ia=/[\\p{Pi}\\p{Ps}"\']/u,Gi=/(?!~)[\\p{P}\\p{S}]/u,Oa=/(?!~)[\\s\\p{P}\\p{S}]/u,Ma=/(?:[^\\s\\p{P}\\p{S}]|~)/u,Na=ce(/link|precode-code|html/,"g").replace("link",/\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)/).replace("precode-",Vi?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Zi=/^(?:\\*+(?:((?!\\*)punct)|([^\\s*]))?)|^_+(?:((?!_)punct)|([^\\s_]))?/,Da=ce(Zi,"u").replace(/punct/g,Tt).getRegex(),Ba=ce(Zi,"u").replace(/punct/g,Gi).getRegex(),$a=ce(/^(?:\\*+(?:((?!\\*)(?!openQuote)punct)|([^\\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\\s_]))?/,"u").replace(/openQuote/g,Ia).replace(/punct/g,Tt).getRegex(),Qi="^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)",Ha=ce(Qi,"gu").replace(/notPunctSpace/g,xs).replace(/punctSpace/g,cs).replace(/punct/g,Tt).getRegex(),qa=ce(Qi,"gu").replace(/notPunctSpace/g,Ma).replace(/punctSpace/g,Oa).replace(/punct/g,Gi).getRegex(),Fa=ce("^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)[\\\\s](\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|(?:(?!\\\\*)punct|notPunctSpace)(\\\\*+)(?!\\\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,xs).replace(/punctSpace/g,cs).replace(/punct/g,Tt).getRegex(),Va=ce("^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xs).replace(/punctSpace/g,cs).replace(/punct/g,Tt).getRegex(),za=ce("^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\\\s](_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,xs).replace(/punctSpace/g,cs).replace(/punct/g,Tt).getRegex(),Ua=ce(/^~~?(?:((?!~)punct)|[^\\s~])/,"u").replace(/punct/g,Tt).getRegex(),Wa=ce("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,xs).replace(/punctSpace/g,cs).replace(/punct/g,Tt).getRegex(),Xa=ce(/\\\\(punct)/,"gu").replace(/punct/g,Tt).getRegex(),Ya=ce(/(`+)(?:[^`]|[^`][\\s\\S]*?[^`])\\1(?!`)|`+|\\\\(punct)/,"gu").replace(/punct/g,Tt).getRegex(),Ga=ce(/^<(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(),Za=ce(Hr).replace("(?:-->|$)","-->").getRegex(),Qa=ce("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>").replace("comment",Za).replace("attribute",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*"[^"]*"|\\s*=\\s*\'[^\']*\'|\\s*=\\s*[^\\s"\'=<>`]+)?/).getRegex(),Ji=/\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]/,Zs=ce(/(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\])|[^\\[\\]\\\\`])*?/).replace("brackets",Ji).getRegex(),Ja=ce(/^!?\\[(label)\\]\\([ \\t\\n]*(href)(?:(?:[ \\t]+(?:\\n[ \\t]*)?|\\n[ \\t]*)(title))?[ \\t\\n]*\\)/).replace("label",Zs).replace("href",/<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]+|(?=\\))/).replace("title",/"(?:\\\\[\\s\\S]|[^"\\\\])*"|\'(?:\\\\[\\s\\S]|[^\'\\\\])*\'|\\((?:\\\\[\\s\\S]|[^)\\\\])*\\)/).getRegex(),ja=ce(/^!?\\[(label)\\]\\[(ref)\\]/).replace("label",Zs).replace("ref",$r).getRegex(),Ka=ce(/^!?\\[(ref)\\](?:\\[\\])?/).replace("ref",$r).getRegex(),ji=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\]){1,999}/,el=ce(/(?:[^\\[\\]\\\\`]*(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\]))){0,999}?[^\\[\\]\\\\`]*?/).replace("brackets",Ji).getRegex(),tl=ce("reflink|nolink(?!\\\\()","g").replace("reflink",ce(/^!?\\[(label)\\]\\[(ref)\\]/).replace("label",el).replace("ref",ji).getRegex()).replace("nolink",ce(/^!?\\[(ref)\\](?:\\[\\])?/).replace("ref",ji).getRegex()).getRegex(),Ki=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sl=ce(/(?:mailto:email|xmpp:email(?:\\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),Fr={_backpedal:Gt,anyPunctuation:Xa,anyPunctuationOutsideCode:Ya,autolink:Ga,blockSkip:Na,br:Yi,code:Aa,del:Gt,delLDelim:Gt,delRDelim:Gt,emStrongLDelim:Da,emStrongRDelimAst:Ha,emStrongRDelimUnd:Va,escape:Ea,link:Ja,nolink:Ka,punctuation:Ra,reflink:ja,reflinkSearch:tl,tag:Qa,text:La,url:Gt},rl={...Fr,emStrongLDelim:$a,emStrongRDelimAst:Fa,emStrongRDelimUnd:za,link:ce(/^!?\\[(label)\\]\\((.*?)\\)/).replace("label",Zs).getRegex(),reflink:ce(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace("label",Zs).getRegex()},Vr={...Fr,emStrongRDelimAst:qa,emStrongLDelim:Ba,delLDelim:Ua,delRDelim:Wa,url:ce(/^emailProtocol|^((?:protocol):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/).replace("emailProtocol",sl).replace("protocol",Ki).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_\'"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_\'"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:ce(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|protocol:\\/\\/|wwwStart|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@))))/).replace("protocol",Ki).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",Vi?"(?<![^\\\\s*_~(])www\\\\.":"www\\\\.").getRegex()},il={...Vr,br:ce(Yi).replace("{2,}","*").getRegex(),text:ce(Vr.text).replace("\\\\b_","\\\\b_| {2,}\\\\n").replace(/\\{2,\\}/g,"*").getRegex()},Qs={normal:qr,gfm:Ca,pedantic:Pa},Ts={normal:Fr,gfm:Vr,breaks:il,pedantic:rl},nl={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"},en=e=>nl[e];function at(e,t){if(t){if(ze.escapeTest.test(e))return e.replace(ze.escapeReplace,en)}else if(ze.escapeTestNoEncode.test(e))return e.replace(ze.escapeReplaceNoEncode,en);return e}function ol(e){return ze.numericCharacterReference.test(e)?e.replace(ze.numericCharacterReferenceOrAmpersand,(t,s,r)=>{if(s===void 0&&r===void 0)return"&amp;";let i=s===void 0?Number.parseInt(r,16):Number.parseInt(s,10);return i===0||i>1114111||i>=55296&&i<=57343?"�":i===38?"&amp;":String.fromCodePoint(i)}):e}function tn(e){try{e=encodeURI(e).replace(ze.percentDecode,"%")}catch{return null}return e}function sn(e,t){let s=e.replace(ze.findPipe,(i,n,o)=>{let c=!1,u=n;for(;--u>=0&&o[u]==="\\\\";)c=!c;return c?"|":" |"}).split(ze.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(ze.slashPipe,"|");return s}function It(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 rn(e){let t=e.split(`\n`),s=t.length-1;for(;s>=0&&ze.blankLine.test(t[s]);)s--;return t.length-s<=2?e:t.slice(0,s+1).join(`\n`)}function Js(e){return e.trim().replace(ze.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function nn(e,t){if(e.indexOf(t[0])===-1&&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}var us=new WeakMap;function zr(e){let t={"*":-1,_:-1},s=-1,r=e.length;for(let i=0;i<r;i++){let n=e[i];if(n!=="*"&&n!=="_"&&n!=="~")continue;let o=i===0?`\n`:e[i-1],c=i+1;for(;c<r&&e[c]===n;)c++;o!==" "&&o!==" "&&o!==`\n`&&o!=="\\r"&&o!=="\\f"&&(n==="~"?s=i:t[n]=i),i=c-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:t,lastPossibleDelCloserIndex:s}}function al(e,t){let s=zr(t),r=us.get(e);r?r.push(s):us.set(e,[s])}function ll(e){let t=us.get(e);t&&(t.pop(),t.length===0&&us.delete(e))}function cl(e,t,s){let r=us.get(e)?.at(-1);return r&&r.maskedSrc===t?r.lastPossibleEmStrongCloserIndex[s]:zr(t).lastPossibleEmStrongCloserIndex[s]}function ul(e,t){let s=us.get(e)?.at(-1);return s&&s.maskedSrc===t?s.lastPossibleDelCloserIndex:zr(t).lastPossibleDelCloserIndex}function js(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 on(e,t,s,r,i){let n=t.href,o=t.title||null,c=e[1].replace(i.other.outputLinkReplace,"$1"),u=e[0].charAt(0)==="!",h=r.state.inLink,p=r.state.linkEmitted,a=r.state.inRawBlock;r.state.inLink=!0,r.state.linkEmitted=!1;let f=r.inlineTokens(c),l=r.state.linkEmitted;if(r.state.linkEmitted=p,r.state.inLink=h,!u){if(l){r.state.inRawBlock=a;return}r.state.linkEmitted=!0}return{type:u?"image":"link",raw:s,href:n,title:o,text:c,tokens:f}}function hl(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[c]=o;return n.slice(Math.min(c.length,i.length))}).join(`\n`)}function an(e,t,s,r){if(!t.includes("<"))return!1;for(let i=0;i<t.length;i++){if(t[i]==="\\\\"){i++;continue}if(t[i]==="`"){let c=r.inline.code.exec(t.slice(i));if(c){i+=c[0].length-1;continue}}if(t[i]!=="<")continue;let n=e.slice(s+i),o=r.inline.tag.exec(n)||r.inline.autolink.exec(n);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var hs=class{constructor(e){Le(this,"options",void 0),Le(this,"rules",void 0),Le(this,"lexer",void 0),this.options=e||Yt}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]:rn(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=hl(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=It(s,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(s=r.trim())}return{type:"heading",raw:It(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:It(t[0],`\n`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=It(t[0],`\n`).split(`\n`),r="",i="",n=[];for(;s.length>0;){let o=!1,c=[],u=0;for(;u<s.length;u++)if(this.rules.other.blockquoteStart.test(s[u]))c.push(s[u]),o=!0;else if(!o)c.push(s[u]);else break;s=s.slice(u);let h=c.join(`\n`),p=h.replace(this.rules.other.blockquoteMarkerWhitespace,(l,d,g)=>d+js(g,d.length)).replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${h}`:h,i=i?`${i}\n${p}`:p;let a=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,n,!0),this.lexer.state.top=a,s.length===0)break;let f=n.at(-1);if(f?.type==="code"||f?.type==="heading"||f?.type==="hr"||f?.type==="html"||f?.type==="table")break;if(f?.type==="blockquote"){let l=f,d=s.join(`\n`),g=l.raw+`\n`+d.replace(this.rules.other.blockquoteSetextReplace2,""),v=this.blockquote(g);n[n.length-1]=v;let _=g.substring(v.raw.length).replace(/^\\n/,""),S=_?_.split(`\n`).length:0,y=S?s.slice(0,-S):s;if(y.length>0&&(r=`${r}\n${y.join(`\n`)}`),i=i.substring(0,i.length-l.text.length)+v.text,s=s.slice(y.length),s.length>0&&this.rules.other.blockquoteStart.test(s[0]))continue;break}else if(f?.type==="list"){let l=f,d=l.raw+`\n`+s.join(`\n`),g=this.list(d);n[n.length-1]=g;let v=g.raw.length>l.raw.length?d.slice(l.raw.length+1,g.raw.length).split(`\n`).length:0;if(v>0){let _=s.slice(0,v).join(`\n`);r=`${r}\n${_}`,i=`${i}\n${_}`}s=s.slice(v);continue}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){if(!this.options.pedantic&&this.lexer.state.lastToken?.type==="text"&&!this.rules.other.listInterruptsParagraph.test(e))return;let s=e,r=()=>s.length-e.length,i=t[1].trim(),n=i.length>1,o={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\\\d{1,9}\\\\${i.slice(-1)}`:`\\\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let c=this.rules.other.listItemRegex(i),u=!1;for(;e;){let p=!1,a="";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;let f=r();e=e.substring(t[0].length);let l=t[2].split(`\n`,1)[0],d=t[1].length,g=this.options.pedantic?js(l,d):l.replace(this.rules.other.leadingSpaceTab,m=>js(m,d)),v=e.split(`\n`,1)[0],_=!g.trim(),S=0;if(this.options.pedantic?(S=2,a=g.trimStart()):_?S=d+1:(S=g.search(this.rules.other.nonSpaceChar),S=S>4?1:S,a=g.slice(S),S+=d),_&&this.rules.other.blankLine.test(v)&&(e=e.substring(v.length+1),p=!0),!p){let m=this.rules.other.nextBulletRegex(S),b=this.rules.other.hrRegex(S),k=this.rules.other.fencesBeginRegex(S),w=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(S):this.rules.other.headingBeginRegex(S),P=this.rules.other.htmlBeginRegex(S),I=this.rules.other.blockquoteBeginRegex(S),E=!1;for(;e;){let A=e.split(`\n`,1)[0],C;if(v=A,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),C=v):C=v.replace(this.rules.other.leadingSpaceTab,B=>js(B)),k.test(v)||w.test(v)||P.test(v)||I.test(v)||m.test(v)||b.test(v))break;if(C.search(this.rules.other.nonSpaceChar)>=S||!v.trim())a+=`\n`+C.slice(S),E=!1;else{if(_||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(g)||w.test(g)||P.test(g)||b.test(g))break;if(!this.options.pedantic&&!E){let D=g.replace(this.rules.other.nestedContainerMarkers,"");if(this.rules.block.fences.test(D)||this.rules.block.heading.test(D)||this.rules.block.hr.test(D))break}let B=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(v)&&this.rules.block.lheading.test(`${g}\n${v}`)?` ${C.replace(/^ {0,3}/,"")}`:v;a+=`\n`+B,E=!0}_=!v.trim(),e=e.substring(A.length+1),g=C.slice(S)}}let y=s.slice(f,r());o.loose||(u?o.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(u=!0)),o.items.push({type:"list_item",raw:y,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]})}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=s.slice(0,r()).trimEnd();for(let p of o.items)if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),!o.loose){let a=p.tokens.filter(f=>f.type==="space");o.loose=a.length>0&&a.some(f=>this.rules.other.anyLine.test(f.raw))}for(let p of o.items){let a=p.tokens[0];if(p.task&&(a?.type==="text"||a?.type==="paragraph")){p.text=p.text.replace(this.rules.other.listReplaceTask,""),a.raw=a.raw.replace(this.rules.other.listReplaceTask,""),a.text=a.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 f=this.rules.other.listTaskCheckbox.exec(p.raw);if(f){let l={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};p.checked=l.checked,o.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=l.raw+p.tokens[0].raw,p.tokens[0].text=l.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(l)):p.tokens.unshift({type:"paragraph",raw:l.raw,text:l.raw,tokens:[l]}):p.tokens.unshift(l)}}else p.task&&(p.task=!1)}if(o.loose)for(let p of o.items){p.loose=!0;for(let a of p.tokens)a.type==="text"&&(a.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let s=rn(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){if(!this.rules.other.startAngleBracket.test(t[2])&&nn(t[2],"()")!==-1)return;let s=Js(t[1]),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:It(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=sn(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:It(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(sn(o,n.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:n.align[u]})));return n}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let s=t[1].trim();return{type:"heading",raw:It(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){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let s=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&an(e,t[1],s,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let c=It(r.slice(0,-1),"\\\\");if((r.length-c.length)%2===0)return}else{let c=nn(t[2],"()");if(c===-2)return;if(c>-1){let u=(t[0].indexOf("!")===0?5:4)+t[1].length+c;t[2]=t[2].substring(0,c),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let i=It(t[0].slice(0,-1),"\\\\");if((t[0].length-i.length)%2===0)return;let n=t[2],o="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(n);c&&(n=c[1],o=c[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),on(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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=s[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&an(e,s[1],r,this.rules))return;let i=t[Js(s[2]||s[1])];if(!i){let n=s[0].charAt(0);return{type:"text",raw:n,text:n}}return on(s,i,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])return;let i=r[0][0],n=s===i,o=t.length-e.length,c=o;for(;!this.options.pedantic&&c>0&&t[c-1]===i;)c--;let u=[...t.slice(Math.max(0,c-2),c)].at(-1)??"",h=u==="*"||u==="_"||!!this.rules.inline.punctuation.exec(u);c<o&&(s=u);let p=c<o?h:s==="*"||s==="_"||!!this.rules.inline.punctuation.exec(s);if(r[4]&&s.match(this.rules.other.unicodeAlphaNumeric))return;let a=r[1]||r[3]||"";if(!a||!s||p){let f=[...r[0]].length-1,l,d,g=f,v=0,_=o-c+f,S=!this.options.pedantic&&!!u.trim()&&(!!a||i==="*"&&!h);if(i!=="*"&&i!=="_")return;let y=i==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,m=cl(this,t,i),b=t.length-e.length+f;if(m<b)return;t=t.slice(-1*e.length+f);let k=m-b;for(y.lastIndex=0;(r=y.exec(t))!==null&&!(r.index>k);){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(d=[...l].length,r[3]||r[4]){g+=d;continue}else if(r[5]||r[6]||S){if(n&&(r[5]||r[6]))break;if(_%3&&!((_+d)%3)){v+=d;continue}}if(g-=d,g>0)continue;d=Math.min(d,d+g+v);let w=[...r[0]][0].length,P=e.slice(0,f+r.index+w+d);if(Math.min(f,d)%2){let E=P.slice(1,-1);return{type:"em",raw:P,text:E,tokens:this.lexer.inlineTokens(E)}}let I=P.slice(2,-2);return{type:"strong",raw:P,text:I,tokens:this.lexer.inlineTokens(I)}}}}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,c=i,u=this.rules.inline.delRDelim,h=ul(this,t),p=t.length-e.length+i;if(h<p)return;t=t.slice(-1*e.length+i);let a=h-p;for(u.lastIndex=0;(r=u.exec(t))!==null&&!(r.index>a);){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]){c+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c);let f=[...r[0]][0].length,l=e.slice(0,i+r.index+f+o),d=l.slice(i,-i);return{type:"del",raw:l,text:d,tokens:this.lexer.inlineTokens(d)}}}}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,autolink:!0,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,autolink:!0,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:s?t[0]:ol(t[0]),escaped:s}}}},bt=(ls=new WeakSet,class $i{constructor(t){da(this,ls),Le(this,"tokens",void 0),Le(this,"options",void 0),Le(this,"state",void 0),Le(this,"inlineQueue",void 0),Le(this,"tokenizer",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Yt,this.options.tokenizer=this.options.tokenizer||new hs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let s={other:ze,block:Qs.normal,inline:Ts.normal};this.options.pedantic?(s.block=Qs.pedantic,s.inline=Ts.pedantic):this.options.gfm&&(s.block=Qs.gfm,this.options.breaks?s.inline=Ts.breaks:s.inline=Ts.gfm),this.tokenizer.rules=s}static get rules(){return{block:Qs,inline:Ts}}static lex(t,s){return new $i(s).lex(t)}static lexInline(t,s){return new $i(s).inlineTokens(t)}lex(t){t=t.replace(ze.carriageReturn,`\n`),this.blockTokens(t,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let r=this.inlineQueue[s];this.state.inRawBlock=!1,this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,s=[],r=!1){this.tokenizer.lexer=this;let i=this.state.lastToken;this.options.pedantic&&(t=t.replace(ze.tabCharGlobal," ").replace(ze.spaceLine,""));let n=1/0;for(;t;){if(t.length<n)n=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}this.state.lastToken=s.at(-1);let o;if(this.options.extensions?.block?.some(u=>(o=u.call({lexer:this},t,s))?(t=t.substring(o.raw.length),s.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let u=s.at(-1);o.raw.length===1&&u!==void 0?u.raw+=`\n`:s.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let u=s.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`\n`)?"":`\n`)+o.raw,u.text+=`\n`+o.text,this.inlineQueue.at(-1).src=u.text):s.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let u=s.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`\n`)?"":`\n`)+o.raw,u.text+=`\n`+o.raw,this.inlineQueue.at(-1).src=u.text):(this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title}),s.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),s.push(o);continue}let c=t;if(this.options.extensions?.startBlock){let u=1/0,h=t.slice(1),p;this.options.extensions.startBlock.forEach(a=>{p=a.call({lexer:this},h),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let u=s.at(-1);r&&u?.type==="paragraph"?(u.raw+=(u.raw.endsWith(`\n`)?"":`\n`)+o.raw,u.text+=`\n`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):s.push(o),r=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let u=s.at(-1);u?.type==="text"?(u.raw+=(u.raw.endsWith(`\n`)?"":`\n`)+o.raw,u.text+=`\n`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):s.push(o);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=i,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,Js(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=this.state.linkParenPossible;this.state.linkParenPossible=r&&t.includes(")");try{return Ys(ls,this,pl).call(this,t,s)}finally{this.state.linkParenPossible=r}}infiniteLoopError(t){let s="Infinite loop on byte: "+t;if(this.options.silent)console.error(s);else throw new Error(s)}});function pl(e,t){let s=e.includes("*")||e.includes("_")||e.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==hs.prototype.emStrong||this.tokenizer.del!==hs.prototype.del?Ys(ls,this,gl).call(this,e):e;al(this.tokenizer,s);try{return Ys(ls,this,fl).call(this,e,s,t)}finally{ll(this.tokenizer)}}function fl(e,t,s){let r=!1,i="",n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let o;if(this.options.extensions?.inline?.some(u=>(o=u.call({lexer:this},e,s))?(e=e.substring(o.raw.length),s.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let u=s.at(-1);o.type==="text"&&u?.type==="text"?(u.raw+=o.raw,u.text+=o.text):s.push(o);continue}if(o=this.tokenizer.emStrong(e,t,i)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.del(e,t,i)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),s.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),s.push(o);continue}let c=e;if(this.options.extensions?.startInline){let u=1/0,h=e.slice(1),p;this.options.extensions.startInline.forEach(a=>{p=a.call({lexer:this},h),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(c=e.substring(0,u+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(i=o.raw.slice(-1)),r=!0;let u=s.at(-1);u?.type==="text"?(u.raw+=o.raw,u.text+=o.text):s.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return s}function dl(e){let{blockSkip:t,tag:s,autolink:r}=this.tokenizer.rules.inline,i="",n=0,o;for(t.lastIndex=0;o=t.exec(e);){let c=o.index+(o[2]?o[2].length:0),u=o.index+o[0].length;if(e.charAt(c)==="<"){let h=e.slice(c),p=s.exec(h)||r.exec(h);if(!p){t.lastIndex=c+1;continue}u=c+p[0].length,t.lastIndex=u}i+=e.slice(n,c)+"["+"a".repeat(u-c-2)+"]",n=u}return i+e.slice(n)}function gl(e){let t=e;if(this.tokens.links&&e.includes("[")){let s=this.tokenizer.rules.inline.reflinkSearch,r=i=>{let n=i.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Js(i.slice(n+1,-1))))return i;if(n>1&&i.charAt(0)!=="!"){let o=i.slice(1,n-1);if(this.linkInText(o))return"["+o.replace(s,r)+"]["+"a".repeat(i.length-n-2)+"]"}return"["+"a".repeat(i.length-2)+"]"};t=t.replace(s,r)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(s,r,i)=>i?"+".repeat(s.length):r?r+s.slice(r.length,-r.length).replace(/`/g,"+")+r:s),t=Ys(ls,this,dl).call(this,t),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}var Ks=class{constructor(e){Le(this,"options",void 0),Le(this,"parser",void 0),this.options=e||Yt}space(e){return""}code({text:e,lang:t,escaped:s}){let r=(t||"").match(ze.notSpaceStart)?.[0],i=e?e.replace(ze.endingNewline,"")+`\n`:"";return r?\'<pre><code class="language-\'+at(r)+\'">\'+(s?i:at(i,!0))+`</code></pre>\n`:"<pre><code>"+(s?i:at(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 c=e.items[o];r+=this.listitem(c)}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>${at(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:s,tokens:r,autolink:i}){let n=i?at(s,!0):this.parser.parseInline(r),o=tn(e);if(o===null)return n;e=at(o,i);let c=\'<a href="\'+e+\'"\';return t&&(c+=\' title="\'+at(t)+\'"\'),c+=">"+n+"</a>",c}image({href:e,title:t,text:s,tokens:r}){r&&(s=this.parser.parseInline(r,this.parser.textRenderer));let i=tn(e);if(i===null)return at(s);e=i;let n=`<img src="${at(e)}" alt="${at(s)}"`;return t&&(n+=` title="${at(t)}"`),n+=">",n}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:at(e.text)}},Ur=class{constructor(){Le(this,"parser",void 0)}strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`\n`}checkbox({raw:e}){return e}},_t=class Hi{constructor(t){Le(this,"options",void 0),Le(this,"renderer",void 0),Le(this,"textRenderer",void 0),this.options=t||Yt,this.options.renderer=this.options.renderer||new Ks,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ur,this.textRenderer.parser=this}static parse(t,s){return new Hi(s).parse(t)}static parseInline(t,s){return new Hi(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,c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){s+=c===!1?"":c??"";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 c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){r+=c===!1?"":c??"";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 c=\'Token with "\'+o.type+\'" type was not found.\';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},Cs=(Gs=class{constructor(e){Le(this,"options",void 0),Le(this,"block",void 0),this.options=e||Yt}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?bt.lex:bt.lexInline}provideParser(e=this.block){return e?_t.parse:_t.parseInline}},Le(Gs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Le(Gs,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Gs);function Ht(e,t){if(Array.isArray(t))for(let s=0;s<t.length;s++)e.push(t[s]);else e.push(t)}var ml=class{constructor(...e){Le(this,"defaults",Nr()),Le(this,"options",this.setOptions),Le(this,"parse",this.parseMarkdown(!0)),Le(this,"parseInline",this.parseMarkdown(!1)),Le(this,"Parser",_t),Le(this,"Renderer",Ks),Le(this,"TextRenderer",Ur),Le(this,"Lexer",bt),Le(this,"Tokenizer",hs),Le(this,"Hooks",Cs),this.use(...e)}walkTokens(e,t){let s=[];for(let r of e)switch(Ht(s,t.call(this,r)),r.type){case"table":{let i=r;for(let n of i.header)Ht(s,this.walkTokens(n.tokens,t));for(let n of i.rows)for(let o of n)Ht(s,this.walkTokens(o.tokens,t));break}case"list":{let i=r;Ht(s,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);Ht(s,this.walkTokens(o,t))}):i.tokens&&Ht(s,this.walkTokens(i.tokens,t))}}return s}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};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 c=i.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}: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 Ks(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,c=s.renderer[o],u=i[o];i[o]=(...h)=>{let p=c.apply(i,h);return p===!1&&(p=u.apply(i,h)),p===!1?"":p??""}}r.renderer=i}if(s.tokenizer){let i=this.defaults.tokenizer||new hs(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,c=s.tokenizer[o],u=i[o];i[o]=(...h)=>{let p=c.apply(i,h);return p===!1&&(p=u.apply(i,h)),p}}r.tokenizer=i}if(s.hooks){let i=this.defaults.hooks||new Cs;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,c=s.hooks[o],u=i[o];Cs.passThroughHooks.has(n)?i[o]=h=>{if(i.options.async&&Cs.passThroughHooksRespectAsync.has(n))return(async()=>{let a=await c.call(i,h);return u.call(i,a)})();let p=c.call(i,h);return u.call(i,p)}:i[o]=(...h)=>{if(i.options.async)return(async()=>{let a=await c.apply(i,h);return a===!1&&(a=await u.apply(i,h)),a})();let p=c.apply(i,h);return p===!1&&(p=u.apply(i,h)),p}}r.hooks=i}if(s.walkTokens){let i=this.defaults.walkTokens,n=s.walkTokens;r.walkTokens=function(o){let c=[];return Ht(c,n.call(this,o)),i&&Ht(c,i.call(this,o)),c}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return bt.lex(e,t??this.defaults)}parser(e,t){return _t.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,c=await(i.hooks?await i.hooks.provideLexer(e):e?bt.lex:bt.lexInline)(o,i),u=i.hooks?await i.hooks.processAllTokens(c):c;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let h=await(i.hooks?await i.hooks.provideParser(e):e?_t.parse:_t.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(h):h})().catch(n);try{i.hooks&&(t=i.hooks.preprocess(t));let o=(i.hooks?i.hooks.provideLexer(e):e?bt.lex:bt.lexInline)(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let c=(i.hooks?i.hooks.provideParser(e):e?_t.parse:_t.parseInline)(o,i);return i.hooks&&(c=i.hooks.postprocess(c)),c}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>"+at(s.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(s);throw s}}},Qt=new ml;function Re(e,t){return Qt.parse(e,t)}Re.options=Re.setOptions=function(e){return Qt.setOptions(e),Re.defaults=Qt.defaults,Fi(Re.defaults),Re},Re.getDefaults=Nr,Re.defaults=Yt;function vl(...e){return Qt.use(...e),Re.defaults=Qt.defaults,Fi(Re.defaults),Re}Re.use=vl,Re.walkTokens=function(e,t){return Qt.walkTokens(e,t)},Re.parseInline=Qt.parseInline,Re.Parser=_t,Re.parser=_t.parse,Re.Renderer=Ks,Re.TextRenderer=Ur,Re.Lexer=bt,Re.lexer=bt.lex,Re.Tokenizer=hs,Re.Hooks=Cs,Re.parse=Re;var Wu=Re.options,Xu=Re.setOptions,Yu=Re.walkTokens,Wr=Re.parseInline,Xr=Re,Gu=_t.parse,Zu=bt.lex,et=pe((e=>{e.__esModule=!0,e.extend=n,e.indexOf=h,e.escapeExpression=p,e.isEmpty=a,e.createFrame=f,e.blockParams=l,e.appendContextPath=d;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 _ in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],_)&&(g[_]=arguments[v][_]);return g}var o=Object.prototype.toString;e.toString=o;var c=function(v){return typeof v=="function"};c(/x/)&&(e.isFunction=c=function(g){return typeof g=="function"&&o.call(g)==="[object Function]"}),e.isFunction=c;var u=Array.isArray||function(g){return g&&typeof g=="object"?o.call(g)==="[object Array]":!1};e.isArray=u;function h(g,v){for(var _=0,S=g.length;_<S;_++)if(g[_]===v)return _;return-1}function p(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 a(g){return!g&&g!==0?!0:!!(u(g)&&g.length===0)}function f(g){var v=n({},g);return v._parent=g,v}function l(g,v){return g.path=v,g}function d(g,v){return(g?g+".":"")+v}})),St=pe(((e,t)=>{e.__esModule=!0;var s=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(i,n){var o=n&&n.loc,c=void 0,u=void 0,h=void 0,p=void 0;o&&o.start&&(c=o.start.line,h=o.start.column,o.end&&(u=o.end.line,p=o.end.column),i+=" - "+c+":"+h);for(var a=Error.prototype.constructor.call(this,i),f=0;f<s.length;f++)this[s[f]]=a[s[f]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{o&&(this.lineNumber=c,this.endLineNumber=u,Object.defineProperty?(Object.defineProperty(this,"column",{value:h,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:p,enumerable:!0})):(this.column=h,this.endColumn=p))}catch{}}r.prototype=new Error,e.default=r,t.exports=e.default})),yl=pe(((e,t)=>{e.__esModule=!0;var s=et();e.default=function(r){r.registerHelper("blockHelperMissing",function(i,n){var o=n.inverse,c=n.fn;if(i===!0)return c(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 u=s.createFrame(n.data);u.contextPath=s.appendContextPath(n.data.contextPath,n.name),n={data:u}}return c(i,n)})},t.exports=e.default})),bl=pe(((e,t)=>{e.__esModule=!0;function s(o){return o&&o.__esModule?o:{default:o}}var r=et(),i=s(St());function n(o){try{var c=o.return;r.isFunction(c)&&c.call(o)}catch{}}e.default=function(o){o.registerHelper("each",function(c,u){if(!u)throw new i.default("Must pass iterator to #each");var h=u.fn,p=u.inverse,a=0,f="",l=void 0,d=void 0;u.data&&u.ids&&(d=r.appendContextPath(u.data.contextPath,u.ids[0])+"."),r.isFunction(c)&&(c=c.call(this)),u.data&&(l=r.createFrame(u.data));function g(m,b,k,w){l&&(l.key=m,l.index=b,l.first=b===0,l.last=!!k,d&&(l.contextPath=d+m)),f=f+h(w,{data:l,blockParams:r.blockParams([w,m],[d+m,null])})}if(c&&typeof c=="object")if(r.isArray(c))for(var v=c.length;a<v;a++)a in c&&g(a,a,a===c.length-1,c[a]);else if(typeof Symbol=="function"&&c[Symbol.iterator])for(var _=c[Symbol.iterator](),S=_.next();!S.done;){var y=_.next();try{g(a,a,y.done,S.value)}catch(m){throw y.done||n(_),m}S=y,a++}else(function(){var m=void 0;Object.keys(c).forEach(function(b){m!==void 0&&g(m,a-1,!1,c[m]),m=b,a++}),m!==void 0&&g(m,a-1,!0,c[m])})();return a===0&&(f=p(this)),f})},t.exports=e.default})),_l=pe(((e,t)=>{e.__esModule=!0;function s(i){return i&&i.__esModule?i:{default:i}}var r=s(St());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})),Sl=pe(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=et(),i=s(St());e.default=function(n){n.registerHelper("if",function(o,c){if(arguments.length!=2)throw new i.default("#if requires exactly one argument");return r.isFunction(o)&&(o=o.call(this)),!c.hash.includeZero&&!o||r.isEmpty(o)?c.inverse(this):c.fn(this)}),n.registerHelper("unless",function(o,c){if(arguments.length!=2)throw new i.default("#unless requires exactly one argument");return n.helpers.if.call(this,o,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},t.exports=e.default})),kl=pe(((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})),wl=pe(((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})),xl=pe(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=et(),i=s(St());e.default=function(n){n.registerHelper("with",function(o,c){if(arguments.length!=2)throw new i.default("#with requires exactly one argument");r.isFunction(o)&&(o=o.call(this));var u=c.fn;if(r.isEmpty(o))return c.inverse(this);var h=c.data;return c.data&&c.ids&&(h=r.createFrame(c.data),h.contextPath=r.appendContextPath(c.data.contextPath,c.ids[0])),u(o,{data:h,blockParams:r.blockParams([o],[h&&h.contextPath])})})},t.exports=e.default})),ln=pe((e=>{e.__esModule=!0,e.registerDefaultHelpers=h,e.moveHelperToHooks=p;function t(a){return a&&a.__esModule?a:{default:a}}var s=t(yl()),r=t(bl()),i=t(_l()),n=t(Sl()),o=t(kl()),c=t(wl()),u=t(xl());function h(a){s.default(a),r.default(a),i.default(a),n.default(a),o.default(a),c.default(a),u.default(a)}function p(a,f,l){a.helpers[f]&&(a.hooks[f]=a.helpers[f],l||(a.helpers[f]=void 0))}})),Tl=pe(((e,t)=>{e.__esModule=!0;var s=et();e.default=function(r){r.registerDecorator("inline",function(i,n,o,c){var u=i;return n.partials||(n.partials={},u=function(h,p){var a=o.partials;o.partials=s.extend({},a,n.partials);var f=i(h,p);return o.partials=a,f}),n.partials[c.args[0]]=c.fn,u})},t.exports=e.default})),Cl=pe((e=>{e.__esModule=!0,e.registerDefaultDecorators=r;function t(i){return i&&i.__esModule?i:{default:i}}var s=t(Tl());function r(i){s.default(i)}})),cn=pe(((e,t)=>{e.__esModule=!0;var s=et(),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 c=arguments.length,u=Array(c>1?c-1:0),h=1;h<c;h++)u[h-1]=arguments[h];console[o].apply(console,u)}}};e.default=r,t.exports=e.default})),un=pe((e=>{e.__esModule=!0,e.createProtoAccessControl=n,e.resultIsAllowed=o,e.isPrototypeConstructor=c,e.resetLoggedProperties=p;function t(a){return a&&a.__esModule?a:{default:a}}var s=et(),r=t(cn()),i=Object.create(null);function n(a){var f=Object.create(null);f.__proto__=!1,s.extend(f,a.allowedProtoProperties);var l=Object.create(null);return l.constructor=!1,l.__defineGetter__=!1,l.__defineSetter__=!1,l.__lookupGetter__=!1,l.__lookupSetter__=!1,s.extend(l,a.allowedProtoMethods),{properties:{whitelist:f,defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:l,defaultValue:a.allowProtoMethodsByDefault}}}function o(a,f,l){return u(typeof a=="function"?f.methods:f.properties,l)}function c(a,f,l){return f==="constructor"&&typeof l=="function"&&a===l.prototype}function u(a,f){return a.whitelist[f]!==void 0?a.whitelist[f]===!0:a.defaultValue!==void 0?a.defaultValue:(h(f),!1)}function h(a){i[a]!==!0&&(i[a]=!0,r.default.log("error",\'Handlebars: Access has been denied to resolve the property "\'+a+`" 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(i).forEach(function(a){delete i[a]})}})),Yr=pe((e=>{e.__esModule=!0,e.HandlebarsEnvironment=l;function t(g){return g&&g.__esModule?g:{default:g}}var s=et(),r=t(St()),i=ln(),n=Cl(),o=t(cn()),c=un(),u="4.7.10";e.VERSION=u;var h=8;e.COMPILER_REVISION=h;var p=7;e.LAST_COMPATIBLE_COMPILER_REVISION=p;var a={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=a;var f="[object Object]";function l(g,v,_){this.helpers=g||{},this.partials=v||{},this.decorators=_||{},i.registerDefaultHelpers(this),n.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:o.default,log:o.default.log,registerHelper:function(v,_){if(s.toString.call(v)===f){if(_)throw new r.default("Arg not supported with multiple helpers");s.extend(this.helpers,v)}else this.helpers[v]=_},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,_){if(s.toString.call(v)===f)s.extend(this.partials,v);else{if(typeof _>"u")throw new r.default(\'Attempting to register a partial called "\'+v+\'" as undefined\');this.partials[v]=_}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,_){if(s.toString.call(v)===f){if(_)throw new r.default("Arg not supported with multiple decorators");s.extend(this.decorators,v)}else this.decorators[v]=_},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var d=o.default.log;e.log=d,e.createFrame=s.createFrame,e.logger=o.default})),Pl=pe(((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})),El=pe((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)}}})),Al=pe((e=>{e.__esModule=!0,e.checkRevision=h,e.template=p,e.wrapProgram=a,e.resolvePartial=f,e.invokePartial=l,e.noop=d;function t(m){return m&&m.__esModule?m:{default:m}}function s(m){if(m&&m.__esModule)return m;var b={};if(m!=null)for(var k in m)Object.prototype.hasOwnProperty.call(m,k)&&(b[k]=m[k]);return b.default=m,b}var r=s(et()),i=t(St()),n=Yr(),o=ln(),c=El(),u=un();function h(m){var b=m&&m[0]||1,k=n.COMPILER_REVISION;if(!(b>=n.LAST_COMPATIBLE_COMPILER_REVISION&&b<=n.COMPILER_REVISION))if(b<n.LAST_COMPATIBLE_COMPILER_REVISION){var w=n.REVISION_CHANGES[k],P=n.REVISION_CHANGES[b];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 ("+P+").")}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 p(m,b){if(!b)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,b.VM.checkRevision(m.compiler);var k=m.compiler&&m.compiler[0]===7;function w(E,A,C){C.hash&&(A=r.extend({},A,C.hash),C.ids&&(C.ids[0]=!0)),E=b.VM.resolvePartial.call(this,E,A,C),C.hooks=this.hooks,C.protoAccessControl=this.protoAccessControl;var B=b.VM.invokePartial.call(this,E,A,C);if(B==null&&r.isFunction(E))throw new i.default("The partial "+C.name+" returned no output: partials must return a string");if(B==null&&b.compile){if(typeof E!="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]=b.compile(E,m.compilerOptions,b),B=C.partials[C.name](A,C)}if(B!=null){if(C.indent){for(var D=B.split(`\n`),V=0,x=D.length;V<x&&!(!D[V]&&V+1===x);V++)D[V]=C.indent+D[V];B=D.join(`\n`)}return B}else throw new i.default("The partial "+C.name+" could not be compiled when running in runtime-only mode")}var P={strict:function(A,C,B){if(!A||!(C in A))throw new i.default(\'"\'+C+\'" not defined in \'+A,{loc:B});return P.lookupProperty(A,C)},lookupProperty:function(A,C){var B=A[C];if(B==null||Object.prototype.hasOwnProperty.call(A,C)&&!u.isPrototypeConstructor(A,C,B)||u.resultIsAllowed(B,P.protoAccessControl,C))return B},lookup:function(A,C){for(var B=A.length,D=0;D<B;D++){var V=A[D]&&P.lookupProperty(A[D],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,B,D,V){var x=this.programs[A],N=this.fn(A);return C||V||D||B?x=a(this,A,N,C,B,D,V):x||(x=this.programs[A]=a(this,A,N)),x},data:function(A,C){for(;A&&C--;)A=A._parent;return A},mergeIfNeeded:function(A,C){var B=A||C;return A&&C&&A!==C&&(B=r.extend({},C,A)),B},nullContext:Object.seal({}),noop:b.VM.noop,compilerInfo:m.compiler};function I(E){var A=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],C=A.data;I._setup(A),!A.partial&&m.useData&&(C=v(E,C));var B=void 0,D=m.useBlockParams?[]:void 0;m.useDepths&&(A.depths?B=E!=A.depths[0]?[E].concat(A.depths):A.depths:B=[E]);function V(x){return""+m.main(P,x,P.helpers,P.partials,C,D,B)}return V=_(m.main,V,P,A.depths||[],C,D),V(E,A)}return I.isTop=!0,I._setup=function(E){if(E.partial)P.protoAccessControl=E.protoAccessControl,P.helpers=E.helpers,P.partials=E.partials,P.decorators=E.decorators,P.hooks=E.hooks;else{var A={};S(A,b.helpers,P),S(A,E.helpers,P),P.helpers=A,m.usePartial&&(P.partials=P.mergeIfNeeded(E.partials,b.partials)),(m.usePartial||m.useDecorators)&&(P.decorators=r.extend({},b.decorators,E.decorators)),P.hooks={},P.protoAccessControl=u.createProtoAccessControl(E);var C=E.allowCallsToHelperMissing||k;o.moveHelperToHooks(P,"helperMissing",C),o.moveHelperToHooks(P,"blockHelperMissing",C)}},I._child=function(E,A,C,B){if(m.useBlockParams&&!C)throw new i.default("must pass block params");if(m.useDepths&&!B)throw new i.default("must pass parent depths");return a(P,E,m[E],A,0,C,B)},I}function a(m,b,k,w,P,I,E){function A(C){var B=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],D=E;return E&&C!=E[0]&&!(C===m.nullContext&&E[0]===null)&&(D=[C].concat(E)),k(m,C,m.helpers,m.partials,B.data||w,I&&[B.blockParams].concat(I),D)}return A=_(k,A,m,E,w,I),A.program=b,A.depth=E?E.length:0,A.blockParams=P||0,A}function f(m,b,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 l(m,b,k){var w=g(k.data,"partial-block");k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var P=void 0;if(k.fn&&k.fn!==d&&(function(){k.data=n.createFrame(k.data);var I=k.fn;P=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,I(A,C)},I.partials&&(k.partials=r.extend({},k.partials,I.partials))})(),m===void 0&&P&&(m=P),m===void 0)throw new i.default("The partial "+k.name+" could not be found");if(m instanceof Function)return m(b,k)}function d(){return""}function g(m,b){if(m&&Object.prototype.hasOwnProperty.call(m,b))return m[b]}function v(m,b){return(!b||!("root"in b))&&(b=b?n.createFrame(b):{},b.root=m),b}function _(m,b,k,w,P,I){if(m.decorator){var E={};b=m.decorator(b,E,k,w&&w[0],P,I,w),r.extend(b,E)}return b}function S(m,b,k){b&&Object.keys(b).forEach(function(w){var P=b[w];m[w]=y(P,k)})}function y(m,b){var k=b.lookupProperty;return c.wrapHelper(m,function(w){return w.lookupProperty=k,w})}})),hn=pe(((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})),Ll=pe(((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 l={};if(f!=null)for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d]);return l.default=f,l}var i=r(Yr()),n=s(Pl()),o=s(St()),c=r(et()),u=r(Al()),h=s(hn());function p(){var f=new i.HandlebarsEnvironment;return c.extend(f,i),f.SafeString=n.default,f.Exception=o.default,f.Utils=c,f.escapeExpression=c.escapeExpression,f.VM=u,f.template=function(l){return u.template(l,f)},f}var a=p();a.create=p,h.default(a),a.default=a,e.default=a,t.exports=e.default})),pn=pe(((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})),Rl=pe(((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,c,u,h,p,a,f){var l=a.length-1;switch(p){case 1:return a[l-1];case 2:this.$=h.prepareProgram(a[l]);break;case 3:this.$=a[l];break;case 4:this.$=a[l];break;case 5:this.$=a[l];break;case 6:this.$=a[l];break;case 7:this.$=a[l];break;case 8:this.$=a[l];break;case 9:this.$={type:"CommentStatement",value:h.stripComment(a[l]),strip:h.stripFlags(a[l],a[l]),loc:h.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:a[l],value:a[l],loc:h.locInfo(this._$)};break;case 11:this.$=h.prepareRawBlock(a[l-2],a[l-1],a[l],this._$);break;case 12:this.$={path:a[l-3],params:a[l-2],hash:a[l-1]};break;case 13:this.$=h.prepareBlock(a[l-3],a[l-2],a[l-1],a[l],!1,this._$);break;case 14:this.$=h.prepareBlock(a[l-3],a[l-2],a[l-1],a[l],!0,this._$);break;case 15:this.$={open:a[l-5],path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:h.stripFlags(a[l-5],a[l])};break;case 16:this.$={path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:h.stripFlags(a[l-5],a[l])};break;case 17:this.$={path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:h.stripFlags(a[l-5],a[l])};break;case 18:this.$={strip:h.stripFlags(a[l-1],a[l-1]),program:a[l]};break;case 19:var d=h.prepareBlock(a[l-2],a[l-1],a[l],a[l],!1,this._$),g=h.prepareProgram([d],a[l-1].loc);g.chained=!0,this.$={strip:a[l-2].strip,program:g,chain:!0};break;case 20:this.$=a[l];break;case 21:this.$={path:a[l-1],strip:h.stripFlags(a[l-2],a[l])};break;case 22:this.$=h.prepareMustache(a[l-3],a[l-2],a[l-1],a[l-4],h.stripFlags(a[l-4],a[l]),this._$);break;case 23:this.$=h.prepareMustache(a[l-3],a[l-2],a[l-1],a[l-4],h.stripFlags(a[l-4],a[l]),this._$);break;case 24:this.$={type:"PartialStatement",name:a[l-3],params:a[l-2],hash:a[l-1],indent:"",strip:h.stripFlags(a[l-4],a[l]),loc:h.locInfo(this._$)};break;case 25:this.$=h.preparePartialBlock(a[l-2],a[l-1],a[l],this._$);break;case 26:this.$={path:a[l-3],params:a[l-2],hash:a[l-1],strip:h.stripFlags(a[l-4],a[l])};break;case 27:this.$=a[l];break;case 28:this.$=a[l];break;case 29:this.$={type:"SubExpression",path:a[l-3],params:a[l-2],hash:a[l-1],loc:h.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:a[l],loc:h.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:h.id(a[l-2]),value:a[l],loc:h.locInfo(this._$)};break;case 32:this.$=h.id(a[l-1]);break;case 33:this.$=a[l];break;case 34:this.$=a[l];break;case 35:this.$={type:"StringLiteral",value:a[l],original:a[l],loc:h.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(a[l]),original:Number(a[l]),loc:h.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:a[l]==="true",original:a[l]==="true",loc:h.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:h.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:h.locInfo(this._$)};break;case 40:this.$=a[l];break;case 41:this.$=a[l];break;case 42:this.$=h.preparePath(!0,a[l],this._$);break;case 43:this.$=h.preparePath(!1,a[l],this._$);break;case 44:a[l-2].push({part:h.id(a[l]),original:a[l],separator:a[l-1]}),this.$=a[l-2];break;case 45:this.$=[{part:h.id(a[l]),original:a[l]}];break;case 46:this.$=[];break;case 47:a[l-1].push(a[l]);break;case 48:this.$=[];break;case 49:a[l-1].push(a[l]);break;case 50:this.$=[];break;case 51:a[l-1].push(a[l]);break;case 58:this.$=[];break;case 59:a[l-1].push(a[l]);break;case 64:this.$=[];break;case 65:a[l-1].push(a[l]);break;case 70:this.$=[];break;case 71:a[l-1].push(a[l]);break;case 78:this.$=[];break;case 79:a[l-1].push(a[l]);break;case 82:this.$=[];break;case 83:a[l-1].push(a[l]);break;case 86:this.$=[];break;case 87:a[l-1].push(a[l]);break;case 90:this.$=[];break;case 91:a[l-1].push(a[l]);break;case 94:this.$=[];break;case 95:a[l-1].push(a[l]);break;case 98:this.$=[a[l]];break;case 99:a[l-1].push(a[l]);break;case 100:this.$=[a[l]];break;case 101:a[l-1].push(a[l])}},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,c){throw new Error(o)},parse:function(o){var c=this,u=[0],h=[null],p=[],a=this.table,f="",l=0,d=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;p.push(v);var _=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function S(){var D=c.lexer.lex()||1;return typeof D!="number"&&(D=c.symbols_[D]||D),D}for(var y,m,b,k,w,P={},I,E,A,C;;){if(b=u[u.length-1],this.defaultActions[b]?k=this.defaultActions[b]:((y===null||typeof y>"u")&&(y=S()),k=a[b]&&a[b][y]),typeof k>"u"||!k.length||!k[0]){var B="";if(!g){C=[];for(I in a[b])this.terminals_[I]&&I>2&&C.push("\'"+this.terminals_[I]+"\'");this.lexer.showPosition?B="Parse error on line "+(l+1)+`:\n`+this.lexer.showPosition()+`\nExpecting `+C.join(", ")+", got \'"+(this.terminals_[y]||y)+"\'":B="Parse error on line "+(l+1)+": Unexpected "+(y==1?"end of input":"\'"+(this.terminals_[y]||y)+"\'"),this.parseError(B,{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: "+b+", token: "+y);switch(k[0]){case 1:u.push(y),h.push(this.lexer.yytext),p.push(this.lexer.yylloc),u.push(k[1]),y=null,m?(y=m,m=null):(d=this.lexer.yyleng,f=this.lexer.yytext,l=this.lexer.yylineno,v=this.lexer.yylloc,g>0&&g--);break;case 2:if(E=this.productions_[k[1]][1],P.$=h[h.length-E],P._$={first_line:p[p.length-(E||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(E||1)].first_column,last_column:p[p.length-1].last_column},_&&(P._$.range=[p[p.length-(E||1)].range[0],p[p.length-1].range[1]]),w=this.performAction.call(P,f,d,l,this.yy,k[1],h,p),typeof w<"u")return w;E&&(u=u.slice(0,-1*E*2),h=h.slice(0,-1*E),p=p.slice(0,-1*E)),u.push(this.productions_[k[1]][0]),h.push(P.$),p.push(P._$),A=a[u[u.length-2]][u[u.length-1]],u.push(A);break;case 3:return!0}}return!0}};r.lexer=(function(){var n={EOF:1,parseError:function(c,u){if(this.yy.parser)this.yy.parser.parseError(c,u);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];return this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c,c.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),c},unput:function(c){var u=c.length,h=c.split(/(?:\\r\\n?|\\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u-1),this.offset-=u;var p=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),h.length-1&&(this.yylineno-=h.length-1);var a=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:h?(h.length===p.length?this.yylloc.first_column:0)+p[p.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-u]),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(),u=new Array(c.length+1).join("-");return c+this.upcomingInput()+`\n`+u+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,u,h,p,a;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),l=0;l<f.length&&(h=this._input.match(this.rules[f[l]]),!(h&&(!u||h[0].length>u[0].length)&&(u=h,p=l,!this.options.flex)));l++);return u?(a=u[0].match(/(?:\\r\\n?|\\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],c=this.performAction.call(this,this.yy,this,f[p],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 n.options={},n.performAction=function(c,u,h,p){function a(f,l){return u.yytext=u.yytext.substring(f,u.yyleng-l+f)}switch(h){case 0:if(u.yytext.slice(-2)==="\\\\\\\\"?(a(0,1),this.begin("mu")):u.yytext.slice(-1)==="\\\\"?(a(0,1),this.begin("emu")):this.begin("mu"),u.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:(a(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(u.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 u.yytext=a(1,2).replace(/\\\\"/g,\'"\'),80;case 32:return u.yytext=a(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 u.yytext=u.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})),fn=pe((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})),dn=pe(((e,t)=>{e.__esModule=!0;function s(a){return a&&a.__esModule?a:{default:a}}var r=s(St()),i=et(),n=fn();function o(){this.parents=[]}function c(a,f){return i.indexOf(n.NODE_TYPES,f)!==-1||!(f in o.prototype)&&typeof a[f]=="function"}o.prototype={constructor:o,mutating:!1,acceptKey:function(f,l){var d=this.accept(f[l]);if(this.mutating){if(d&&!c(this,d.type))throw new r.default(\'Unexpected node type "\'+d.type+\'" found when accepting \'+l+" on "+f.type);f[l]=d}},acceptRequired:function(f,l){if(this.acceptKey(f,l),!f[l])throw new r.default(f.type+" requires "+l)},acceptArray:function(f){for(var l=0,d=f.length;l<d;l++)this.acceptKey(f,l),f[l]||(f.splice(l,1),l--,d--)},accept:function(f){if(f){if(!c(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 l=this[f.type](f);if(this.current=this.parents.shift(),!this.mutating||l)return l;if(l!==!1)return f}},Program:function(f){this.acceptArray(f.body)},MustacheStatement:u,Decorator:u,BlockStatement:h,DecoratorBlock:h,PartialStatement:p,PartialBlockStatement:function(f){p.call(this,f),this.acceptKey(f,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:u,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 u(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function h(a){u.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function p(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}e.default=o,t.exports=e.default})),Il=pe(((e,t)=>{e.__esModule=!0;function s(h){return h&&h.__esModule?h:{default:h}}var r=s(dn());function i(){var h=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=h}i.prototype=new r.default,i.prototype.Program=function(h){var p=!this.options.ignoreStandalone,a=!this.isRootSeen;this.isRootSeen=!0;for(var f=h.body,l=0,d=f.length;l<d;l++){var g=f[l],v=this.accept(g);if(v){var _=n(f,l,a),S=o(f,l,a),y=v.openStandalone&&_,m=v.closeStandalone&&S,b=v.inlineStandalone&&_&&S;v.close&&c(f,l,!0),v.open&&u(f,l,!0),p&&b&&(c(f,l),u(f,l)&&g.type==="PartialStatement"&&(g.indent=/(?:^|[^ \\t])([ \\t]+)$/.exec(f[l-1].original)[1])),p&&y&&(c((g.program||g.inverse).body),u(f,l)),p&&m&&(c(f,l),u((g.inverse||g.program).body))}}return h},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(h){this.accept(h.program),this.accept(h.inverse);var p=h.program||h.inverse,a=h.program&&h.inverse,f=a,l=a;if(a&&a.chained)for(f=a.body[0].program;l.chained;)l=l.body[l.body.length-1].program;var d={open:h.openStrip.open,close:h.closeStrip.close,openStandalone:o(p.body),closeStandalone:n((f||p).body)};if(h.openStrip.close&&c(p.body,null,!0),a){var g=h.inverseStrip;g.open&&u(p.body,null,!0),g.close&&c(f.body,null,!0),h.closeStrip.open&&u(l.body,null,!0),!this.options.ignoreStandalone&&n(p.body)&&o(f.body)&&(u(p.body),c(f.body))}else h.closeStrip.open&&u(p.body,null,!0);return d},i.prototype.Decorator=i.prototype.MustacheStatement=function(h){return h.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(h){var p=h.strip||{};return{inlineStandalone:!0,open:p.open,close:p.close}};function n(h,p,a){p===void 0&&(p=h.length);var f=h[p-1],l=h[p-2];if(!f)return a;if(f.type==="ContentStatement")return(l||!a?/(?:^|\\S)[^\\S\\n]*\\n\\s*$/:/^\\s*$|(?:^|\\S)[^\\S\\n]*\\n\\s*$/).test(f.original)}function o(h,p,a){p===void 0&&(p=-1);var f=h[p+1],l=h[p+2];if(!f)return a;if(f.type==="ContentStatement")return(l||!a?/^\\s*?\\r?\\n/:/^\\s*?(\\r?\\n|$)/).test(f.original)}function c(h,p,a){var f=h[p==null?0:p+1];if(!(!f||f.type!=="ContentStatement"||!a&&f.rightStripped)){var l=f.value;f.value=f.value.replace(a?/^\\s+/:/^[ \\t]*\\r?\\n?/,""),f.rightStripped=f.value!==l}}function u(h,p,a){var f=h[p==null?h.length-1:p-1];if(!(!f||f.type!=="ContentStatement"||!a&&f.leftStripped)){var l=f.value;return f.value=f.value.replace(a?/(^|\\S)\\s+$/:/(^|[^ \\t])[ \\t]+$/,"$1"),f.leftStripped=f.value!==l,f.leftStripped}}e.default=i,t.exports=e.default})),Ol=pe((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=n,e.stripFlags=o,e.stripComment=c,e.preparePath=u,e.prepareMustache=h,e.prepareRawBlock=p,e.prepareBlock=a,e.prepareProgram=f,e.preparePartialBlock=l;function t(d){return d&&d.__esModule?d:{default:d}}var s=t(St());function r(d,g){if(g=g.path?g.path.original:g,d.path.original!==g){var v={loc:d.path.loc};throw new s.default(d.path.original+" doesn\'t match "+g,v)}}function i(d,g){this.source=d,this.start={line:g.first_line,column:g.first_column},this.end={line:g.last_line,column:g.last_column}}function n(d){return/^\\[.*\\]$/.test(d)?d.substring(1,d.length-1):d}function o(d,g){return{open:d.charAt(2)==="~",close:g.charAt(g.length-3)==="~"}}function c(d){return d.replace(/^\\{\\{~?!-?-?/,"").replace(/-?-?~?\\}\\}$/,"")}function u(d,g,v){v=this.locInfo(v);for(var _=d?"@":"",S=[],y=0,m=0,b=g.length;m<b;m++){var k=g[m].part,w=g[m].original!==k;if(_+=(g[m].separator||"")+k,!w&&(k===".."||k==="."||k==="this")){if(S.length>0)throw new s.default("Invalid path: "+_,{loc:v});k===".."&&y++}else S.push(k)}return{type:"PathExpression",data:d,depth:y,parts:S,original:_,loc:v}}function h(d,g,v,_,S,y){var m=_.charAt(3)||_.charAt(2),b=m!=="{"&&m!=="&";return{type:/\\*/.test(_)?"Decorator":"MustacheStatement",path:d,params:g,hash:v,escaped:b,strip:S,loc:this.locInfo(y)}}function p(d,g,v,_){r(d,v),_=this.locInfo(_);var S={type:"Program",body:g,strip:{},loc:_};return{type:"BlockStatement",path:d.path,params:d.params,hash:d.hash,program:S,openStrip:{},inverseStrip:{},closeStrip:{},loc:_}}function a(d,g,v,_,S,y){_&&_.path&&r(d,_);var m=/\\*/.test(d.open);g.blockParams=d.blockParams;var b=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=_.strip),k=v.strip,b=v.program}return S&&(S=b,b=g,g=S),{type:m?"DecoratorBlock":"BlockStatement",path:d.path,params:d.params,hash:d.hash,program:g,inverse:b,openStrip:d.strip,inverseStrip:k,closeStrip:_&&_.strip,loc:this.locInfo(y)}}function f(d,g){if(!g&&d.length){var v=d[0].loc,_=d[d.length-1].loc;v&&_&&(g={source:v.source,start:{line:v.start.line,column:v.start.column},end:{line:_.end.line,column:_.end.column}})}return{type:"Program",body:d,strip:{},loc:g}}function l(d,g,v,_){return r(d,v),{type:"PartialBlockStatement",name:d.path,params:d.params,hash:d.hash,program:g,openStrip:d.strip,closeStrip:v&&v.strip,loc:this.locInfo(_)}}})),Ml=pe((e=>{e.__esModule=!0,e.parseWithoutProcessing=u,e.parse=h;function t(p){if(p&&p.__esModule)return p;var a={};if(p!=null)for(var f in p)Object.prototype.hasOwnProperty.call(p,f)&&(a[f]=p[f]);return a.default=p,a}function s(p){return p&&p.__esModule?p:{default:p}}var r=s(Rl()),i=s(Il()),n=t(Ol()),o=et();e.parser=r.default;var c={};o.extend(c,n);function u(p,a){return p.type==="Program"?p:(r.default.yy=c,c.locInfo=function(f){return new c.SourceLocation(a&&a.srcName,f)},r.default.parse(p))}function h(p,a){var f=u(p,a);return new i.default(a).accept(f)}})),Nl=pe((e=>{e.__esModule=!0,e.Compiler=c,e.precompile=u,e.compile=h;function t(S){return S&&S.__esModule?S:{default:S}}var s=t(St()),r=et(),i=t(pn()),n=fn(),o=[].slice;function c(){}c.prototype={compiler:c,equals:function(y){var m=this.opcodes.length;if(y.opcodes.length!==m)return!1;for(var b=0;b<m;b++){var k=this.opcodes[b],w=y.opcodes[b];if(k.opcode!==w.opcode||!v(k.args,w.args))return!1}m=this.children.length;for(var b=0;b<m;b++)if(!this.children[b].equals(y.children[b]))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),b=this.guid++;return this.usePartial=this.usePartial||m.usePartial,this.children[b]=m,this.useDepths=this.useDepths||m.useDepths,b},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,b=m.length,k=0;k<b;k++)this.accept(m[k]);return this.options.blockParams.shift(),this.isSimple=b===1,this.blockParams=y.blockParams?y.blockParams.length:0,this},BlockStatement:function(y){_(y);var m=y.program,b=y.inverse;m=m&&this.compileProgram(m),b=b&&this.compileProgram(b);var k=this.classifySexpr(y);k==="helper"?this.helperSexpr(y,m,b):k==="simple"?(this.simpleSexpr(y),this.opcode("pushProgram",m),this.opcode("pushProgram",b),this.opcode("emptyHash"),this.opcode("blockValue",y.path.original)):(this.ambiguousSexpr(y,m,b),this.opcode("pushProgram",m),this.opcode("pushProgram",b),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(y){var m=y.program&&this.compileProgram(y.program),b=this.setupFullMustacheParams(y,m,void 0),k=y.path;this.useDecorators=!0,this.opcode("registerDecorator",b.length,k.original)},PartialStatement:function(y){this.usePartial=!0;var m=y.program;m&&(m=this.compileProgram(y.program));var b=y.params;if(b.length>1)throw new s.default("Unsupported number of partial arguments: "+b.length,y);b.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):b.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 P=y.indent||"";this.options.preventIndent&&P&&(this.opcode("appendContent",P),P=""),this.opcode("invokePartial",w,k,P),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 p(y,"value must be a string");y.value&&this.opcode("appendContent",y.value)},CommentStatement:function(){},SubExpression:function(y){_(y);var m=this.classifySexpr(y);m==="simple"?this.simpleSexpr(y):m==="helper"?this.helperSexpr(y):this.ambiguousSexpr(y)},ambiguousSexpr:function(y,m,b){var k=y.path,w=k.parts[0],P=m!=null||b!=null;this.opcode("getContext",a(k)),this.opcode("pushProgram",m),this.opcode("pushProgram",b),k.strict=!0,this.accept(k),this.opcode("invokeAmbiguous",w,P)},simpleSexpr:function(y){var m=y.path;m.strict=!0,this.accept(m),this.opcode("resolvePossibleLambda")},helperSexpr:function(y,m,b){var k=this.setupFullMustacheParams(y,m,b),w=y.path,P=w.parts[0];if(this.options.knownHelpers[P])this.opcode("invokeKnownHelper",k.length,P);else{if(this.options.knownHelpersOnly)throw new s.default("You specified knownHelpersOnly, but used the unknown helper "+P,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=a(y),b=d(y);this.addDepth(m),this.opcode("getContext",m);var k=b[0],w=i.default.helpers.scopedId(y),P=!m&&!w&&this.blockParamIndex(k);P?this.opcode("lookupBlockParam",P,b):k?y.data?(this.options.data=!0,this.opcode("lookupData",m,b,y.strict)):this.opcode("lookupOnContext",b,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,b=0,k=void 0;if(!r.isArray(m))throw p(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 p(y,"pair keys must be strings");for(this.opcode("pushHash");b<k;b++)this.pushParam(m[b].value);for(;b--;)this.opcode("assignToHash",m[b].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){d(y.path);var m=i.default.helpers.simpleId(y.path),b=m&&!!this.blockParamIndex(y.path.parts[0]),k=!b&&i.default.helpers.helperExpression(y),w=!b&&(k||m);if(w&&!k){var P=y.path.parts[0],I=this.options;I.knownHelpers[P]?k=!0:I.knownHelpersOnly&&(w=!1)}return k?"helper":w?"ambiguous":"simple"},pushParams:function(y){for(var m=0,b=y.length;m<b;m++)this.pushParam(y[m])},pushParam:function(y){f(y);var m=y.value!=null?y.value:y.original||"",b=a(y);if(this.stringParams)typeof m!="number"&&typeof m!="boolean"&&(m=String(m)),m.replace&&(m=m.replace(/^(\\.?\\.\\/)*/g,"").replace(/\\//g,".")),b&&this.addDepth(b),this.opcode("getContext",b),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)&&!b&&(k=this.blockParamIndex(d(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,b,k){var w=y.params;return this.pushParams(w),this.opcode("pushProgram",m),this.opcode("pushProgram",b),y.hash?this.accept(y.hash):this.opcode("emptyHash",k),w},blockParamIndex:function(y){for(var m=0,b=this.options.blockParams.length;m<b;m++){var k=this.options.blockParams[m],w=k&&r.indexOf(k,y);if(k&&w>=0)return[m,w]}}};function u(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 b=m.parse(S,y),k=new m.Compiler().compile(b,y);return new m.JavaScriptCompiler().compile(k,y)}function h(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 b=void 0;function k(){var P=m.parse(S,y),I=new m.Compiler().compile(P,y),E=new m.JavaScriptCompiler().compile(I,y,void 0,!0);return m.template(E)}function w(P,I){return b||(b=k()),b.call(this,P,I)}return w._setup=function(P){return b||(b=k()),b._setup(P)},w._child=function(P,I,E,A){return b||(b=k()),b._child(P,I,E,A)},w}function p(S,y){return new s.default("Invalid AST: "+S.type+" "+y,S)}function a(S){var y=S.depth;if(y==null)return 0;if(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y<0)throw p(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 p(S,"value must be a string");if(S.type==="NumberLiteral"&&typeof y!="number")throw p(S,"value must be a number");if(S.type==="BooleanLiteral"&&typeof y!="boolean")throw p(S,"value must be a boolean")}function l(S,y,m){if(!r.isArray(y))throw p(S,m+" must be an array");for(var b=0;b<y.length;b++)if(typeof y[b]!="string")throw p(S,m+" must only contain strings");return y}function d(S){return l(S,S.parts,"parts")}function g(S){S.blockParams!=null&&l(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 _(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}}}})),Dl=pe((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,c=48,u=57,h=43,p=47,a=26,f=52;return r<=s&&s<=i?s-r:n<=s&&s<=o?s-n+a:c<=s&&s<=u?s-c+f:s==h?62:s==p?63:-1}})),gn=pe((e=>{var t=Dl(),s=5,r=1<<s,i=r-1,n=r;function o(u){return u<0?(-u<<1)+1:(u<<1)+0}function c(u){var h=(u&1)===1,p=u>>1;return h?-p:p}e.encode=function(h){var p="",a,f=o(h);do a=f&i,f>>>=s,f>0&&(a|=n),p+=t.encode(a);while(f>0);return p},e.decode=function(h,p,a){var f=h.length,l=0,d=0,g,v;do{if(p>=f)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(h.charCodeAt(p++)),v===-1)throw new Error("Invalid base64 digit: "+h.charAt(p-1));g=!!(v&n),v&=i,l=l+(v<<d),d+=s}while(g);a.value=c(l),a.rest=p}})),Ps=pe((e=>{function t(m,b,k){if(b in m)return m[b];if(arguments.length===3)return k;throw new Error(\'"\'+b+\'" is a required argument.\')}e.getArg=t;var s=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,r=/^data:.+\\,.+$/;function i(m){var b=m.match(s);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=i;function n(m){var b="";return m.scheme&&(b+=m.scheme+":"),b+="//",m.auth&&(b+=m.auth+"@"),m.host&&(b+=m.host),m.port&&(b+=":"+m.port),m.path&&(b+=m.path),b}e.urlGenerate=n;function o(m){var b=m,k=i(m);if(k){if(!k.path)return m;b=k.path}for(var w=e.isAbsolute(b),P=b.split(/\\/+/),I,E=0,A=P.length-1;A>=0;A--)I=P[A],I==="."?P.splice(A,1):I===".."?E++:E>0&&(I===""?(P.splice(A+1,E),E=0):(P.splice(A,2),E--));return b=P.join("/"),b===""&&(b=w?"/":"."),k?(k.path=b,n(k)):b}e.normalize=o;function c(m,b){m===""&&(m="."),b===""&&(b=".");var k=i(b),w=i(m);if(w&&(m=w.path||"/"),k&&!k.scheme)return w&&(k.scheme=w.scheme),n(k);if(k||b.match(r))return b;if(w&&!w.host&&!w.path)return w.host=b,n(w);var P=b.charAt(0)==="/"?b:o(m.replace(/\\/+$/,"")+"/"+b);return w?(w.path=P,n(w)):P}e.join=c,e.isAbsolute=function(m){return m.charAt(0)==="/"||s.test(m)};function u(m,b){m===""&&(m="."),m=m.replace(/\\/$/,"");for(var k=0;b.indexOf(m+"/")!==0;){var w=m.lastIndexOf("/");if(w<0||(m=m.slice(0,w),m.match(/^([^\\/]+:\\/)?\\/*$/)))return b;++k}return Array(k+1).join("../")+b.substr(m.length+1)}e.relative=u;var h=(function(){return!("__proto__"in Object.create(null))})();function p(m){return m}function a(m){return l(m)?"$"+m:m}e.toSetString=h?p:a;function f(m){return l(m)?m.slice(1):m}e.fromSetString=h?p:f;function l(m){if(!m)return!1;var b=m.length;if(b<9||m.charCodeAt(b-1)!==95||m.charCodeAt(b-2)!==95||m.charCodeAt(b-3)!==111||m.charCodeAt(b-4)!==116||m.charCodeAt(b-5)!==111||m.charCodeAt(b-6)!==114||m.charCodeAt(b-7)!==112||m.charCodeAt(b-8)!==95||m.charCodeAt(b-9)!==95)return!1;for(var k=b-10;k>=0;k--)if(m.charCodeAt(k)!==36)return!1;return!0}function d(m,b,k){var w=v(m.source,b.source);return w!==0||(w=m.originalLine-b.originalLine,w!==0)||(w=m.originalColumn-b.originalColumn,w!==0||k)||(w=m.generatedColumn-b.generatedColumn,w!==0)||(w=m.generatedLine-b.generatedLine,w!==0)?w:v(m.name,b.name)}e.compareByOriginalPositions=d;function g(m,b,k){var w=m.generatedLine-b.generatedLine;return w!==0||(w=m.generatedColumn-b.generatedColumn,w!==0||k)||(w=v(m.source,b.source),w!==0)||(w=m.originalLine-b.originalLine,w!==0)||(w=m.originalColumn-b.originalColumn,w!==0)?w:v(m.name,b.name)}e.compareByGeneratedPositionsDeflated=g;function v(m,b){return m===b?0:m===null?1:b===null?-1:m>b?1:-1}function _(m,b){var k=m.generatedLine-b.generatedLine;return k!==0||(k=m.generatedColumn-b.generatedColumn,k!==0)||(k=v(m.source,b.source),k!==0)||(k=m.originalLine-b.originalLine,k!==0)||(k=m.originalColumn-b.originalColumn,k!==0)?k:v(m.name,b.name)}e.compareByGeneratedPositionsInflated=_;function S(m){return JSON.parse(m.replace(/^\\)]}\'[^\\n]*\\n/,""))}e.parseSourceMapInput=S;function y(m,b,k){if(b=b||"",m&&(m[m.length-1]!=="/"&&b[0]!=="/"&&(m+="/"),b=m+b),k){var w=i(k);if(!w)throw new Error("sourceMapURL could not be parsed");if(w.path){var P=w.path.lastIndexOf("/");P>=0&&(w.path=w.path.substring(0,P+1))}b=c(n(w),b)}return o(b)}e.computeSourceURL=y})),mn=pe((e=>{var t=Ps(),s=Object.prototype.hasOwnProperty,r=typeof Map<"u";function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(o,c){for(var u=new i,h=0,p=o.length;h<p;h++)u.add(o[h],c);return u},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(o,c){var u=r?o:t.toSetString(o),h=r?this.has(o):s.call(this._set,u),p=this._array.length;(!h||c)&&this._array.push(o),h||(r?this._set.set(o,p):this._set[u]=p)},i.prototype.has=function(o){if(r)return this._set.has(o);var c=t.toSetString(o);return s.call(this._set,c)},i.prototype.indexOf=function(o){if(r){var c=this._set.get(o);if(c>=0)return c}else{var u=t.toSetString(o);if(s.call(this._set,u))return this._set[u]}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})),Bl=pe((e=>{var t=Ps();function s(i,n){var o=i.generatedLine,c=n.generatedLine,u=i.generatedColumn,h=n.generatedColumn;return c>o||c==o&&h>=u||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})),vn=pe((e=>{var t=gn(),s=Ps(),r=mn().ArraySet,i=Bl().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(c){var u=c.sourceRoot,h=new n({file:c.file,sourceRoot:u});return c.eachMapping(function(p){var a={generated:{line:p.generatedLine,column:p.generatedColumn}};p.source!=null&&(a.source=p.source,u!=null&&(a.source=s.relative(u,a.source)),a.original={line:p.originalLine,column:p.originalColumn},p.name!=null&&(a.name=p.name)),h.addMapping(a)}),c.sources.forEach(function(p){var a=p;u!==null&&(a=s.relative(u,p)),h._sources.has(a)||h._sources.add(a);var f=c.sourceContentFor(p);f!=null&&h.setSourceContent(p,f)}),h},n.prototype.addMapping=function(c){var u=s.getArg(c,"generated"),h=s.getArg(c,"original",null),p=s.getArg(c,"source",null),a=s.getArg(c,"name",null);this._skipValidation||this._validateMapping(u,h,p,a),p!=null&&(p=String(p),this._sources.has(p)||this._sources.add(p)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:u.line,generatedColumn:u.column,originalLine:h!=null&&h.line,originalColumn:h!=null&&h.column,source:p,name:a})},n.prototype.setSourceContent=function(c,u){var h=c;this._sourceRoot!=null&&(h=s.relative(this._sourceRoot,h)),u!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(h)]=u):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(h)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(c,u,h){var p=u;if(u==null){if(c.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=c.file}var a=this._sourceRoot;a!=null&&(p=s.relative(a,p));var f=new r,l=new r;this._mappings.unsortedForEach(function(d){if(d.source===p&&d.originalLine!=null){var g=c.originalPositionFor({line:d.originalLine,column:d.originalColumn});g.source!=null&&(d.source=g.source,h!=null&&(d.source=s.join(h,d.source)),a!=null&&(d.source=s.relative(a,d.source)),d.originalLine=g.line,d.originalColumn=g.column,g.name!=null&&(d.name=g.name))}var v=d.source;v!=null&&!f.has(v)&&f.add(v);var _=d.name;_!=null&&!l.has(_)&&l.add(_)},this),this._sources=f,this._names=l,c.sources.forEach(function(d){var g=c.sourceContentFor(d);g!=null&&(h!=null&&(d=s.join(h,d)),a!=null&&(d=s.relative(a,d)),this.setSourceContent(d,g))},this)},n.prototype._validateMapping=function(c,u,h,p){if(u&&typeof u.line!="number"&&typeof u.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(!(c&&"line"in c&&"column"in c&&c.line>0&&c.column>=0&&!u&&!h&&!p)){if(c&&"line"in c&&"column"in c&&u&&"line"in u&&"column"in u&&c.line>0&&c.column>=0&&u.line>0&&u.column>=0&&h)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:c,source:h,original:u,name:p}))}},n.prototype._serializeMappings=function(){for(var c=0,u=1,h=0,p=0,a=0,f=0,l="",d,g,v,_,S=this._mappings.toArray(),y=0,m=S.length;y<m;y++){if(g=S[y],d="",g.generatedLine!==u)for(c=0;g.generatedLine!==u;)d+=";",u++;else if(y>0){if(!s.compareByGeneratedPositionsInflated(g,S[y-1]))continue;d+=","}d+=t.encode(g.generatedColumn-c),c=g.generatedColumn,g.source!=null&&(_=this._sources.indexOf(g.source),d+=t.encode(_-f),f=_,d+=t.encode(g.originalLine-1-p),p=g.originalLine-1,d+=t.encode(g.originalColumn-h),h=g.originalColumn,g.name!=null&&(v=this._names.indexOf(g.name),d+=t.encode(v-a),a=v)),l+=d}return l},n.prototype._generateSourcesContent=function(c,u){return c.map(function(h){if(!this._sourcesContents)return null;u!=null&&(h=s.relative(u,h));var p=s.toSetString(h);return Object.prototype.hasOwnProperty.call(this._sourcesContents,p)?this._sourcesContents[p]:null},this)},n.prototype.toJSON=function(){var c={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(c.file=this._file),this._sourceRoot!=null&&(c.sourceRoot=this._sourceRoot),this._sourcesContents&&(c.sourcesContent=this._generateSourcesContent(c.sources,c.sourceRoot)),c},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=n})),$l=pe((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(s,r,i,n,o,c){var u=Math.floor((r-s)/2)+s,h=o(i,n[u],!0);return h===0?u:h>0?r-u>1?t(u,r,i,n,o,c):c==e.LEAST_UPPER_BOUND?r<n.length?r:-1:u:u-s>1?t(s,u,i,n,o,c):c==e.LEAST_UPPER_BOUND?u:s<0?-1:s}e.search=function(r,i,n,o){if(i.length===0)return-1;var c=t(-1,i.length,r,i,n,o||e.GREATEST_LOWER_BOUND);if(c<0)return-1;for(;c-1>=0&&n(i[c],i[c-1],!0)===0;)--c;return c}})),Hl=pe((e=>{function t(i,n,o){var c=i[n];i[n]=i[o],i[o]=c}function s(i,n){return Math.round(i+Math.random()*(n-i))}function r(i,n,o,c){if(o<c){var u=s(o,c),h=o-1;t(i,u,c);for(var p=i[c],a=o;a<c;a++)n(i[a],p)<=0&&(h+=1,t(i,h,a));t(i,h+1,a);var f=h+1;r(i,n,o,f-1),r(i,n,f+1,c)}}e.quickSort=function(i,n){r(i,n,0,i.length-1)}})),ql=pe((e=>{var t=Ps(),s=$l(),r=mn().ArraySet,i=gn(),n=Hl().quickSort;function o(p,a){var f=p;return typeof p=="string"&&(f=t.parseSourceMapInput(p)),f.sections!=null?new h(f,a):new c(f,a)}o.fromSourceMap=function(p,a){return c.fromSourceMap(p,a)},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(a,f){var l=a.charAt(f);return l===";"||l===","},o.prototype._parseMappings=function(a,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(a,f,l){var d=f||null,g=l||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 _=this.sourceRoot;v.map(function(S){var y=S.source===null?null:this._sources.at(S.source);return y=t.computeSourceURL(_,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(a,d)},o.prototype.allGeneratedPositionsFor=function(a){var f=t.getArg(a,"line"),l={source:t.getArg(a,"source"),originalLine:f,originalColumn:t.getArg(a,"column",0)};if(l.source=this._findSourceIndex(l.source),l.source<0)return[];var d=[],g=this._findMapping(l,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(g>=0){var v=this._originalMappings[g];if(a.column===void 0)for(var _=v.originalLine;v&&v.originalLine===_;)d.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;)d.push({line:t.getArg(v,"generatedLine",null),column:t.getArg(v,"generatedColumn",null),lastColumn:t.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++g]}return d},e.SourceMapConsumer=o;function c(p,a){var f=p;typeof p=="string"&&(f=t.parseSourceMapInput(p));var l=t.getArg(f,"version"),d=t.getArg(f,"sources"),g=t.getArg(f,"names",[]),v=t.getArg(f,"sourceRoot",null),_=t.getArg(f,"sourcesContent",null),S=t.getArg(f,"mappings"),y=t.getArg(f,"file",null);if(l!=this._version)throw new Error("Unsupported version: "+l);v&&(v=t.normalize(v)),d=d.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(d,!0),this._absoluteSources=this._sources.toArray().map(function(m){return t.computeSourceURL(v,m,a)}),this.sourceRoot=v,this.sourcesContent=_,this._mappings=S,this._sourceMapURL=a,this.file=y}c.prototype=Object.create(o.prototype),c.prototype.consumer=o,c.prototype._findSourceIndex=function(p){var a=p;if(this.sourceRoot!=null&&(a=t.relative(this.sourceRoot,a)),this._sources.has(a))return this._sources.indexOf(a);for(var f=0;f<this._absoluteSources.length;++f)if(this._absoluteSources[f]==p)return f;return-1},c.fromSourceMap=function(a,f){var l=Object.create(c.prototype),d=l._names=r.fromArray(a._names.toArray(),!0),g=l._sources=r.fromArray(a._sources.toArray(),!0);l.sourceRoot=a._sourceRoot,l.sourcesContent=a._generateSourcesContent(l._sources.toArray(),l.sourceRoot),l.file=a._file,l._sourceMapURL=f,l._absoluteSources=l._sources.toArray().map(function(w){return t.computeSourceURL(l.sourceRoot,w,f)});for(var v=a._mappings.toArray().slice(),_=l.__generatedMappings=[],S=l.__originalMappings=[],y=0,m=v.length;y<m;y++){var b=v[y],k=new u;k.generatedLine=b.generatedLine,k.generatedColumn=b.generatedColumn,b.source&&(k.source=g.indexOf(b.source),k.originalLine=b.originalLine,k.originalColumn=b.originalColumn,b.name&&(k.name=d.indexOf(b.name)),S.push(k)),_.push(k)}return n(l.__originalMappings,t.compareByOriginalPositions),l},c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function u(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}c.prototype._parseMappings=function(a,f){for(var l=1,d=0,g=0,v=0,_=0,S=0,y=a.length,m=0,b={},k={},w=[],P=[],I,E,A,C,B;m<y;)if(a.charAt(m)===";")l++,m++,d=0;else if(a.charAt(m)===",")m++;else{for(I=new u,I.generatedLine=l,C=m;C<y&&!this._charIsMappingSeparator(a,C);C++);if(E=a.slice(m,C),A=b[E],A)m+=E.length;else{for(A=[];m<C;)i.decode(a,m,k),B=k.value,m=k.rest,A.push(B);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");b[E]=A}I.generatedColumn=d+A[0],d=I.generatedColumn,A.length>1&&(I.source=_+A[1],_+=A[1],I.originalLine=g+A[2],g=I.originalLine,I.originalLine+=1,I.originalColumn=v+A[3],v=I.originalColumn,A.length>4&&(I.name=S+A[4],S+=A[4])),P.push(I),typeof I.originalLine=="number"&&w.push(I)}n(P,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=P,n(w,t.compareByOriginalPositions),this.__originalMappings=w},c.prototype._findMapping=function(a,f,l,d,g,v){if(a[l]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+a[l]);if(a[d]<0)throw new TypeError("Column must be greater than or equal to 0, got "+a[d]);return s.search(a,f,g,v)},c.prototype.computeColumnSpans=function(){for(var a=0;a<this._generatedMappings.length;++a){var f=this._generatedMappings[a];if(a+1<this._generatedMappings.length){var l=this._generatedMappings[a+1];if(f.generatedLine===l.generatedLine){f.lastGeneratedColumn=l.generatedColumn-1;continue}}f.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(a){var f={generatedLine:t.getArg(a,"line"),generatedColumn:t.getArg(a,"column")},l=this._findMapping(f,this._generatedMappings,"generatedLine","generatedColumn",t.compareByGeneratedPositionsDeflated,t.getArg(a,"bias",o.GREATEST_LOWER_BOUND));if(l>=0){var d=this._generatedMappings[l];if(d.generatedLine===f.generatedLine){var g=t.getArg(d,"source",null);g!==null&&(g=this._sources.at(g),g=t.computeSourceURL(this.sourceRoot,g,this._sourceMapURL));var v=t.getArg(d,"name",null);return v!==null&&(v=this._names.at(v)),{source:g,line:t.getArg(d,"originalLine",null),column:t.getArg(d,"originalColumn",null),name:v}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return a==null}):!1},c.prototype.sourceContentFor=function(a,f){if(!this.sourcesContent)return null;var l=this._findSourceIndex(a);if(l>=0)return this.sourcesContent[l];var d=a;this.sourceRoot!=null&&(d=t.relative(this.sourceRoot,d));var g;if(this.sourceRoot!=null&&(g=t.urlParse(this.sourceRoot))){var v=d.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("/"+d))return this.sourcesContent[this._sources.indexOf("/"+d)]}if(f)return null;throw new Error(\'"\'+d+\'" is not in the SourceMap.\')},c.prototype.generatedPositionFor=function(a){var f=t.getArg(a,"source");if(f=this._findSourceIndex(f),f<0)return{line:null,column:null,lastColumn:null};var l={source:f,originalLine:t.getArg(a,"line"),originalColumn:t.getArg(a,"column")},d=this._findMapping(l,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(a,"bias",o.GREATEST_LOWER_BOUND));if(d>=0){var g=this._originalMappings[d];if(g.source===l.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=c;function h(p,a){var f=p;typeof p=="string"&&(f=t.parseSourceMapInput(p));var l=t.getArg(f,"version"),d=t.getArg(f,"sections");if(l!=this._version)throw new Error("Unsupported version: "+l);this._sources=new r,this._names=new r;var g={line:-1,column:0};this._sections=d.map(function(v){if(v.url)throw new Error("Support for url field in sections not implemented.");var _=t.getArg(v,"offset"),S=t.getArg(_,"line"),y=t.getArg(_,"column");if(S<g.line||S===g.line&&y<g.column)throw new Error("Section offsets must be ordered and non-overlapping.");return g=_,{generatedOffset:{generatedLine:S+1,generatedColumn:y+1},consumer:new o(t.getArg(v,"map"),a)}})}h.prototype=Object.create(o.prototype),h.prototype.constructor=o,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var p=[],a=0;a<this._sections.length;a++)for(var f=0;f<this._sections[a].consumer.sources.length;f++)p.push(this._sections[a].consumer.sources[f]);return p}}),h.prototype.originalPositionFor=function(a){var f={generatedLine:t.getArg(a,"line"),generatedColumn:t.getArg(a,"column")},l=s.search(f,this._sections,function(g,v){var _=g.generatedLine-v.generatedOffset.generatedLine;return _||g.generatedColumn-v.generatedOffset.generatedColumn}),d=this._sections[l];return d?d.consumer.originalPositionFor({line:f.generatedLine-(d.generatedOffset.generatedLine-1),column:f.generatedColumn-(d.generatedOffset.generatedLine===f.generatedLine?d.generatedOffset.generatedColumn-1:0),bias:a.bias}):{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})},h.prototype.sourceContentFor=function(a,f){for(var l=0;l<this._sections.length;l++){var d=this._sections[l].consumer.sourceContentFor(a,!0);if(d)return d}if(f)return null;throw new Error(\'"\'+a+\'" is not in the SourceMap.\')},h.prototype.generatedPositionFor=function(a){for(var f=0;f<this._sections.length;f++){var l=this._sections[f];if(l.consumer._findSourceIndex(t.getArg(a,"source"))!==-1){var d=l.consumer.generatedPositionFor(a);if(d)return{line:d.line+(l.generatedOffset.generatedLine-1),column:d.column+(l.generatedOffset.generatedLine===d.line?l.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},h.prototype._parseMappings=function(a,f){this.__generatedMappings=[],this.__originalMappings=[];for(var l=0;l<this._sections.length;l++)for(var d=this._sections[l],g=d.consumer._generatedMappings,v=0;v<g.length;v++){var _=g[v],S=d.consumer._sources.at(_.source);S=t.computeSourceURL(d.consumer.sourceRoot,S,this._sourceMapURL),this._sources.add(S),S=this._sources.indexOf(S);var y=null;_.name&&(y=d.consumer._names.at(_.name),this._names.add(y),y=this._names.indexOf(y));var m={source:S,generatedLine:_.generatedLine+(d.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(d.generatedOffset.generatedLine===_.generatedLine?d.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.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=h})),Fl=pe((e=>{var t=vn().SourceMapGenerator,s=Ps(),r=/(\\r?\\n)/,i=10,n="$$$isSourceNode$$$";function o(c,u,h,p,a){this.children=[],this.sourceContents={},this.line=c??null,this.column=u??null,this.source=h??null,this.name=a??null,this[n]=!0,p!=null&&this.add(p)}o.fromStringWithSourceMap=function(u,h,p){var a=new o,f=u.split(r),l=0,d=function(){return y()+(y()||"");function y(){return l<f.length?f[l++]:void 0}},g=1,v=0,_=null;return h.eachMapping(function(y){if(_!==null)if(g<y.generatedLine)S(_,d()),g++,v=0;else{var m=f[l]||"",b=m.substr(0,y.generatedColumn-v);f[l]=m.substr(y.generatedColumn-v),v=y.generatedColumn,S(_,b),_=y;return}for(;g<y.generatedLine;)a.add(d()),g++;if(v<y.generatedColumn){var m=f[l]||"";a.add(m.substr(0,y.generatedColumn)),f[l]=m.substr(y.generatedColumn),v=y.generatedColumn}_=y},this),l<f.length&&(_&&S(_,d()),a.add(f.splice(l).join(""))),h.sources.forEach(function(y){var m=h.sourceContentFor(y);m!=null&&(p!=null&&(y=s.join(p,y)),a.setSourceContent(y,m))}),a;function S(y,m){if(y===null||y.source===void 0)a.add(m);else{var b=p?s.join(p,y.source):y.source;a.add(new o(y.originalLine,y.originalColumn,b,m,y.name))}}},o.prototype.add=function(u){if(Array.isArray(u))u.forEach(function(h){this.add(h)},this);else if(u[n]||typeof u=="string")u&&this.children.push(u);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+u);return this},o.prototype.prepend=function(u){if(Array.isArray(u))for(var h=u.length-1;h>=0;h--)this.prepend(u[h]);else if(u[n]||typeof u=="string")this.children.unshift(u);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+u);return this},o.prototype.walk=function(u){for(var h,p=0,a=this.children.length;p<a;p++)h=this.children[p],h[n]?h.walk(u):h!==""&&u(h,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(u){var h,p,a=this.children.length;if(a>0){for(h=[],p=0;p<a-1;p++)h.push(this.children[p]),h.push(u);h.push(this.children[p]),this.children=h}return this},o.prototype.replaceRight=function(u,h){var p=this.children[this.children.length-1];return p[n]?p.replaceRight(u,h):typeof p=="string"?this.children[this.children.length-1]=p.replace(u,h):this.children.push("".replace(u,h)),this},o.prototype.setSourceContent=function(u,h){this.sourceContents[s.toSetString(u)]=h},o.prototype.walkSourceContents=function(u){for(var h=0,p=this.children.length;h<p;h++)this.children[h][n]&&this.children[h].walkSourceContents(u);for(var a=Object.keys(this.sourceContents),h=0,p=a.length;h<p;h++)u(s.fromSetString(a[h]),this.sourceContents[a[h]])},o.prototype.toString=function(){var u="";return this.walk(function(h){u+=h}),u},o.prototype.toStringWithSourceMap=function(u){var h={code:"",line:1,column:0},p=new t(u),a=!1,f=null,l=null,d=null,g=null;return this.walk(function(v,_){h.code+=v,_.source!==null&&_.line!==null&&_.column!==null?((f!==_.source||l!==_.line||d!==_.column||g!==_.name)&&p.addMapping({source:_.source,original:{line:_.line,column:_.column},generated:{line:h.line,column:h.column},name:_.name}),f=_.source,l=_.line,d=_.column,g=_.name,a=!0):a&&(p.addMapping({generated:{line:h.line,column:h.column}}),f=null,a=!1);for(var S=0,y=v.length;S<y;S++)v.charCodeAt(S)===i?(h.line++,h.column=0,S+1===y?(f=null,a=!1):a&&p.addMapping({source:_.source,original:{line:_.line,column:_.column},generated:{line:h.line,column:h.column},name:_.name})):h.column++}),this.walkSourceContents(function(v,_){p.setSourceContent(v,_)}),{code:h.code,map:p}},e.SourceNode=o})),Vl=pe((e=>{e.SourceMapGenerator=vn().SourceMapGenerator,e.SourceMapConsumer=ql().SourceMapConsumer,e.SourceNode=Fl().SourceNode})),zl=pe((e=>{e.__esModule=!0,e.safeJsonLiteral=o;var t=et(),s=/[\\x00-\\x1f\\\\"\\u2028\\u2029<\\ud800-\\udfff]/,r=/<(?=!--|\\/?script)/gi;function i(p){return p.replace(r,"\\\\u003C")}function n(p){return"\\\\u"+p.charCodeAt(0).toString(16)}function o(p){return i(JSON.stringify(p).replace(/\\u2028/g,"\\\\u2028").replace(/\\u2029/g,"\\\\u2029").replace(/[\\ud800-\\udfff]/g,n))}var c=void 0;try{(typeof define!="function"||!define.amd)&&(c=Vl().SourceNode)}catch{}c||(c=function(p,a,f,l){this.src="",l&&this.add(l)},c.prototype={add:function(a){t.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){t.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function u(p,a,f){if(t.isArray(p)){for(var l=[],d=0,g=p.length;d<g;d++)l.push(a.wrap(p[d],f));return l}else if(typeof p=="boolean"||typeof p=="number")return p+"";return p}function h(p){this.srcFile=p,this.source=[]}h.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,f){this.source.unshift(this.wrap(a,f))},push:function(a,f){this.source.push(this.wrap(a,f))},merge:function(){var a=this.empty();return this.each(function(f){a.add([" ",f,`\n`])}),a},each:function(a){for(var f=0,l=this.source.length;f<l;f++)a(this.source[f])},empty:function(){var a=this.currentLocation||{start:{}};return new c(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var f=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return a instanceof c?a:(a=u(a,this,f),new c(f.start.line,f.start.column,this.srcFile,a))},functionCall:function(a,f,l){return l=this.generateList(l),this.wrap([a,f?"."+f+"(":"(",l,")"])},quotedString:function(a){return a=a+"",s.test(a)?o(a):\'"\'+a+\'"\'},objectLiteral:function(a){var f=this,l=[];Object.keys(a).forEach(function(g){var v=u(a[g],f);v!=="undefined"&&l.push([f.quotedString(g),":",v])});var d=this.generateList(l);return d.prepend("{"),d.add("}"),d},generateList:function(a){for(var f=this.empty(),l=0,d=a.length;l<d;l++)l&&f.add(","),f.add(u(a[l],this));return f},generateArray:function(a){var f=this.generateList(a);return f.prepend("["),f.add("]"),f}},e.default=h})),Ul=pe(((e,t)=>{e.__esModule=!0;function s(f){return f&&f.__esModule?f:{default:f}}var r=Yr(),i=s(St()),n=et(),o=zl(),c=s(o);function u(f){this.value=f}function h(){}h.prototype={nameLookup:function(l,d){return this.internalNameLookup(l,d)},depthedLookup:function(l){return[this.aliasable("container.lookup"),"(depths, ",this.quotedString(l),")"]},compilerInfo:function(){var l=r.COMPILER_REVISION;return[l,r.REVISION_CHANGES[l]]},appendToBuffer:function(l,d,g){return n.isArray(l)||(l=[l]),l=this.source.wrap(l,d),this.environment.isSimple?["return ",l,";"]:g?["buffer += ",l,";"]:(l.appendToBuffer=!0,l)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(l,d){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",l,",",this.quotedString(d),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(l,d,g,v){this.environment=l,this.options=d,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(l,d),this.useDepths=this.useDepths||l.useDepths||l.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||l.useBlockParams;var _=l.opcodes,S=void 0,y=void 0,m=void 0,b=void 0;for(m=0,b=_.length;m<b;m++)S=_[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 P=this.context,I=P.programs,E=P.decorators;for(m=0,b=I.length;m<b;m++)w[m]=I[m],E[m]&&(w[m+"_d"]=E[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),d.srcName?(w=w.toStringWithSourceMap({file:d.destName}),w.map=w.map&&w.map.toString()):w=w.toString()),w},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(l){var d=this,g="",v=this.stackVars.concat(this.registers.list);v.length>0&&(g+=", "+v.join(", "));var _=0;Object.keys(this.aliases).forEach(function(m){var b=d.aliases[m];b.children&&b.referenceCount>1&&(g+=", alias"+ ++_+"="+m,b.children[0]="alias"+_)}),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 l?(S.push(y),Function.apply(this,S)):this.source.wrap(["function(",S.join(","),`) {\n `,y,"}"])},mergeSource:function(l){var d=this.environment.isSimple,g=!this.forceBuffer,v=void 0,_=void 0,S=void 0,y=void 0;return this.source.each(function(m){m.appendToBuffer?(S?m.prepend(" + "):S=m,y=m):(S&&(_?S.prepend("buffer += "):v=!0,y.add(";"),S=y=void 0),_=!0,d||(g=!1))}),g?S?(S.prepend("return "),y.add(";")):_||this.source.push(\'return "";\'):(l+=", buffer = "+(v?"":this.initializeBuffer()),S?(S.prepend("return buffer + "),y.add(";")):this.source.push("return buffer;")),l&&this.source.prepend("var "+l.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(l){var d=this.aliasable("container.hooks.blockHelperMissing"),g=[this.contextName(0)];this.setupHelperArgs(l,0,g);var v=this.popStack();g.splice(1,0,v),this.push(this.source.functionCall(d,"call",g))},ambiguousBlockValue:function(){var l=this.aliasable("container.hooks.blockHelperMissing"),d=[this.contextName(0)];this.setupHelperArgs("",0,d,!0),this.flushInline();var g=this.topStack();d.splice(1,0,g),this.pushSource(["if (!",this.lastHelper,") { ",g," = ",this.source.functionCall(l,"call",d),"}"])},appendContent:function(l){this.pendingContent?l=this.pendingContent+l:this.pendingLocation=this.source.currentLocation,this.pendingContent=l},append:function(){if(this.isInline())this.replaceStack(function(d){return[" != null ? ",d,\' : ""\']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var l=this.popStack();this.pushSource(["if (",l," != null) { ",this.appendToBuffer(l,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(l){this.lastContext=l},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(l,d,g,v){var _=0;!v&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(l[_++])):this.pushContext(),this.resolvePath("context",l,_,d,g)},lookupBlockParam:function(l,d){this.useBlockParams=!0,this.push(["blockParams[",l[0],"][",l[1],"]"]),this.resolvePath("context",d,1)},lookupData:function(l,d,g){l?this.pushStackLiteral("container.data(data, "+l+")"):this.pushStackLiteral("data"),this.resolvePath("data",d,0,!0,g)},resolvePath:function(l,d,g,v,_){var S=this;if(this.options.strict||this.options.assumeObjects){this.push(a(this.options.strict&&_,this,d,g,l));return}for(var y=d.length,m=function(k){S.replaceStack(function(w){var P=S.nameLookup(w,d[k],l);return v?[" && ",P]:[" != null ? ",P," : ",w]})},b=g;b<y;b++)m(b)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(l,d){this.pushContext(),this.pushString(d),d!=="SubExpression"&&(typeof l=="string"?this.pushString(l):this.pushStackLiteral(l))},emptyHash:function(l){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(l?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var l=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(l.ids)),this.stringParams&&(this.push(this.objectLiteral(l.contexts)),this.push(this.objectLiteral(l.types))),this.push(this.objectLiteral(l.values))},pushString:function(l){this.pushStackLiteral(this.quotedString(l))},pushLiteral:function(l){this.pushStackLiteral(l)},pushProgram:function(l){l!=null?this.pushStackLiteral(this.programExpression(l)):this.pushStackLiteral(null)},registerDecorator:function(l,d){var g=this.nameLookup("decorators",d,"decorator"),v=this.setupHelperArgs(d,l);this.decorators.push(["var decorator = ",g,";"]),this.decorators.push([\'if (typeof decorator !== "function") { throw new Error(\',this.quotedString(\'Missing decorator: "\'+d+\'"\'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",v])," || fn;"])},invokeHelper:function(l,d,g){var v=this.popStack(),_=this.setupHelper(l,d),S=[];g&&S.push(_.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",_.callParams);this.push(m)},itemsSeparatedBy:function(l,d){var g=[];g.push(l[0]);for(var v=1;v<l.length;v++)g.push(d,l[v]);return g},invokeKnownHelper:function(l,d){var g=this.setupHelper(l,d);this.push(this.source.functionCall(g.name,"call",g.callParams))},invokeAmbiguous:function(l,d){this.useRegister("helper");var g=this.popStack();this.emptyHash();var v=this.setupHelper(0,l,d),_=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",l,"helper")," || ",g,")"];this.options.strict||(_[0]="(helper = ",_.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",_,v.paramsInit?["),(",v.paramsInit]:[],"),","(typeof helper === ",this.aliasable(\'"function"\')," ? ",this.source.functionCall("helper","call",v.callParams)," : helper))"])},invokePartial:function(l,d,g){var v=[],_=this.setupParams(d,1,v);l&&(d=this.popStack(),delete _.name),g&&(_.indent=this.quotedString(g)),_.helpers="helpers",_.partials="partials",_.decorators="container.decorators",l?v.unshift(d):v.unshift(this.nameLookup("partials",d,"partial")),this.options.compat&&(_.depths="depths"),_=this.objectLiteral(_),v.push(_),this.push(this.source.functionCall("container.invokePartial","",v))},assignToHash:function(l){var d=this.popStack(),g=void 0,v=void 0,_=void 0;this.trackIds&&(_=this.popStack()),this.stringParams&&(v=this.popStack(),g=this.popStack());var S=this.hash;g&&(S.contexts[l]=g),v&&(S.types[l]=v),_&&(S.ids[l]=_),S.values[l]=d},pushId:function(l,d,g){l==="BlockParam"?this.pushStackLiteral("blockParams["+d[0]+"].path["+d[1]+"]"+(g?" + "+this.quotedString("."+g):"")):l==="PathExpression"?this.pushString(d):l==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:h,compileChildren:function(l,d){for(var g=l.children,v=void 0,_=void 0,S=0,y=g.length;S<y;S++){v=g[S],_=new this.compiler;var m=this.matchExistingProgram(v);if(m==null){var b=this.context.programs.push("")-1;v.index=b,v.name="program"+b,this.context.programs[b]=_.compile(v,d,this.context,!this.precompile),this.context.decorators[b]=_.decorators,this.context.environments[b]=v,this.useDepths=this.useDepths||_.useDepths,this.useBlockParams=this.useBlockParams||_.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(l){for(var d=0,g=this.context.environments.length;d<g;d++){var v=this.context.environments[d];if(v&&v.equals(l))return v}},programExpression:function(l){var d=this.environment.children[l],g=[d.index,"data",d.blockParams];return(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths"),"container.program("+g.join(", ")+")"},useRegister:function(l){this.registers[l]||(this.registers[l]=!0,this.registers.list.push(l))},push:function(l){return l instanceof u||(l=this.source.wrap(l)),this.inlineStack.push(l),l},pushStackLiteral:function(l){this.push(new u(l))},pushSource:function(l){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),l&&this.source.push(l)},replaceStack:function(l){var d=["("],g=void 0,v=void 0,_=void 0;if(!this.isInline())throw new i.default("replaceStack on non-inline");var S=this.popStack(!0);if(S instanceof u)g=[S.value],d=["(",g],_=!0;else{v=!0;var y=this.incrStack();d=["((",this.push(y)," = ",S,")"],g=this.topStack()}var m=l.call(this,g);_||this.popStack(),v&&this.stackSlot--,this.push(d.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 l=this.inlineStack;this.inlineStack=[];for(var d=0,g=l.length;d<g;d++){var v=l[d];if(v instanceof u)this.compileStack.push(v);else{var _=this.incrStack();this.pushSource([_," = ",v,";"]),this.compileStack.push(_)}}},isInline:function(){return this.inlineStack.length},popStack:function(l){var d=this.isInline(),g=(d?this.inlineStack:this.compileStack).pop();if(!l&&g instanceof u)return g.value;if(!d){if(!this.stackSlot)throw new i.default("Invalid stack pop");this.stackSlot--}return g},topStack:function(){var l=this.isInline()?this.inlineStack:this.compileStack,d=l[l.length-1];return d instanceof u?d.value:d},contextName:function(l){return this.useDepths&&l?"depths["+l+"]":"depth"+l},quotedString:function(l){return this.source.quotedString(l)},objectLiteral:function(l){return this.source.objectLiteral(l)},aliasable:function(l){var d=this.aliases[l];return d?(d.referenceCount++,d):(d=this.aliases[l]=this.source.wrap(l),d.aliasable=!0,d.referenceCount=1,d)},setupHelper:function(l,d,g){var v=[];return{params:v,paramsInit:this.setupHelperArgs(d,l,v,g),name:this.nameLookup("helpers",d,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(v)}},setupParams:function(l,d,g){var v={},_=[],S=[],y=[],m=!g,b=void 0;m&&(g=[]),v.name=this.quotedString(l),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 P=d;P--;)b=this.popStack(),g[P]=b,this.trackIds&&(y[P]=this.popStack()),this.stringParams&&(S[P]=this.popStack(),_[P]=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(_)),this.options.data&&(v.data="data"),this.useBlockParams&&(v.blockParams="blockParams"),v},setupHelperArgs:function(l,d,g,v){var _=this.setupParams(l,d,g);return _.loc=p(this),_=this.objectLiteral(_),v?(this.useRegister("options"),g.push("options"),["options=",_]):g?(g.push(_),""):_}},(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(" "),l=h.RESERVED_WORDS={},d=0,g=f.length;d<g;d++)l[f[d]]=!0})(),h.isValidJavaScriptVariableName=function(f){return!h.RESERVED_WORDS[f]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(f)};function p(f){var l=f.source.currentLocation;return l?o.safeJsonLiteral(l):"undefined"}function a(f,l,d,g,v){var _=l.popStack(),S=d.length;f&&S--;for(var y=g;y<S;y++)_=l.nameLookup(_,d[y],v);return f?[l.aliasable("container.strict"),"(",_,", ",l.quotedString(d[S]),", ",p(l)," )"]:_}e.default=h,t.exports=e.default})),Wl=pe(((e,t)=>{e.__esModule=!0;function s(l){return l&&l.__esModule?l:{default:l}}var r=s(Ll()),i=s(pn()),n=Ml(),o=Nl(),c=s(Ul()),u=s(dn()),h=s(hn()),p=r.default.create;function a(){var l=p();return l.compile=function(d,g){return o.compile(d,g,l)},l.precompile=function(d,g){return o.precompile(d,g,l)},l.AST=i.default,l.Compiler=o.Compiler,l.JavaScriptCompiler=c.default,l.Parser=n.parser,l.parse=n.parse,l.parseWithoutProcessing=n.parseWithoutProcessing,l}var f=a();f.create=a,h.default(f),f.Visitor=u.default,f.default=f,e.default=f,t.exports=e.default})),Qe=ua(Wl(),1),Gr={"=":"eq","==":"eq","!=":"ne",">":"gt","<":"lt",">=":"gte","<=":"lte"},Xl={"+":"add","-":"sub","*":"mul","/":"div","%":"mod"},Yl=["==","!=",">=","<=","&&","||","=",">","<","!","+","*","%","-","/"],Gl=["and","or","not"],yn=["true","false","null","undefined"],Zl=new Set([...` \\r\n!"\'()<>=&|{}~+*%`]),Zr=/^-?\\d+(\\.\\d+)?$/,Xe=class extends Error{};function Ql(e){const t=[];let s=0;for(;s<e.length;){const r=e[s];if(/\\s/.test(r)){s++;continue}if(r==="("||r===")"){t.push({type:r,text:r}),s++;continue}if(r===\'"\'||r==="\'"){let c=s+1;for(;c<e.length&&e[c]!==r;)e[c]==="\\\\"&&c++,c++;if(c>=e.length)throw new Xe("unterminated string");t.push({type:"value",text:e.slice(s,c+1)}),s=c+1;continue}const i=Yl.find(c=>e.startsWith(c,s)&&!(c==="-"&&/\\d/.test(e[s+1]??"")));if(i){t.push({type:"op",text:i}),s+=i.length;continue}let n=s;for(;n<e.length&&!Zl.has(e[n]);){if(e[n]==="["){const c=e.indexOf("]",n);if(c===-1)throw new Xe("missing \']\'");n=c}n++}if(n===s)throw new Xe(`unexpected \'${r}\'`);const o=e.slice(s,n);Gl.includes(o)?t.push({type:"op",text:o}):yn.includes(o)||Zr.test(o)?t.push({type:"value",text:o}):t.push({type:"ident",text:o}),s=n}return t}var Jl=class{constructor(e){this.tokens=e,this.pos=0,this.usedInfix=!1}peek(e=0){return this.tokens[this.pos+e]}next(){return this.tokens[this.pos++]}isOp(e,...t){return e?.type==="op"&&t.includes(e.text)}startsPrimary(e){return e?.type==="ident"||e?.type==="value"||e?.type==="("}describe(e){return e?`\'${e.text}\'`:"end of expression"}parseExpression(){const e=this.parseOr();if(this.peek())throw new Xe(`unexpected ${this.describe(this.peek())}`);return e}parseArguments(e){const t=[];for(let s=0;s<e;s++)t.push(this.parsePrimary());if(!this.peek())throw new Xe("expected a value");return t.push(this.parseExpression()),t}parseCondition(){const e=[this.parseOr()];for(;this.peek()?.type==="ident"&&this.isOp(this.peek(1),"=");)e.push(this.parseHashPair());if(this.peek())throw new Xe(`unexpected ${this.describe(this.peek())}`);return e}parseHashPair(){const e=this.next().text;return this.next(),{kind:"raw",text:`${e}=${ps(this.parsePrimary())}`}}parseOr(){return this.parseChain(["or","||"],"or",()=>this.parseAnd())}parseAnd(){return this.parseChain(["and","&&"],"and",()=>this.parseNot())}parseChain(e,t,s){const r=[s()];for(;this.isOp(this.peek(),...e);){const i=this.next().text;if(!this.peek())throw new Xe(`expected a value after \'${i}\'`);r.push(s())}return r.length===1?r[0]:(this.usedInfix=!0,{kind:"call",name:t,args:r})}parseNot(){if(this.isOp(this.peek(),"not","!")){const e=this.next().text;if(!this.peek())throw new Xe(`expected a value after \'${e}\'`);return this.usedInfix=!0,{kind:"call",name:"not",args:[this.parseNot()]}}return this.parseComparison()}parseComparison(){const e=this.parseAdditive(),t=this.peek();if(t?.type!=="op"||!(t.text in Gr))return e;if(this.next(),!this.peek())throw new Xe(`expected a value after \'${t.text}\'`);const s=this.parseAdditive(),r=this.peek();if(r?.type==="op"&&r.text in Gr)throw new Xe(`comparisons can\'t be chained (at \'${r.text}\'), use "and" to combine them`);return this.usedInfix=!0,{kind:"call",name:Gr[t.text],args:[e,s]}}parseAdditive(){return this.parseArithmetic(["+","-"],()=>this.parseMultiplicative())}parseMultiplicative(){return this.parseArithmetic(["*","/","%"],()=>this.parseUnary())}parseArithmetic(e,t){let s=t();for(;;){let r;const i=this.peek();if(this.isOp(i,...e)){if(r=this.next().text,!this.peek())throw new Xe(`expected a value after \'${r}\'`)}else if(e.includes("-")&&i?.type==="value"&&i.text.startsWith("-")&&Zr.test(i.text))r="-",this.tokens[this.pos]={type:"value",text:i.text.slice(1)};else return s;this.usedInfix=!0,s={kind:"call",name:Xl[r],args:[s,t()]}}}parseUnary(){if(this.isOp(this.peek(),"-")){if(this.next(),!this.peek())throw new Xe("expected a value after \'-\'");return this.usedInfix=!0,{kind:"call",name:"sub",args:[{kind:"raw",text:"0"},this.parseUnary()]}}return this.parsePrimary()}parsePrimary(){const e=this.peek();if(e?.type==="ident"||e?.type==="value")return this.next(),{kind:"raw",text:e.text};if(e?.type==="("){this.next();const t=this.isHelperCall()?this.parseHelperCall():this.parseOr();if(this.peek()?.type!==")")throw new Xe(`expected \')\' but found ${this.describe(this.peek())}`);return this.next(),t}if(this.isOp(e,"not","!")){const t=e?.text==="!"?"!value":"not value";throw new Xe(`\'${e?.text}\' must be inside parentheses here, e.g. (${t})`)}throw e?.type==="op"?new Xe(`expected a value before \'${e.text}\'`):new Xe(e?`unexpected ${this.describe(e)}`:"expected a value")}isHelperCall(){const e=this.peek(),t=this.peek(1);return this.isOp(e,"and","or")?!0:e?.type==="ident"&&this.startsPrimary(t)}parseHelperCall(){const e=this.next().text,t=[];for(;this.peek()&&this.peek()?.type!==")";)this.peek()?.type==="ident"&&this.isOp(this.peek(1),"=")?t.push(this.parseHashPair()):t.push(this.parsePrimary());return{kind:"call",name:e,args:t}}};function ps(e){return e.kind==="raw"?e.text:`(${e.name} ${e.args.map(ps).join(" ")})`}function er(e,t,s){const r=t==="display"||t==="value";let i=null,n=[];try{n=Ql(e)}catch(h){if(!r||!(h instanceof Xe))return null;i=h}const o=n.some(h=>h.type==="op"),c=new Jl(n);let u=[];if(!i)try{u=t==="condition"?c.parseCondition():t==="arguments"?c.parseArguments(1):[c.parseExpression()]}catch(h){if(!(h instanceof Xe)||!o&&!r)return null;i=h}if(i)throw new Error(`Invalid ${s} "${e.trim()}": ${i.message}`);return!c.usedInfix&&!r?null:u}function jl(e){const t=er(e,"condition","condition");return t&&t.map(ps).join(" ")}function Kl(e){const t=er(e,"arguments","expression");return t&&t.map(ps).join(" ")}function ec(e){const t=er(e,"display","expression")[0];if(t.kind==="call")return`${t.name} ${t.args.map(ps).join(" ")}`;if(yn.includes(t.text)||Zr.test(t.text)||/^["\']/.test(t.text))throw new Error(`Invalid expression "${e.trim()}": expected an attribute or a calculation`);return t.text}function tc(e){return ps(er(e,"value","expression")[0])}function sc(e){const t=[];let s=0,r=null,i=0;for(let n=0;n<e.length;n++){const o=e[n];r?o==="\\\\"?n++:o===r&&(r=null):o===\'"\'||o==="\'"?r=o:o==="("?s++:o===")"?s=Math.max(0,s-1):o===","&&s===0&&(t.push(e.slice(i,n)),i=n+1)}return t.push(e.slice(i)),t.map(n=>n.trim()).filter(n=>n!=="")}var Qr=/(\\\\*)\\{\\{(~?\\s*)(?:(#if|#unless|else\\s+if|else\\s+unless)(?=[\\s(!])|(set|inc|dec)(?=\\s)|(=))/g;function rc(e,t){let s=null;for(let r=t;r<e.length;r++){const i=e[r];if(s)i==="\\\\"?r++:i===s&&(s=null);else if(i===\'"\'||i==="\'")s=i;else{if(e.startsWith("~}}",r))return r;if(e.startsWith("}}",r))return r}}return-1}function ic(e){if(!e.includes("{{"))return e;let t="",s=0;Qr.lastIndex=0;let r;for(;(r=Qr.exec(e))!==null;){if(r[1].length%2===1)continue;const i=r.index+r[0].length,n=rc(e,i);if(n===-1)break;const o=e.slice(i,n);if(r[5]){const c=r.index+r[1].length;t+=e.slice(s,c)+"{{"+r[2]+ec(o),s=n}else{const c=r[3]?jl(o):Kl(o);c!==null&&(t+=e.slice(s,i)+" "+c,s=n)}Qr.lastIndex=n}return t+e.slice(s)}var Jr=e=>e==null||e===!1||e==="",jr=e=>typeof e=="number"||Jr(e)||typeof e=="string"&&e.trim()!==""&&!isNaN(Number(e));function qt(e,t){if(!jr(t))throw new Error(`"${e}" needs numbers, but was given ${JSON.stringify(t)}`);return Jr(t)?0:Number(t)}var nc=class{constructor(e,t,s){this.goto=null,this.expressionCache=new Map,this.getStory=e,this.state=t,this.getCurrentSection=s,this.handlebars=Qe.default.create(),this.handlebars.registerHelper("embed",u=>{const h=this.getCurrentSection();if(h.passages&&u in h.passages)return new Qe.default.SafeString(this.process(h.passages[u].text||"",!0));const p=this.getStory();if(u in p.sections)return new Qe.default.SafeString(this.process(p.sections[u].text||"",!0))}),this.handlebars.registerHelper("seen",u=>this.state.getSeen(u)),this.handlebars.registerHelper("visits",u=>this.state.getVisits(u)),this.handlebars.registerHelper("get",u=>this.state.get(u)),this.handlebars.registerHelper("at",u=>{const h=this.state.get("_section");return Array.isArray(u)?u.includes(h):h===u});const r=u=>u&&typeof u=="object"&&typeof u.toString=="function"&&!Array.isArray(u)?u.toString():u;this.handlebars.registerHelper("goto",(...u)=>{const h=u.pop(),p=u.length?r(u[0]):void 0;if(typeof p!="string"||!p||!(p in this.getStory().sections))return new Qe.default.SafeString(Es("Error in {{goto}}:",p===void 0?\'expected a section name, e.g. {{goto "cave"}}\':`there is no section called "${p}"`));let a=0;return h.hash.after!==void 0&&(a=Number(r(h.hash.after)),!Number.isFinite(a)||a<0)?new Qe.default.SafeString(Es("Error in {{goto}}:",`after= should be a number of milliseconds, e.g. after=3000, not "${h.hash.after}"`)):(this.goto??(this.goto={section:p,after:a}),"")}),this.handlebars.registerHelper("set",(u,h)=>(this.state.set(u,r(h)),"")),this.handlebars.registerHelper("__value",u=>(this.evaluated=r(u),"")),this.handlebars.registerHelper("unset",u=>(this.state.set(u,!1),""));const i=(u,h)=>{this.handlebars.registerHelper(u,(p,...a)=>{const f=a.length>1?qt(u,r(a[0])):1,l=qt(u,this.state.get(p));return this.state.set(p,l+h*f),""})};i("inc",1),i("dec",-1),this.handlebars.registerHelper("and",(...u)=>u.slice(0,-1).every(Boolean)),this.handlebars.registerHelper("or",(...u)=>u.slice(0,-1).some(Boolean)),this.handlebars.registerHelper("not",u=>!u),this.handlebars.registerHelper("eq",(u,h)=>u==h),this.handlebars.registerHelper("ne",(u,h)=>u!=h),this.handlebars.registerHelper("gt",(u,h)=>u>h),this.handlebars.registerHelper("lt",(u,h)=>u<h),this.handlebars.registerHelper("gte",(u,h)=>u>=h),this.handlebars.registerHelper("lte",(u,h)=>u<=h);const n=(u,h)=>{this.handlebars.registerHelper(u,(...p)=>{const a=p.slice(0,-1).map(r);if(a.length!==2)throw new Error(`"${u}" needs two values, but was given ${a.length}`);return h(qt(u,a[0]),qt(u,a[1]))})};this.handlebars.registerHelper("add",(...u)=>{const h=u.slice(0,-1).map(r);if(h.length!==2)throw new Error(`"add" needs two values, but was given ${h.length}`);const[p,a]=h;if(jr(p)&&jr(a))return qt("add",p)+qt("add",a);const f=l=>{if(Jr(l))return"";if(typeof l=="object")throw new Error(`"add" can\'t add ${Array.isArray(l)?"a list":"an object"}`);return String(l)};return f(p)+f(a)}),n("sub",(u,h)=>u-h),n("mul",(u,h)=>u*h),n("div",(u,h)=>{if(h===0)throw new Error("division by zero");return u/h}),n("mod",(u,h)=>{if(h===0)throw new Error("division by zero");return u%h}),this.handlebars.registerHelper("array",function(...u){return u.pop(),u}),this.handlebars.registerHelper("append",(u,h)=>{const p=this.state.get(u)||[],a=Array.isArray(p)?[...p]:[p],f=r(h);return Array.isArray(f)?a.push(...f.map(r)):a.push(f),this.state.set(u,a),""}),this.handlebars.registerHelper("prepend",(u,h)=>{const p=this.state.get(u)||[],a=Array.isArray(p)?[...p]:[p],f=r(h);return Array.isArray(f)?a.unshift(...f.map(r)):a.unshift(f),this.state.set(u,a),""}),this.handlebars.registerHelper("pop",u=>{const h=this.state.get(u)||[];if(!Array.isArray(h)||h.length===0)return"";const p=[...h],a=p.shift();return this.state.set(u,p),a}),this.handlebars.registerHelper("remove",(u,h)=>{const p=this.state.get(u)||[];if(!Array.isArray(p))return"";const a=r(h),f=p.findIndex(l=>r(l)===a);if(f!==-1){const l=[...p];l.splice(f,1),this.state.set(u,l)}return""}),this.handlebars.registerHelper("contains",(u,h)=>{let p;if(typeof u=="string"){const f=this.state.get(u);p=Array.isArray(f)?f:[]}else if(Array.isArray(u))p=u;else return!1;const a=r(h);return p.some(f=>r(f)===a)}),this.handlebars.registerHelper("length",u=>{let h;if(typeof u=="string"){const p=this.state.get(u);h=Array.isArray(p)?p:[]}else if(Array.isArray(u))h=u;else return 0;return h.length});const o=u=>String(u).replace(/&/g,"&amp;").replace(/"/g,"&quot;"),c=u=>{let h="";const p=u.hash.set||"";if(p){const a=this.getStory().expressions?sc(p):p.split(",").map(f=>f.trim());h+=` data-set="${o(JSON.stringify(a))}"`}return h};this.handlebars.registerHelper("section",(u,h)=>{const p=h.hash.text||u;return new Qe.default.SafeString(`<a class="squiffy-link link-section" data-section="${o(u)}"${c(h)} role="link" tabindex="0">${p}</a>`)}),this.handlebars.registerHelper("passage",(u,h)=>{const p=h.hash.text||u;return new Qe.default.SafeString(`<a class="squiffy-link link-passage" data-passage="${o(u)}"${c(h)} role="link" tabindex="0">${p}</a>`)})}evaluate(e){let t=this.expressionCache.get(e);return t||(t=this.handlebars.compile(`{{__value ${tc(e)}}}`),this.expressionCache.set(e,t)),this.evaluated=void 0,t(this.state.getStore()),this.evaluated}process(e,t){try{return e=this.handlebars.compile(ic(e))(this.state.getStore()),t?Wr(e,{async:!1}).trim():Xr(e,{async:!1}).trim()}catch(s){const r=s instanceof Error?s.message:String(s);return console.error("Squiffy template error:",r),Es("Template error:",r)}}};function Es(e,t){const s=r=>r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return`<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>${s(e)}</strong> ${s(t)}</div>`}var oc=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)}})}},ac=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=[]);const s=this.get("_visits")||{};s[e]=this.getVisitsFrom(s,t,e)+1,this.set("_visits",s),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}getVisits(e){return this.getVisitsFrom(this.get("_visits")||{},this.get("_seen_sections")||[],e)}getVisitsFrom(e,t,s){return Object.prototype.hasOwnProperty.call(e,s)?e[s]:t.indexOf(s)>-1?1:0}};function bn(e,t){return!e&&!t?!0:!e||!t||e.length!==t.length?!1:e.every((s,r)=>s===t[r])}function lc(e,t,s,r,i,n){function o(p){return p.replace(/\'/g,"\\\\\'")}function c(p){return s.querySelectorAll(`[data-source=\'[[${o(p)}]]\']`)}function u(p,a){return s.querySelectorAll(`[data-source=\'[[${o(p)}]][${o(a)}]\']`)}function h(p,a){const f=Array.from(p.querySelectorAll("a.link-passage.disabled")).map(l=>l.getAttribute("data-passage"));p.innerHTML=a;for(const l of f){const d=p.querySelector(`a.link-passage[data-passage="${l}"]`);d&&i(d)}}for(const p of Object.keys(e.sections)){const a=c(p);if(a.length){const f=t.sections[p];if(f){const l=e.sections[p],d=!bn(l.attributes,f.attributes),g=f.text!=l.text;if(d&&n(f.attributes||[]),g||d)for(const v of a)h(v,r(f.text||"",f))}else for(const l of a)l.closest(".squiffy-output-section")?.remove()}if(e.sections[p].passages)for(const f of Object.keys(e.sections[p].passages)){const l=u(p,f);if(!l.length)continue;const d=t.sections[p]?.passages&&t.sections[p]?.passages[f];if(d){const g=e.sections[p].passages[f],v=!bn(g.attributes,d.attributes),_=d.text!=g.text;if(v&&n(d.attributes||[]),_||v)for(const S of l)h(S,r(d.text||"",t.sections[p]))}else for(const g of l)g.closest(".squiffy-output-passage")?.remove()}}}var cc=class{constructor(e,t,s,r,i,n,o,c,u,h,p){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=c,this.animation=u,this.emitter=h,this.resolveAssetsInHtml=p}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,resolveAssetsInHtml:this.resolveAssetsInHtml,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 _n(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 uc(){return{name:"replaceLabel",init(e){e.registerHelper("label",function(t,s){return new Qe.default.SafeString(`<span class="squiffy-label-${t}">${s.fn(this)}</span>`)}),e.registerHelper("replace",function(t,s){const r=String(s.fn(this)),i=e.outputElement.querySelectorAll(`.squiffy-label-${t}`),n=i[i.length-1];if(n){const o=r.includes(`\n\n`)?Xr(r,{async:!1}).trim():Wr(r,{async:!1}).trim();e.addTransition(()=>_n(n,o))}return""})}}}function hc(){const e=i=>i.replace(/&/g,"&amp;").replace(/\'/g,"&#39;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=(i,n,o,c)=>{const u=o.map(l=>l.toString()),h=r(u,null),p=c.hash.set||"";p&&i.set(p,h[0]);const a=e(JSON.stringify(h.slice(1))||""),f=c.hash.show=="next"?h[1]:h[0];return new Qe.default.SafeString(`<a class="squiffy-link" data-handler="${n}" data-value="${e(h[0])}" data-show="${c.hash.show||""}" data-options=\'${a}\' data-attribute="${p}" role="link">${f}</a>`)},s=(i,n,o)=>{const c={},u=JSON.parse(n.getAttribute("data-options")??"[]")||[],h=r(u,o?n.getAttribute("data-value"):"");n.innerHTML=n.getAttribute("data-show")=="next"?h[1]:h[0],n.setAttribute("data-value",h[0]),n.setAttribute("data-options",JSON.stringify(h.slice(1))||""),h[1]||(c.disableLink=!0);const p=n.getAttribute("data-attribute");return p&&i.set(p,n.getAttribute("data-value")),window.getSelection()?.removeAllRanges(),c},r=(i,n)=>{const o=i[0],c=i.slice(1);return n&&c.push(n),[o,...c]};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 pc(){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 Qe.default.SafeString(i)})}}}function fc(){let e;return{name:"live",init(t){e=t,e.registerHelper("live",(r,i)=>{const n=i.hash.section||"";if(n)return new Qe.default.SafeString(`<span class="squiffy-live" data-attribute="${r}" data-section="${n}"></span>`);const o=i.hash.passage||"";return o?new Qe.default.SafeString(`<span class="squiffy-live" data-attribute="${r}" data-passage="${o}"></span>`):new Qe.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 c=o.innerHTML;let u="";if(o.dataset.section){const h=e.getSectionText(o.dataset.section);h&&(u=e.processText(h,!0))}else if(o.dataset.passage){const h=e.getPassageText(o.dataset.passage);h&&(u=e.processText(h,!0))}else u=r.value;c!==u&&i.push(_n(o,u))}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 dc(){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)continue;const o=n.content.includes(`\n\n`)?Xr(n.content,{async:!1}):Wr(n.content,{async:!1});if(i.innerHTML=e.resolveAssetsInHtml(o.trim()),!n.name)continue;const c=i.innerHTML;let u=[];const h=()=>{for(const f of u)e.animation.removeLinkAnimation(f);u=[...i.querySelectorAll("a")];for(const f of u)e.animation.addLinkAnimation(f,a)},p=()=>{if(n.trigger!=="link"){i.innerHTML=c;return}const f=u;i.innerHTML=c,h(),u.forEach((l,d)=>{const g=f[d];if(!g)return;g.classList.contains("disabled")&&l.classList.add("disabled");const v=g.getAttribute("tabindex");v!==null&&l.setAttribute("tabindex",v)})},a=()=>{n.loop?e.animation.runAnimation(n.name,i,n,()=>{},!0):(e.animation.isInitiallyHidden(n.name)&&(i.style.opacity="0"),e.addTransition(()=>new Promise(f=>{i.style.opacity="",e.animation.runAnimation(n.name,i,n,()=>{i.classList.remove("squiffy-animate"),p(),f()},!1)})))};n.trigger==="link"?h():a()}};return{name:"animate",init(r){e=r,e.registerHelper("animate",function(i,n){const o=n.fn(this),c={name:i,content:o,...n.hash},u=Object.entries(c).map(([p,a])=>` data-${Qe.default.escapeExpression(p)}="${Qe.default.escapeExpression(JSON.stringify(a))}"`).join(""),h=o.includes(`\n\n`)?"div":"span";return new Qe.default.SafeString(`<${h} class="squiffy-animate"${u}></${h}>`)})},onWrite(r){s(r)},onLoad(){s(e.outputElement)}}}var As={ReplaceLabel:uc,RotateSequencePlugin:hc,RandomPlugin:pc,LivePlugin:fc,AnimatePlugin:dc},gc=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,{}]}},Ct=typeof window<"u",tt=Ct?window:null,j=Ct?document:null,De={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},ye={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},lt={NONE:0,AUTO:1,FORCE:2},Ue={replace:0,none:1,blend:2},Sn=Symbol(),Jt=Symbol(),Kr=Symbol(),Ls=Symbol(),kn=Symbol(),Be=1e-11,kt=1e12,st=1e3,Qu="var(",tr=[],ei=(()=>{const e=new Map;return e.set("x","translateX"),e.set("y","translateY"),e.set("z","translateZ"),e})(),jt=["perspective","translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],wn=jt.reduce((e,t)=>({...e,[t]:t+"("}),{}),ae=()=>{},mc=e=>e,vc=/\\)\\s*[-.\\d]/,yc=/(^#([\\da-f]{3}){1,2}$)|(^#([\\da-f]{4}){1,2}$)/i,bc=/rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/i,_c=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,Sc=/hsl\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*\\)/i,kc=/hsla\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,xn=/[-+]?\\d*\\.?\\d+(?:e[-+]?\\d)?/gi,Tn=/^([-+]?\\d*\\.?\\d+(?:e[-+]?\\d+)?)([a-z]+|%)$/i,wc=/([a-z])([A-Z])/g,Cn=/(\\*=|\\+=|-=)/,xc=/var\\(\\s*(--[\\w-]+)(?:\\s*,\\s*([^)]+))?\\s*\\)/,Rs={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:st,delay:0,loopDelay:0,ease:"out(2)",composition:Ue.replace,modifier:mc,onBegin:ae,onBeforeUpdate:ae,onUpdate:ae,onLoop:ae,onPause:ae,onComplete:ae,onRender:ae},$e={current:null,root:j},z={defaults:Rs,precision:4,timeScale:1,tickThreshold:200,editor:null},Pn={version:"4.5.0",engine:null};Ct&&(tt.AnimeJS||(tt.AnimeJS=[]),tt.AnimeJS.push(Pn));var sr=e=>e.replace(wc,"$1-$2").toLowerCase(),qe=(e,t)=>e.indexOf(t)===0,Ft=Date.now,We=Array.isArray,Fe=e=>e&&e.constructor===Object,Ye=e=>typeof e=="number"&&!isNaN(e),Ve=e=>typeof e=="string",Oe=e=>typeof e=="function",$=e=>typeof e>"u",Kt=e=>$(e)||e===null,rr=e=>Ct&&e instanceof SVGElement,En=e=>yc.test(e),An=e=>qe(e,"rgb"),Ln=e=>qe(e,"hsl"),Tc=e=>En(e)||(An(e)||Ln(e))&&(e[e.length-1]===")"||!vc.test(e)),fs=e=>!z.defaults.hasOwnProperty(e),Cc=["opacity","rotate","overflow","color"],Pc=(e,t)=>{if(Cc.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}},es=e=>Ve(e)?parseFloat(e):e,ts=Math.pow,ft=Math.sqrt,ti=Math.sin,si=Math.cos,dt=Math.abs,ir=Math.exp,Ec=Math.ceil,ds=Math.floor,Ac=Math.asin,Rn=Math.max,nr=Math.atan2,Pt=Math.PI,ri=Math.round,Y=(e,t,s)=>e<t?t:e>s?s:e,F=(e,t)=>{if(t<0)return e;if(!t)return ri(e);const s=10**t;return ri(e*s)/s},ss=(e,t)=>We(t)?t.reduce((s,r)=>dt(r-e)<dt(s-e)?r:s):t?ri(e/t)*t:e,Vt=(e,t,s)=>s===1?t:s===0?e:e+(t-e)*s,or=e=>e===1/0?kt:e===-1/0?-kt:e,gs=e=>e<=1e-11?Be:or(F(e,11)),Je=e=>We(e)?[...e]:e,gt=(e,t)=>{const s={...e};for(let r in t){const i=e[r];s[r]=$(i)?t[r]:i}return s},Te=(e,t,s,r="_prev",i="_next")=>{let n=e._head,o=i;for(s&&(n=e._tail,o=r);n;){const c=n[o];t(n),n=c}},wt=(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},xt=(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},Lc=(e,t,s)=>{const r=e.style.transform;if(r){const i=e[Ls];let n=0;const o=r.length;let c;for(;n<o;){for(;n<o&&r.charCodeAt(n)===32;)n++;if(n>=o)break;const h=n;for(;n<o&&r.charCodeAt(n)!==40;)n++;if(n>=o)break;const p=r.substring(h,n);let a=1;const f=n+1;let l=-1,d=-1;for(n++;n<o&&a>0;){const v=r.charCodeAt(n);v===40?a++:v===41?a--:v===44&&a===1&&(l===-1?l=n:d===-1&&(d=n)),n++}const g=n-1;p==="translate"||p==="translate3d"?(l===-1?i.translateX=r.substring(f,g).trim():(i.translateX=r.substring(f,l).trim(),d===-1?i.translateY=r.substring(l+1,g).trim():(i.translateY=r.substring(l+1,d).trim(),i.translateZ=r.substring(d+1,g).trim())),c=r.substring(f,g)):p==="scale"||p==="scale3d"?l===-1?i.scale=r.substring(f,g).trim():(i.scaleX=r.substring(f,l).trim(),d===-1?i.scaleY=r.substring(l+1,g).trim():(i.scaleY=r.substring(l+1,d).trim(),i.scaleZ=r.substring(d+1,g).trim())):i[p]=r.substring(f,g)}if(t==="translate3d"&&c)return s&&(s[t]=c),c;const u=i[t];if(!$(u))return s&&(s[t]=u),u}return t==="translate3d"?"0px, 0px, 0px":t==="rotate3d"?"0, 0, 0, 0deg":qe(t,"scale")?"1":qe(t,"rotate")||qe(t,"skew")?"0deg":"0px"},In=e=>{let t="";for(let s=0,r=jt.length;s<r;s++){const i=jt[s],n=e[i];if(n!==void 0){if(i==="translateX"){const o=e.translateY;if(o!==void 0){const c=e.translateZ;c!==void 0?(t+=`translate3d(${n},${o},${c}) `,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 c=e.scaleZ;c!==void 0?(t+=`scale3d(${n},${o},${c}) `,s+=2):(t+=`scale(${n},${o}) `,s+=1);continue}}t+=`${wn[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},ii=[];function On(e,t){if(!e)return null;const s=ii.length;e:for(let r=0;r<s;r++){const i=ii[r];if(i.detect&&!i.detect(e))continue;const n=i.targetAdapters;for(let o=0,c=n.length;o<c;o++){const u=n[o];if(u.detect(e)){const h=u.props[t];if(h&&(!h.gate||h.gate(e)))return h;break e}}}for(let r=0;r<s;r++){const i=ii[r];if(i.detect&&!i.detect(e))continue;const n=i.propertyResolvers;for(let o=0,c=n.length;o<c;o++){const u=n[o](e,t);if(u)return u}}return null}var Rc=e=>{const t=bc.exec(e)||_c.exec(e),s=$(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],s]},Ic=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]},ni=(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),Oc=e=>{const t=Sc.exec(e)||kc.exec(e),s=+t[1]/360,r=+t[2]/100,i=+t[3]/100,n=$(t[4])?1:+t[4];let o,c,u;if(r===0)o=c=u=i;else{const h=i<.5?i*(1+r):i+r-i*r,p=2*i-h;o=F(ni(p,h,s+1/3)*255,0),c=F(ni(p,h,s)*255,0),u=F(ni(p,h,s-1/3)*255,0)}return[o,c,u,n]},Mc=e=>An(e)?Rc(e):En(e)?Ic(e):Ln(e)?Oc(e):[0,0,0,1],U=(e,t)=>$(e)?t:e,Mn=(e,t)=>{const s=e.match(xc),r=t[Jt]?t:document.documentElement;let i=getComputedStyle(r)?.getPropertyValue(s[1]);return(!i||i.trim()==="")&&s[2]&&(i=s[2].trim()),i||0},He=(e,t,s,r,i,n)=>{if(Oe(e)){if(!i){const c=e(t,s,r,n);return isNaN(+c)?c||0:+c}const o=()=>{const c=e(t,s,r,n);return isNaN(+c)?c||0:+c};return i.func=o,o()}if(Ve(e)&&qe(e,"var(")){if(!i)return Mn(e,t);const o=()=>Mn(e,t);return i.func=o,o()}return e},oi=(e,t)=>e[Jt]?e[Kr]&&Pc(e,t)?De.ATTRIBUTE:jt.includes(t)||ei.get(t)?De.TRANSFORM:qe(t,"--")?De.CSS_VAR:t in e.style?De.CSS:t in e?De.OBJECT:De.ATTRIBUTE:De.OBJECT,Nn=(e,t,s)=>{const r=e.style[t];r&&s&&(s[t]=r);const i=r||getComputedStyle(e[kn]||e).getPropertyValue(t);return i==="auto"?"0":i},rs=(e,t,s,r)=>{const i=$(s)?oi(e,t):s,n=On(e,t);if(n){const o=n.get(e);return o&&r&&(r[t]=o),o??0}if(i===De.OBJECT){const o=e[t];return o&&r&&(r[t]=o),o||0}if(i===De.ATTRIBUTE){const o=e.getAttribute(t);return o&&r&&(r[t]=o),o}return i===De.TRANSFORM?Lc(e,t,r):i===De.CSS_VAR?Nn(e,t,r).trimStart():Nn(e,t,r)},is=(e,t,s)=>s==="-"?e-t:s==="+"?e+t:e*t,ai=()=>({t:ye.NUMBER,n:0,u:null,o:null,d:null,s:null}),nt=(e,t)=>{if(t.t=ye.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:Tn.exec(r);if(i)return t.t=ye.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(Tc(r))return t.t=ye.COLOR,t.d=Mc(r),t;{const n=r.match(xn);return t.t=ye.COMPLEX,t.d=n?n.map(Number):[],t.s=r.split(xn)||[],t}},Dn=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=Je(e._toNumbers),t.s=Je(e._strings),t),Ge=ai(),Bn=(e,t,s)=>{const r=e._modifier,i=e._fromNumbers,n=e._toNumbers,o=e._strings;let c=o[0];for(let u=0,h=n.length;u<h;u++){const p=r(F(Vt(i[u],n[u],t),s)),a=o[u+1];c+=`${a?p+a:p}`,e._numbers[u]=p}return c},ar=(e,t,s,r,i)=>{const n=e.parent,o=e.duration,c=e.completed,u=e.iterationDuration,h=e.iterationCount,p=e._currentIteration,a=e._loopDelay,f=e._reversed,l=e._alternate,d=e._hasChildren,g=e._delay,v=e._currentTime,_=g+u,S=t-g,y=Y(v,-g,o),m=Y(S,-g,o),b=S-v,k=m>0,w=m>=o,P=o<=Be,I=i===lt.FORCE;let E=0,A=S,C=0;if(h>1){const N=u+(w?0:a),R=~~(m/N);e._currentIteration=Y(R,0,h),w&&e._currentIteration--,E=e._currentIteration%2,A=m-R*N||0}const B=f^(l&&E),D=e._ease;let V=w?B?0:o:B?u-A:A;D&&(V=u*D(V/u)||0);const x=(n?n.backwards:S<v)?!B:!!B;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&&!d&&k&&e._currentIteration!==p&&e.onLoop(e),I||i===lt.AUTO&&(t>=(n&&g>0?0:g)&&t<=_||t<=g&&y>g||t>=_&&y!==o)||V>=_&&y!==o||V<=g&&y>0&&!w||t<=y&&y===o&&c||w&&!c&&P){if(k&&(e.computeDeltaTime(y),s||e.onBeforeUpdate(e)),!d){const N=I||(x?b*-1:b)>=z.tickThreshold,R=F(e._offset+(n?n._offset:0)+g+V,12);let L=e._head,q,K,G,W,te=0;for(;L;){const ne=L._composition,ue=L._currentTime,he=L._changeDuration,ge=L._absoluteStartTime+L._changeDuration,oe=L._nextRep,Z=L._prevRep,le=ne!==Ue.none,Ee=Z?Z._absoluteStartTime+Z._changeDuration:0,be=Z&&Z.parent!==L.parent,Pe=!oe||oe._isOverridden?ge:oe.parent===L.parent?ge+oe._delay:oe._absoluteStartTime<oe._absoluteUpdateStartTime?oe._absoluteStartTime:oe._absoluteUpdateStartTime;if((N||(ue!==he||R<=Pe||Z&&!be&&(!oe||oe.parent!==L.parent))&&(ue!==0||R>=L._absoluteStartTime||be&&!L._hasFromValue&&!Z._isOverridden&&R>=Ee||oe&&!oe._isOverridden&&oe.parent===L.parent&&oe._currentTime!==0&&V<oe._startTime))&&(!Z||be||V>=L._startTime)&&(!le||!L._isOverridden&&(!L._isOverlapped||R<=ge)&&(!oe||oe._isOverridden||R<=Pe)&&(!Z||Z._isOverridden||(be?R>=L._absoluteStartTime||!L._hasFromValue&&R>=Ee:R>=Ee+L._delay)))){const Ie=L._currentTime=Y(V-L._startTime,0,he),_e=L._ease(Ie/L._updateDuration),ee=L._modifier,Ce=L._valueType,de=L._tweenType,me=de===De.OBJECT,re=Ce===ye.NUMBER,ke=re&&me||_e===0||_e===1?-1:z.precision;let Se,Ae;if(re)Se=Ae=ee(F(Vt(L._fromNumber,L._toNumber,_e),ke));else if(Ce===ye.UNIT)Ae=ee(F(Vt(L._fromNumber,L._toNumber,_e),ke)),Se=`${Ae}${L._unit}`;else if(Ce===ye.COLOR){const M=L._numbers,X=L._fromNumbers,Q=L._toNumbers,se=1-_e,Me=X[0],Ne=X[1],yt=X[2],At=Q[0],Lt=Q[1],je=Q[2];M[0]=ee(Math.sqrt(Me*Me*se+At*At*_e)),M[1]=ee(Math.sqrt(Ne*Ne*se+Lt*Lt*_e)),M[2]=ee(Math.sqrt(yt*yt*se+je*je*_e)),M[3]=ee(Vt(X[3],Q[3],_e)),(!L._setter||r)&&(Se=`rgba(${F(M[0],0)},${F(M[1],0)},${F(M[2],0)},${M[3]})`)}else Ce===ye.COMPLEX&&(Se=Bn(L,_e,ke));if(le&&(L._number=Ae),!r&&ne!==Ue.blend){const M=L.property;q=L.target,L._setter?L._setter(q,Ae,L):me?q[M]=Se:de===De.ATTRIBUTE?q.setAttribute(M,Se):(K=q.style,de===De.TRANSFORM?(q!==G&&(G=q,W=q[Ls]),W[M]=Se,te=1):de===De.CSS?K[M]=Se:de===De.CSS_VAR&&K.setProperty(M,Se)),k&&(C=1)}else L._value=Se}else ue&&Z&&!be&&V<L._startTime&&(L._currentTime=0);te&&L._renderTransforms&&(K.transform=In(W),te=0),L=L._next}!s&&C&&e.onRender(e)}!s&&k&&e.onUpdate(e)}return n&&P?!s&&(n.began&&!x&&S>0&&!c||x&&S<=1e-11&&c)&&(e.onComplete(e),e.completed=!x):k&&w?h===1/0?e._startTime+=e.duration:e._currentIteration>=h-1&&(e.paused=!0,!c&&!d&&(e.completed=!0,!s&&!(n&&(x||!n.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,C},ns=(e,t,s,r,i)=>{const n=e._currentIteration;if(ar(e,t,s,r,i),e._hasChildren){const o=e,c=o.backwards,u=r?t:o._iterationTime,h=Ft();let p=0,a=!0;if(!r&&o._currentIteration!==n){const f=o.iterationDuration;Te(o,l=>{if(!c)!l.completed&&!l.backwards&&l._currentTime<l.iterationDuration&&ar(l,f,s,1,lt.FORCE),l.began=!1,l.completed=!1;else{const d=l.duration,g=l._offset+l._delay,v=g+d;!s&&d<=1e-11&&(!g||v===f)&&l.onComplete(l)}}),s||o.onLoop(o)}Te(o,f=>{const l=F((u-f._offset)*f._speed,12);if(c&&l>f._delay+f.duration)return;const d=f._fps<o._fps?f.requestTick(h):i;p+=ar(f,l,s,r,d),!f.completed&&a&&(a=!1)},c),!s&&p&&o.onRender(o),(a||c)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},$n={},li=(e,t,s)=>{if(s===De.TRANSFORM){const r=ei.get(e);return r||e}else if(s===De.CSS||s===De.ATTRIBUTE&&rr(t)&&e in t.style){const r=$n[e];if(r)return r;{const i=e&&sr(e);return $n[e]=i,i}}else return e},lr=(e,t=!1)=>{if(e._hasChildren)Te(e,s=>lr(s,t),!0);else{const s=e;s.pause(),Te(s,r=>{const i=r.property,n=r.target,o=r._tweenType,c=r._inlineValue,u=Kt(c)||c==="";if(r._setter){if(!t&&!u){if(nt(c,Ge),Ge.d){const h=Ge.d,p=r._numbers;for(let a=0,f=h.length;a<f;a++)p[a]=h[a]}else r._number=Ge.n;r._setter(r.target,r._number,r)}}else if(o===De.OBJECT)!t&&!u&&(n[i]=c);else if(n[Jt])if(o===De.ATTRIBUTE)t||(u?n.removeAttribute(i):n.setAttribute(i,c));else{const h=n.style;if(o===De.TRANSFORM){const p=n[Ls];u?delete p[i]:p[i]=c,r._renderTransforms&&(Object.keys(p).length?h.transform=In(p):h.removeProperty("transform"))}else u?h.removeProperty(sr(i)):h[i]=c}n[Jt]&&s._tail===r&&s.targets.forEach(h=>{h.getAttribute&&h.getAttribute("style")===""&&h.removeAttribute("style")})})}return e},Hn=e=>lr(e,!0),qn=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=st/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?Be:t,r=st/s;s>Rs.frameRate&&(Rs.frameRate=s),this._fps=s,this._frameDuration=r}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<1e-11?Be:t}requestTick(e){const t=this._frameDuration,s=e-this._lastTickTime,r=t*.25;return s+(r<4?r:4)<t?lt.NONE:(this._lastTickTime=s>=t?e-s%t:e,lt.AUTO)}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},ms={animation:null,update:ae},Nc=e=>{let t=ms.animation;return t||(t={duration:Be,computeDeltaTime:ae,_offset:0,_delay:0,_head:null,_tail:null},ms.animation=t,ms.update=()=>{e.forEach(s=>{for(let r in s){const i=s[r],n=i._head;if(n){const o=n._valueType,c=o===ye.COMPLEX||o===ye.COLOR?Je(n._fromNumbers):null;let u=n._fromNumber,h=i._tail;for(;h&&h!==n;){if(c)for(let p=0,a=h._numbers.length;p<a;p++)c[p]+=h._numbers[p];else u+=h._number;h=h._prevAdd}n._toNumber=u,n._toNumbers=c}}}),ar(t,1,1,0,lt.FORCE)}),t},Fn=Ct?requestAnimationFrame:setImmediate,Dc=Ct?cancelAnimationFrame:clearImmediate,Bc=class extends qn{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Rs,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=Ft();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?(wt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):ns(r,(e-r._startTime)*r._speed*t,0,0,r._fps<s?r.requestTick(e):lt.AUTO),r=i}ms.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(Ft()),this.reqId=Fn(Vn)),this}pause(){if(this.reqId)return this.paused=!0,$c()}resume(){if(this.paused)return this.paused=!1,Te(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(z.timeScale===1?1:st)}set speed(e){const t=e*z.timeScale;this._speed!==t&&(this._speed=t,Te(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:st;this.defaults.duration*=i,this._speed*=i}}get precision(){return z.precision}set precision(e){z.precision=e}},Ze=(()=>{const e=new Bc(Ft());return Ct&&(Pn.engine=e,j.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(j.hidden?e.pause():e.resume())})),e})(),Vn=()=>{Ze._head?(Ze.reqId=Fn(Vn),Ze.update()):Ze.reqId=0},$c=()=>(Dc(Ze.reqId),Ze.reqId=0,Ze),cr={_rep:new WeakMap,_add:new Map},ci=(e,t,s="_rep")=>{const r=cr[s];let i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},Hc=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,ur=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=Be,e._currentTime=Be},zn=(e,t)=>{const s=e._composition;if(s===Ue.replace){const r=e._absoluteStartTime;xt(t,e,Hc,"_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){ur(i);let h=i._prevRep;for(;h&&h.parent.id===n.id;)ur(h),h=h._prevRep}const c=e._absoluteUpdateStartTime;if(o>c){const h=i._startTime,p=o-(h+i._updateDuration),a=F(c-p-h,12);i._changeDuration=a,i._currentTime=a,i._isOverlapped=1,a<1e-11&&ur(i)}const u=e.parent.parent;if(!u||u!==n.parent){let h=!0;if(Te(n,p=>{p._isOverlapped||(h=!1)}),h){const p=n.parent;if(p){let a=!0;Te(p,f=>{f!==n&&Te(f,l=>{l._isOverlapped||(a=!1)})}),a&&p.cancel()}else n.cancel()}}}}else if(s===Ue.blend){const r=ci(e.target,e.property,"_add"),i=Nc(cr._add);let n=r._head;n||(n={...e},n._composition=Ue.replace,n._updateDuration=Be,n._startTime=0,n._numbers=Je(e._fromNumbers),n._number=0,n._next=null,n._prev=null,xt(r,n),xt(i,n));const o=e._toNumber;if(e._fromNumber=n._fromNumber-o,e._toNumber=0,e._numbers=Je(e._fromNumbers),e._number=0,n._fromNumber=o,e._toNumbers.length){const c=Je(e._toNumbers);c.forEach((u,h)=>{e._fromNumbers[h]=n._fromNumbers[h]-u,e._toNumbers[h]=0}),n._fromNumbers=c}xt(r,e,null,"_prevAdd","_nextAdd")}return e},Un=e=>{const t=e._composition;if(t!==Ue.none){const s=e.target,r=e.property,i=cr._rep.get(s)[r];if(wt(i,e,"_prevRep","_nextRep"),t===Ue.blend){const n=cr._add,o=n.get(s);if(!o)return;const c=o[r],u=ms.animation;wt(c,e,"_prevAdd","_nextAdd");const h=c._head;if(h&&h===c._tail){wt(c,h,"_prevAdd","_nextAdd"),wt(u,h);let p=!0;for(let a in o)if(o[a]._head){p=!1;break}p&&n.delete(s)}}}return e},Wn=(e,t,s)=>{let r=!1;return Te(t,i=>{const n=i.target;if(e.includes(n)){const o=i.property,c=i._tweenType,u=li(s,n,c);(!u||u&&u===o)&&(i.parent._tail===i&&i._tweenType===De.TRANSFORM&&i._prev&&i._prev._tweenType===De.TRANSFORM&&(i._prev._renderTransforms=1),wt(t,i),Un(i),r=!0)}},!0),r},Ot=(e,t,s)=>{const r=t||Ze;let i;if(r._hasChildren){let n=0;Te(r,o=>{if(!o._hasChildren)if(i=Wn(e,o,s),i&&!o._head)o.cancel(),wt(r,o);else{const c=o._offset+o._delay+o.duration;c>n&&(n=c)}o._head?Ot(e,o,s):o._hasChildren=!1},!0),$(r.iterationDuration)||(r.iterationDuration=n)}else i=Wn(e,r,s);i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())},Xn=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),ui=e=>(e._cancelled&&(e._hasChildren?Te(e,ui):Te(e,t=>{t._composition!==Ue.none&&zn(t,ci(t.target,t.property))}),e._cancelled=0),e),Yn=0,qc=(e,t)=>e._priority>t._priority,ct=class extends qn{constructor(e={},t=null,s=0){super(0),++Yn;const{id:r,delay:i,duration:n,reversed:o,alternate:c,loop:u,loopDelay:h,autoplay:p,frameRate:a,playbackRate:f,priority:l,onComplete:d,onLoop:g,onPause:v,onBegin:_,onBeforeUpdate:S,onUpdate:y}=e;$e.current&&$e.current.register(this);const m=t?0:Ze._lastTickTime,b=t?t.defaults:z.defaults,k=Oe(i)||$(i)?b.delay:+i,w=Oe(n)||$(n)?1/0:+n,P=U(u,b.loop),I=U(h,b.loopDelay);let E=P===!0||P===1/0||P<0?1/0:P+1,A=0;t?A=s:(Ze.reqId||Ze.requestTick(Ft()),A=(Ze._lastTickTime-Ze._startTime)*z.timeScale),this.id=$(r)?Yn:r,this.parent=t,this.duration=or((w+I)*E-I)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||b.onBegin,this.onBeforeUpdate=S||b.onBeforeUpdate,this.onUpdate=y||b.onUpdate,this.onLoop=g||b.onLoop,this.onPause=v||b.onPause,this.onComplete=d||b.onComplete,this.iterationDuration=w,this.iterationCount=E,this._autoplay=t?!1:U(p,b.autoplay),this._offset=A,this._delay=k,this._loopDelay=I,this._iterationTime=0,this._currentIteration=0,this._resolve=ae,this._running=!1,this._reversed=+U(o,b.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=U(c,b.alternate),this._prev=null,this._next=null,this._lastTickTime=m,this._startTime=m,this._lastTime=m,this._fps=U(a,b.frameRate),this._speed=U(f,b.playbackRate),this._priority=+U(l,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Y(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 Y(F(this._iterationTime,z.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Y(F(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Y(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*Y(+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 ui(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,ns(this,0,1,~~e,lt.FORCE),Xn(this),this._hasChildren&&Te(this,Xn),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&ns(this,this.duration,1,~~e,lt.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!$(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Ze._speed);return this._startTime=Ft()-(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?ns(this,Be,0,0,lt.FORCE):(this._running||(xt(Ze,this,qc),Ze._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Ze.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,s=0){ui(this),this.completed=!1;const r=this.paused;return this.paused=!0,ns(this,e+this._delay,~~t,~~s,lt.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,s=this.iterationDuration,r=t===1/0?ds(kt/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?Te(this,e=>e.cancel(),!0):Te(this,Un),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,s=gs(e);if(t===s)return this;const r=e/t,i=e<=Be;return this.duration=i?Be:s,this.iterationDuration=i?Be:gs(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){ns(this,0,1,0,lt.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))}},Fc=e=>new ct(e,null,0).init();function hi(e){const t=Ve(e)?$e.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function ut(e){if(Kt(e))return[];if(!Ct)return We(e)&&e.flat(1/0)||[e];if(We(e)){const s=e.flat(1/0),r=[];for(let i=0,n=s.length;i<n;i++){const o=s[i];if(!Kt(o)){const c=hi(o);if(c)for(let u=0,h=c.length;u<h;u++){const p=c[u];if(!Kt(p)){let a=!1;for(let f=0,l=r.length;f<l;f++)if(r[f]===p){a=!0;break}a||r.push(p)}}else{let u=!1;for(let h=0,p=r.length;h<p;h++)if(r[h]===o){u=!0;break}u||r.push(o)}}}return r}const t=hi(e);return t?Array.from(t):[e]}function zt(e){const t=ut(e),s=t.length;for(let r=0;r<s;r++){const i=t[r];if(!i[Sn]){i[Sn]=!0;const n=rr(i);(i.nodeType||n)&&(i[Jt]=!0,i[Kr]=n,i[Ls]={})}}return t}var pi={deg:1,rad:180/Pt,turn:360},Gn={},hr=(e,t,s,r=!1)=>{const i=t.u,n=t.n;if(t.t===ye.UNIT&&i===s)return t;const o=n+i+s,c=Gn[o];if(!$(c)&&!r)t.n=c;else{let u;if(i in pi)u=n*pi[i]/pi[s];else{const p=e.cloneNode(),a=e.parentNode,f=a&&a!==j?a:j.body;f.appendChild(p);const l=p.style;l.width=100+i;const d=p.offsetWidth||100;l.width=100+s;const g=d/(p.offsetWidth||100);f.removeChild(p),u=g*n}t.n=u,Gn[o]=u}return t.t,ye.UNIT,t.u=s,t},ht=e=>e,Is=(e=1.68)=>t=>ts(t,+e),fi={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},Vc=Pt/2,Zn=Pt*2,Qn={"":Is,Quad:Is(2),Cubic:Is(3),Quart:Is(4),Quint:Is(5),Sine:e=>1-si(e*Vc),Circ:e=>1-ft(1-e*e),Expo:e=>e?ts(2,10*e-10):0,Bounce:e=>{let t,s=4;for(;e<((t=ts(2,--s))-1)/11;);return 1/ts(4,3-s)-7.5625*ts((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=Y(+e,1,10),r=Y(+t,Be,2),i=r/Zn*Ac(1/s),n=Zn/r;return o=>o===0||o===1?o:-s*ts(2,-10*(1-o))*ti((1-o-i)*n)}},Mt=(()=>{const e={linear:ht,none:ht};for(let t in fi)for(let s in Qn){const r=Qn[s],i=fi[t];e[t+s]=s===""||s==="Back"||s==="Elastic"?(n,o)=>i(r(n,o)):i(r)}return e})(),pr={linear:ht,none:ht},Jn=e=>{if(pr[e])return pr[e];if(e.indexOf("(")<=-1){const t=fi[e]||e.includes("Back")||e.includes("Elastic")?Mt[e]():Mt[e];return t?pr[e]=t:ht}else{const t=e.slice(0,-1).split("("),s=Mt[t[0]];return s?pr[e]=s(...t[1].split(",")):ht}},jn=["steps(","irregular(","linear(","cubicBezier("],Nt=e=>{if(Ve(e)){for(let t=0,s=jn.length;t<s;t++)if(qe(e,jn[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}\\``),ht}return Oe(e)?e:Ve(e)?Jn(e):ht},ie=ai(),fe=ai(),vs={},fr={func:null},dr={func:null},gr=[null],ys=[null,null],mr={to:null},zc=0,Kn=0,Ut,Et,Uc=(e,t)=>{const s={};if(We(e)){const r=[].concat(...e.map(i=>Object.keys(i))).filter(fs);for(let i=0,n=r.length;i<n;i++){const o=r[i];s[o]=e.map(c=>{const u={};for(let h in c){const p=c[h];fs(h)?h===o&&(u.to=p):u[h]=p}return u})}}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 c in o)if(fs(c)){let u=s[c];u||(u=s[c]=[]);const h=n*r;let p=u.length,a=u[p-1];const f={to:o[c]};let l=0;for(let d=0;d<p;d++)l+=u[d].duration;p===1&&(f.from=a.to),o.ease&&(f.ease=o.ease),f.duration=h-(p?l:0),u.push(f)}return i});for(let i in s){const n=s[i];let o;for(let c=0,u=n.length;c<u;c++){const h=n[c],p=h.ease;h.ease=o||void 0,o=p}n[0].duration||n.shift()}}return s},Dt=class extends ct{constructor(e,t,s,r,i=!1,n=0,o){super(t,s,r),this._head,this._tail,++Kn;const c=zt(e),u=c.length,h=t.keyframes,p=h?gt(Uc(h,t),t):t,{id:a,delay:f,duration:l,ease:d,playbackEase:g,modifier:v,composition:_,onRender:S}=p,y=s?s.defaults:z.defaults,m=U(d,y.ease),b=U(g,y.playbackEase),k=b?Nt(b):null,w=!$(m.ease),P=w?m.ease:U(d,k?"linear":y.ease),I=w?m.settlingDuration:U(l,y.duration),E=U(f,y.delay),A=v||y.modifier,C=$(_)&&u>=1e3?Ue.none:$(_)?y.composition:_,B=this._offset+(s?s._offset:0);w&&(m.parent=this);let D=NaN,V=NaN,x=0,N=0;for(let R=0;R<u;R++){const L=c[R],q=n||R,K=o||c;let G=NaN,W=NaN;for(let te in p)if(fs(te)){const ne=oi(L,te),ue=On(L,te),he=li(te,L,ne);let ge=p[te];const oe=We(ge);if(i&&!oe&&(ys[0]=ge,ys[1]=ge,ge=ys),oe){const Ie=ge.length,_e=!Fe(ge[0]);Ie===2&&_e?(mr.to=ge,gr[0]=mr,Ut=gr):Ie>2&&_e?(Ut=[],ge.forEach((ee,Ce)=>{Ce?Ce===1?(ys[1]=ee,Ut.push(ys)):Ut.push(ee):ys[0]=ee})):Ut=ge}else gr[0]=ge,Ut=gr;let Z=null,le=null,Ee=NaN,be=0,Pe=0;for(let Ie=Ut.length;Pe<Ie;Pe++){const _e=Ut[Pe];Fe(_e)?Et=_e:(mr.to=_e,Et=mr),fr.func=null,dr.func=null;const ee=He(U(Et.composition,C),L,q,K,null,null),Ce=Ye(ee)?ee:Ue[ee];!Z&&Ce!==Ue.none&&(Z=ci(L,he));const de=Z?Z._tail:null,me=s&&de&&de.parent.parent===s?de:le,re=He(Et.to,L,q,K,fr,me);let ke;Fe(re)&&!$(re.to)?(Et=re,ke=re.to):ke=re;const Se=He(Et.from,L,q,K,dr,me),Ae=Et.ease||P,M=He(Ae,L,q,K,null,me),X=Oe(M)||Ve(M)?M:Ae,Q=!$(X)&&!$(X.ease),se=Q?X.ease:X,Me=Q?X.settlingDuration:He(U(Et.duration,Ie>1?He(I,L,q,K,null,me)/Ie:I),L,q,K,null,me),Ne=He(U(Et.delay,Pe?0:E),L,q,K,null,me),yt=Et.modifier||A,At=!$(Se),Lt=!$(ke),je=We(ke),T=je||At&&Lt,O=le?be:0,H=le?be+Ne:Ne,J=F(B+H,12),we=F(B+O,12);!N&&(At||je)&&(N=1);let ve=le;if(Ce!==Ue.none){let xe=Z._head;for(;xe&&xe._absoluteStartTime<=J;)if(xe._isOverridden||(ve=xe),xe=xe._nextRep,xe&&xe._absoluteStartTime>=J)for(;xe;)ur(xe),xe=xe._nextRep}if(T){nt(je?He(ke[0],L,q,K,dr,me):Se,ie),nt(je?He(ke[1],L,q,K,fr,me):ke,fe);const xe=rs(L,he,ne,vs);ie.t===ye.NUMBER&&(ve?ve._valueType===ye.UNIT&&(ie.t=ye.UNIT,ie.u=ve._unit):(nt(xe,Ge),Ge.t===ye.UNIT&&(ie.t=ye.UNIT,ie.u=Ge.u)))}else Lt?nt(ke,fe):le?Dn(le,fe):nt(s&&ve&&ve.parent.parent===s?ve._value:rs(L,he,ne,vs),fe),At?nt(Se,ie):le?Dn(le,ie):nt(s&&ve&&ve.parent.parent===s?ve._value:rs(L,he,ne,vs),ie);if(ie.o&&(ie.n=is(ve?ve._toNumber:nt(rs(L,he,ne,vs),Ge).n,ie.n,ie.o)),fe.o&&(fe.n=is(ie.n,fe.n,fe.o)),ie.t!==fe.t){if(ie.t===ye.COMPLEX||fe.t===ye.COMPLEX){const xe=ie.t===ye.COMPLEX?ie:fe,it=ie.t===ye.COMPLEX?fe:ie;it.t=ye.COMPLEX,it.s=Je(xe.s),it.d=xe.d.map(()=>it.n)}else if(ie.t===ye.UNIT||fe.t===ye.UNIT){const xe=ie.t===ye.UNIT?ie:fe,it=ie.t===ye.UNIT?fe:ie;it.t=ye.UNIT,it.u=xe.u}else if(ie.t===ye.COLOR||fe.t===ye.COLOR){const xe=ie.t===ye.COLOR?ie:fe,it=ie.t===ye.COLOR?fe:ie;it.t=ye.COLOR,it.d=xe.d.map(()=>0)}}if(ie.u!==fe.u){let xe=fe.u?ie:fe;xe=hr(L,xe,fe.u?fe.u:ie.u,!1)}if(fe.d&&ie.d&&fe.d.length!==ie.d.length){const xe=ie.d.length>fe.d.length?ie:fe,it=xe===ie?fe:ie;it.d=xe.d.map((Ju,ia)=>$(it.d[ia])?0:it.d[ia]),it.s=Je(xe.s)}const $t=F(+Me||1e-11,12);let Rt=vs[he];Kt(Rt)||(vs[he]=null);const Di=ue?ue.set:null;be=F(H+$t,12);const os=ie.d,Ke=fe.d,ra=fe.s,pt={parent:this,id:zc++,property:he,target:L,_value:null,_toFunc:fr.func,_fromFunc:dr.func,_ease:Nt(se),_fromNumbers:os?Je(os):tr,_toNumbers:Ke?Je(Ke):tr,_strings:ra?Je(ra):tr,_fromNumber:ie.n,_toNumber:fe.n,_numbers:os?Je(os):tr,_number:ie.n,_unit:fe.u,_modifier:yt,_currentTime:0,_startTime:H,_delay:+Ne,_updateDuration:$t,_changeDuration:$t,_absoluteStartTime:J,_absoluteUpdateStartTime:we,_absoluteEndTime:F(B+be,12),_hasFromValue:At||je?1:0,_tweenType:ne,_setter:Di,_valueType:fe.t,_composition:Ce,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Rt,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};Ce!==Ue.none&&zn(pt,Z);const Bi=pt._valueType;if(Bi===ye.COMPLEX)pt._value=Bn(pt,1,-1);else if(Bi===ye.UNIT)pt._value=`${yt(pt._toNumber)}${pt._unit}`;else if(Bi===ye.COLOR){const xe=fe.d;pt._value=`rgba(${F(xe[0],0)},${F(xe[1],0)},${F(xe[2],0)},${xe[3]})`}else pt._value=yt(pt._toNumber);isNaN(Ee)&&(Ee=pt._startTime),le=pt,x++,xt(this,pt)}(isNaN(V)||Ee<V)&&(V=Ee),(isNaN(D)||be>D)&&(D=be),ne===De.TRANSFORM&&(G=x-Pe,W=x)}if(!isNaN(G)){let te=0;Te(this,ne=>{te>=G&&te<W&&(ne._renderTransforms=1,ne._composition===Ue.blend&&Te(ms.animation,ue=>{ue.id===ne.id&&(ue._renderTransforms=1)})),te++})}}u||console.warn("No target found. Make sure the element you\'re trying to animate is accessible before creating your animation."),V?(Te(this,R=>{R._startTime-R._delay||(R._delay-=V),R._startTime-=V}),D-=V):V=0,D||(D=Be,this.iterationCount=0),this.targets=c,this.id=$(a)?Kn:a,this.duration=D===1e-11?Be:or((D+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=S||y.onRender,this._ease=k,this._delay=V,this.iterationDuration=D,!this._autoplay&&N&&this.onRender(this)}stretch(e){const t=this.duration;if(t===gs(e))return this;const s=e/t;return Te(this,r=>{r._updateDuration=gs(r._updateDuration*s),r._changeDuration=gs(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 Te(this,e=>{const t=e._toFunc,s=e._fromFunc;(t||s)&&(s?(nt(s(),ie),ie.u!==e._unit&&e.target[Jt]&&hr(e.target,ie,e._unit,!0),e._fromNumbers=Je(ie.d),e._fromNumber=ie.n):t&&(nt(rs(e.target,e.property,e._tweenType),Ge),e._fromNumbers=Je(Ge.d),e._fromNumber=Ge.n),t&&(nt(t(),fe),e._toNumbers=Je(fe.d),e._strings=Je(fe.s),e._toNumber=fe.o?is(e._fromNumber,fe.n,fe.o):fe.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),lr(this)}then(e){return super.then(e)}},Os=(e,t)=>z.editor?z.editor.addAnimation(e,t):new Dt(e,t,null,0,!1).init(),Wc=(e,t)=>{if(qe(t,"<")){const s=t[1]==="<",r=e._tail,i=r?r._offset+r._delay:0;return s?i:i+r.duration}},Ms=(e,t)=>{let s=e.iterationDuration;if(s===1e-11&&(s=0),$(t))return s;if(Ye(+t))return+t;const r=t,i=e?e.labels:null,n=!Kt(i),o=Wc(e,r),c=!$(o),u=Cn.exec(r);if(u){const h=u[0],p=r.split(h),a=n&&p[0]?i[p[0]]:s,f=c?o:n?a:s,l=+p[1];return is(f,l,h[0])}else return c?o:n?$(i[r])?s:i[r]:s};function Xc(e){return or((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function di(e,t,s,r,i,n){const o=Ye(e.duration)&&e.duration<=1e-11?s-Be:s;t.composition&&ns(t,o,1,1,lt.AUTO);const c=r?new Dt(r,e,t,o,!1,i,n):new ct(e,t,o);return t.composition&&c.init(!0),xt(t,c),Te(t,u=>{const h=u._offset+u._delay+u.duration;h>t.iterationDuration&&(t.iterationDuration=h)}),t.duration=Xc(t),t}var eo=0,to=class extends ct{constructor(e={}){super(e,null,0),++eo,this.id=$(e.id)?eo:e.id,this.duration=0,this.labels={};const t=e.defaults,s=z.defaults;this.defaults=t?gt(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?Nt(r):null,this.iterationDuration=0}add(e,t,s){const r=Fe(t),i=Fe(e);if(r||i){if(this._hasChildren=!0,r){const n=t,o=z.editor&&z.editor.addTimelineChild,c=s&&s.type==="Stagger"&&z.editor,u=Oe(s)?s:null;if(u||c){const h=ut(e),p=this.duration,a=this.iterationDuration,f=n.id;let l=0;const d=h.length,g=o?o(e,n,this.id,s,d):null,v=u||z.editor.resolveStagger(s.defaultValue);h.forEach(_=>{const S={...g||n};this.duration=p,this.iterationDuration=a,$(f)||(S.id=f+"-"+l);const y=Ms(this,v(_,l,h,null,this));di(S,this,y,_,l,h),l++})}else{const h=o?o(e,n,this.id,s):n,p=s&&s.type?s.defaultValue:s;di(h,this,Ms(this,p),e)}}else di(e,this,Ms(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if($(e)||e&&$(e.pause))return this;e.pause();const s=+(e.effect?e.effect.getTiming().duration:e.duration);!$(e)&&!$(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 $(t)?this:(t.duration=Be,t.composition=Ue.replace,this.add(e,t,s))}call(e,t){return $(e)||e&&!Oe(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 $(e)||e&&!Ve(e)?this:(z.editor&&z.editor.addTimelineLabel&&(t=z.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=Ms(this,t),this)}remove(e,t){return Ot(ut(e),this,t),this}stretch(e){const t=this.duration;if(t===gs(e))return this;const s=e/t,r=this.labels;Te(this,i=>i.stretch(i.duration*s));for(let i in r)r[i]*=s;return super.stretch(e)}refresh(){return Te(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),Te(this,e=>e.revert,!0),lr(this)}then(e){return super.then(e)}},so=e=>z.editor?z.editor.addTimeline(e):new to(e).init(),gi=class{constructor(e,t){$e.current&&$e.current.register(this);const s=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let c=!0;for(let u in this.animations)if(!this.animations[u].paused&&c){c=!1;break}c&&this.callbacks.complete()},i={onBegin:s,onComplete:r,onPause:r},n={v:1,autoplay:!1},o={};if(this.targets=[],this.animations={},this.callbacks=null,!($(e)||$(t))){for(let c in t){const u=t[c];fs(c)?o[c]=u:qe(c,"on")?n[c]=u:i[c]=u}this.callbacks=new Dt({v:0},n);for(let c in o){const u=o[c],h=Fe(u);let p={},a="+=0";if(h){const d=u.unit;Ve(d)&&(a+=d)}else p.duration=u;p[c]=h?gt({to:a},u):a;const f=gt(i,p);f.composition=Ue.replace,f.autoplay=!1;const l=this.animations[c]=new Dt(e,f,null,0,!1).init();this.targets.length||this.targets.push(...l.targets),this[c]=(d,g,v)=>{const _=l._head;if($(d)&&_){const S=_._numbers;return S&&S.length?S:_._modifier(_._number)}else return Te(l,S=>{if(We(d))for(let y=0,m=d.length;y<m;y++)$(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;$(v)||(S._ease=Nt(v)),S._currentTime=0}),$(g)||l.stretch(g),l.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}},Yc=(e,t)=>new gi(e,t),Gc=as({clamp:()=>Y,damp:()=>tu,degToRad:()=>Kc,lerp:()=>Vt,mapRange:()=>Ns,padEnd:()=>Jc,padStart:()=>Qc,radToDeg:()=>eu,round:()=>F,roundPad:()=>Zc,snap:()=>ss,wrap:()=>jc}),Zc=(e,t)=>(+e).toFixed(t),Qc=(e,t,s)=>`${e}`.padStart(t,s),Jc=(e,t,s)=>`${e}`.padEnd(t,s),jc=(e,t,s)=>((e-t)%(s-t)+(s-t))%(s-t)+t,Ns=(e,t,s,r,i)=>r+(e-t)/(s-t)*(i-r),Kc=e=>e*Math.PI/180,eu=e=>e*180/Math.PI,tu=(e,t,s,r)=>r?r===1?t:Vt(e,t,1-Math.exp(-r*s*.1)):e,ot=st*10,vr=class{constructor(e={}){const t=!$(e.bounce)||!$(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/st,this.maxIterations=this.maxDuration/this.timeStep/st,this.bn=Y(U(e.bounce,.5),-1,1),this.pd=Y(U(e.duration,628),10*z.timeScale,ot*z.timeScale),this.m=Y(U(e.mass,1),1,ot),this.s=Y(U(e.stiffness,100),Be,ot),this.d=Y(U(e.damping,10),Be,ot),this.v=Y(U(e.velocity,0),-ot,ot),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=ir(-n*t*s)*(1*si(r*n)+i*ti(r*n)):t===1?n=(1+i*n)*ir(-n*s):n=((1+i)*ir((-t*s+r)*n)+(1-i)*ir((-t*s-r)*n))/2,1-n}calculateSDFromBD(){const e=z.timeScale===1?this.pd/st:this.pd;this.m=1,this.v=0,this.s=ts(2*Pt/e,2),this.bn>=0?this.d=(1-this.bn)*4*Pt/e:this.d=4*Pt/(e*(1+this.bn)),this.s=F(Y(this.s,Be,ot),3),this.d=F(Y(this.d,Be,300),3)}calculateBDFromSD(){const e=2*Pt/ft(this.s);this.pd=e*(z.timeScale===1?st:1),this.d/(2*ft(this.s))<=1?this.bn=1-this.d*e/(4*Pt):this.bn=4*Pt/(this.d*e)-1,this.bn=F(Y(this.bn,-1,1),3),this.pd=F(Y(this.pd,10*z.timeScale,ot*z.timeScale),3)}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:s,timeStep:r,m:i,d:n,s:o,v:c}=this,u=this.w0=Y(ft(o/i),Be,st),h=this.zeta=n/(2*ft(o*i));h<1?(this.wd=u*ft(1-h*h),this.b=(h*u+-c)/this.wd):h===1?(this.wd=0,this.b=-c+u):(this.wd=u*ft(h*h-1),this.b=(h*u+-c)/this.wd);let p=0,a=0,f=0;for(;a<=e&&f<=t;)dt(1-this.solve(p))<s?a++:a=0,this.solverDuration=p,p+=r,f++;this.settlingDuration=F(this.solverDuration*st,0)*z.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=Y(U(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=Y(U(e,1),10*z.timeScale,ot*z.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=Y(U(e,100),Be,ot),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=Y(U(e,10),Be,ot),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=Y(U(e,1),1,ot),this.compute()}get velocity(){return this.v}set velocity(e){this.v=Y(U(e,0),-ot,ot),this.compute()}},yr=e=>new vr(e),ro=e=>(console.warn("createSpring() is deprecated use spring() instead"),new vr(e)),mi={_head:null,_tail:null},vi=(e,t,s)=>{let r=mi._head,i;for(;r;){const n=r._next,o=r.$el===e,c=!t||r.property===t,u=!s||r.parent===s;if(o&&c&&u){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),wt(mi,r);const h=r.parent;h&&(h._completed++,h.animations.length===h._completed&&(h.completed=!0,h.paused=!0,h.muteCallbacks||(h.onComplete(h),h._resolve(h))))}r=n}return i},io=(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),vi(t,s),xt(mi,{parent:e,animation:n,$el:t,property:s,_next:null,_prev:null});const c=()=>vi(t,s,e);return n.oncancel=c,n.onremove=c,e.persist||(n.onfinish=c),n};function Wt(e,t,s){const r=zt(e);if(!r.length)return;const[i]=r,n=oi(i,t),o=li(t,i,n);let c=rs(i,o);if($(s))return c;if(nt(c,Ge),Ge.t===ye.NUMBER||Ge.t===ye.UNIT){if(s===!1)return Ge.n;{const u=hr(i,Ge,s,!1);return`${F(u.n,z.precision)}${u.u}`}}}var Bt=(e,t)=>{if(!$(t))return z.editor&&z.editor.addSet?z.editor.addSet(e,t):(t.duration=Be,t.composition=U(t.composition,Ue.none),new Dt(e,t,null,0,!0).resume())},no=(e,t,s)=>{const r=ut(e);for(let i=0,n=r.length;i<n;i++)vi(r[i],s,t&&t.controlAnimation&&t);return Ot(r,t,s),r},Xt=e=>{e.cancelable&&e.preventDefault()},su=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}}},ru=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})}},rt=(e,t)=>e&&Oe(e)?e(t):e,br=0,oo=class{constructor(e,t={}){if(!e)return;$e.current&&$e.current.register(this);const s=t.x,r=t.y,i=t.trigger,n=t.modifier,o=t.releaseEase,c=o&&Nt(o),u=!$(o)&&!$(o.ease),h=Fe(s)&&!$(s.mapTo)?s.mapTo:"translateX",p=Fe(r)&&!$(r.mapTo)?r.mapTo:"translateY",a=rt(t.container,this);this.containerArray=We(a)?a:null,this.$container=a&&!this.containerArray?ut(a)[0]:j.body,this.useWin=this.$container===j.body,this.$scrollContainer=this.useWin?tt:this.$container,this.$target=Fe(e)?new su(e):ut(e)[0],this.$trigger=ut(i||e)[0],this.fixed=Wt(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=u?o:yr({mass:U(t.releaseMass,1),stiffness:U(t.releaseStiffness,80),damping:U(t.releaseDamping,20)}),this.releaseYSpring=u?o:yr({mass:U(t.releaseMass,1),stiffness:U(t.releaseStiffness,80),damping:U(t.releaseDamping,20)}),this.releaseEase=c||Mt.outQuint,this.hasReleaseSpring=u,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),$(s)||s===!0)f[h]=0;else if(Fe(s)){const l=s,d={};l.modifier&&(d.modifier=l.modifier),l.composition&&(d.composition=l.composition),f[h]=d}else s===!1&&(f[h]=0,this.disabled[0]=1);if($(r)||r===!0)f[p]=0;else if(Fe(r)){const l=r,d={};l.modifier&&(d.modifier=l.modifier),l.composition&&(d.composition=l.composition),f[p]=d}else r===!1&&(f[p]=0,this.disabled[1]=1);this.animate=new gi(this.$target,f),this.xProp=h,this.yProp=p,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=[-kt,kt,kt,-kt],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=Ft(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new ru(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new ct({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 ct({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!$(a),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]?h:p,this.animate.callbacks.onRender=()=>{const l=this.updated,d=!(this.grabbed&&l)&&this.released,g=this.x,v=this.y,_=g-this.coords[2],S=v-this.coords[3];this.deltaX=_,this.deltaY=S,this.coords[2]=g,this.coords[3]=v,l&&(_||S)&&this.onUpdate(this),d?(this.computeVelocity(_,S),this.angle=nr(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 ct({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),Fe(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const s=this.velocityTime,r=Ft(),i=r-s;if(i<17)return this.velocity;this.velocityTime=r;const n=this.velocityStack,o=this.velocityMultiplier,c=this.minVelocity,u=this.maxVelocity,h=this.velocityStackIndex;n[h]=F(Y(ft(e*e+t*t)/i*o,c,u),5);const p=Rn(n[0],n[1],n[2]);return this.velocity=p,this.velocityStackIndex=(h+1)%3,p}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]=ss(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]=ss(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 Ns(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(Ns(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return Ns(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(Ns(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=F(this.useWin?tt.scrollX:this.$container.scrollLeft,0),t=F(this.useWin?tt.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]=tt.innerWidth,o=this.window[1]=tt.innerHeight,c=this.useWin,u=e.scrollWidth,h=e.scrollHeight,p=this.fixed,a=e.getBoundingClientRect(),[f,l,d,g]=this.containerPadding;this.dragArea[0]=c?0:a.left,this.dragArea[1]=c?0:a.top,this.scrollView[0]=c?Y(u,n,u):u,this.scrollView[1]=c?Y(h,o,h):h,this.updateScrollCoords();const{width:v,height:_,left:S,top:y,right:m,bottom:b}=e.getBoundingClientRect();this.dragArea[2]=F(c?Y(v,n,n):v,0),this.dragArea[3]=F(c?Y(_,o,o):_,0);const k=Wt(e,"overflow"),w=k==="visible",P=k==="hidden";if(this.canScroll=p?!1:this.contained&&(e===j.body&&w||!P&&!w)&&(u>this.dragArea[2]+g-l||h>this.dragArea[3]+f-d)&&(!this.containerArray||this.containerArray&&!We(this.containerArray)),this.contained){const I=this.scroll.x,E=this.scroll.y,A=this.canScroll,C=this.$target.getBoundingClientRect(),B=A?c?0:e.scrollLeft:0,D=A?c?0:e.scrollTop:0,V=A?this.scrollView[0]-B-v:0,x=A?this.scrollView[1]-D-_:0;this.targetBounds[0]=F(C.top+E-(c?0:y),0),this.targetBounds[1]=F(C.right+I-(c?n:m),0),this.targetBounds[2]=F(C.bottom+E-(c?o:b),0),this.targetBounds[3]=F(C.left+I-(c?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+f,this.containerBounds[1]=this.containerArray[1]-l,this.containerBounds[2]=this.containerArray[2]-d,this.containerBounds[3]=this.containerArray[3]+g):(this.containerBounds[0]=-F(C.top-(p?Y(y,0,o):y)+D-f,0),this.containerBounds[1]=-F(C.right-(p?Y(m,0,n):m)-V+l,0),this.containerBounds[2]=-F(C.bottom-(p?Y(b,0,o):b)-x+d,0),this.containerBounds[3]=-F(C.left-(p?Y(S,0,n):S)+B-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,[c,u]=this.disabled,h=!c&&t<o||!c&&t>i,p=!u&&s<r||!u&&s>n;return h&&!p?1:!h&&p?2:h&&p?3:0}refresh(){const e=this.parameters,t=e.x,s=e.y,r=rt(e.container,this),i=rt(e.containerPadding,this)||0,n=We(i)?i:[i,i,i,i],o=this.x,c=this.y,u=rt(e.cursor,this),h={onHover:"grab",onGrab:"grabbing"};if(u){const{onHover:v,onGrab:_}=u;v&&(h.onHover=v),_&&(h.onGrab=_)}const p=rt(e.dragThreshold,this),a={mouse:3,touch:7};if(Ye(p))a.mouse=p,a.touch=p;else if(p){const{mouse:v,touch:_}=p;$(v)||(a.mouse=v),$(_)||(a.touch=_)}this.containerArray=We(r)?r:null,this.$container=r&&!this.containerArray?ut(r)[0]:j.body,this.useWin=this.$container===j.body,this.$scrollContainer=this.useWin?tt:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=U(n,[0,0,0,0]),this.containerFriction=Y(U(rt(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=Y(U(rt(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=rt(Fe(t)&&!$(t.snap)?t.snap:e.snap,this),this.snapY=rt(Fe(s)&&!$(s.snap)?s.snap:e.snap,this),this.scrollSpeed=U(rt(e.scrollSpeed,this),1.5),this.scrollThreshold=U(rt(e.scrollThreshold,this),20),this.dragSpeed=U(rt(e.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?a.mouse:a.touch,this.minVelocity=U(rt(e.minVelocity,this),0),this.maxVelocity=U(rt(e.maxVelocity,this),50),this.velocityMultiplier=U(rt(e.velocityMultiplier,this),1),this.cursor=u===!1?!1:h,this.updateBoundingValues();const[f,l,d,g]=this.containerBounds;this.setX(Y(o,g,l),!0),this.setY(Y(c,f,d),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[_,S,y,m]=this.containerPadding,[b,k]=this.scrollView,w=this.dragArea[2],P=this.dragArea[3],I=this.scroll.x,E=this.scroll.y,A=this.$container.scrollWidth,C=this.$container.scrollHeight,B=this.useWin?Y(A,this.window[0],A):A,D=this.useWin?Y(C,this.window[1],C):C,V=b-B,x=k-D;this.dragged&&V>0&&(this.coords[0]-=V,this.scrollView[0]=B),this.dragged&&x>0&&(this.coords[1]-=x,this.scrollView[1]=D);const N=this.scrollSpeed*10,R=this.scrollThreshold,[L,q]=this.coords,[K,G,W,te]=this.scrollBounds,ne=F(Y((q-K+_)/R,-1,0)*N,0),ue=F(Y((L-G-S)/R,0,1)*N,0),he=F(Y((q-W-y)/R,0,1)*N,0),ge=F(Y((L-te+m)/R,-1,0)*N,0);if(ne||he||ge||ue){const[oe,Z]=this.disabled;let le=I,Ee=E;oe||(le=F(Y(I+(ge||ue),0,b-w),0),this.coords[0]-=I-le),Z||(Ee=F(Y(E+(ne||he),0,k-P),0),this.coords[1]-=E-Ee),this.useWin?this.$scrollContainer.scrollBy(-(I-le),-(E-Ee)):this.$scrollContainer.scrollTo(le,Ee)}}const[e,t,s,r]=this.containerBounds,[i,n,o,c,u,h]=this.pointer;this.coords[0]+=(i-u)*this.dragSpeed,this.coords[1]+=(n-h)*this.dragSpeed,this.pointer[4]=i,this.pointer[5]=n;const[p,a]=this.coords,[f,l]=this.snapped,d=(1-this.containerFriction)*this.dragSpeed;this.setX(p>t?t+(p-t)*d:p<r?r+(p-r)*d:p,!1),this.setY(a>s?s+(a-s)*d:a<e?e+(a-e)*d:a,!1),this.computeVelocity(i-u,n-h),this.angle=nr(n-c,i-o);const[g,v]=this.snapped;(g!==f&&this.snapX||v!==l&&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 Ot([this],null,"x"),Ot([this],null,"y"),Ot([this],null,"progressX"),Ot([this],null,"progressY"),Ot([this.scroll]),Ot([this.overshootCoords]),this}scrollInView(e,t=0,s=Mt.inOutQuad){this.updateScrollCoords();const r=this.destX,i=this.destY,n=this.scroll,o=this.scrollBounds,c=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,r,i)){const[u,h,p,a]=o,f=F(Y(i-u,-kt,0),0),l=F(Y(r-h,0,kt),0),d=F(Y(i-p,0,kt),0),g=F(Y(r-a,-kt,0),0);new Dt(n,{x:F(n.x+(g?g-t:l?l+t:0),0),y:F(n.y+(f?f-t:d?d+t:0),0),duration:$(e)?350*z.timeScale:e,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=c})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Bt(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,s=Mt.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,i=this.y,[n,o,c,u]=this.containerPadding,h=this.scroll.y-this.targetBounds[0]+n+t,p=this.scroll.x-this.targetBounds[1]-o-t,a=this.scroll.y-this.targetBounds[2]-c-t,f=this.scroll.x-this.targetBounds[3]+u+t,l=this.isOutOfBounds([h,p,a,f],r,i);if(l){const[d,g]=this.disabled,v=Y(ss(r,this.snapX),f,p),_=Y(ss(i,this.snapY),h,a),S=$(e)?350*z.timeScale:e;!d&&(l===1||l===3)&&this.animate[this.xProp](v,S,s),!g&&(l===2||l===3)&&this.animate[this.yProp](_,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),[c,u,h,p]=this.containerBounds,a=(1-this.containerFriction)*this.dragSpeed,f=this.x,l=this.y;this.coords[0]=this.coords[2]=a?f>u?u+(f-u)/a:f<p?p+(f-p)/a:f:f,this.coords[1]=this.coords[3]=a?l>h?h+(l-h)/a:l<c?c+(l-c)/a:l:l,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 d=Wt(this.$target,"zIndex",!1);br=(d>br?d:br)+1,this.targetStyles=Bt(this.$target,{zIndex:br}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Bt(j.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Mt.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],c=n-this.pointer[7];let u=e.target,h=!1,p=!1,a=!1;for(;t&&u&&u!==this.$trigger;){const f=Wt(u,"overflow-y");if(f!=="hidden"&&f!=="visible"){const{scrollTop:l,scrollHeight:d,clientHeight:g}=u;if(d>g){a=!0,h=l<=3,p=l>=d-g-3;break}}u=u.parentElement}a&&(!h&&!p||h&&c<0||p&&c>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):(Xt(e),this.triggerStyles||(this.triggerStyles=Bt(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Xt,{passive:!1}),this.$trigger.addEventListener("touchmove",Xt,{passive:!1}),this.$trigger.addEventListener("touchend",Xt),(this.dragged||!this.disabled[0]&&dt(o)>this.dragThreshold||!this.disabled[1]&&dt(c)>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,c]=this.pointer,[u,h,p,a]=this.containerBounds,[f,l]=this.snapped,d=this.releaseXSpring,g=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,m=this.y,b=this.computeVelocity(s-o,r-c),k=this.angle=nr(r-n,s-i),w=b*150,P=(1-this.releaseContainerFriction)*this.dragSpeed,I=y+si(k)*w,E=m+ti(k)*w,A=I>h?h+(I-h)*P:I<a?a+(I-a)*P:I,C=E>p?p+(E-p)*P:E<u?u+(E-u)*P:E,B=this.destX=Y(F(ss(A,this.snapX),5),a,h),D=this.destY=Y(F(ss(C,this.snapY),5),u,p),V=this.isOutOfBounds(this.containerBounds,I,E);let x=0,N=0,R=v,L=v,q=0;if(S.x=y,S.y=m,!e){const G=B===h?y>h?-1:1:y<a?-1:1,W=F(y-B,0);d.velocity=t&&_?W?w*G/dt(W):0:b;const{ease:te,settlingDuration:ne,restDuration:ue}=d;x=y===B?0:_?ne:ne-ue*z.timeScale,_&&(R=te),x>q&&(q=x)}if(!t){const G=D===p?m>p?-1:1:m<u?-1:1,W=F(m-D,0);g.velocity=e&&_?W?w*G/dt(W):0:b;const{ease:te,settlingDuration:ne,restDuration:ue}=g;N=m===D?0:_?ne:ne-ue*z.timeScale,_&&(L=te),N>q&&(q=N)}if(!_&&V&&P&&(x||N)){const G=Ue.blend;new Dt(S,{x:{to:A,duration:x*.65},y:{to:C,duration:N*.65},ease:v,composition:G}).init(),new Dt(S,{x:{to:B,duration:x},y:{to:D,duration:N},ease:v,composition:G}).init(),this.overshootTicker.stretch(Rn(x,N)).restart()}else e||this.animate[this.xProp](B,x,R),t||this.animate[this.yProp](D,N,L);this.scrollInView(q,this.scrollThreshold,v);let K=!1;B!==f&&(this.snapped[0]=B,this.snapX&&(K=!0)),D!==l&&this.snapY&&(this.snapped[1]=D,this.snapY&&(K=!0)),K&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Xt),this.$trigger.removeEventListener("touchmove",Xt),this.$trigger.removeEventListener("touchend",Xt),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=Bt(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":Xt(e)}}},iu=(e,t)=>new oo(e,t),yi=(e=ae)=>new ct({duration:1*z.timeScale,onComplete:e},null,0).resume(),_r=e=>{let t;return((...s)=>{let r,i,n,o,c;t&&(r=t.currentIteration,i=t.iterationProgress,n=t.reversed,o=t._alternate,c=t._startTime,t.revert());const u=e(...s);return u&&!Oe(u)&&u.revert&&(t=u),$(i)||(t.currentIteration=r,t.iterationProgress=(o&&r%2?!n:n)?1-i:i,t._startTime=c),u||ae})},ao=class{constructor(e={}){$e.current&&$e.current.register(this);const t=e.root;let s=j;t&&(s=t.current||t.nativeElement||ut(t)[0]||j);const r=e.defaults,i=z.defaults,n=e.mediaQueries;if(this.defaults=r?gt(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 c=tt.matchMedia(n[o]);this.mediaQueryLists[o]=c,c.addEventListener("change",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=$e.current,s=$e.root,r=z.defaults;$e.current=this,$e.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 $e.current=t,$e.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);Oe(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,Oe(e)){const s=e;this.constructors.push(s),this.execute(()=>{const r=s(this);Oe(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...s)=>this.execute(()=>t(...s));return this}addOnce(e){if(this.once=!0,Oe(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const s=e;this.constructorsOnce[t]=s,this.execute(()=>{const r=s(this);Oe(r)&&this.revertConstructorsOnce.push(r)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,s=this.constructorsOnce[t];if(Oe(s))return s(this);const r=_r(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,c=s.length,u=r.length;for(;n--;)e[n].revert();for(;o--;)t[o](this);for(;c--;)s[c].revert();for(;u--;)r[u](this);for(let h in i)i[h].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={}}},nu=e=>new ao(e),ou=()=>{const e=j.createElement("div");j.body.appendChild(e),e.style.height="100lvh";const t=e.offsetHeight;return j.body.removeChild(e),t},Sr=(e,t)=>e&&Oe(e)?e(t):e,kr=new Map,au=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 ct({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Te(this,s=>s.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ct({autoplay:!1,frameRate:30,onUpdate:t=>{const s=t.deltaTime,r=this.prevScrollX,i=this.prevScrollY,n=this.scrollX,o=this.scrollY,c=r-n,u=i-o;this.prevScrollX=n,this.prevScrollY=o,c&&(this.backwardX=r>n),u&&(this.backwardY=i>o),this.velocity=F(s>0?Math.sqrt(c*c+u*u)/s:0,5)}}).init(),this.resizeTicker=new ct({autoplay:!1,duration:250*z.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ct({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?tt:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=F(e?tt.scrollX:t.scrollLeft,0),this.scrollY=F(e?tt.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=tt.innerWidth,this.winHeight=ou()}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(){Te(this,e=>{e.ready&&e._debug&&e.removeDebug()}),this.updateBounds(),Te(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?tt:this.element).removeEventListener("scroll",this),kr.delete(this.element)}},lu=e=>{const t=e&&ut(e)[0]||j.body;let s=kr.get(t);return s||(s=new au(t),kr.set(t,s)),s},Ds=(e,t,s,r,i)=>{const n=t==="min",o=t==="max",{n:c,u}=nt(t==="top"||t==="left"||t==="start"||n?0:t==="bottom"||t==="right"||t==="end"||o?"100%":t==="center"?"50%":t,Ge);let h=c;return u==="%"?h=c/100*s:u&&(h=hr(e,Ge,"px",!0).n),o&&r<0&&(h+=r),n&&i>0&&(h+=i),h},wr=(e,t,s,r,i)=>{let n;if(Ve(t)){const o=Cn.exec(t);if(o){const c=o[0],u=c[0],h=t.split(c),p=h[0]==="min",a=h[0]==="max",f=Ds(e,h[0],s,r,i),l=Ds(e,h[1],s,r,i);if(p){const d=is(Ds(e,"min",s),l,u);n=d<f?f:d}else if(a){const d=is(Ds(e,"max",s),l,u);n=d>f?f:d}else n=is(f,l,u)}else n=Ds(e,t,s,r,i)}else n=t;return F(n,0)},lo=e=>{let t;const s=e.targets;for(let r=0,i=s.length;r<i;r++){const n=s[r];if(n[Jt]){t=n;break}}return t},cu=0,co=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"],uo=class{constructor(e={}){$e.current&&$e.current.register(this);const t=U(e.sync,"play pause"),s=t?Nt(t):null,r=t&&(t==="linear"||t===ht),i=t&&!(s===ht&&!r),n=t&&(Ye(t)||t===!0||r),o=t&&Ve(t)&&!i&&!n,c=o?t.split(" ").map(h=>()=>{const p=this.linked;return p&&p[h]?p[h]():null}):null,u=o&&c.length>2;this.index=cu++,this.id=$(e.id)?this.index:e.id,this.container=lu(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=i||n||!!c,this.syncEase=i?s:null,this.syncSmooth=n?t===!0||r?1:t:null,this.onSyncEnter=c&&!u&&c[0]?c[0]:ae,this.onSyncLeave=c&&!u&&c[1]?c[1]:ae,this.onSyncEnterForward=c&&u&&c[0]?c[0]:ae,this.onSyncLeaveForward=c&&u&&c[1]?c[1]:ae,this.onSyncEnterBackward=c&&u&&c[2]?c[2]:ae,this.onSyncLeaveBackward=c&&u&&c[3]?c[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,xt(this.container,this),yi(()=>{if(!this.reverted){if(!this.target){const h=ut(e.target)[0];this.target=h||j.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!$(e)&&!$(e.persist)&&(e.persist=!0),!this._params.target)){let t;$(e.targets)?Te(e,s=>{s.targets&&!t&&(t=lo(s))}):t=lo(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(Y(e,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const e=this._params;return this.repeat=U(Sr(e.repeat,this),!0),this.horizontal=U(Sr(e.axis,this),"y")==="x",this.enter=U(Sr(e.enter,this),"end start"),this.leave=U(Sr(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=co[this.index%co.length],c=e.useWin,u=c?e.winWidth:e.width,h=c?e.winHeight:e.height,p=e.scrollWidth,a=e.scrollHeight,f=this.container.width>360?320:260,l=t?0:10,d=t?10:0,g=t?24:f/2,v=t?g:15,_=t?60:g,S=t?_:v,y=t?"repeat-x":"repeat-y",m=P=>t?"0px "+P+"px":P+"px 2px",b=P=>`linear-gradient(${t?90:0}deg, ${P} 2px, transparent 1px)`,k=(P,I,E,A,C)=>`position:${P};left:${I}px;top:${E}px;width:${A}px;height:${C}px;`;r.style.cssText=`${k("absolute",l,d,t?p:f,t?f:a)}\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?u:g,t?g:h)}`,s||(i.style.cssText+=`background:\n ${b("#FFFF")}${m(g-10)} / 100px 100px ${y},\n ${b("#FFF8")}${m(g-10)} / 10px 10px ${y};\n `),n.style.cssText=`${k("relative",0,0,t?p:g,t?g:a)}`,s||(n.style.cssText+=`background:\n ${b("#FFFF")}${m(0)} / ${t?"100px 10px":"10px 100px"} ${y},\n ${b("#FFF8")}${m(0)} / ${t?"10px 0px":"0px 10px"} ${y};\n `);const w=[" enter: "," leave: "];this.coords.forEach((P,I)=>{const E=I>1,A=(E?0:this.offset)+P,C=I%2,B=A<S,D=A>(E?t?u:h:t?p:a)-S,V=(E?C&&!B:!C&&!B)||D,x=j.createElement("div"),N=j.createElement("div"),R=t?V?"right":"left":V?"bottom":"top",L=V?(t?_:v)+(E?t?-1:D?0:-2:t?-1:-2):t?1:0;N.innerHTML=`${this.id}${w[C]}${this.thresholds[I]}`,x.style.cssText=`${k("absolute",0,0,_,v)}\n display: flex;\n flex-direction: ${t?"column":"row"};\n justify-content: flex-${E?"start":"end"};\n align-items: flex-${V?"end":"start"};\n border-${R}: 2px solid ${o};\n `,N.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&&!E?"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(N);let q=A-L+(t?1:0);x.style[t?"left":"top"]=`${q}px`,(E?i:n).appendChild(x)}),r.appendChild(i),r.appendChild(n),e.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,Wt(e.element,"position")==="static"&&(this.debugStyles=Bt(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=Wt(o,"position")==="sticky"?Bt(o,{position:"static"}):!1;o=o.parentElement,C&&(e||(e=[]),e.push(C))}const c=t.getBoundingClientRect(),u=s.scale,h=(r?c.left+s.scrollX-s.left:c.top+s.scrollY-s.top)*u,p=(r?c.width:c.height)*u,a=r?s.width:s.height,f=(r?s.scrollWidth:s.scrollHeight)-a,l=this.enter,d=this.leave;let g="start",v="end",_="end",S="start";if(Ve(l)){const C=l.split(" ");_=C[0],g=C.length>1?C[1]:g}else if(Fe(l)){const C=l;$(C.container)||(_=C.container),$(C.target)||(g=C.target)}else Ye(l)&&(_=l);if(Ve(d)){const C=d.split(" ");S=C[0],v=C.length>1?C[1]:v}else if(Fe(d)){const C=d;$(C.container)||(S=C.container),$(C.target)||(v=C.target)}else Ye(d)&&(S=d);const y=wr(t,g,p),m=wr(t,v,p),b=y+h-a,k=m+h-f,w=wr(t,_,a,b,k),P=wr(t,S,a,b,k),I=y+h-w,E=m+h-P,A=E-I;this.offset=h,this.offsetStart=I,this.offsetEnd=E,this.distance=A<=0?0:A,this.thresholds=[g,v,_,S],this.coords=[y,m,w,P],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,c=this.scroll,u=c<=this.offsetStart,h=c>=this.offsetEnd,p=!u&&!h,a=c===this.offsetStart||c===this.offsetEnd,f=!this.hasEntered&&a,l=this._debug&&this.$debug;let d=!1,g=!1,v=this.progress;if(u&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),i){const _=e.progress;if(r&&Ye(r)){if(r<1){const S=_<v&&v===1?1e-4:_>v&&!v?-1e-4:0;v=F(Vt(_,v,Vt(.01,.2,r))+S,6)}}else s&&(v=s(v));d=v!==this.prevProgress,g=_===1,d&&!g&&r&&_&&o.wakeTicker.restart()}if(l){const _=n?o.scrollY:o.scrollX;l.style[n?"top":"left"]=_+10+"px"}(p&&!this.isInView||f&&!this.forceEnter&&!this.hasEntered)&&(p&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(l&&p&&(l.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)):p&&(this.forceEnter=!1)),(p||!p&&this.isInView)&&(d=!0),d&&(i&&e.seek(e.duration*v),this.onUpdate(this)),!p&&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 wt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}},uu=(e={})=>new uo(e),ho=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,hu=(e,t,s)=>{let r=0,i=1,n,o,c=0;do o=r+(i-r)/2,n=ho(o,t,s)-e,n>0?i=o:r=o;while(dt(n)>1e-7&&++c<100);return o},po=(e=.5,t=0,s=.5,r=1)=>e===t&&s===r?ht:i=>i===0||i===1?i:ho(hu(i,e,s),t,r),fo=(e=10,t)=>{const s=t?Ec:ds;return r=>s(Y(r,0,1)*e)*(1/e)},bi=(...e)=>{const t=e.length;if(!t)return ht;const s=t-1,r=e[0],i=e[s],n=[0],o=[es(r)];for(let c=1;c<s;c++){const u=e[c],h=Ve(u)?u.trim().split(" "):[u],p=h[0],a=h[1];n.push($(a)?c/s:es(a)/100),o.push(es(p))}return o.push(es(i)),n.push(1),function(u){for(let h=1,p=n.length;h<p;h++){const a=n[h];if(u<=a){const f=n[h-1],l=o[h-1];return l+(o[h]-l)*(u-f)/(a-f)}}return o[o.length-1]}},go=(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,c=o+((i+1)/r-o)*Math.random(),u=o*(1-t)+c*t;s.push(Y(u,n,1))}return s.push(1),bi(...s)},pu=as({Spring:()=>vr,createSpring:()=>ro,cubicBezier:()=>po,eases:()=>Mt,irregular:()=>go,linear:()=>bi,spring:()=>yr,steps:()=>fo}),xr=(e,t=100)=>{const s=[];for(let r=0;r<=t;r++)s.push(F(e(r/t),4));return`linear(${s.join(", ")})`},mo={},vo=e=>{let t=mo[e];if(t)return t;if(t="linear",Ve(e)){if(qe(e,"linear")||qe(e,"cubic-")||qe(e,"steps")||qe(e,"ease"))t=e;else if(qe(e,"cubicB"))t=sr(e);else{const s=Jn(e);Oe(s)&&(t=s===ht?"linear":xr(s))}mo[e]=t}else if(Oe(e)){const s=xr(e);s&&(t=s)}else e.ease&&(t=xr(e.ease));return t},yo=["x","y","z"],fu=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...yo],du=[...yo,...jt.filter(e=>["X","Y","Z"].some(t=>e.endsWith(t)))],_i=null,Bs=(e,t,s,r,i)=>{let n=Ve(t)?t:He(t,s,r,i,null,null);return Ye(n)?fu.includes(e)||qe(e,"translate")?`${n}px`:qe(e,"rotate")||qe(e,"skew")?`${n}deg`:`${n}`:n},bo=(e,t,s,r,i,n)=>{let o="0";const c=$(r)?getComputedStyle(e)[t]:Bs(t,r,e,i,n);return $(s)?o=We(r)?r.map(u=>Bs(t,u,e,i,n)):c:o=[Bs(t,s,e,i,n),c],o},_o=class{constructor(e,t){$e.current&&$e.current.register(this),Kt(_i)&&(Ct&&($(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"))?_i=!1:(jt.forEach(f=>{const l=qe(f,"skew"),d=qe(f,"scale"),g=qe(f,"rotate"),v=qe(f,"translate"),_=g||l,S=_?"<angle>":d?"<number>":v?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+f,syntax:S,inherits:!1,initialValue:v?"0px":_?"0deg":d?"1":"0"})}catch{}}),_i=!0));const s=zt(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,c=U(t.loop,z.defaults.loop),u=c===!0||c===1/0?1/0:Ye(c)?c+1:1,h=n?o?"alternate-reverse":"alternate":o?"reverse":"normal",p="both",a=z.timeScale===1?1:st;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,l)=>{const d=f[Ls],g=du.some(E=>t.hasOwnProperty(E)),v=f.style,_=this._inlineStyles[l]={},S=U(t.ease,z.defaults.ease),y=He(S,f,l,s,null,null),m=Oe(y)||Ve(y)?y:S,b=S.ease&&S,k=vo(m),w=(b?b.settlingDuration:He(U(t.duration,z.defaults.duration),f,l,s,null,null))*a,P=He(U(t.delay,z.defaults.delay),f,l,s,null,null)*a,I=U(t.composition,"replace");for(let E in t){if(!fs(E))continue;const A={},C={iterations:u,direction:h,fill:p,easing:k,duration:w,delay:P,composite:I},B=t[E],D=g?jt.includes(E)?E:ei.get(E):!1,V=D?"transform":E;_[V]||(_[V]=v[V]);let x;if(Fe(B)){const N=B,R=U(N.ease,k),L=R.ease&&R,q=N.to,K=N.from;if(C.duration=(L?L.settlingDuration:He(U(N.duration,w),f,l,s,null,null))*a,C.delay=He(U(N.delay,P),f,l,s,null,null)*a,C.composite=U(N.composition,I),C.easing=vo(R),x=bo(f,E,K,q,l,s),D?(A[`--${D}`]=x,d[D]=x):A[E]=bo(f,E,K,q,l,s),io(this,f,E,A,C),!$(K))if(!D)v[E]=A[E][0];else{const G=`--${D}`;v.setProperty(G,A[G][0])}}else x=We(B)?B.map(N=>Bs(E,N,f,l,s)):Bs(E,B,f,l,s),D?(A[`--${D}`]=x,d[D]=x):A[E]=x,io(this,f,E,A,C)}if(g){let E="";for(let A in d)E+=`${wn[A]}var(--${A})) `;v.transform=E}}),i&&this.autoplay.link(this)}forEach(e){try{const t=Ve(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:st);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];$(n)||n===""?s.removeProperty(sr(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))}},So={animate:(e,t)=>new _o(e,t),convertEase:xr},gu=0,mu=0,Tr=(e,t)=>!e||!t?!1:e===t||e.contains(t),bs=e=>{if(!e)return null;const t=e.style,s=t.transition||"";return t.setProperty("transition","none","important"),s},Cr=(e,t)=>{if(!e)return;const s=e.style;t?s.transition=t:s.removeProperty("transition")},vu=e=>{const t=e.layout.transitionMuteStore,s=e.$el,r=e.$measure;s&&!t.has(s)&&t.set(s,bs(s)),r&&!t.has(r)&&t.set(r,bs(r))},Pr=e=>{e.forEach((t,s)=>Cr(s,t)),e.clear()},yu={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},bu=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)},ko=(e,t,s,r)=>{let i=e.dataset.layoutId;i||(i=e.dataset.layoutId=`node-${mu++}`);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},wo=(e,t,s,r)=>{const i=e.$el,n=e.layout.root,o=n===i,c=e.properties,u=e.state.rootNode,h=e.parentNode,p=s.transform,a=i.style.transform,f=h?h.measuredIsRemoved:!1,l=s.position;o&&(e.layout.absoluteCoords=l==="fixed"||l==="absolute"),e.$measure=t,e.inlineTransforms=a,e.hasTransform=p&&p!=="none",e.measuredIsInsideRoot=Tr(n,t),e.measuredInlineTransform=null,e.measuredDisplay=s.display,e.measuredVisibility=s.visibility,e.measuredPosition=l,e.measuredHasDisplayNone=s.display==="none",e.measuredHasVisibilityHidden=s.visibility==="hidden",e.measuredIsVisible=!(e.measuredHasDisplayNone||e.measuredHasVisibilityHidden),e.measuredIsRemoved=e.measuredHasDisplayNone||e.measuredHasVisibilityHidden||f;let d=!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)d=!0;else{for(g=i.nextSibling;g&&(g.nodeType===Node.COMMENT_NODE||g.nodeType===Node.TEXT_NODE&&!g.textContent.trim());)g=g.nextSibling;d=g!==null&&g.nodeType===Node.TEXT_NODE}if(e.isInlined=d,e.hasTransform&&!r){const k=e.layout.transitionMuteStore;k.get(i)||(e.inlineTransition=bs(i)),t===i?i.style.transform="none":(k.get(t)||(e.measuredInlineTransition=bs(t)),e.measuredInlineTransform=t.style.transform,t.style.transform="none")}let v=0,_=0,S=0,y=0;if(!r){const k=t.getBoundingClientRect();v=k.left,_=k.top,S=k.width,y=k.height}for(let k in c){const w=k==="transform"?p:s[k]||s.getPropertyValue&&s.getPropertyValue(k);$(w)||(c[k]=w)}c.left=v,c.top=_,c.clientLeft=r?0:t.clientLeft,c.clientTop=r?0:t.clientTop;let m,b;if(o)e.layout.absoluteCoords?(m=v,b=_):(m=0,b=0);else{const k=h||u,w=k.properties.left,P=k.properties.top,I=k.properties.clientLeft,E=k.properties.clientTop;if(e.layout.absoluteCoords)m=v-w-I,b=_-P-E;else if(k===u){const A=u.properties.left,C=u.properties.top,B=u.properties.clientLeft,D=u.properties.clientTop;m=v-A-B,b=_-C-D}else m=v-w-I,b=_-P-E}return c.x=m,c.y=b,c.width=S,c.height=y,e},xo=(e,t)=>{if(t)for(let s in t)e.properties[s]=t[s]},$s=(e,t)=>{const s=He(t.ease,e.$el,e.index,e.targets,null,null),r=Oe(s)?s:t.ease,i=!$(r)&&!$(r.ease);e.ease=i?r.ease:r,e.duration=i?r.settlingDuration:He(t.duration,e.$el,e.index,e.targets,null,null),e.delay=He(t.delay,e.$el,e.index,e.targets,null,null)},_u=e=>{const t=e.$el.style,s=e.inlineStyles;s.length=0,e.layout.recordedProperties.forEach(r=>{s.push(r,t[r]||"")})},To=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))}},Su=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&&(Cr(e.$el,e.inlineTransition),e.inlineTransition=null),r!==e.$el&&e.measuredInlineTransition!==null&&(Cr(r,e.measuredInlineTransition),e.measuredInlineTransition=null)},Co=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)},Si=(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),Po=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,bs(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||rr(o))continue;const c=n?n.measuredIsRemoved:!1,u=c?yu:getComputedStyle(o),h=c?!0:u.display==="none",p=c?!0:u.visibility==="hidden",a=!h&&!p,f=o.dataset.layoutId,l=Tr(r,o);let d=f?this.nodes.get(f):null;if(d&&d.$el!==o){const v=Tr(r,d.$el),_=d.measuredIsVisible,S=!v&&(l||!l&&!_&&a),y=v&&!_&&a;if(S)bu(d),d=ko(o,n,this,d);else if(y){wo(d,o,u,c);let m=o.lastElementChild;for(;m;)s.push(m,d),m=m.previousElementSibling;i||(i=d);continue}else{let m=o.lastElementChild;for(;m;)s.push(m,n),m=m.previousElementSibling;i||(i=d);continue}}else d=ko(o,n,this,d);d.branchAdded=!1,d.branchRemoved=!1,d.branchNotRendered=!1,d.isTarget=!1,d.sizeChanged=!1,d.hasVisibilityHidden=p,d.hasDisplayNone=h,d.hasVisibilitySwap=p&&!d.measuredHasVisibilityHidden||h&&!d.measuredHasDisplayNone,this.nodes.set(d.id,d),d.parentNode=n||null,d._prev=null,d._next=null,n?(this.rootNodes.delete(d),n._head?(n._tail._next=d,d._prev=n._tail,n._tail=d):(n._head=d,n._tail=d)):this.rootNodes.add(d),wo(d,d.$el,u,c);let g=o.lastElementChild;for(;g;)s.push(g,d),g=g.previousElementSibling;i||(i=d)}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=We(t)?t:[t],i=[],n=t==="*"?s:$e.root,o=[];let c=s.parentElement;for(;c&&c.nodeType===1;){const g=getComputedStyle(c);if(g.transform&&g.transform!=="none"){const v=c.style.transform||"",_=bs(c);o.push(c,v,_),c.style.transform="none"}c=c.parentElement}for(let g=0,v=r.length;g<v;g++){const _=r[g];i[g]=Ve(_)?n.querySelectorAll(_):_}const u=zt(i);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const p=new Set;let a=0;const f=[];this.nodes.forEach(g=>{f.push(g.$el)}),this.nodes.forEach((g,v)=>{g.index=a++,g.targets=f,g&&g.measuredIsInsideRoot&&p.add(v)});const l=new Set,d=[];for(let g=0,v=u.length;g<v;g++){const _=u[g];if(!(!_||_.nodeType!==1||_===s)){if(!Tr(s,_)){const S=_.dataset.layoutId;if(!S||!p.has(S))continue}l.has(_)||(l.add(_),d.push(_))}}for(let g=0,v=d.length;g<v;g++)this.ensureDetachedNode(d[g],l);for(let g=0,v=u.length;g<v;g++){const _=u[g],S=this.getNode(_);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(Su);for(let g=0,v=o.length;g<v;g+=3){const _=o[g],S=o[g+1],y=o[g+2];S&&S!==""?_.style.transform=S:_.style.removeProperty("transform"),Cr(_,y)}return this}};function _s(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 Eo=class{constructor(e,t={}){$e.current&&$e.current.register(this);const s=_s(t.swapAt),r=_s(t.enterFrom),i=_s(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=zt(e)[0],this.id=t.id||gu++,this.children=t.children||"*",this.absoluteCoords=!1,this.swapAtParams=gt(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,c=n.length;o<c;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 Po(this),this.newState=new Po(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),Pr(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(()=>Pr(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(To),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 Rs)x!=="ease"&&x!=="duration"&&x!=="delay"&&($(e[x])?$(this.params[x])||(s[x]=this.params[x]):s[x]=e[x]);s.onComplete=()=>{const x=e.autoplay,N=z.editor;if(x&&x.linked||N&&N.showPanel){r&&r(this.timeline);return}this.transformAnimation&&this.transformAnimation.cancel(),g.forEachRootNode(R=>{Co(R),To(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")||Pr(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(Co),this.root.classList.remove("is-animated"),r&&r(this.timeline),i&&i(this.timeline))},s.composition=!1;const n=gt(gt(e.swapAt||{},this.swapAtParams),t),o=gt(gt(e.enterFrom||{},this.enterFromParams),t),c=gt(gt(e.leaveTo||{},this.leaveToParams),t),[u,h]=_s(n),[p,a]=_s(o),[f,l]=_s(c),d=this.oldState,g=this.newState,v=this.animating,_=this.swapping,S=this.entering,y=this.leaving,m=this.pendingRemoval;v.length=_.length=S.length=y.length=0,d.forEachRootNode(vu),g.record(),g.forEachRootNode(_u);const b=[],k=[],w=[],P=[],I=g.rootNode,E=I.$el;g.forEachRootNode(x=>{const N=x.$el,R=x.id,L=x.parentNode,q=L?L.branchAdded:!1,K=L?L.branchRemoved:!1,G=L?L.branchNotRendered:!1;let W=d.nodes.get(R);const te=!W;te?(W=Si(x,{},d),d.nodes.set(R,W),W.measuredIsRemoved=!0):W.measuredIsRemoved&&!x.measuredIsRemoved&&(Si(x,W,d),W.measuredIsRemoved=!0);const ne=W.parentNode,ue=(ne?ne.id:null)!==(L?L.id:null),he=W.$el!==x.$el,ge=W.measuredIsRemoved,oe=x.measuredIsRemoved;if(!W.measuredIsRemoved&&!oe&&!te&&(ue||he)){const ee=W.properties.left,Ce=W.properties.top,de=L||g.rootNode,me=de.id?d.nodes.get(de.id):null,re=me?me.properties.left:de.properties.left,ke=me?me.properties.top:de.properties.top,Se=me?me.properties.clientLeft:de.properties.clientLeft,Ae=me?me.properties.clientTop:de.properties.clientTop;W.properties.x=ee-re-Se,W.properties.y=Ce-ke-Ae}x.hasVisibilitySwap&&(x.hasVisibilityHidden&&(x.$el.style.visibility="visible",x.$measure.style.visibility="hidden"),x.hasDisplayNone&&(x.$el.style.display=W.measuredDisplay||x.measuredDisplay||"",x.$measure.style.visibility="hidden"));const Z=m.has(N),le=W.measuredIsVisible,Ee=x.measuredIsVisible,be=!le&&Ee&&!G,Pe=!oe&&(ge||Z)&&!q,Ie=oe&&!ge&&!K,_e=Ie||oe&&Z&&!K;x.branchAdded=q||Pe,x.branchRemoved=K||_e,x.branchNotRendered=G||oe,oe&&le&&(x.$el.style.display=W.measuredDisplay,x.$el.style.visibility="visible",Si(W,x,g)),Ie?(x.isTarget&&(y.push(N),x.isLeaving=!0),m.add(N)):!oe&&Z&&m.delete(N),Pe&&!G||be?(xo(W,p),x.isTarget&&(S.push(N),x.isEntering=!0)):_e&&!G&&xo(x,f),x!==I&&x.isTarget&&!x.isEntering&&!x.isLeaving&&v.push(N),b.push(N)});let A=0,C=0,B=0;g.forEachRootNode(x=>{const N=x.$el,R=x.parentNode,L=d.nodes.get(x.id),q=x.properties,K=L.properties;let G=R!==I&&R;for(;G&&!G.isTarget&&G!==I;)G=G.parentNode;x===I?(x.index=0,x.targets=v,$s(x,t)):x.isEntering?(x.index=G?G.index:A,x.targets=G?v:S,$s(x,a),A++):x.isLeaving?(x.index=G?G.index:C,x.targets=G?v:y,C++,$s(x,l)):x.isTarget?(x.index=B++,x.targets=v,$s(x,t)):(x.index=G?G.index:0,x.targets=v,$s(x,h)),L.index=x.index,L.targets=x.targets;for(let ue in q)q[ue]=He(q[ue],N,x.index,x.targets,null,null),K[ue]=He(K[ue],N,L.index,L.targets,null,null);const W=1,te=Math.abs(q.width-K.width)>W,ne=Math.abs(q.height-K.height)>W;if(x.sizeChanged=te||ne,x.isTarget&&(!x.measuredIsRemoved&&L.measuredIsVisible||x.measuredIsRemoved&&x.measuredIsVisible)){(q.transform!=="none"||K.transform!=="none")&&(x.hasTransform=!0,w.push(N));for(let ue in q)if(ue!=="transform"&&q[ue]!==K[ue]){k.push(N);break}}x.isTarget||(_.push(N),x.sizeChanged&&R&&R.isTarget&&R.sizeChanged&&(u.transform&&(x.hasTransform=!0,w.push(N)),P.push(N)))});const D={delay:x=>g.getNode(x).delay,duration:x=>g.getNode(x).duration,ease:x=>g.getNode(x).ease};if(s.defaults=D,this.timeline=so(s),!k.length&&!w.length&&!_.length)return Pr(this.transitionMuteStore),this.timeline.complete();if(b.length){this.root.classList.add("is-animated");for(let x=0,N=b.length;x<N;x++){const R=b[x],L=R.dataset.layoutId,q=d.nodes.get(L),K=g.nodes.get(L),G=q.properties;K.isInlined||((q.measuredDisplay==="grid"||K.measuredDisplay==="grid")&&R.style.setProperty("display","block","important"),(R!==E||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=`${G.x}px ${G.y}px`),R===E&&K.measuredPosition==="static"&&(R.style.position="relative",R.style.left="0px",R.style.top="0px")),R.style.width=`${G.width}px`,R.style.height=`${G.height}px`,R.style.minWidth="auto",R.style.minHeight="auto",R.style.maxWidth="none",R.style.maxHeight="none"}(d.scrollX!==window.scrollX||d.scrollY!==window.scrollY)&&requestAnimationFrame(()=>window.scrollTo(d.scrollX,d.scrollY));for(let x=0,N=k.length;x<N;x++){const R=k[x],L=R.dataset.layoutId,q=d.nodes.get(L),K=g.nodes.get(L),G=q.properties,W=K.properties;let te=!1;const ne={composition:"none"};G.width!==W.width&&(ne.width=[G.width,W.width],te=!0),G.height!==W.height&&(ne.height=[G.height,W.height],te=!0),!K.hasTransform&&!K.isInlined&&(ne.translate=[`${G.x}px ${G.y}px`,`${W.x}px ${W.y}px`],te=!0),this.properties.forEach(ue=>{const he=G[ue],ge=W[ue];ue!=="transform"&&he!==ge&&(ne[ue]=[he,ge],te=!0)}),te&&this.timeline.add(R,ne,0)}}if(_.length){for(let x=0,N=_.length;x<N;x++){const R=_[x],L=d.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(K=>{K!=="transform"&&(R.style[K]=`${d.getComputedValue(R,K)}`)})}for(let x=0,N=_.length;x<N;x++){const R=_[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(K=>{K!=="transform"&&(R.style[K]=`${g.getComputedValue(R,K)}`)})},L.delay+L.duration/2)}if(P.length){const x=Nt(g.nodes.get(P[0].dataset.layoutId).ease),N=L=>1-x(1-L),R={};if(u)for(let L in u)L!=="transform"&&(R[L]=[{from:q=>d.getComputedValue(q,L),to:u[L]},{from:u[L],to:q=>g.getComputedValue(q,L),ease:N}]);this.timeline.add(P,R,0)}}const V=w.length;if(V){for(let x=0;x<V;x++){const N=w[x],R=g.getNode(N);R.isInlined||(N.style.translate=`${d.getComputedValue(N,"x")}px ${d.getComputedValue(N,"y")}px`),N.style.transform=d.getComputedValue(N,"transform"),P.includes(N)&&(R.ease=He(n.ease,N,R.index,R.targets,null,null),R.duration=He(n.duration,N,R.index,R.targets,null,null))}this.transformAnimation=So.animate(w,{translate:x=>g.getNode(x).isInlined?"0px 0px":`${g.getComputedValue(x,"x")}px ${g.getComputedValue(x,"y")}px`,transform:x=>{const N=g.getComputedValue(x,"transform");if(!P.includes(x))return N;const R=d.getComputedValue(x,"transform"),L=g.getNode(x);return[R,He(u.transform,x,L.index,L.targets,null,null),N]},autoplay:!1,...D}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(e,t={}){return this.record(),e(this),this.animate(t)}},ku=(e,t)=>new Eo(e,t),mt=Gc,Er={},wu=(e,t=0)=>(...s)=>t?r=>e(...s,r):r=>e(r,...s),Ao=e=>(...t)=>{const s=e(...t);return new Proxy(ae,{apply:(r,i,[n])=>s(n),get:(r,i)=>{if(Er[i])return Ao((...n)=>{const o=Er[i](...n);return c=>o(s(c))})}})},vt=(e,t,s=0)=>{const r=(...i)=>(i.length<t.length?Ao(wu(t,s)):t)(...i);return Er[e]||(Er[e]=r),r},Lo=vt("roundPad",mt.roundPad),Ro=vt("padStart",mt.padStart),Io=vt("padEnd",mt.padEnd),Oo=vt("wrap",mt.wrap),Mo=vt("mapRange",mt.mapRange),No=vt("degToRad",mt.degToRad),Do=vt("radToDeg",mt.radToDeg),Bo=vt("snap",mt.snap),$o=vt("clamp",mt.clamp),Ho=vt("round",mt.round),qo=vt("lerp",mt.lerp,1),Fo=vt("damp",mt.damp,1),Hs=(e=0,t=1,s=0)=>{const r=10**s;return Math.floor((Math.random()*(t-e+1/r)+e)*r)/r},xu=0,qs=(e,t=0,s=1,r=0)=>{let i=e===void 0?xu++:e;return(n=t,o=s,c=r)=>{i+=1831565813,i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61);const u=10**c;return Math.floor((((i^i>>>14)>>>0)/4294967296*(o-n+1/u)+n)*u)/u}},Vo=e=>e[Hs(0,e.length-1)],ki=(e,t=Hs)=>{let s=e.length,r,i;for(;s;)i=t(0,--s),r=e[s],e[s]=e[i],e[i]=r;return e},Fs=(e,t={})=>{let s=[],r=0,i,n=null;const o=t.from,c=t.reversed,u=t.ease,h=!$(u),p=h&&!$(u.ease)?u.ease:h?Nt(u):null,a=t.grid,f=a===!0,l=t.axis,d=t.total,g=$(o)||o===0||o==="first",v=o==="center",_=o==="last",S=o==="random",y=We(o),m=We(e),b=t.use,k=es(m?e[0]:e),w=m?es(e[1]):0,P=Tn.exec((m?e[1]:e)+""),I=t.start||0+(m?k:0),E=t.seed,A=!$(E)&&E!==!1?qs(E===!0?0:E):Hs,C=t.jitter,B=!$(C),D=We(C),V=D?C[0]:C||0,x=D?C[1]:C||0;let N=g?0:Ye(o)?o:0;return(R,L,q,K,G)=>{const[W]=zt(R),te=$(d)?q.length:d,ne=$(b)?!1:Oe(b)?b(W,L,te):rs(W,b),ue=Ye(ne)||Ve(ne)&&Ye(+ne)?+ne:L,he=ue>=0&&ue<te?ue:L;if(v&&(N=(te-1)/2),_&&(N=te-1),!s.length){if(f){let Z=!0,le=!1,Ee=1/0,be=1/0,Pe=1/0,Ie=-1/0,_e=-1/0,ee=-1/0;const Ce=[],de=[],me=[];for(let re=0;re<te;re++){const ke=q[re];let Se=0,Ae=0,M=0,X=!1;if(ke&&Oe(ke.getBoundingClientRect)){const Q=ke.getBoundingClientRect();Se=Q.left+Q.width/2,Ae=Q.top+Q.height/2,X=!0}else{const Q=ke;Q&&Ye(Q.x)&&Ye(Q.y)&&(Se=Q.x,Ae=Q.y,Ye(Q.z)&&(M=Q.z,le=!0),X=!0)}if(!X){Z=!1;break}Ce.push(Se),de.push(Ae),me.push(M),Se<Ee&&(Ee=Se),Ae<be&&(be=Ae),M<Pe&&(Pe=M),Se>Ie&&(Ie=Se),Ae>_e&&(_e=Ae),M>ee&&(ee=M)}if(Z){let re=Ce[0],ke=de[0],Se=me[0];y?(re=Ee+o[0]*(Ie-Ee),ke=be+o[1]*(_e-be),Se=le?Pe+(o.length>=3?o[2]:.5)*(ee-Pe):0):v?(re=(Ee+Ie)/2,ke=(be+_e)/2,Se=(Pe+ee)/2):_?(re=Ce[te-1],ke=de[te-1],Se=me[te-1]):Ye(o)&&(re=Ce[o],ke=de[o],Se=me[o]);for(let M=0;M<te;M++){const X=re-Ce[M],Q=ke-de[M],se=Se-me[M];let Me=ft(X*X+Q*Q+(le?se*se:0));l==="x"&&(Me=-X),l==="y"&&(Me=-Q),l==="z"&&(Me=-se),s.push(Me)}let Ae=1/0;for(let M=0;M<te;M++){const X=dt(s[M]);X>0&&X<Ae&&(Ae=X)}if(Ae>0&&Ae<1/0)for(let M=0;M<te;M++)s[M]=s[M]/Ae}else for(let re=0;re<te;re++)s.push(dt(N-re))}else for(let Z=0;Z<te;Z++)if(!a)s.push(dt(N-Z));else{const le=a.length,Ee=a[0]*a[1];let be,Pe,Ie;y?(be=o[0]*(a[0]-1),Pe=o[1]*(a[1]-1),Ie=le===3?(o.length>=3?o[2]:.5)*(a[2]-1):0):v?(be=(a[0]-1)/2,Pe=(a[1]-1)/2,Ie=le===3?(a[2]-1)/2:0):(be=N%a[0],Pe=ds(N/a[0])%a[1],Ie=le===3?ds(N/Ee):0);const _e=Z%a[0],ee=ds(Z/a[0])%a[1],Ce=le===3?ds(Z/Ee):0,de=be-_e,me=Pe-ee,re=Ie-Ce;let ke=ft(de*de+me*me+(le===3?re*re:0));l==="x"&&(ke=-de),l==="y"&&(ke=-me),l==="z"&&(ke=-re),s.push(ke)}r=s[0];for(let Z=1;Z<te;Z++)s[Z]>r&&(r=s[Z]);if(p||c)for(let Z=0;Z<te;Z++){let le=s[Z];p&&(le=p(le/r)*r),c&&(le=l?-le:dt(r-le)),s[Z]=le}if(B){n=new Array(te);for(let Z=0;Z<te;Z++)n[Z]=A(-1,1,4)}S&&(s=ki(s,A))}const ge=m?(w-k)/r:k;$(i)&&(i=G?Ms(G,$(t.start)?G.iterationDuration:I):I);let oe=i+(ge*F(s[he],2)||0);if(B){const Z=r?s[he]/r:0,le=V+(x-V)*Z;oe=oe+n[he]*le}return t.modifier&&(oe=t.modifier(oe)),P&&(oe=`${oe}${P[2]}`),oe}},Tu=as({$:()=>zt,addChild:()=>xt,clamp:()=>$o,cleanInlineStyles:()=>Hn,createSeededRandom:()=>qs,damp:()=>Fo,degToRad:()=>No,forEachChildren:()=>Te,get:()=>Wt,keepTime:()=>_r,lerp:()=>qo,mapRange:()=>Mo,padEnd:()=>Io,padStart:()=>Ro,radToDeg:()=>Do,random:()=>Hs,randomPick:()=>Vo,remove:()=>no,removeChild:()=>wt,round:()=>Ho,roundPad:()=>Lo,set:()=>Bt,shuffle:()=>ki,snap:()=>Bo,stagger:()=>Fs,sync:()=>yi,wrap:()=>Oo}),zo=e=>{const t=ut(e)[0];return!t||!rr(t)?console.warn(`${e} is not a valid SVGGeometryElement`):t},wi=(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)},xi=(e,t,s=0)=>r=>{const i=+e.getTotalLength(),n=r[Kr],o=e.getCTM(),c=s===0;return{from:0,to:i,modifier:u=>{const h=u+s*i;if(t==="a"){const p=wi(e,i,h,-1,c),a=wi(e,i,h,1,c);return nr(a.y-p.y,a.x-p.x)*180/Pt}else{const p=wi(e,i,h,0,c);return t==="x"?n||!o?p.x:p.x*o.a+p.y*o.c+o.e:n||!o?p.y:p.x*o.b+p.y*o.d+o.f}}}},Uo=(e,t=0)=>{const s=zo(e);if(s)return{translateX:xi(s,"x",t),translateY:xi(s,"y",t),rotate:xi(s,"a",t)}},Cu=e=>{let t=1;if(e&&e.getCTM){const s=e.getCTM();s&&(t=(ft(s.a*s.a+s.b*s.b)+ft(s.c*s.c+s.d*s.d))/2)}return t},Pu=(e,t,s)=>{const r=st,i=getComputedStyle(e),n=i.strokeLinecap,o=i.vectorEffect==="non-scaling-stroke"?e:null;let c=n;const u=new Proxy(e,{get(h,p){const a=h[p];return p===kn?h:p==="setAttribute"?(...f)=>{if(f[0]==="draw"){const l=f[1].split(" "),d=+l[0],g=+l[1],v=Cu(o),_=d*-r*v,S=g*r*v+_,y=r*v+(d===0&&g===1||d===1&&g===0?0:10*v)-S;if(n!=="butt"){const m=d===g?"butt":n;c!==m&&(h.style.strokeLinecap=`${m}`,c=m)}h.setAttribute("stroke-dashoffset",`${_}`),h.setAttribute("stroke-dasharray",`${S} ${y}`)}return Reflect.apply(a,h,f)}:Oe(a)?(...f)=>Reflect.apply(a,h,f):a}});return e.getAttribute("pathLength")!==`${r}`&&(e.setAttribute("pathLength",`${r}`),u.setAttribute("draw",`${t} ${s}`)),u},Wo=(e,t=0,s=0)=>ut(e).map(r=>Pu(r,t,s)),Xo=(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=zo(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 c=s.tagName==="path",u=c?" ":",",h=n?n._value:null;h&&s.setAttribute(c?"d":"points",h);let p="",a="";if(!t)p=s.getAttribute(c?"d":"points"),a=o.getAttribute(c?"d":"points");else{const f=s.getTotalLength(),l=o.getTotalLength(),d=Math.max(Math.ceil(f*t),Math.ceil(l*t));for(let g=0;g<d;g++){const v=g/(d-1),_=s.getPointAtLength(f*v),S=o.getPointAtLength(l*v),y=c?g===0?"M":"L":"";p+=y+F(_.x,3)+u+_.y+" ",a+=y+F(S.x,3)+u+S.y+" "}}return[p,a]},Eu=as({createDrawable:()=>Wo,createMotionPath:()=>Uo,morphTo:()=>Xo}),Ar=typeof Intl<"u"&&Intl.Segmenter,Au=/\\{value\\}/g,Lu=/\\{i\\}/g,Ti=/(\\s+)/,Ci=/^\\s+$/,Pi="line",Vs="word",zs="char",Us="data-line",Ei=null,Ai=null,Lr=null,Yo=e=>e.isWordLike||e.segment===" "||Ye(+e.segment),Li=e=>e.setAttribute("aria-hidden","true"),Rr=(e,t)=>[...e.querySelectorAll(`[data-${t}]:not([data-${t}] [data-${t}])`)],Ru={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Go=e=>{if(!e.childElementCount&&!e.textContent.trim()){const t=e.parentElement;e.remove(),t&&Go(t)}},Zo=(e,t,s)=>{const r=e.getAttribute(Us);if(r!==null&&+r!==t||e.tagName==="BR"){s.add(e);const n=e.previousSibling,o=e.nextSibling;n&&n.nodeType===3&&Ci.test(n.textContent)&&s.add(n),o&&o.nodeType===3&&Ci.test(o.textContent)&&s.add(o)}let i=e.childElementCount;for(;i--;)Zo(e.children[i],t,s);return s},Ri=(e,t={})=>{let s="";t||(t={});const r=Ve(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 c=i==="left"?"-100%":i==="right"?"100%":"0",u=i==="top"?"-100%":i==="bottom"?"100%":"0";s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${u};left:${c};white-space:nowrap;">{value}</span>`}else s+="{value}";return s+="</span>",n&&(s+="</span>"),s},Ii=(e,t,s,r,i,n,o,c,u)=>{const h=i===Pi,p=i===zs,a=`_${i}_`,f=Oe(e)?e(s):e,l=h?"block":"inline-block";Lr.innerHTML=f.replace(Au,`<i class="${a}"></i>`).replace(Lu,`${p?u:h?o:c}`);const d=Lr.content,g=d.firstElementChild,v=d.querySelector(`[data-${i}]`)||g,_=d.querySelectorAll(`i.${a}`),S=_.length;if(S){g.style.display=l,v.style.display=l,v.setAttribute(Us,`${o}`),h||(v.setAttribute("data-word",`${c}`),p&&v.setAttribute("data-char",`${u}`));let y=S;for(;y--;){const m=_[y],b=m.parentElement;b.style.display=l,h?b.innerHTML=s.innerHTML:b.replaceChild(s.cloneNode(!0),m)}t.push(v),r.appendChild(d)}else console.warn(\'The expression "{value}" is missing from the provided template.\');return n&&(g.style.outline=`1px dotted ${Ru[i]}`),g},Ir=class{constructor(e,t={}){Ei||(Ei=Ar?new Ar([],{granularity:Vs}):{segment:l=>{const d=[],g=l.split(Ti);for(let v=0,_=g.length;v<_;v++){const S=g[v];d.push({segment:S,isWordLike:!Ci.test(S)})}return d}}),Ai||(Ai=Ar?new Ar([],{granularity:"grapheme"}):{segment:l=>[...l].map(d=>({segment:d}))}),!Lr&&Ct&&(Lr=j.createElement("template")),$e.current&&$e.current.register(this);const{words:s,chars:r,lines:i,accessible:n,includeSpaces:o,debug:c}=t,u=(e=We(e)?e[0]:e)&&e.nodeType?e:(hi(e)||[])[0],h=i===!0?{}:i,p=s===!0||$(s)?{}:s,a=r===!0?{}:r;this.debug=U(c,!1),this.includeSpaces=U(o,!1),this.accessible=U(n,!0),this.linesOnly=h&&!p&&!a,this.lineTemplate=Fe(h)?Ri(Pi,h):h,this.wordTemplate=Fe(p)||this.linesOnly?Ri(Vs,p):p,this.charTemplate=Fe(a)?Ri(zs,a):a,this.$target=u,this.html=u&&u.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&&(h||p||a)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const l=u.offsetWidth;l!==this.width&&(this.width=l,f())},150)}),this.lineTemplate&&!this.ready?j.fonts.ready.then(f):f(),u?this.resizeObserver.observe(u):console.warn("No Text Splitter target found.")}addEffect(e){if(!Oe(e))return console.warn("Effect must return a function."),this;const t=_r(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=>Oe(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 c=[],u=this.words,h=this.chars,p=Ei.segment(o),a=j.createDocumentFragment();let f=null;for(const l of p){const d=l.segment,g=Yo(l);if(!f||g&&f&&Yo(f))c.push(d);else{const v=c.length-1,_=c[v];!Ti.test(_)&&!Ti.test(d)?c[v]+=d:c.push(d)}f=l}for(let l=0,d=c.length;l<d;l++){const g=c[l];if(g.trim()){const v=c[l+1],_=r&&v&&!v.trim(),S=g,y=s?Ai.segment(S):null,m=s?j.createDocumentFragment():j.createTextNode(_?g+" ":g);if(s){const b=[...y];for(let k=0,w=b.length;k<w;k++){const P=b[k],I=k===w-1&&_?P.segment+" ":P.segment,E=j.createTextNode(I);Ii(s,h,E,m,zs,i,-1,u.length,h.length)}}t?Ii(t,u,m,a,Vs,i,-1,u.length,h.length):s?a.appendChild(m):a.appendChild(j.createTextNode(g)),_&&l++}else{if(l&&r)continue;a.appendChild(j.createTextNode(g))}}e.parentNode.replaceChild(a,e)}}else if(n===1){const o=[...e.childNodes];for(let c=0,u=o.length;c<u;c++)this.splitNode(o[c])}}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",c=r&&o;this.ready=!r||o,(c||e)&&this.effectsCleanups.forEach(a=>Oe(a)&&a(this)),s||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),c&&(s&&(t.innerHTML=this.cache),this.lines.length=0,i&&(this.words=Rr(t,Vs))),n&&(c||i)&&(this.chars=Rr(t,zs));const u=this.words.length?this.words:this.chars;let h,p=0;for(let a=0,f=u.length;a<f;a++){const l=u[a],{top:d,height:g}=l.getBoundingClientRect();!$(h)&&d-h>g*.5&&p++,l.setAttribute(Us,`${p}`);const v=l.querySelectorAll(`[${Us}]`);let _=v.length;for(;_--;)v[_].setAttribute(Us,`${p}`);h=d}if(c){const a=j.createDocumentFragment(),f=new Set,l=[];for(let d=0;d<p+1;d++){const g=t.cloneNode(!0);Zo(g,d,new Set).forEach(v=>{const _=v.parentNode;_&&(v.nodeType===1&&f.add(_),_.removeChild(v))}),l.push(g)}f.forEach(Go);for(let d=0,g=l.length;d<g;d++)Ii(r,this.lines,l[d],a,Pi,this.debug,d);t.innerHTML="",t.appendChild(a),i&&(this.words=Rr(t,Vs)),n&&(this.chars=Rr(t,zs))}if(this.linesOnly){const a=this.words;let f=a.length;for(;f--;){const l=a[f];l.replaceWith(l.textContent)}a.length=0}if(this.accessible&&(c||!s)){const a=j.createElement("span");a.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",a.innerHTML=this.html,t.insertBefore(a,t.firstChild),this.lines.forEach(Li),this.words.forEach(Li),this.chars.forEach(Li)}return this.width=t.offsetWidth,(c||e)&&this.effects.forEach((a,f)=>this.effectsCleanups[f]=a(this)),this}refresh(){this.split(!0)}},Qo=(e,t)=>new Ir(e,t),Ws=(e,t)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Ir(e,t)),Jo=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},jo={lowercase:"a-z",uppercase:"A-Z",numbers:"0-9",symbols:"!%#_|*+=",braille:"⠀-⣿",blocks:"▀-▟",shades:"░-▓"},Oi=new WeakMap,Ko=(e={})=>{e||(e={});const t=e.chars,s=Nt(e.ease||"linear"),r=e.text,i=e.from,n=e.reversed||!1,o=e.perturbation||0,c=e.cursor,u=c===!0?"_":typeof c=="number"?String.fromCharCode(c):typeof c=="string"?c:"",h=u.length,p=e.seed||0,a=e.override!==void 0?e.override:!0,f=e.revealRate||60,l=1e3*z.timeScale/f,d=e.settleDuration||300*z.timeScale,g=e.settleRate||30,v=e.duration,_=e.revealDelay,S=e.delay,y=e.onChange||ae;return(m,b,k,w)=>{const P=typeof t=="function"?t(m,b,k):t||"a-zA-Z0-9!%#_",I=Jo(jo[P]||P),E=I.length-1,A=typeof v=="function"?v(m,b,k):v,C=typeof _=="function"?_(m,b,k):_||0,B=typeof S=="function"?S(m,b,k):S||0,D=p?qs(p):qs();Oi.has(m)||Oi.set(m,m.textContent);const V=w?w._value:m.textContent,x=r!==void 0?typeof r=="function"?r(m,b,k):r:w?w._value:Oi.get(m),N=x===" "||x==="&nbsp;"?" ":x,R=V===" "?0:V.length,L=N.length,q=a===!0?I:typeof a=="string"&&a.length>0?Jo(jo[a]||a):null,K=q?q.length-1:0,G=a===" "?" ":null,W=a===""?L:Math.max(R,L),te=A>0?A:(W-1)*l+d,ne=F((te+C)/z.timeScale,0)*z.timeScale,ue=C>0?F(C/ne,12):0,he=i===void 0||i==="auto"?L<R?"right":"left":i,ge=new Int32Array(W);if(he==="random"){for(let M=0;M<W;M++)ge[M]=M;for(let M=W-1;M>0;M--){const X=D(0,M),Q=ge[M];ge[M]=ge[X],ge[X]=Q}}else{const M=he==="right"?(a===""||!R?W:R)-1:he==="center"?((a===""||!R?W:R)-1)/2:typeof he=="number"?he:0,X=Math.abs,Q=new Array(W);for(let se=0;se<W;se++)Q[se]=se;Q.sort((se,Me)=>X(se-M)-X(Me-M));for(let se=0;se<W;se++)ge[Q[se]]=se}if(n){const M=W-1;for(let X=0;X<W;X++)ge[X]=M-ge[X]}const oe=F(d/te,12),Z=F((1-oe)/W,12),le=h*Z,Ee=F(1e3*z.timeScale/(g*ne),12),be=new Float32Array(W),Pe=new Float32Array(W),Ie=o>0?o*oe:0;for(let M=0;M<W;M++){const X=Ie>0?(D(0,2e3)-1e3)/1e3*Ie:0,Q=Ie>0?(D(0,2e3)-1e3)/1e3*Ie:0;be[M]=ge[M]*Z+X,Pe[M]=Math.ceil((be[M]+oe+Q)/Ee)*Ee}if(L<W&&he!=="left"&&he!=="right"&&he!=="random"){let M=0;for(let se=L;se<W;se++)Pe[se]>M&&(M=Pe[se]);const X=new Array(L);for(let se=0;se<L;se++)X[se]=se;X.sort((se,Me)=>ge[se]-ge[Me]);const Q=(1-M)/L;for(let se=0;se<L;se++){const Me=M+se*Q;Me>Pe[X[se]]&&(Pe[X[se]]=Me)}}const _e=new Array(W);for(let M=0;M<W;M++)_e[M]=I[D(0,E)];const ee=q?q===I?_e:new Array(W):null;if(ee&&ee!==_e)for(let M=0;M<W;M++)ee[M]=G||q[D(0,q.length-1)];let Ce=V;if(!w){if(a==="")Ce="";else if(q){Ce="";for(let M=0;M<R;M++)Ce+=V[M]===" "?" ":ee[M]}}let de=-1,me=-1,re="";const ke=a!=="",Se=!!q,Ae=h>0;return{from:0,to:1,duration:ne,delay:B,ease:"linear",modifier:M=>{if(M===de)return re;if(de=M,B>0&&M<=0)return re=V,V;if(M<=0)return re=Ce,Ce;if(M>=1)return re=N,N;re="";const X=M/Ee|0,Q=X!==me;Q&&(me=X);const se=ue>0?(M-ue)/(1-ue):M,Me=se>0?s(se):0;for(let Ne=0;Ne<W;Ne++){const yt=be[Ne];if(Me>=Pe[Ne]){Ne<L&&(re+=N[Ne]);continue}if(Me<=0||Me<yt){ke&&Ne<R&&(Se?V[Ne]===" "?re+=" ":(Q&&(ee[Ne]=G||q[D(0,K)]),re+=ee[Ne]):re+=V[Ne]);continue}Ne<L&&N[Ne]===" "||Ne<R&&V[Ne]===" "?re+=" ":Ae&&Me-yt<le?re+=u[h-1-((Me-yt)/Z|0)]:(Q&&(_e[Ne]=I[D(0,E)]),re+=_e[Ne])}return Q&&y(re,Me),re}}}},Iu=as({TextSplitter:()=>Ir,scrambleText:()=>Ko,split:()=>Ws,splitText:()=>Qo}),Ou=as({$:()=>zt,Animatable:()=>gi,AutoLayout:()=>Eo,Draggable:()=>oo,JSAnimation:()=>Dt,Scope:()=>ao,ScrollObserver:()=>uo,Spring:()=>vr,TextSplitter:()=>Ir,Timeline:()=>to,Timer:()=>ct,WAAPIAnimation:()=>_o,addChild:()=>xt,animate:()=>Os,clamp:()=>$o,cleanInlineStyles:()=>Hn,createAnimatable:()=>Yc,createDraggable:()=>iu,createDrawable:()=>Wo,createLayout:()=>ku,createMotionPath:()=>Uo,createScope:()=>nu,createSeededRandom:()=>qs,createSpring:()=>ro,createTimeline:()=>so,createTimer:()=>Fc,cubicBezier:()=>po,damp:()=>Fo,degToRad:()=>No,eases:()=>Mt,easings:()=>pu,engine:()=>Ze,forEachChildren:()=>Te,get:()=>Wt,globals:()=>z,irregular:()=>go,keepTime:()=>_r,lerp:()=>qo,linear:()=>bi,mapRange:()=>Mo,morphTo:()=>Xo,onScroll:()=>uu,padEnd:()=>Io,padStart:()=>Ro,radToDeg:()=>Do,random:()=>Hs,randomPick:()=>Vo,remove:()=>no,removeChild:()=>wt,round:()=>Ho,roundPad:()=>Lo,scrambleText:()=>Ko,scrollContainers:()=>kr,set:()=>Bt,shuffle:()=>ki,snap:()=>Bo,split:()=>Ws,splitText:()=>Qo,spring:()=>yr,stagger:()=>Fs,steps:()=>fo,svg:()=>Eu,sync:()=>yi,text:()=>Iu,utils:()=>Tu,waapi:()=>So,wrap:()=>Oo}),Mu=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)}removeLinkAnimation(e){this.linkAnimations.delete(e)}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}=Ws(e,{words:!1,chars:!0}),n=t.fadeDuration||100,o=t.interval||100;Os(i,{opacity:[0,1],easing:"linear",duration:n,delay:Fs(o,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation("toast",function(e,t,s,r){const{words:i}=Ws(e,{words:!0,chars:!1}),n=t.fadeDuration||100,o=t.interval||200;Os(i,{opacity:[0,1],y:[{to:["100%","0%"]}],easing:"linear",duration:n,delay:Fs(o,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation("fadeIn",function(e,t,s,r){const i=t.duration||500;Os(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=Ws(e,{words:!1,chars:!0}).chars,i=Os(n,{opacity:[1,.3,1],easing:"easeInOutSine",duration:1200,delay:Fs(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 c of n)c.style.opacity="1";s()};e.addEventListener("click",o)})}},Nu={animejs:Ou},ea="input:not([disabled]), textarea:not([disabled]), select:not([disabled])",Du="a.squiffy-link[data-section], a.squiffy-link[data-passage]";function ta(e){if(!e)return!0;const t=e.querySelectorAll(ea);for(const s of t)if(!s.checkValidity())return!1;return!0}function Mi(e){if(!e)return;const t=ta(e),s=e.querySelectorAll(Du);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 Or(e){if(!e)return;const t=e.querySelectorAll(ea);for(const s of t)s.addEventListener("input",()=>Mi(e)),s.addEventListener("change",()=>Mi(e)),s.addEventListener("invalid",r=>{r.preventDefault(),s.classList.add("squiffy-invalid")}),s.addEventListener("input",()=>{s.checkValidity()&&s.classList.remove("squiffy-invalid")});Mi(e)}var sa=["src","poster"],Bu="data-squiffy-asset-",$u=[...sa,"srcset","style"].map(e=>`[${e}]`).join(","),Hu=e=>/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")||e.startsWith("#"),Ni=(e,t)=>{const s=e.trim();if(!s||Hu(s))return e;let r=s;try{r=decodeURI(s)}catch{}return t(r)},qu=(e,t)=>e.split(",").map(s=>{const r=s.match(/^(\\s*)(\\S+)(.*)$/s);return r?r[1]+Ni(r[2],t)+r[3]:s}).join(","),Fu=(e,t)=>e.replace(/url\\(\\s*([\'"]?)(.*?)\\1\\s*\\)/gi,(s,r,i)=>{const n=Ni(i,t);return n===i?s:`url("${n.replace(/["\\\\\\n]/g,o=>"\\\\"+(o===`\n`?"a ":o))}")`}),Vu=(e,t,s)=>{const r=Bu+t,i=e.getAttribute(r)??e.getAttribute(t);if(i===null)return;let n;t==="srcset"?n=qu(i,s):t==="style"?n=Fu(i,s):n=Ni(i,s),n===i?e.removeAttribute(r):e.setAttribute(r,i),e.setAttribute(t,n)},zu=e=>t=>{if(!e||!/\\b(src|srcset|poster|style)\\s*=/i.test(t))return t;const s=document.createElement("template");s.innerHTML=t;for(const r of s.content.querySelectorAll($u))for(const i of[...sa,"srcset","style"])r.hasAttribute(i)&&Vu(r,i,e);return s.innerHTML},Uu=async e=>{let t,s,r,i,n,o=0,c=!1;const u=[],h=new oc,p=[];let a=!1,f,l=0;const d=100;async function g(T){if(a||T.closest(".squiffy-output-section")!==r||T.classList.contains("disabled")||!ta(r))return!1;const O=T.getAttribute("data-passage"),H=T.getAttribute("data-section");if((O!==null||H!==null)&&(l=0,Q("turns",(X("turns")||0)+1)),O!==null)return _(T),Q("_turncount",X("_turncount")+1),await w(T),O&&(n=null,await x(O)),h.emit("linkClick",{linkType:"passage"}),!0;if(H!==null)return await w(T),H&&await C(H),h.emit("linkClick",{linkType:"section"}),!0;const[J,we,ve]=Me.handleLink(T);return J?(ve?.disableLink&&_(T),L(),h.emit("linkClick",{linkType:we}),!0):!1}async function v(T){const O=T.target;O.classList.contains("squiffy-link")&&await g(O)}function _(T){T.classList.add("disabled"),T.setAttribute("tabindex","-1")}function S(T){T.classList.remove("disabled"),T.removeAttribute("tabindex")}async function y(T){if(T&&T.section in t.sections){await C(T.section),T.passage!==void 0&&X("_section")==T.section&&await x(T.passage);return}if(!q()){await C(t.start);return}const O=i??r,H=O?.getAttribute("data-goto");H&&H in t.sections&&await k({section:H,after:Number(O.getAttribute("data-goto-after")||0)})}function m(){clearTimeout(f),f=void 0,se.goto=null}function b(T){const O=se.goto;return se.goto=null,O&&(T.setAttribute("data-goto",O.section),O.after&&T.setAttribute("data-goto-after",String(O.after))),O}async function k(T){if(T){if(T.after>0){f=setTimeout(()=>{f=void 0,l=0,C(T.section)},T.after);return}if(++l>d){l=0;const O=i??r;O.removeAttribute("data-goto");const H=`stopped after ${d} in a row without the player clicking anything, going to "${T.section}". Is there a loop?`;console.error("Squiffy error in {{goto}}:",H),O.insertAdjacentHTML("beforeend",Es("Error in {{goto}}:",H)),L();return}await C(T.section)}}async function w(T){Lt.runLinkAnimation(T),await V();const O=T.getAttribute("data-set");if(O){const H=JSON.parse(O);for(const J of H)P(J)}}function P(T){try{t.expressions?E(T):A(T)}catch(O){const H=O instanceof Error?O.message:String(O);console.error(`Squiffy error in "${T}":`,H),u.push(Es(`Error in "${T}":`,H))}}function I(T,O,H){const J=O+"=",we=qt(J,H);let ve=qt(J,X(T));O=="+"&&(ve+=we),O=="-"&&(ve-=we),O=="*"&&(ve*=we),O=="/"&&(ve/=we),Q(T,ve)}function E(T){const O=/^(\\w+)\\s*:=(.*)$/.exec(T);if(O){Q(O[1],he.processText(O[2],!0));return}const H=/^(\\w+)\\s*([+\\-*/]?)=(?!=)(.*)$/.exec(T);if(H){const[,we,ve,$t]=H,Rt=se.evaluate($t);ve?I(we,ve,Rt):Q(we,Rt);return}const J=/^(not\\s+)?(\\w+)$/.exec(T.trim());if(!J)throw new Error("expected an attribute name, e.g. gold = 10, gold += 5, has_key or not has_key");Q(J[2],!J[1])}function A(T){T=T.replace(/^(\\w*\\s*):=(.*)$/,(H,J,we)=>J+"="+he.processText(we,!0));const O=/^([\\w]*)\\s*=\\s*(.*)$/.exec(T);if(O){const H=O[1];let J=O[2];J==="true"?Q(H,!0):J==="false"?Q(H,!1):isNaN(J)?(J.startsWith("@")&&(J=X(J.substring(1))),Q(H,J)):Q(H,parseFloat(J))}else{const H=/^([\\w]*)\\s*([+\\-*/])=\\s*(.*)$/.exec(T);if(H){const J=H[1],we=H[2],ve=H[3].trim();I(J,we,ve.startsWith("@")?X(ve.substring(1)):ve)}else{let J=!0;T.startsWith("not ")&&(T=T.substring(4),J=!1),Q(T,J)}}}async function C(T){m();const O=be();if(s=t.sections[T],!s)return;Q("_section",T),X("turns")===null&&M.setInternal("turns",0,!1),M.setSeen(T);const H=t.sections[""];(H?.clear||s.clear)&&ne(),G(T);const J=r;if(H&&(await D(H,"[[]]"),X("_section")!==T)){J.remove();return}if(await D(s,`[[${T}]]`),X("_section")!==T){J.remove();return}Or(r),Q("_turncount",0);const we=b(r);Se(),L();const ve=be();ve!=O&&h.emit("canGoBackChanged",{canGoBack:ve}),h.emit("navigated",{section:T}),await k(we)}function B(T,O=null){const H={get:X,set:Q,ui:{transition:At,write:he.write,scrollToEnd:he.scrollToEnd},story:{go:C,seen:J=>M.getSeen(J),visits:J=>M.getVisits(J)},element:_e,import:Nu,...O};t.js[T](H,X,Q)}async function D(T,O){if(T.attributes&&await N(T.attributes),T.jsIndex!==void 0){const H=X("_section");if(B(T.jsIndex),X("_section")!==H)return}he.write(T.text||"",O),await V()}async function V(){a=!0,r.classList.add("links-disabled");for(const T of p)await T();p.length=0,a=!1,r.classList.remove("links-disabled")}async function x(T){m();const O=be();let H=s.passages&&s.passages[T];const J=t.sections[""];if(!H&&J&&J.passages&&(H=J.passages[T]),!H)throw`No passage named ${T} in the current section or master section`;M.setSeen(T);const we=[],ve=[];if(J&&J.passages){const Ke=J.passages[""];Ke&&(we.push(Ke),ve.push(()=>D(Ke,"[[]][]")))}const $t=s.passages&&s.passages[""];$t&&(we.push($t),ve.push(()=>D($t,`[[${X("_section")}]][]`))),we.push(H),ve.push(()=>D(H,`[[${X("_section")}]][${T}]`));const Rt="@"+X("_turncount");if(s.passages){if(Rt in s.passages){const Ke=s.passages[Rt];we.push(Ke),ve.push(()=>D(Ke,`[[${X("_section")}]][${Rt}]`))}if("@last"in s.passages&&X("_turncount")>=(s.passageCount||0)){const Ke=s.passages["@last"];we.push(Ke),ve.push(()=>D(Ke,`[[${X("_section")}]][${Rt}]`))}}we.some(Ke=>Ke.clear)&&(ne(),W()),i=document.createElement("div"),i.classList.add("squiffy-output-passage"),i.setAttribute("data-passage",`${T}`),r.appendChild(i);for(const Ke of ve)await Ke();Or(r);const Di=b(i);Se(),L();const os=be();os!=O&&h.emit("canGoBackChanged",{canGoBack:os}),h.emit("navigated",{section:X("_section"),passage:T}),await k(Di)}async function N(T){for(const O of T)P(O)}function R(){m(),M.reset(),de.scroll==="element"||de.scroll==="none"?(ee.innerHTML="",y()):location.reload()}function L(){Q("_output",ee.innerHTML)}function q(){const T=()=>{t.uiJsIndex!==void 0&&B(t.uiJsIndex,{registerAnimation:Lt.registerAnimation.bind(Lt),registerHelper:se.handlebars.registerHelper.bind(se.handlebars),SafeString:se.handlebars.SafeString})};M.load();const O=X("_output");return O?(ee.innerHTML=Ce(O),oe(),Z(),n=ee.querySelector(".squiffy-output-block:last-child"),s=t.sections[X("_section")],T(),je.onLoad(),Or(r),!0):(T(),!1)}function K(){n=document.createElement("div"),n.classList.add("squiffy-output-block"),(i||r)?.appendChild(n)}function G(T){r&&(r.querySelectorAll("input, textarea, select").forEach(O=>{const H=O,J=H.getAttribute("data-attribute")||H.id;J&&Q(J,H.value),H.disabled||(H.disabled=!0,H.setAttribute("data-squiffy-disabled",""))}),r.querySelectorAll("[contenteditable]").forEach(O=>{const H=O.getAttribute("data-attribute")||O.id;H&&Q(H,O.innerHTML),O.getAttribute("contenteditable")!=="false"&&(O.setAttribute("contenteditable","false"),O.setAttribute("data-squiffy-disabled",""))})),i=null,W(T),K()}function W(T){r=document.createElement("div"),r.classList.add("squiffy-output-section"),r.setAttribute("data-section",T??X("_section")),T||r.setAttribute("data-clear","true"),ee.appendChild(r)}function te(){return ee.querySelector(".squiffy-clear-stack")}function ne(){let T=te();T||(T=document.createElement("div"),T.classList.add("squiffy-clear-stack"),T.style.display="none",ee.prepend(T));const O=document.createElement("div");T.appendChild(O),c=!0;for(const H of[...ee.children])H!==T&&O.appendChild(H)}function ue(){const T=te();if(!T)return;for(const H of[...ee.children])H!==T&&H.remove();const O=T.children[T.children.length-1];for(const H of[...O.children])ee.appendChild(H);O.remove()}const he={write:(T,O)=>{o=ee.scrollHeight;const H=u.splice(0).join("")+he.renderHtml(T,!1).trim();n||K();const J=document.createElement("div");O&&J.setAttribute("data-source",O),J.innerHTML=H,je.onWrite(J),n.appendChild(J),Or(r),he.scrollToEnd()},clearScreen:()=>{ne(),W()},scrollToEnd:()=>{if(de.scroll!=="none")if(c)if(c=!1,de.scroll==="element")r.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"});else{const T=Math.max(document.body.scrollTop,document.documentElement.scrollTop),O=ee.getBoundingClientRect().top+T;O<T&&window.scrollTo({top:O,behavior:"smooth"})}else if(de.scroll==="element")ee.lastElementChild?.scrollIntoView({block:"end",inline:"nearest",behavior:"smooth"});else{let T=o;const O=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(T>O){const H=document.documentElement.scrollHeight-window.innerHeight;T>H&&(T=H),window.scrollTo({top:T,behavior:"smooth"})}}},processText:(T,O)=>se.process(T,O),renderHtml:(T,O)=>Ce(he.processText(T,O))};function ge(T){if(T.start!=t.start){t=T,M.reset(),ee.innerHTML="",C(t.start);return}const O=t;t=T,lc(O,T,ee,(J,we)=>{const ve=s;s=we;try{return he.renderHtml(J,!1)}finally{s=ve}},_,J=>N(J)),oe(),Z()}function oe(){const T=ee.querySelectorAll(".squiffy-output-section:last-child");r=T[T.length-1];const O=r.getAttribute("data-section");s=t.sections[O]}function Z(){i=r.querySelector(".squiffy-output-passage:last-child")}function le(){const T=te(),O=ee.querySelectorAll(".squiffy-output-section").length+ee.querySelectorAll(".squiffy-output-passage").length;return T?O+T.children.length:O}function Ee(T){T.querySelectorAll("[data-squiffy-disabled]").forEach(O=>{O.hasAttribute("contenteditable")?O.setAttribute("contenteditable","true"):O.disabled=!1,O.removeAttribute("data-squiffy-disabled")})}function be(){const T=i??r,O=[...ee.querySelectorAll("[data-goto]")].filter(H=>H!==T).length;return le()-O>1}function Pe(){if(a||!be())return;m();do Ie();while((i??r).hasAttribute("data-goto")&&le()>1);L(),be()||h.emit("canGoBackChanged",{canGoBack:!1});const T=i?.getAttribute("data-passage");h.emit("navigated",T?{section:X("_section"),passage:T}:{section:X("_section")})}function Ie(){const T=te();if(i){const O=i.getAttribute("data-passage");Ae(i.getAttribute("data-undo")),i.remove();let H=!1,J=!1;for(const we of ee.children)if(we!==T){if(we.getAttribute("data-clear")=="true"&&we.children.length==0){H=!0;continue}J=!0;break}H&&!J&&(ue(),oe());for(const we of r.querySelectorAll("a.squiffy-link[data-passage]"))we.getAttribute("data-passage")==O&&S(we);Z()}else{Ae(r.getAttribute("data-undo")),r.remove();let O=!1;for(const H of[...ee.children])if(H!==T){O=!0;break}O||ue(),oe(),Z(),Ee(r)}}const _e=e.element,ee=document.createElement("div");_e.appendChild(ee),t=e.story;const Ce=zu(e.resolveAssetUrl),de={scroll:e.scroll||"body",persist:e.persist===void 0?!0:e.persist,onSet:e.onSet||(()=>{})};let me="";de.persist&&(e.storyId!==void 0?me=e.storyId:window.location.protocol==="file:"?me=t.id||"":me=window.location.pathname,me||(console.warn("Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled."),de.persist=!1)),de.scroll==="element"&&(ee.style.overflowY="auto"),ee.addEventListener("click",v),ee.addEventListener("keypress",async function(T){T.key==="Enter"&&await v(T)});let re={};const ke=function(T,O){T!="_output"&&(T in re||(re[T]=O))},Se=function(){(i??r).setAttribute("data-undo",JSON.stringify(re)),re={}},Ae=function(T){if(!T)return;const O=JSON.parse(T);if(O)for(const H of Object.keys(O))M.setInternal(H,O[H],!1)},M=new ac(de.persist,me,de.onSet,h,ke),X=M.get.bind(M),Q=M.set.bind(M),se=new nc(()=>t,M,()=>s),Me=new gc,Ne=T=>T in t.sections&&t.sections[T].text||null,yt=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,At=T=>{p.push(T)},Lt=new Mu,je=new cc(ee,se,M,Me,Ne,yt,he.renderHtml,At,Lt,h,Ce);return je.add(As.ReplaceLabel()),je.add(As.RotateSequencePlugin()),je.add(As.RandomPlugin()),je.add(As.LivePlugin()),je.add(As.AnimatePlugin()),{begin:y,restart:R,get:X,set:Q,clickLink:g,update:ge,goBack:Pe,canGoBack:be,on:(T,O)=>h.on(T,O),off:(T,O)=>h.off(T,O),once:(T,O)=>h.once(T,O)}};return Mr.init=Uu,Mr})({});\n\n//# sourceMappingURL=squiffy.runtime.global.js.map', Ye = `/* Core Squiffy Runtime Styles. See https://squiffystory.com/styling/ for how to customise these. */
443
443
 
444
444
  /* Colours. Each has a light and a dark value, and light-dark() picks one from the page's
445
445
  color-scheme. This file doesn't set color-scheme itself, so a story embedded in a page stays
@@ -540,7 +540,7 @@ select.squiffy-invalid:focus
540
540
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--squiffy-error) 50%, transparent);
541
541
  }
542
542
 
543
- /* Header button styles: the Restart button */
543
+ /* Header button styles: the Back and Restart buttons */
544
544
  button.squiffy-header-button
545
545
  {
546
546
  color: var(--squiffy-muted);
@@ -555,12 +555,19 @@ button.squiffy-header-button
555
555
  transition: color 0.2s ease-in-out, text-decoration-color 0.2s ease-in-out;
556
556
  }
557
557
 
558
- button.squiffy-header-button:hover
558
+ button.squiffy-header-button:hover:not(:disabled)
559
559
  {
560
560
  color: var(--squiffy-text);
561
561
  text-decoration-color: currentColor;
562
562
  }
563
563
 
564
+ /* The Back button, when there's nothing to go back to */
565
+ button.squiffy-header-button:disabled
566
+ {
567
+ cursor: default;
568
+ opacity: 0.5;
569
+ }
570
+
564
571
  /* Output block spacing */
565
572
  div.squiffy-output-block:not(:last-child),
566
573
  div.squiffy-output-passage:not(:last-child),
@@ -638,7 +645,7 @@ div.squiffy-output-section:not(:last-child)
638
645
  animation: none;
639
646
  }
640
647
  }
641
- `, Ye = `<!DOCTYPE html>
648
+ `, Ge = `<!DOCTYPE html>
642
649
  <html>
643
650
  <!-- INFO -->
644
651
  <head>
@@ -675,7 +682,20 @@ div.squiffy-output-section:not(:last-child)
675
682
  }
676
683
  });
677
684
 
685
+ // The Back button, unless the story's squiffy.json turns it off
686
+ const backButton = document.getElementById('squiffy-back');
687
+ if (backButton) {
688
+ backButton.addEventListener('click', function () {
689
+ squiffyApi.goBack();
690
+ });
691
+ squiffyApi.on('canGoBackChanged', function (event) {
692
+ backButton.disabled = !event.canGoBack;
693
+ });
694
+ }
695
+
678
696
  await squiffyApi.begin();
697
+ // A saved game may have somewhere to go back to
698
+ if (backButton) backButton.disabled = !squiffyApi.canGoBack();
679
699
  });
680
700
  <\/script>
681
701
  <!-- STYLESHEETS -->
@@ -683,6 +703,7 @@ div.squiffy-output-section:not(:last-child)
683
703
  <body>
684
704
  <div id="squiffy-container">
685
705
  <div id="squiffy-header">
706
+ <!-- BACK_BUTTON -->
686
707
  <button class="squiffy-header-button" id="restart" tabindex="0">Restart</button>
687
708
  <button class="squiffy-header-button" id="squiffy-theme" type="button">
688
709
  <svg class="squiffy-icon-dark" viewBox="0 0 24 24" aria-hidden="true"><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></svg>
@@ -742,7 +763,7 @@ div.squiffy-output-section:not(:last-child)
742
763
  <\/script>
743
764
  </body>
744
765
  </html>
745
- `, Ge = `/* Page layout styles for an exported story. See https://squiffystory.com/styling/ for how to customise these. */
766
+ `, Ze = `/* Page layout styles for an exported story. See https://squiffystory.com/styling/ for how to customise these. */
746
767
 
747
768
  :root
748
769
  {
@@ -862,47 +883,47 @@ div#squiffy img
862
883
  max-width: 100%;
863
884
  height: auto;
864
885
  }
865
- `, Ze = "@textadventures/squiffy-packager", Je = "7.0.0-beta.3", Qe = {
886
+ `, Je = "@textadventures/squiffy-packager", Qe = "7.0.0-beta.5", Ke = {
866
887
  type: "git",
867
888
  url: "git+https://github.com/textadventures/squiffy.git",
868
889
  directory: "packager"
869
- }, Ke = { access: "public" }, et = "dist/packager.js", tt = "dist/packager.d.ts", st = {
890
+ }, et = { access: "public" }, tt = "dist/packager.js", st = "dist/packager.d.ts", nt = {
870
891
  build: "vite build",
871
892
  test: "vitest --run",
872
893
  dev: "vitest"
873
- }, nt = "Alex Warren", rt = [
894
+ }, rt = "Alex Warren", it = [
874
895
  "CrisisSDK",
875
896
  "mrangel",
876
897
  "Luis Felipe Morales"
877
898
  ];
878
- var it = {
899
+ var ot = {
879
900
  fflate: "^0.8.3",
880
- "squiffy-compiler": "^7.0.0-beta.3",
881
- "squiffy-runtime": "^7.0.0-beta.3"
882
- }, ot = {
901
+ "squiffy-compiler": "^7.0.0-beta.5",
902
+ "squiffy-runtime": "^7.0.0-beta.5"
903
+ }, at = {
883
904
  esbuild: "^0.28.2",
884
905
  tsx: "^4.23.15",
885
906
  typescript: "^6.0.3",
886
907
  vite: "^8.3.8",
887
908
  "vite-plugin-dts": "^5.1.2",
888
909
  vitest: "^5.1.0"
889
- }, at = ["dist"], lt = "module", ct = {
890
- name: Ze,
891
- version: Je,
892
- repository: Qe,
893
- publishConfig: Ke,
894
- main: et,
895
- types: tt,
896
- scripts: st,
897
- author: nt,
898
- contributors: rt,
910
+ }, lt = ["dist"], ct = "module", ht = {
911
+ name: Je,
912
+ version: Qe,
913
+ repository: Ke,
914
+ publishConfig: et,
915
+ main: tt,
916
+ types: st,
917
+ scripts: nt,
918
+ author: rt,
919
+ contributors: it,
899
920
  license: "MIT",
900
921
  description: "",
901
- dependencies: it,
902
- devDependencies: ot,
903
- files: at,
904
- type: lt
905
- }, ht = ct.version, ut = {
922
+ dependencies: ot,
923
+ devDependencies: at,
924
+ files: lt,
925
+ type: ct
926
+ }, ut = ht.version, pt = {
906
927
  apng: "image/apng",
907
928
  avif: "image/avif",
908
929
  bmp: "image/bmp",
@@ -934,7 +955,7 @@ var it = {
934
955
  pdf: "application/pdf",
935
956
  json: "application/json",
936
957
  txt: "text/plain"
937
- }, pt = (e) => ut[e.split(".").pop()?.toLowerCase() ?? ""] ?? "application/octet-stream", dt = (e) => {
958
+ }, dt = (e) => pt[e.split(".").pop()?.toLowerCase() ?? ""] ?? "application/octet-stream", we = (e) => {
938
959
  const t = e.replace(/\\/g, "/").replace(/^(\.\/)+/, "");
939
960
  if (!t || t.startsWith("/") || /^[a-z]:/i.test(t) || t.split("/").includes("..")) throw new Error(`Invalid asset path: ${e}`);
940
961
  return t;
@@ -945,49 +966,71 @@ var it = {
945
966
  }, gt = (e) => JSON.stringify(e).replace(/</g, "\\u003c"), yt = async (e, t = !1) => {
946
967
  const n = typeof t == "boolean" ? { createZip: t } : t, s = {}, i = e.getUiInfo(), r = `<!--
947
968
 
948
- Created with Squiffy ${ht}
969
+ Created with Squiffy ${ut}
949
970
 
950
971
  https://squiffystory.com
951
972
  https://github.com/textadventures/squiffy
952
973
 
953
- -->`, a = i.externalScripts.map((k) => `<script src="${k}"><\/script>`).join(`
954
- `), l = i.externalStylesheets.map((k) => `<link rel="stylesheet" href="${k}"/>`).join(`
955
- `), u = Xe.toString() + `
974
+ -->`, a = Ye.toString() + `
956
975
 
957
- ` + Ge.toString(), c = await e.getJs(), o = {};
958
- for (const [k, _] of Object.entries(n.assets ?? {})) o[dt(k)] = _;
959
- const h = Object.keys(o).length > 0;
960
- let g = "", m, b, y;
976
+ ` + Ze.toString(), l = await e.getJs(), u = {};
977
+ for (const [m, d] of Object.entries(n.assets ?? {})) u[we(m)] = d;
978
+ const c = /* @__PURE__ */ new Set(), o = (m) => {
979
+ if (!n.inlineHtml) return;
980
+ let d;
981
+ try {
982
+ d = we(m);
983
+ } catch {
984
+ return;
985
+ }
986
+ const S = u[d];
987
+ if (S)
988
+ return c.add(d), new TextDecoder().decode(S);
989
+ }, h = i.externalScripts.map((m) => {
990
+ const d = o(m);
991
+ return d === void 0 ? `<script src="${m}"><\/script>` : `<script>
992
+ ` + d.replace(/<\/(script)/gi, "<\\/$1") + `
993
+ <\/script>`;
994
+ }).join(`
995
+ `), v = i.externalStylesheets.map((m) => {
996
+ const d = o(m);
997
+ return d === void 0 ? `<link rel="stylesheet" href="${m}"/>` : `<style>
998
+ ` + d.replace(/<\/(style)/gi, "<\\/$1") + `
999
+ </style>`;
1000
+ }).join(`
1001
+ `);
1002
+ let y = "", _, b, x;
961
1003
  if (n.inlineHtml) {
962
- if (m = `<style>
963
- ` + u + `
1004
+ if (_ = `<style>
1005
+ ` + a + `
964
1006
  </style>`, b = `<script>
965
1007
  ` + xe + `
966
- <\/script>`, y = `<script>
967
- ` + c + `
968
- <\/script>`, h) {
969
- const k = Object.fromEntries(Object.entries(o).map(([_, O]) => [_, `data:${pt(_)};base64,${ft(O)}`]));
970
- y += `
1008
+ <\/script>`, x = `<script>
1009
+ ` + l + `
1010
+ <\/script>`, Object.keys(u).some((m) => !c.has(m))) {
1011
+ const m = Object.fromEntries(Object.entries(u).filter(([d]) => !c.has(d)).map(([d, S]) => [d, `data:${dt(d)};base64,${ft(S)}`]));
1012
+ x += `
971
1013
  <script>
972
- var squiffyAssetUrls = ` + gt(k) + `;
973
- <\/script>`, g = 'resolveAssetUrl: function (path) { return squiffyAssetUrls[path.replace(/^(\\.\\/)+/, "")] || path; },';
1014
+ var squiffyAssetUrls = ` + gt(m) + `;
1015
+ <\/script>`, y = 'resolveAssetUrl: function (path) { return squiffyAssetUrls[path.replace(/^(\\.\\/)+/, "")] || path; },';
974
1016
  }
975
1017
  } else
976
- m = '<link rel="stylesheet" href="style.css"/>', b = '<script src="squiffy.runtime.global.js"><\/script>', y = '<script src="story.js"><\/script>', s["story.js"] = c, s["squiffy.runtime.global.js"] = xe, s["style.css"] = u;
977
- let d = Ye.toString();
978
- return d = d.replace("<!-- INFO -->", () => r), d = d.replace("<!-- TITLE -->", () => i.title), d = d.replace("<!-- SCRIPTS -->", () => a), d = d.replace("<!-- STYLESHEETS -->", () => l), d = d.replace("<!-- STYLE_CONTENT -->", () => m), d = d.replace("<!-- RUNTIME_CONTENT -->", () => b), d = d.replace("<!-- STORY_CONTENT -->", () => y), d = d.replace(/\n([ \t]*)\/\* ASSET_OPTIONS \*\//, (k, _) => g ? `
979
- ` + _ + g : ""), s["index.html"] = d, {
1018
+ _ = '<link rel="stylesheet" href="style.css"/>', b = '<script src="squiffy.runtime.global.js"><\/script>', x = '<script src="story.js"><\/script>', s["story.js"] = l, s["squiffy.runtime.global.js"] = xe, s["style.css"] = a;
1019
+ let f = Ge.toString();
1020
+ return f = f.replace("<!-- INFO -->", () => r), f = f.replace("<!-- TITLE -->", () => i.title), f = f.replace("<!-- SCRIPTS -->", () => h), f = f.replace("<!-- STYLESHEETS -->", () => v), f = f.replace("<!-- STYLE_CONTENT -->", () => _), f = f.replace("<!-- RUNTIME_CONTENT -->", () => b), f = f.replace(/[ \t]*<!-- BACK_BUTTON -->\n/, () => n.backButton === !1 ? "" : ` <button class="squiffy-header-button" id="squiffy-back" type="button" disabled>Back</button>
1021
+ `), f = f.replace("<!-- STORY_CONTENT -->", () => x), f = f.replace(/\n([ \t]*)\/\* ASSET_OPTIONS \*\//, (m, d) => y ? `
1022
+ ` + d + y : ""), s["index.html"] = f, {
980
1023
  files: s,
981
- zip: n.createZip ? We({
982
- ...n.inlineHtml ? {} : o,
983
- ...Object.fromEntries(Object.entries(s).map(([k, _]) => [k, le(_)]))
1024
+ zip: n.createZip ? Xe({
1025
+ ...n.inlineHtml ? {} : u,
1026
+ ...Object.fromEntries(Object.entries(s).map(([m, d]) => [m, le(d)]))
984
1027
  }) : void 0
985
1028
  };
986
1029
  };
987
1030
  export {
988
1031
  yt as createPackage,
989
- pt as getMimeType,
990
- dt as normaliseAssetPath
1032
+ dt as getMimeType,
1033
+ we as normaliseAssetPath
991
1034
  };
992
1035
 
993
1036
  //# sourceMappingURL=packager.js.map