@builder.io/sdk-react 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/lib/browser/blocks-exports.cjs +12 -12
  2. package/lib/browser/blocks-exports.mjs +185 -164
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +1 -1
  6. package/lib/browser/init.mjs +1 -1
  7. package/lib/{node/server-entry-0687830a.js → browser/server-entry-0c6c220c.js} +1 -1
  8. package/lib/browser/{server-entry-02cecfb7.cjs → server-entry-7e145817.cjs} +1 -1
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{accordion-368a2cf8.cjs → accordion-72dab8ce.cjs} +1 -1
  12. package/lib/edge/{accordion-0eca9b08.js → accordion-99129d68.js} +1 -1
  13. package/lib/edge/blocks-426e0c44.js +808 -0
  14. package/lib/edge/blocks-53ae1b87.cjs +12 -0
  15. package/lib/edge/blocks-exports.cjs +1 -1
  16. package/lib/edge/blocks-exports.mjs +2 -2
  17. package/lib/edge/{button-e852700f.js → button-778062cd.js} +2 -2
  18. package/lib/edge/{button-3ed29654.cjs → button-967d0268.cjs} +1 -1
  19. package/lib/edge/{columns-ee464f6c.js → columns-3a8c4d3f.js} +10 -9
  20. package/lib/edge/columns-3b921658.cjs +28 -0
  21. package/lib/edge/{content-variants-c0257a99.js → content-variants-15d191de.js} +15 -13
  22. package/lib/edge/content-variants-4b8718f8.cjs +134 -0
  23. package/lib/edge/evaluate-26c0fdb7.js +2615 -0
  24. package/lib/edge/evaluate-c0eeb4f8.cjs +21 -0
  25. package/lib/edge/form-9d9dce5d.cjs +1 -0
  26. package/lib/edge/{form-8191004e.js → form-ccb0b912.js} +8 -7
  27. package/lib/edge/{get-class-prop-name-d18337d2.js → get-class-prop-name-0a91c3bd.js} +1 -1
  28. package/lib/edge/{get-class-prop-name-5fc98fcc.cjs → get-class-prop-name-eae60eae.cjs} +1 -1
  29. package/lib/edge/{image-e3fcd611.js → image-6a074aab.js} +27 -25
  30. package/lib/edge/image-eebfcbac.cjs +17 -0
  31. package/lib/edge/{img-10ef20a5.cjs → img-183de27d.cjs} +1 -1
  32. package/lib/edge/{img-a24ed75f.js → img-75751c89.js} +1 -1
  33. package/lib/edge/index.cjs +1 -1
  34. package/lib/edge/index.mjs +1 -1
  35. package/lib/edge/init.cjs +1 -1
  36. package/lib/edge/init.mjs +1 -1
  37. package/lib/edge/{input-3876429d.js → input-27972020.js} +1 -1
  38. package/lib/edge/{input-6325bfc0.cjs → input-fd18a67d.cjs} +1 -1
  39. package/lib/edge/{select-5dc1c7d1.js → select-60ff549c.js} +1 -1
  40. package/lib/edge/{select-3f0f00f3.cjs → select-6ea0d59f.cjs} +1 -1
  41. package/lib/edge/{server-entry-805b9266.cjs → server-entry-4133a544.cjs} +1 -1
  42. package/lib/edge/{server-entry-ff728468.js → server-entry-feff6177.js} +1 -1
  43. package/lib/edge/server-entry.cjs +1 -1
  44. package/lib/edge/server-entry.mjs +1 -1
  45. package/lib/edge/{slot-20fe5e4f.js → slot-2347377e.js} +12 -11
  46. package/lib/edge/slot-a4509cae.cjs +1 -0
  47. package/lib/edge/{symbol-5012ed02.cjs → symbol-98650b06.cjs} +1 -1
  48. package/lib/edge/{symbol-e95082e1.js → symbol-dcef0d8e.js} +2 -2
  49. package/lib/edge/{tabs-261e8cd4.js → tabs-0784574b.js} +10 -9
  50. package/lib/edge/tabs-4c131e17.cjs +1 -0
  51. package/lib/edge/text-1c1986aa.cjs +1 -0
  52. package/lib/edge/text-6f7cbc35.js +38 -0
  53. package/lib/node/blocks-exports.cjs +15 -15
  54. package/lib/node/blocks-exports.mjs +186 -165
  55. package/lib/node/index.cjs +1 -1
  56. package/lib/node/index.mjs +2 -2
  57. package/lib/node/init.cjs +1 -1
  58. package/lib/node/init.mjs +2 -2
  59. package/lib/node/{node-runtime-160b6846.cjs → node-runtime-4978bc21.cjs} +1 -1
  60. package/lib/node/{node-runtime-405effc5.js → node-runtime-ce5c71e5.js} +1 -1
  61. package/lib/{browser/server-entry-0687830a.js → node/server-entry-0c6c220c.js} +1 -1
  62. package/lib/node/{server-entry-02cecfb7.cjs → server-entry-7e145817.cjs} +1 -1
  63. package/lib/node/server-entry.cjs +1 -1
  64. package/lib/node/server-entry.mjs +1 -1
  65. package/package.json +1 -1
  66. package/types/blocks/image/image.types.d.ts +2 -0
  67. package/types/blocks/symbol/symbol.types.d.ts +1 -0
  68. package/types/constants/sdk-version.d.ts +1 -1
  69. package/lib/edge/blocks-db3cfcac.js +0 -3419
  70. package/lib/edge/blocks-f524a758.cjs +0 -32
  71. package/lib/edge/columns-1f84e26e.cjs +0 -28
  72. package/lib/edge/content-variants-42f2495b.cjs +0 -134
  73. package/lib/edge/form-4444faf2.cjs +0 -1
  74. package/lib/edge/image-344ddbb0.cjs +0 -17
  75. package/lib/edge/slot-a64b535f.cjs +0 -1
  76. package/lib/edge/tabs-d672f816.cjs +0 -1
  77. package/lib/edge/text-5915f038.js +0 -17
  78. package/lib/edge/text-e6dbb721.cjs +0 -1
@@ -1,3419 +0,0 @@
1
- var kn = Object.defineProperty;
2
- var En = (e, t, n) => t in e ? kn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Rt = (e, t, n) => (En(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { jsx as b, Fragment as Z, jsxs as Mt } from "react/jsx-runtime";
5
- import { createContext as Cn, useState as $r, useEffect as jn, useContext as Rr } from "react";
6
- import { BuilderContext as Gr } from "./blocks-exports.mjs";
7
- import { isEditing as Dt, isBrowser as Ut, getUserAttributes as On, logger as Wt, checkIsDefined as ot, TARGET as Vr } from "./server-entry-ff728468.js";
8
- import { getClassPropName as An } from "./get-class-prop-name-d18337d2.js";
9
- import { DynamicRenderer as In } from "./dynamic-renderer-8b343325.js";
10
- const Xr = (e) => JSON.parse(JSON.stringify(e)), Hr = (e, t, n) => {
11
- if (Object(e) !== e)
12
- return e;
13
- const r = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
14
- return r.slice(0, -1).reduce((o, s, a) => Object(o[s]) === o[s] ? o[s] : o[s] = Math.abs(Number(r[a + 1])) >> 0 === +r[a + 1] ? [] : {}, e)[r[r.length - 1]] = n, e;
15
- }, Jr = ({
16
- builder: e,
17
- context: t,
18
- event: n,
19
- state: r
20
- }) => Object.entries({
21
- state: r,
22
- Builder: e,
23
- // legacy
24
- builder: e,
25
- context: t,
26
- event: n
27
- }), bn = () => ({
28
- isEditing: Dt(),
29
- isBrowser: Ut(),
30
- isServer: !Ut(),
31
- getUserAttributes: () => On()
32
- }), Tn = (e, {
33
- isExpression: t = !0
34
- }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, Pn = Cn({ registeredComponents: {} });
35
- function Nn(e) {
36
- var t;
37
- return {
38
- ...(t = e.component) == null ? void 0 : t.options,
39
- ...e.options
40
- };
41
- }
42
- const Rn = ({
43
- code: e,
44
- builder: t,
45
- context: n,
46
- event: r,
47
- localState: o,
48
- rootSetState: s,
49
- rootState: a
50
- }) => {
51
- const f = Jr({
52
- builder: t,
53
- context: n,
54
- event: r,
55
- state: Kr({
56
- rootState: a,
57
- localState: o,
58
- rootSetState: s
59
- })
60
- });
61
- return new Function(...f.map(([g]) => g), e)(...f.map(([, g]) => g));
62
- };
63
- function Kr({
64
- rootState: e,
65
- localState: t,
66
- rootSetState: n
67
- }) {
68
- return new Proxy(e, {
69
- get: (r, o) => {
70
- if (t && o in t)
71
- return t[o];
72
- const s = r[o];
73
- return typeof s == "object" && s !== null ? Kr({
74
- rootState: s,
75
- localState: void 0,
76
- rootSetState: n ? (a) => {
77
- r[o] = a, n(r);
78
- } : void 0
79
- }) : s;
80
- },
81
- set: (r, o, s) => {
82
- if (t && o in t)
83
- throw new Error("Writing to local state is not allowed as it is read-only.");
84
- return r[o] = s, n == null || n(r), !0;
85
- }
86
- });
87
- }
88
- var I, Bn = function(e) {
89
- function t(i) {
90
- return 48 > i ? i === 36 : 58 > i ? !0 : 65 > i ? !1 : 91 > i ? !0 : 97 > i ? i === 95 : 123 > i ? !0 : 170 <= i && Sn.test(String.fromCharCode(i));
91
- }
92
- function n(i) {
93
- return 65 > i ? i === 36 : 91 > i ? !0 : 97 > i ? i === 95 : 123 > i ? !0 : 170 <= i && Nr.test(String.fromCharCode(i));
94
- }
95
- function r(i, l) {
96
- for (var u = d, p = 1, x = 0; ; ) {
97
- rt.lastIndex = x;
98
- var U = rt.exec(u);
99
- if (U && U.index < i)
100
- ++p, x = U.index + U[0].length;
101
- else
102
- break;
103
- }
104
- throw u = {
105
- line: p,
106
- ab: i - x
107
- }, l += " (" + u.line + ":" + u.ab + ")", l = new SyntaxError(l), l.j = i, l.X = u, l.o = c, l;
108
- }
109
- function o(i) {
110
- i = i.split(" ");
111
- for (var l = /* @__PURE__ */ Object.create(null), u = 0; u < i.length; u++)
112
- l[i[u]] = !0;
113
- return function(p) {
114
- return l[p] || !1;
115
- };
116
- }
117
- function s() {
118
- this.line = de, this.ab = c - te;
119
- }
120
- function a(i, l) {
121
- me = c, j.C && (wt = new s()), S = i, g(), K = l, Pe = i.m;
122
- }
123
- function f() {
124
- for (var i = c, l = j.va && j.C && new s(), u = d.charCodeAt(c += 2); c < ve && u !== 10 && u !== 13 && u !== 8232 && u !== 8233; )
125
- ++c, u = d.charCodeAt(c);
126
- j.va && j.va(!1, d.slice(i + 2, c), i, c, l, j.C && new s());
127
- }
128
- function g() {
129
- for (; c < ve; ) {
130
- var i = d.charCodeAt(c);
131
- if (i === 32)
132
- ++c;
133
- else if (i === 13)
134
- ++c, i = d.charCodeAt(c), i === 10 && ++c, j.C && (++de, te = c);
135
- else if (i === 10 || i === 8232 || i === 8233)
136
- ++c, j.C && (++de, te = c);
137
- else if (8 < i && 14 > i)
138
- ++c;
139
- else if (i === 47)
140
- if (i = d.charCodeAt(c + 1), i === 42) {
141
- i = void 0;
142
- var l = j.va && j.C && new s(), u = c, p = d.indexOf("*/", c += 2);
143
- if (p === -1 && r(c - 2, "Unterminated comment"), c = p + 2, j.C)
144
- for (rt.lastIndex = u; (i = rt.exec(d)) && i.index < c; )
145
- ++de, te = i.index + i[0].length;
146
- j.va && j.va(!0, d.slice(u + 2, p), u, c, l, j.C && new s());
147
- } else if (i === 47)
148
- f();
149
- else
150
- break;
151
- else if (i === 160)
152
- ++c;
153
- else if (5760 <= i && wn.test(String.fromCharCode(i)))
154
- ++c;
155
- else
156
- break;
157
- }
158
- }
159
- function O(i) {
160
- switch (i) {
161
- case 46:
162
- i = d.charCodeAt(c + 1), 48 <= i && 57 >= i ? N(!0) : (++c, a(Cr));
163
- return;
164
- case 40:
165
- return ++c, a(re);
166
- case 41:
167
- return ++c, a(z);
168
- case 59:
169
- return ++c, a(ne);
170
- case 44:
171
- return ++c, a(pe);
172
- case 91:
173
- return ++c, a(bt);
174
- case 93:
175
- return ++c, a(Tt);
176
- case 123:
177
- return ++c, a(Be);
178
- case 125:
179
- return ++c, a(Se);
180
- case 58:
181
- return ++c, a(Me);
182
- case 63:
183
- return ++c, a(jr);
184
- case 48:
185
- if (i = d.charCodeAt(c + 1), i === 120 || i === 88) {
186
- c += 2, i = R(16), i === null && r(D + 2, "Expected hexadecimal number"), n(d.charCodeAt(c)) && r(c, "Identifier directly after number"), a(Re, i);
187
- return;
188
- }
189
- case 49:
190
- case 50:
191
- case 51:
192
- case 52:
193
- case 53:
194
- case 54:
195
- case 55:
196
- case 56:
197
- case 57:
198
- return N(!1);
199
- case 34:
200
- case 39:
201
- c++;
202
- for (var l = ""; ; ) {
203
- c >= ve && r(D, "Unterminated string constant");
204
- var u = d.charCodeAt(c);
205
- if (u === i) {
206
- ++c, a(Qe, l);
207
- break;
208
- }
209
- if (u === 92) {
210
- u = d.charCodeAt(++c);
211
- var p = /^[0-7]+/.exec(d.slice(c, c + 3));
212
- for (p && (p = p[0]); p && 255 < parseInt(p, 8); )
213
- p = p.slice(0, -1);
214
- if (p === "0" && (p = null), ++c, p)
215
- J && r(c - 2, "Octal literal in strict mode"), l += String.fromCharCode(parseInt(p, 8)), c += p.length - 1;
216
- else
217
- switch (u) {
218
- case 110:
219
- l += `
220
- `;
221
- break;
222
- case 114:
223
- l += "\r";
224
- break;
225
- case 120:
226
- l += String.fromCharCode(ue(2));
227
- break;
228
- case 117:
229
- l += String.fromCharCode(ue(4));
230
- break;
231
- case 85:
232
- l += String.fromCharCode(ue(8));
233
- break;
234
- case 116:
235
- l += " ";
236
- break;
237
- case 98:
238
- l += "\b";
239
- break;
240
- case 118:
241
- l += "\v";
242
- break;
243
- case 102:
244
- l += "\f";
245
- break;
246
- case 48:
247
- l += "\0";
248
- break;
249
- case 13:
250
- d.charCodeAt(c) === 10 && ++c;
251
- case 10:
252
- j.C && (te = c, ++de);
253
- break;
254
- default:
255
- l += String.fromCharCode(u);
256
- }
257
- } else
258
- u !== 13 && u !== 10 && u !== 8232 && u !== 8233 || r(D, "Unterminated string constant"), l += String.fromCharCode(u), ++c;
259
- }
260
- return;
261
- case 47:
262
- i = d.charCodeAt(c + 1), Pe ? (++c, T()) : i === 61 ? w(ye, 2) : w(Or, 1);
263
- return;
264
- case 37:
265
- case 42:
266
- d.charCodeAt(c + 1) === 61 ? w(ye, 2) : w(yn, 1);
267
- return;
268
- case 124:
269
- case 38:
270
- l = d.charCodeAt(c + 1), l === i ? w(i === 124 ? br : Tr, 2) : l === 61 ? w(ye, 2) : w(i === 124 ? un : fn, 1);
271
- return;
272
- case 94:
273
- d.charCodeAt(c + 1) === 61 ? w(ye, 2) : w(cn, 1);
274
- return;
275
- case 43:
276
- case 45:
277
- l = d.charCodeAt(c + 1), l === i ? l === 45 && d.charCodeAt(c + 2) === 62 && tt.test(d.slice(fe, c)) ? (c += 3, f(), g(), C()) : w(ln, 2) : l === 61 ? w(ye, 2) : w(dn, 1);
278
- return;
279
- case 60:
280
- case 62:
281
- l = d.charCodeAt(c + 1), u = 1, l === i ? (u = i === 62 && d.charCodeAt(c + 2) === 62 ? 3 : 2, d.charCodeAt(c + u) === 61 ? w(ye, u + 1) : w(gn, u)) : l === 33 && i === 60 && d.charCodeAt(c + 2) === 45 && d.charCodeAt(c + 3) === 45 ? (c += 4, f(), g(), C()) : (l === 61 && (u = d.charCodeAt(c + 2) === 61 ? 3 : 2), w(hn, u));
282
- return;
283
- case 61:
284
- case 33:
285
- d.charCodeAt(c + 1) === 61 ? w(pn, d.charCodeAt(c + 2) === 61 ? 3 : 2) : w(i === 61 ? Ar : Ir, 1);
286
- return;
287
- case 126:
288
- return w(Ir, 1);
289
- }
290
- return !1;
291
- }
292
- function C(i) {
293
- if (i ? c = D + 1 : D = c, j.C && (mt = new s()), i)
294
- return T();
295
- if (c >= ve)
296
- return a(kt);
297
- if (i = d.charCodeAt(c), n(i) || i === 92)
298
- return H();
299
- if (O(i) === !1) {
300
- if (i = String.fromCharCode(i), i === "\\" || Nr.test(i))
301
- return H();
302
- r(c, "Unexpected character '" + i + "'");
303
- }
304
- }
305
- function w(i, l) {
306
- var u = d.slice(c, c + l);
307
- c += l, a(i, u);
308
- }
309
- function T() {
310
- for (var i, l, u = c; ; ) {
311
- c >= ve && r(u, "Unterminated regexp");
312
- var p = d.charAt(c);
313
- if (tt.test(p) && r(u, "Unterminated regexp"), i)
314
- i = !1;
315
- else {
316
- if (p === "[")
317
- l = !0;
318
- else if (p === "]" && l)
319
- l = !1;
320
- else if (p === "/" && !l)
321
- break;
322
- i = p === "\\";
323
- }
324
- ++c;
325
- }
326
- i = d.slice(u, c), ++c, (l = $()) && !/^[gmi]*$/.test(l) && r(u, "Invalid regexp flag");
327
- try {
328
- var x = new RegExp(i, l);
329
- } catch (U) {
330
- throw U instanceof SyntaxError && r(u, U.message), U;
331
- }
332
- a(ir, x);
333
- }
334
- function R(i, l) {
335
- for (var u = c, p = 0, x = l === void 0 ? 1 / 0 : l, U = 0; U < x; ++U) {
336
- var G = d.charCodeAt(c);
337
- if (G = 97 <= G ? G - 97 + 10 : 65 <= G ? G - 65 + 10 : 48 <= G && 57 >= G ? G - 48 : 1 / 0, G >= i)
338
- break;
339
- ++c, p = p * i + G;
340
- }
341
- return c === u || l !== void 0 && c - u !== l ? null : p;
342
- }
343
- function N(i) {
344
- var l = c, u = !1, p = d.charCodeAt(c) === 48;
345
- i || R(10) !== null || r(l, "Invalid number"), d.charCodeAt(c) === 46 && (++c, R(10), u = !0), i = d.charCodeAt(c), (i === 69 || i === 101) && (i = d.charCodeAt(++c), i !== 43 && i !== 45 || ++c, R(10) === null && r(l, "Invalid number"), u = !0), n(d.charCodeAt(c)) && r(c, "Identifier directly after number"), i = d.slice(l, c);
346
- var x;
347
- u ? x = parseFloat(i) : p && i.length !== 1 ? /[89]/.test(i) || J ? r(l, "Invalid number") : x = parseInt(i, 8) : x = parseInt(i, 10), a(Re, x);
348
- }
349
- function ue(i) {
350
- return i = R(16, i), i === null && r(D, "Bad character escape sequence"), i;
351
- }
352
- function $() {
353
- xe = !1;
354
- for (var i, l = !0, u = c; ; ) {
355
- var p = d.charCodeAt(c);
356
- if (t(p))
357
- xe && (i += d.charAt(c)), ++c;
358
- else if (p === 92) {
359
- xe || (i = d.slice(u, c)), xe = !0, d.charCodeAt(++c) !== 117 && r(c, "Expecting Unicode escape sequence \\uXXXX"), ++c, p = ue(4);
360
- var x = String.fromCharCode(p);
361
- x || r(c - 1, "Invalid Unicode escape"), (l ? n(p) : t(p)) || r(c - 4, "Invalid Unicode escape"), i += x;
362
- } else
363
- break;
364
- l = !1;
365
- }
366
- return xe ? i : d.slice(u, c);
367
- }
368
- function H() {
369
- var i = $(), l = we;
370
- !xe && mn(i) && (l = an[i]), a(l, i);
371
- }
372
- function k() {
373
- St = D, fe = me, xt = wt, C();
374
- }
375
- function Q(i) {
376
- if (J = i, c = D, j.C)
377
- for (; c < te; )
378
- te = d.lastIndexOf(`
379
- `, te - 2) + 1, --de;
380
- g(), C();
381
- }
382
- function Ke() {
383
- this.type = null, this.start = D, this.end = null;
384
- }
385
- function tr() {
386
- this.start = mt, this.end = null, vt && (this.source = vt);
387
- }
388
- function L() {
389
- var i = new Ke();
390
- return j.C && (i.X = new tr()), j.vb && (i.sourceFile = j.vb), j.Xa && (i.j = [D, 0]), i;
391
- }
392
- function ce(i) {
393
- var l = new Ke();
394
- return l.start = i.start, j.C && (l.X = new tr(), l.X.start = i.X.start), j.Xa && (l.j = [i.j[0], 0]), l;
395
- }
396
- function E(i, l) {
397
- return i.type = l, i.end = fe, j.C && (i.X.end = xt), j.Xa && (i.j[1] = fe), i;
398
- }
399
- function ct(i) {
400
- return i.type === "ExpressionStatement" && i.la.type === "Literal" && i.la.value === "use strict";
401
- }
402
- function P(i) {
403
- return S === i ? (k(), !0) : !1;
404
- }
405
- function Ye() {
406
- return !j.fc && (S === kt || S === Se || tt.test(d.slice(fe, D)));
407
- }
408
- function ge() {
409
- P(ne) || Ye() || q();
410
- }
411
- function B(i) {
412
- S === i ? k() : q();
413
- }
414
- function q() {
415
- r(D, "Unexpected token");
416
- }
417
- function Ze(i) {
418
- i.type !== "Identifier" && i.type !== "MemberExpression" && r(i.start, "Assigning to rvalue"), J && i.type === "Identifier" && et(i.name) && r(i.start, "Assigning to " + i.name + " in strict mode");
419
- }
420
- function Y() {
421
- (S === Or || S === ye && K === "/=") && C(!0);
422
- var i = S, l = L();
423
- switch (i) {
424
- case Et:
425
- case ar:
426
- k();
427
- var u = i === Et;
428
- P(ne) || Ye() ? l.label = null : S !== we ? q() : (l.label = ee(), ge());
429
- for (var p = 0; p < M.length; ++p) {
430
- var x = M[p];
431
- if ((l.label === null || x.name === l.label.name) && (x.kind !== null && (u || x.kind === "loop") || l.label && u))
432
- break;
433
- }
434
- return p === M.length && r(l.start, "Unsyntactic " + i.l), E(l, u ? "BreakStatement" : "ContinueStatement");
435
- case lr:
436
- return k(), ge(), E(l, "DebuggerStatement");
437
- case cr:
438
- return k(), M.push(Pt), l.body = Y(), M.pop(), B(It), l.test = Ie(), ge(), E(l, "DoWhileStatement");
439
- case hr:
440
- return k(), M.push(Pt), B(re), S === ne ? ft(l, null) : S === At ? (i = L(), k(), nr(i, !0), E(i, "VariableDeclaration"), i.fa.length === 1 && P(qe) ? rr(l, i) : ft(l, i)) : (i = W(!1, !0), P(qe) ? (Ze(i), rr(l, i)) : ft(l, i));
441
- case jt:
442
- return k(), dt(l, !0);
443
- case gr:
444
- return k(), l.test = Ie(), l.da = Y(), l.alternate = P(fr) ? Y() : null, E(l, "IfStatement");
445
- case dr:
446
- return Ne || j.Ib || r(D, "'return' outside of function"), k(), P(ne) || Ye() ? l.K = null : (l.K = W(), ge()), E(l, "ReturnStatement");
447
- case Ot:
448
- for (k(), l.Qb = Ie(), l.tb = [], B(Be), M.push(xn); S !== Se; )
449
- S === Ct || S === ur ? (i = S === Ct, p && E(p, "SwitchCase"), l.tb.push(p = L()), p.da = [], k(), i ? p.test = W() : (u && r(St, "Multiple default clauses"), u = !0, p.test = null), B(Me)) : (p || q(), p.da.push(Y()));
450
- return p && E(p, "SwitchCase"), k(), M.pop(), E(l, "SwitchStatement");
451
- case yr:
452
- return k(), tt.test(d.slice(fe, D)) && r(fe, "Illegal newline after throw"), l.K = W(), ge(), E(l, "ThrowStatement");
453
- case vr:
454
- return k(), l.block = be(), l.Ea = null, S === sr && (i = L(), k(), B(re), i.Ua = ee(), J && et(i.Ua.name) && r(i.Ua.start, "Binding " + i.Ua.name + " in strict mode"), B(z), i.body = be(), l.Ea = E(i, "CatchClause")), l.fb = P(pr) ? be() : null, l.Ea || l.fb || r(l.start, "Missing catch or finally clause"), E(l, "TryStatement");
455
- case At:
456
- return k(), nr(l), ge(), E(l, "VariableDeclaration");
457
- case It:
458
- return k(), l.test = Ie(), M.push(Pt), l.body = Y(), M.pop(), E(l, "WhileStatement");
459
- case mr:
460
- return J && r(D, "'with' in strict mode"), k(), l.object = Ie(), l.body = Y(), E(l, "WithStatement");
461
- case Be:
462
- return be();
463
- case ne:
464
- return k(), E(l, "EmptyStatement");
465
- default:
466
- if (u = K, x = W(), i === we && x.type === "Identifier" && P(Me)) {
467
- for (p = 0; p < M.length; ++p)
468
- M[p].name === u && r(x.start, "Label '" + u + "' is already declared");
469
- return M.push({
470
- name: u,
471
- kind: S.W ? "loop" : S === Ot ? "switch" : null
472
- }), l.body = Y(), M.pop(), l.label = x, E(l, "LabeledStatement");
473
- }
474
- return l.la = x, ge(), E(l, "ExpressionStatement");
475
- }
476
- }
477
- function Ie() {
478
- B(re);
479
- var i = W();
480
- return B(z), i;
481
- }
482
- function be(i) {
483
- var l = L(), u = !0, p = !1;
484
- for (l.body = [], B(Be); !P(Se); ) {
485
- var x = Y();
486
- if (l.body.push(x), u && i && ct(x)) {
487
- var U = p;
488
- Q(p = !0);
489
- }
490
- u = !1;
491
- }
492
- return p && !U && Q(!1), E(l, "BlockStatement");
493
- }
494
- function ft(i, l) {
495
- return i.ua = l, B(ne), i.test = S === ne ? null : W(), B(ne), i.update = S === z ? null : W(), B(z), i.body = Y(), M.pop(), E(i, "ForStatement");
496
- }
497
- function rr(i, l) {
498
- return i.left = l, i.right = W(), B(z), i.body = Y(), M.pop(), E(i, "ForInStatement");
499
- }
500
- function nr(i, l) {
501
- for (i.fa = [], i.kind = "var"; ; ) {
502
- var u = L();
503
- if (u.id = ee(), J && et(u.id.name) && r(u.id.start, "Binding " + u.id.name + " in strict mode"), u.ua = P(Ar) ? W(!0, l) : null, i.fa.push(E(u, "VariableDeclarator")), !P(pe))
504
- break;
505
- }
506
- }
507
- function W(i, l) {
508
- var u = pt(l);
509
- if (!i && S === pe) {
510
- for (i = ce(u), i.xb = [u]; P(pe); )
511
- i.xb.push(pt(l));
512
- return E(i, "SequenceExpression");
513
- }
514
- return u;
515
- }
516
- function pt(i) {
517
- var l = ht(gt(), -1, i);
518
- if (P(jr)) {
519
- var u = ce(l);
520
- u.test = l, u.da = W(!0), B(Me), u.alternate = W(!0, i), l = E(u, "ConditionalExpression");
521
- }
522
- return S.Cb ? (u = ce(l), u.operator = K, u.left = l, k(), u.right = pt(i), Ze(l), E(u, "AssignmentExpression")) : l;
523
- }
524
- function ht(i, l, u) {
525
- var p = S.L;
526
- if (p !== null && (!u || S !== qe) && p > l) {
527
- var x = ce(i);
528
- return x.left = i, x.operator = K, i = S, k(), x.right = ht(gt(), p, u), p = E(x, i === br || i === Tr ? "LogicalExpression" : "BinaryExpression"), ht(p, l, u);
529
- }
530
- return i;
531
- }
532
- function gt() {
533
- if (S.prefix) {
534
- var i = L(), l = S.$b;
535
- return i.operator = K, Pe = i.prefix = !0, k(), i.K = gt(), l ? Ze(i.K) : J && i.operator === "delete" && i.K.type === "Identifier" && r(i.start, "Deleting local variable in strict mode"), E(i, l ? "UpdateExpression" : "UnaryExpression");
536
- }
537
- for (l = Te(ze()); S.cc && !Ye(); )
538
- i = ce(l), i.operator = K, i.prefix = !1, i.K = l, Ze(l), k(), l = E(i, "UpdateExpression");
539
- return l;
540
- }
541
- function Te(i, l) {
542
- if (P(Cr)) {
543
- var u = ce(i);
544
- return u.object = i, u.Wa = ee(!0), u.bb = !1, Te(E(u, "MemberExpression"), l);
545
- }
546
- return P(bt) ? (u = ce(i), u.object = i, u.Wa = W(), u.bb = !0, B(Tt), Te(E(u, "MemberExpression"), l)) : !l && P(re) ? (u = ce(i), u.callee = i, u.arguments = yt(z, !1), Te(E(u, "CallExpression"), l)) : i;
547
- }
548
- function ze() {
549
- switch (S) {
550
- case Sr:
551
- var i = L();
552
- return k(), E(i, "ThisExpression");
553
- case we:
554
- return ee();
555
- case Re:
556
- case Qe:
557
- case ir:
558
- return i = L(), i.value = K, i.raw = d.slice(D, me), k(), E(i, "Literal");
559
- case xr:
560
- case kr:
561
- case Er:
562
- return i = L(), i.value = S.$a, i.raw = S.l, k(), E(i, "Literal");
563
- case re:
564
- i = mt;
565
- var l = D;
566
- k();
567
- var u = W();
568
- return u.start = l, u.end = me, j.C && (u.X.start = i, u.X.end = wt), j.Xa && (u.j = [l, me]), B(z), u;
569
- case bt:
570
- return i = L(), k(), i.elements = yt(Tt, !0, !0), E(i, "ArrayExpression");
571
- case Be:
572
- for (i = L(), l = !0, u = !1, i.h = [], k(); !P(Se); ) {
573
- if (l)
574
- l = !1;
575
- else if (B(pe), j.sb && P(Se))
576
- break;
577
- var p = {
578
- key: S === Re || S === Qe ? ze() : ee(!0)
579
- }, x = !1;
580
- if (P(Me)) {
581
- p.value = W(!0);
582
- var U = p.kind = "init";
583
- } else
584
- p.key.type !== "Identifier" || p.key.name !== "get" && p.key.name !== "set" ? q() : (x = u = !0, U = p.kind = p.key.name, p.key = S === Re || S === Qe ? ze() : ee(!0), S !== re && q(), p.value = dt(L(), !1));
585
- if (p.key.type === "Identifier" && (J || u))
586
- for (var G = 0; G < i.h.length; ++G) {
587
- var ke = i.h[G];
588
- if (ke.key.name === p.key.name) {
589
- var Nt = U === ke.kind || x && ke.kind === "init" || U === "init" && (ke.kind === "get" || ke.kind === "set");
590
- Nt && !J && U === "init" && ke.kind === "init" && (Nt = !1), Nt && r(p.key.start, "Redefinition of property");
591
- }
592
- }
593
- i.h.push(p);
594
- }
595
- return E(i, "ObjectExpression");
596
- case jt:
597
- return i = L(), k(), dt(i, !1);
598
- case wr:
599
- return i = L(), k(), i.callee = Te(ze(), !0), i.arguments = P(re) ? yt(z, !1) : sn, E(i, "NewExpression");
600
- }
601
- q();
602
- }
603
- function dt(i, l) {
604
- S === we ? i.id = ee() : l ? q() : i.id = null, i.oa = [];
605
- var u = !0;
606
- for (B(re); !P(z); )
607
- u ? u = !1 : B(pe), i.oa.push(ee());
608
- u = Ne;
609
- var p = M;
610
- if (Ne = !0, M = [], i.body = be(!0), Ne = u, M = p, J || i.body.body.length && ct(i.body.body[0])) {
611
- for (u = i.id ? -1 : 0; u < i.oa.length; ++u)
612
- if (p = 0 > u ? i.id : i.oa[u], (Pr(p.name) || et(p.name)) && r(p.start, "Defining '" + p.name + "' in strict mode"), 0 <= u)
613
- for (var x = 0; x < u; ++x)
614
- p.name === i.oa[x].name && r(p.start, "Argument name clash in strict mode");
615
- }
616
- return E(i, l ? "FunctionDeclaration" : "FunctionExpression");
617
- }
618
- function yt(i, l, u) {
619
- for (var p = [], x = !0; !P(i); ) {
620
- if (x)
621
- x = !1;
622
- else if (B(pe), l && j.sb && P(i))
623
- break;
624
- p.push(u && S === pe ? null : W(!0));
625
- }
626
- return p;
627
- }
628
- function ee(i) {
629
- var l = L();
630
- return i && j.yb === "everywhere" && (i = !1), S === we ? (!i && (j.yb && vn(K) || J && Pr(K)) && d.slice(D, me).indexOf("\\") === -1 && r(D, "The keyword '" + K + "' is reserved"), l.name = K) : i && S.l ? l.name = S.l : q(), Pe = !1, k(), E(l, "Identifier");
631
- }
632
- e.version = "0.5.0";
633
- var j, d = "", ve, vt;
634
- e.parse = function(i, l) {
635
- d = String(i), ve = d.length, j = l || {};
636
- for (var u in or)
637
- Object.prototype.hasOwnProperty.call(j, u) || (j[u] = or[u]);
638
- for (vt = j.sourceFile, de = 1, c = te = 0, Pe = !0, g(), u = j.dc, St = fe = c, j.C && (xt = new s()), Ne = J = !1, M = [], C(), i = u || L(), l = !0, u || (i.body = []); S !== kt; )
639
- u = Y(), i.body.push(u), l && ct(u) && Q(!0), l = !1;
640
- return E(i, "Program");
641
- };
642
- var or = {
643
- fc: !1,
644
- sb: !0,
645
- yb: !1,
646
- Ib: !1,
647
- C: !1,
648
- va: null,
649
- Xa: !1,
650
- dc: null,
651
- sourceFile: null,
652
- vb: null
653
- }, c = 0, D = 0, me = 0, mt, wt, S, K, Pe, de, te, St = 0, fe = 0, xt, Ne, M, J, sn = [], Re = {
654
- type: "num"
655
- }, ir = {
656
- type: "regexp"
657
- }, Qe = {
658
- type: "string"
659
- }, we = {
660
- type: "name"
661
- }, kt = {
662
- type: "eof"
663
- }, Et = {
664
- l: "break"
665
- }, Ct = {
666
- l: "case",
667
- m: !0
668
- }, sr = {
669
- l: "catch"
670
- }, ar = {
671
- l: "continue"
672
- }, lr = {
673
- l: "debugger"
674
- }, ur = {
675
- l: "default"
676
- }, cr = {
677
- l: "do",
678
- W: !0
679
- }, fr = {
680
- l: "else",
681
- m: !0
682
- }, pr = {
683
- l: "finally"
684
- }, hr = {
685
- l: "for",
686
- W: !0
687
- }, jt = {
688
- l: "function"
689
- }, gr = {
690
- l: "if"
691
- }, dr = {
692
- l: "return",
693
- m: !0
694
- }, Ot = {
695
- l: "switch"
696
- }, yr = {
697
- l: "throw",
698
- m: !0
699
- }, vr = {
700
- l: "try"
701
- }, At = {
702
- l: "var"
703
- }, It = {
704
- l: "while",
705
- W: !0
706
- }, mr = {
707
- l: "with"
708
- }, wr = {
709
- l: "new",
710
- m: !0
711
- }, Sr = {
712
- l: "this"
713
- }, xr = {
714
- l: "null",
715
- $a: null
716
- }, kr = {
717
- l: "true",
718
- $a: !0
719
- }, Er = {
720
- l: "false",
721
- $a: !1
722
- }, qe = {
723
- l: "in",
724
- L: 7,
725
- m: !0
726
- }, an = {
727
- break: Et,
728
- case: Ct,
729
- catch: sr,
730
- continue: ar,
731
- debugger: lr,
732
- default: ur,
733
- do: cr,
734
- else: fr,
735
- finally: pr,
736
- for: hr,
737
- function: jt,
738
- if: gr,
739
- return: dr,
740
- switch: Ot,
741
- throw: yr,
742
- try: vr,
743
- var: At,
744
- while: It,
745
- with: mr,
746
- null: xr,
747
- true: kr,
748
- false: Er,
749
- new: wr,
750
- in: qe,
751
- instanceof: {
752
- l: "instanceof",
753
- L: 7,
754
- m: !0
755
- },
756
- this: Sr,
757
- typeof: {
758
- l: "typeof",
759
- prefix: !0,
760
- m: !0
761
- },
762
- void: {
763
- l: "void",
764
- prefix: !0,
765
- m: !0
766
- },
767
- delete: {
768
- l: "delete",
769
- prefix: !0,
770
- m: !0
771
- }
772
- }, bt = {
773
- type: "[",
774
- m: !0
775
- }, Tt = {
776
- type: "]"
777
- }, Be = {
778
- type: "{",
779
- m: !0
780
- }, Se = {
781
- type: "}"
782
- }, re = {
783
- type: "(",
784
- m: !0
785
- }, z = {
786
- type: ")"
787
- }, pe = {
788
- type: ",",
789
- m: !0
790
- }, ne = {
791
- type: ";",
792
- m: !0
793
- }, Me = {
794
- type: ":",
795
- m: !0
796
- }, Cr = {
797
- type: "."
798
- }, jr = {
799
- type: "?",
800
- m: !0
801
- }, Or = {
802
- L: 10,
803
- m: !0
804
- }, Ar = {
805
- Cb: !0,
806
- m: !0
807
- }, ye = {
808
- Cb: !0,
809
- m: !0
810
- }, ln = {
811
- cc: !0,
812
- prefix: !0,
813
- $b: !0
814
- }, Ir = {
815
- prefix: !0,
816
- m: !0
817
- }, br = {
818
- L: 1,
819
- m: !0
820
- }, Tr = {
821
- L: 2,
822
- m: !0
823
- }, un = {
824
- L: 3,
825
- m: !0
826
- }, cn = {
827
- L: 4,
828
- m: !0
829
- }, fn = {
830
- L: 5,
831
- m: !0
832
- }, pn = {
833
- L: 6,
834
- m: !0
835
- }, hn = {
836
- L: 7,
837
- m: !0
838
- }, gn = {
839
- L: 8,
840
- m: !0
841
- }, dn = {
842
- L: 9,
843
- prefix: !0,
844
- m: !0
845
- }, yn = {
846
- L: 10,
847
- m: !0
848
- }, vn = o("class enum extends super const export import"), Pr = o("implements interface let package private protected public static yield"), et = o("eval arguments"), mn = o("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"), wn = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/, Nr = RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"), Sn = RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"), tt = /[\n\r\u2028\u2029]/, rt = /\r\n|[\n\r\u2028\u2029]/g, xe, Pt = {
849
- kind: "loop"
850
- }, xn = {
851
- kind: "switch"
852
- };
853
- }, Ft = Ft = typeof globalThis == "undefined" ? void 0 : globalThis;
854
- Bn(Ft.j || (Ft.j = {}));
855
- function h(e, t) {
856
- typeof e == "string" && (e = je(e, "code"));
857
- var n = e.constructor;
858
- this.ya = function() {
859
- return new n({
860
- options: {}
861
- });
862
- };
863
- var r = this.ya(), o;
864
- for (o in e)
865
- r[o] = o === "body" ? e[o].slice() : e[o];
866
- this.ra = r, this.ca = [], this.qb = t, this.za = !1, this.ba = [], this.Ya = 0, this.rb = /* @__PURE__ */ Object.create(null), e = /^step([A-Z]\w*)$/;
867
- var s, a;
868
- for (a in this)
869
- typeof this[a] == "function" && (s = a.match(e)) && (this.rb[s[1]] = this[a].bind(this));
870
- this.N = _t(this, this.ra, null), this.Na = this.N.object, this.ra = je(this.ba.join(`
871
- `), "polyfills"), this.ba = void 0, st(this.ra), s = new v(this.ra, this.N), s.done = !1, this.o = [s], this.Eb(), this.value = void 0, this.ra = r, s = new v(this.ra, this.N), s.done = !1, this.o.length = 0, this.o[0] = s;
872
- }
873
- var Br = {
874
- C: !0,
875
- kc: 5
876
- }, $t = {
877
- configurable: !0,
878
- enumerable: !0,
879
- writable: !1
880
- }, y = {
881
- configurable: !0,
882
- enumerable: !1,
883
- writable: !0
884
- }, X = {
885
- configurable: !0,
886
- enumerable: !1,
887
- writable: !1
888
- }, De = {
889
- configurable: !1,
890
- enumerable: !1,
891
- writable: !1
892
- }, Mr = {
893
- configurable: !1,
894
- enumerable: !0,
895
- writable: !0
896
- }, Yr = {
897
- STEP_ERROR: !0
898
- }, Ae = {
899
- SCOPE_REFERENCE: !0
900
- }, Ve = {
901
- VALUE_IN_DESCRIPTOR: !0
902
- }, Ee = {
903
- REGEXP_TIMEOUT: !0
904
- }, Dr = [], se = null, We = null, he = typeof globalThis == "undefined" ? void 0 : globalThis, Mn = ["onmessage = function(e) {", "var result;", "var data = e.data;", "switch (data[0]) {", "case 'split':", "result = data[1].split(data[2], data[3]);", "break;", "case 'match':", "result = data[1].match(data[2]);", "break;", "case 'search':", "result = data[1].search(data[2]);", "break;", "case 'replace':", "result = data[1].replace(data[2], data[3]);", "break;", "case 'exec':", "var regexp = data[1];", "regexp.lastIndex = data[2];", "result = [regexp.exec(data[3]), data[1].lastIndex];", "break;", "default:", "throw Error('Unknown RegExp operation: ' + data[0]);", "}", "postMessage(result);", "close();", "};"];
905
- function Gt(e) {
906
- var t = e >>> 0;
907
- return t === Number(e) ? t : NaN;
908
- }
909
- function $e(e) {
910
- var t = e >>> 0;
911
- return String(t) === String(e) && t !== 4294967295 ? t : NaN;
912
- }
913
- function st(e, t, n) {
914
- t ? e.start = t : delete e.start, n ? e.end = n : delete e.end;
915
- for (var r in e)
916
- if (r !== "loc" && e.hasOwnProperty(r)) {
917
- var o = e[r];
918
- o && typeof o == "object" && st(o, t, n);
919
- }
920
- }
921
- h.prototype.REGEXP_MODE = 2;
922
- h.prototype.REGEXP_THREAD_TIMEOUT = 1e3;
923
- h.prototype.POLYFILL_TIMEOUT = 1e3;
924
- I = h.prototype;
925
- I.P = !1;
926
- I.Ka = !1;
927
- I.Kb = 0;
928
- I.ic = 0;
929
- function je(e, t) {
930
- var n = {}, r;
931
- for (r in Br)
932
- n[r] = Br[r];
933
- return n.sourceFile = t, he.j.parse(e, n);
934
- }
935
- I.Jb = function(e) {
936
- var t = this.o[0];
937
- if (!t || t.node.type !== "Program")
938
- throw Error("Expecting original AST to start with a Program node");
939
- if (typeof e == "string" && (e = je(e, "appendCode" + this.Kb++)), !e || e.type !== "Program")
940
- throw Error("Expecting new AST to start with a Program node");
941
- Xe(this, e, t.scope), Array.prototype.push.apply(t.node.body, e.body), t.node.body.jb = null, t.done = !1;
942
- };
943
- I.lb = function() {
944
- var e = this.o, t;
945
- do {
946
- var n = e[e.length - 1];
947
- if (this.za)
948
- break;
949
- if (!n || n.node.type === "Program" && n.done) {
950
- if (!this.ca.length)
951
- return !1;
952
- if (n = this.ca[0], !n || n.time > Date.now())
953
- n = null;
954
- else {
955
- this.ca.shift(), 0 <= n.interval && Qr(this, n, n.interval);
956
- var r = new v(n.node, n.scope);
957
- n.zb && (r.ia = 2, r.B = this.Na, r.U = n.zb, r.Qa = !0, r.F = n.Lb), n = r;
958
- }
959
- if (!n)
960
- break;
961
- }
962
- r = n.node;
963
- var o = We;
964
- We = this;
965
- try {
966
- var s = this.rb[r.type](e, n, r);
967
- } catch (a) {
968
- if (a !== Yr)
969
- throw this.value !== a && (this.value = void 0), a;
970
- } finally {
971
- We = o;
972
- }
973
- if (s && e.push(s), this.P)
974
- throw this.value = void 0, Error("Getter not supported in this context");
975
- if (this.Ka)
976
- throw this.value = void 0, Error("Setter not supported in this context");
977
- t || r.end || (t = Date.now() + this.POLYFILL_TIMEOUT);
978
- } while (!r.end && t > Date.now());
979
- return !0;
980
- };
981
- I.Eb = function() {
982
- for (; !this.za && this.lb(); )
983
- ;
984
- return this.za;
985
- };
986
- function Dn(e, t) {
987
- e.g(t, "NaN", NaN, De), e.g(t, "Infinity", 1 / 0, De), e.g(t, "undefined", void 0, De), e.g(t, "window", t, $t), e.g(t, "this", t, De), e.g(t, "self", t), e.M = new A(null), e.Z = new A(e.M), Un(e, t), Fn(e, t), t.xa = e.M, e.g(t, "constructor", e.v, y), Ln(e, t), _n(e, t), Wn(e, t), $n(e, t), Gn(e, t), Vn(e, t), Xn(e, t), Hn(e, t), Jn(e, t);
988
- var n = e.i(function() {
989
- throw EvalError("Can't happen");
990
- }, !1);
991
- n.eval = !0, e.g(t, "eval", n, y), e.g(t, "parseInt", e.i(parseInt, !1), y), e.g(t, "parseFloat", e.i(parseFloat, !1), y), e.g(t, "isNaN", e.i(isNaN, !1), y), e.g(t, "isFinite", e.i(isFinite, !1), y);
992
- for (var r = [[escape, "escape"], [unescape, "unescape"], [decodeURI, "decodeURI"], [decodeURIComponent, "decodeURIComponent"], [encodeURI, "encodeURI"], [encodeURIComponent, "encodeURIComponent"]], o = 0; o < r.length; o++)
993
- n = function(s) {
994
- return function(a) {
995
- try {
996
- return s(a);
997
- } catch (f) {
998
- m(e, e.Gb, f.message);
999
- }
1000
- };
1001
- }(r[o][0]), e.g(t, r[o][1], e.i(n, !1), y);
1002
- n = function(s) {
1003
- return Ur(e, !1, arguments);
1004
- }, e.g(t, "setTimeout", e.i(n, !1), y), n = function(s) {
1005
- return Ur(e, !0, arguments);
1006
- }, e.g(t, "setInterval", e.i(n, !1), y), n = function(s) {
1007
- Fr(e, s);
1008
- }, e.g(t, "clearTimeout", e.i(n, !1), y), n = function(s) {
1009
- Fr(e, s);
1010
- }, e.g(t, "clearInterval", e.i(n, !1), y), e.OBJECT = e.v, e.OBJECT_PROTO = e.M, e.FUNCTION = e.O, e.FUNCTION_PROTO = e.Z, e.ARRAY = e.qa, e.ARRAY_PROTO = e.La, e.REGEXP = e.I, e.REGEXP_PROTO = e.Ma, e.DATE = e.$, e.DATE_PROTO = e.nb, e.qb && e.qb(e, t);
1011
- }
1012
- I.Wb = 0;
1013
- function Un(e, t) {
1014
- var n = /^[A-Za-z_$][\w$]*$/, r = function(o) {
1015
- var s = arguments.length ? String(arguments[arguments.length - 1]) : "", a = Array.prototype.slice.call(arguments, 0, -1).join(",").trim();
1016
- if (a) {
1017
- a = a.split(/\s*,\s*/);
1018
- for (var f = 0; f < a.length; f++) {
1019
- var g = a[f];
1020
- n.test(g) || m(e, e.T, "Invalid function argument: " + g);
1021
- }
1022
- a = a.join(", ");
1023
- }
1024
- try {
1025
- var O = je("(function(" + a + ") {" + s + "})", "function" + e.Wb++);
1026
- } catch (C) {
1027
- m(e, e.T, "Invalid code: " + C.message);
1028
- }
1029
- return O.body.length !== 1 && m(e, e.T, "Invalid code in function body"), Ht(e, O.body[0].la, e.N, "anonymous");
1030
- };
1031
- e.O = e.i(r, !0), e.g(t, "Function", e.O, y), e.g(e.O, "prototype", e.Z, y), e.g(e.Z, "constructor", e.O, y), e.Z.Ta = function() {
1032
- }, e.Z.Ta.id = e.Ya++, e.Z.Ab = !0, e.g(e.Z, "length", 0, X), e.Z.H = "Function", r = function(o, s) {
1033
- var a = e.o[e.o.length - 1];
1034
- a.U = this, a.B = o, a.F = [], s != null && (s instanceof A ? a.F = Zr(e, s) : m(e, e.j, "CreateListFromArrayLike called on non-object")), a.eb = !1;
1035
- }, F(e, e.O, "apply", r), r = function(o) {
1036
- var s = e.o[e.o.length - 1];
1037
- s.U = this, s.B = o, s.F = [];
1038
- for (var a = 1; a < arguments.length; a++)
1039
- s.F.push(arguments[a]);
1040
- s.eb = !1;
1041
- }, F(e, e.O, "call", r), e.ba.push("Object.defineProperty(Function.prototype, 'bind',", "{configurable: true, writable: true, value:", "function bind(oThis) {", "if (typeof this !== 'function') {", "throw TypeError('What is trying to be bound is not callable');", "}", "var aArgs = Array.prototype.slice.call(arguments, 1),", "fToBind = this,", "fNOP = function() {},", "fBound = function() {", "return fToBind.apply(this instanceof fNOP", "? this", ": oThis,", "aArgs.concat(Array.prototype.slice.call(arguments)));", "};", "if (this.prototype) {", "fNOP.prototype = this.prototype;", "}", "fBound.prototype = new fNOP();", "return fBound;", "}", "});", ""), r = function() {
1042
- return String(this);
1043
- }, F(e, e.O, "toString", r), e.g(e.O, "toString", e.i(r, !1), y), r = function() {
1044
- return this.valueOf();
1045
- }, F(e, e.O, "valueOf", r), e.g(e.O, "valueOf", e.i(r, !1), y);
1046
- }
1047
- function Fn(e, t) {
1048
- function n(o) {
1049
- o != null || m(e, e.j, "Cannot convert '" + o + "' to object");
1050
- }
1051
- var r = function(o) {
1052
- if (o == null)
1053
- return le(e) ? this : e.s(e.M);
1054
- if (!(o instanceof A)) {
1055
- var s = e.s(ae(e, o));
1056
- return s.data = o, s;
1057
- }
1058
- return o;
1059
- };
1060
- e.v = e.i(r, !0), e.g(e.v, "prototype", e.M, y), e.g(e.M, "constructor", e.v, y), e.g(t, "Object", e.v, y), r = function(o) {
1061
- return n(o), ie(e, Object.getOwnPropertyNames(o instanceof A ? o.h : o));
1062
- }, e.g(e.v, "getOwnPropertyNames", e.i(r, !1), y), r = function(o) {
1063
- return n(o), o instanceof A && (o = o.h), ie(e, Object.keys(o));
1064
- }, e.g(e.v, "keys", e.i(r, !1), y), r = function(o) {
1065
- return o === null ? e.s(null) : (o instanceof A || m(e, e.j, "Object prototype may only be an Object or null, not " + o), e.s(o));
1066
- }, e.g(e.v, "create", e.i(r, !1), y), e.ba.push("(function() {", "var create_ = Object.create;", "Object.create = function create(proto, props) {", "var obj = create_(proto);", "props && Object.defineProperties(obj, props);", "return obj;", "};", "})();", ""), r = function(o, s, a) {
1067
- return s = String(s), o instanceof A || m(e, e.j, "Object.defineProperty called on non-object: " + o), a instanceof A || m(e, e.j, "Property description must be an object"), !o.preventExtensions || s in o.h || m(e, e.j, "Can't define property '" + s + "', object is not extensible"), e.g(o, s, Ve, a.h), o;
1068
- }, e.g(e.v, "defineProperty", e.i(r, !1), y), e.ba.push("(function() {", "var defineProperty_ = Object.defineProperty;", "Object.defineProperty = function defineProperty(obj, prop, d1) {", "var d2 = {};", "if ('configurable' in d1) d2.configurable = d1.configurable;", "if ('enumerable' in d1) d2.enumerable = d1.enumerable;", "if ('writable' in d1) d2.writable = d1.writable;", "if ('value' in d1) d2.value = d1.value;", "if ('get' in d1) d2.get = d1.get;", "if ('set' in d1) d2.set = d1.set;", "return defineProperty_(obj, prop, d2);", "};", "})();", "Object.defineProperty(Object, 'defineProperties',", "{configurable: true, writable: true, value:", "function defineProperties(obj, props) {", "var keys = Object.keys(props);", "for (var i = 0; i < keys.length; i++) {", "Object.defineProperty(obj, keys[i], props[keys[i]]);", "}", "return obj;", "}", "});", ""), r = function(o, s) {
1069
- if (o instanceof A || m(e, e.j, "Object.getOwnPropertyDescriptor called on non-object: " + o), s = String(s), s in o.h) {
1070
- var a = Object.getOwnPropertyDescriptor(o.h, s), f = o.V[s];
1071
- return o = o.Y[s], s = e.s(e.M), f || o ? (e.g(s, "get", f), e.g(s, "set", o)) : (e.g(s, "value", a.value), e.g(s, "writable", a.writable)), e.g(s, "configurable", a.configurable), e.g(s, "enumerable", a.enumerable), s;
1072
- }
1073
- }, e.g(e.v, "getOwnPropertyDescriptor", e.i(r, !1), y), r = function(o) {
1074
- return n(o), ae(e, o);
1075
- }, e.g(e.v, "getPrototypeOf", e.i(r, !1), y), r = function(o) {
1076
- return !!o && !o.preventExtensions;
1077
- }, e.g(e.v, "isExtensible", e.i(r, !1), y), r = function(o) {
1078
- return o instanceof A && (o.preventExtensions = !0), o;
1079
- }, e.g(e.v, "preventExtensions", e.i(r, !1), y), F(e, e.v, "toString", A.prototype.toString), F(e, e.v, "toLocaleString", A.prototype.toString), F(e, e.v, "valueOf", A.prototype.valueOf), r = function(o) {
1080
- return n(this), this instanceof A ? String(o) in this.h : this.hasOwnProperty(o);
1081
- }, F(e, e.v, "hasOwnProperty", r), r = function(o) {
1082
- return n(this), this instanceof A ? Object.prototype.propertyIsEnumerable.call(this.h, o) : this.propertyIsEnumerable(o);
1083
- }, F(e, e.v, "propertyIsEnumerable", r), r = function(o) {
1084
- for (; ; ) {
1085
- if (o = ae(e, o), !o)
1086
- return !1;
1087
- if (o === this)
1088
- return !0;
1089
- }
1090
- }, F(e, e.v, "isPrototypeOf", r);
1091
- }
1092
- function Ln(e, t) {
1093
- var n = function(r) {
1094
- var o = le(e) ? this : Oe(e), s = arguments[0];
1095
- if (arguments.length === 1 && typeof s == "number")
1096
- isNaN(Gt(s)) && m(e, e.ob, "Invalid array length: " + s), o.h.length = s;
1097
- else {
1098
- for (s = 0; s < arguments.length; s++)
1099
- o.h[s] = arguments[s];
1100
- o.h.length = s;
1101
- }
1102
- return o;
1103
- };
1104
- e.qa = e.i(n, !0), e.La = e.qa.h.prototype, e.g(t, "Array", e.qa, y), n = function(r) {
1105
- return r && r.H === "Array";
1106
- }, e.g(e.qa, "isArray", e.i(n, !1), y), e.g(e.La, "length", 0, {
1107
- configurable: !1,
1108
- enumerable: !1,
1109
- writable: !0
1110
- }), e.La.H = "Array", e.ba.push("(function() {", "function createArrayMethod_(f) {", "Object.defineProperty(Array.prototype, f.name,", "{configurable: true, writable: true, value: f});", "}", "createArrayMethod_(", "function pop() {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len || len < 0) {", "o.length = 0;", "return undefined;", "}", "len--;", "var x = o[len];", "delete o[len];", "o.length = len;", "return x;", "}", ");", "createArrayMethod_(", "function push(var_args) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "for (var i = 0; i < arguments.length; i++) {", "o[len] = arguments[i];", "len++;", "}", "o.length = len;", "return len;", "}", ");", "createArrayMethod_(", "function shift() {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len || len < 0) {", "o.length = 0;", "return undefined;", "}", "var value = o[0];", "for (var i = 0; i < len - 1; i++) {", "if ((i + 1) in o) {", "o[i] = o[i + 1];", "} else {", "delete o[i];", "}", "}", "delete o[i];", "o.length = len - 1;", "return value;", "}", ");", "createArrayMethod_(", "function unshift(var_args) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len || len < 0) {", "len = 0;", "}", "for (var i = len - 1; i >= 0; i--) {", "if (i in o) {", "o[i + arguments.length] = o[i];", "} else {", "delete o[i + arguments.length];", "}", "}", "for (var i = 0; i < arguments.length; i++) {", "o[i] = arguments[i];", "}", "return (o.length = len + arguments.length);", "}", ");", "createArrayMethod_(", "function reverse() {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len || len < 2) {", "return o;", "}", "for (var i = 0; i < len / 2 - 0.5; i++) {", "var x = o[i];", "var hasX = i in o;", "if ((len - i - 1) in o) {", "o[i] = o[len - i - 1];", "} else {", "delete o[i];", "}", "if (hasX) {", "o[len - i - 1] = x;", "} else {", "delete o[len - i - 1];", "}", "}", "return o;", "}", ");", "createArrayMethod_(", "function indexOf(searchElement, fromIndex) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var n = fromIndex | 0;", "if (!len || n >= len) {", "return -1;", "}", "var i = Math.max(n >= 0 ? n : len - Math.abs(n), 0);", "while (i < len) {", "if (i in o && o[i] === searchElement) {", "return i;", "}", "i++;", "}", "return -1;", "}", ");", "createArrayMethod_(", "function lastIndexOf(searchElement, fromIndex) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len) {", "return -1;", "}", "var n = len - 1;", "if (arguments.length > 1) {", "n = fromIndex | 0;", "if (n) {", "n = (n > 0 || -1) * Math.floor(Math.abs(n));", "}", "}", "var i = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);", "while (i >= 0) {", "if (i in o && o[i] === searchElement) {", "return i;", "}", "i--;", "}", "return -1;", "}", ");", "createArrayMethod_(", "function slice(start, end) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "start |= 0;", "start = (start >= 0) ? start : Math.max(0, len + start);", "if (typeof end !== 'undefined') {", "if (end !== Infinity) {", "end |= 0;", "}", "if (end < 0) {", "end = len + end;", "} else {", "end = Math.min(end, len);", "}", "} else {", "end = len;", "}", "var size = end - start;", "var cloned = new Array(size);", "for (var i = 0; i < size; i++) {", "if ((start + i) in o) {", "cloned[i] = o[start + i];", "}", "}", "return cloned;", "}", ");", "createArrayMethod_(", "function splice(start, deleteCount, var_args) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "start |= 0;", "if (start < 0) {", "start = Math.max(len + start, 0);", "} else {", "start = Math.min(start, len);", "}", "if (arguments.length < 1) {", "deleteCount = len - start;", "} else {", "deleteCount |= 0;", "deleteCount = Math.max(0, Math.min(deleteCount, len - start));", "}", "var removed = [];", "for (var i = start; i < start + deleteCount; i++) {", "if (i in o) {", "removed.push(o[i]);", "} else {", "removed.length++;", "}", "if ((i + deleteCount) in o) {", "o[i] = o[i + deleteCount];", "} else {", "delete o[i];", "}", "}", "for (var i = start + deleteCount; i < len - deleteCount; i++) {", "if ((i + deleteCount) in o) {", "o[i] = o[i + deleteCount];", "} else {", "delete o[i];", "}", "}", "for (var i = len - deleteCount; i < len; i++) {", "delete o[i];", "}", "len -= deleteCount;", "var arl = arguments.length - 2;", "for (var i = len - 1; i >= start; i--) {", "if (i in o) {", "o[i + arl] = o[i];", "} else {", "delete o[i + arl];", "}", "}", "len += arl;", "for (var i = 2; i < arguments.length; i++) {", "o[start + i - 2] = arguments[i];", "}", "o.length = len;", "return removed;", "}", ");", "createArrayMethod_(", "function concat(var_args) {", "if (!this) throw TypeError();", "var o = Object(this);", "var cloned = [];", "for (var i = -1; i < arguments.length; i++) {", "var value = (i === -1) ? o : arguments[i];", "if (Array.isArray(value)) {", "for (var j = 0, l = value.length; j < l; j++) {", "if (j in value) {", "cloned.push(value[j]);", "} else {", "cloned.length++;", "}", "}", "} else {", "cloned.push(value);", "}", "}", "return cloned;", "}", ");", "createArrayMethod_(", "function join(opt_separator) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var sep = typeof opt_separator === 'undefined' ?", "',' : ('' + opt_separator);", "var str = '';", "for (var i = 0; i < len; i++) {", "if (i && sep) str += sep;", "str += (o[i] === null || o[i] === undefined) ? '' : o[i];", "}", "return str;", "}", ");", "createArrayMethod_(", "function every(callbackfn, thisArg) {", "if (!this || typeof callbackfn !== 'function') throw TypeError();", "var t, k = 0;", "var o = Object(this), len = o.length >>> 0;", "if (arguments.length > 1) t = thisArg;", "while (k < len) {", "if (k in o && !callbackfn.call(t, o[k], k, o)) return false;", "k++;", "}", "return true;", "}", ");", "createArrayMethod_(", "function filter(fun, var_args) {", "if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var res = [];", "var thisArg = arguments.length >= 2 ? arguments[1] : void 0;", "for (var i = 0; i < len; i++) {", "if (i in o) {", "var val = o[i];", "if (fun.call(thisArg, val, i, o)) res.push(val);", "}", "}", "return res;", "}", ");", "createArrayMethod_(", "function forEach(callback, thisArg) {", "if (!this || typeof callback !== 'function') throw TypeError();", "var t, k = 0;", "var o = Object(this), len = o.length >>> 0;", "if (arguments.length > 1) t = thisArg;", "while (k < len) {", "if (k in o) callback.call(t, o[k], k, o);", "k++;", "}", "}", ");", "createArrayMethod_(", "function map(callback, thisArg) {", "if (!this || typeof callback !== 'function') throw TypeError();", "var t, k = 0;", "var o = Object(this), len = o.length >>> 0;", "if (arguments.length > 1) t = thisArg;", "var a = new Array(len);", "while (k < len) {", "if (k in o) a[k] = callback.call(t, o[k], k, o);", "k++;", "}", "return a;", "}", ");", "createArrayMethod_(", "function reduce(callback /*, initialValue*/) {", "if (!this || typeof callback !== 'function') throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var k = 0, value;", "if (arguments.length === 2) {", "value = arguments[1];", "} else {", "while (k < len && !(k in o)) k++;", "if (k >= len) {", "throw TypeError('Reduce of empty array with no initial value');", "}", "value = o[k++];", "}", "for (; k < len; k++) {", "if (k in o) value = callback(value, o[k], k, o);", "}", "return value;", "}", ");", "createArrayMethod_(", "function reduceRight(callback /*, initialValue*/) {", "if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var k = len - 1, value;", "if (arguments.length >= 2) {", "value = arguments[1];", "} else {", "while (k >= 0 && !(k in o)) k--;", "if (k < 0) {", "throw TypeError('Reduce of empty array with no initial value');", "}", "value = o[k--];", "}", "for (; k >= 0; k--) {", "if (k in o) value = callback(value, o[k], k, o);", "}", "return value;", "}", ");", "createArrayMethod_(", "function some(fun/*, thisArg*/) {", "if (!this || typeof fun !== 'function') throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var thisArg = arguments.length >= 2 ? arguments[1] : void 0;", "for (var i = 0; i < len; i++) {", "if (i in o && fun.call(thisArg, o[i], i, o)) return true;", "}", "return false;", "}", ");", "createArrayMethod_(", "function sort(opt_comp) {", "if (!this) throw TypeError();", "if (typeof opt_comp !== 'function') {", "opt_comp = undefined;", "}", "for (var i = 0; i < this.length; i++) {", "var changes = 0;", "for (var j = 0; j < this.length - i - 1; j++) {", "if (opt_comp ? (opt_comp(this[j], this[j + 1]) > 0) :", "(String(this[j]) > String(this[j + 1]))) {", "var swap = this[j];", "var hasSwap = j in this;", "if ((j + 1) in this) {", "this[j] = this[j + 1];", "} else {", "delete this[j];", "}", "if (hasSwap) {", "this[j + 1] = swap;", "} else {", "delete this[j + 1];", "}", "changes++;", "}", "}", "if (!changes) break;", "}", "return this;", "}", ");", "createArrayMethod_(", "function toLocaleString() {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var out = [];", "for (var i = 0; i < len; i++) {", "out[i] = (o[i] === null || o[i] === undefined) ? '' : o[i].toLocaleString();", "}", "return out.join(',');", "}", ");", "})();", "");
1111
- }
1112
- function _n(e, t) {
1113
- var n = function(r) {
1114
- return r = arguments.length ? he.String(r) : "", le(e) ? (this.data = r, this) : r;
1115
- };
1116
- for (e.J = e.i(n, !0), e.g(t, "String", e.J, y), e.g(e.J, "fromCharCode", e.i(String.fromCharCode, !1), y), t = "charAt charCodeAt concat indexOf lastIndexOf slice substr substring toLocaleLowerCase toLocaleUpperCase toLowerCase toUpperCase trim".split(" "), n = 0; n < t.length; n++)
1117
- F(e, e.J, t[n], String.prototype[t[n]]);
1118
- n = function(r, o, s) {
1119
- o = e.R(o), s = e.R(s);
1120
- try {
1121
- return String(this).localeCompare(r, o, s);
1122
- } catch (a) {
1123
- m(e, e.D, "localeCompare: " + a.message);
1124
- }
1125
- }, F(e, e.J, "localeCompare", n), n = function(r, o, s) {
1126
- var a = String(this);
1127
- if (o = o ? Number(o) : void 0, _(e, r, e.I) && (r = r.data, Fe(e, r, s), e.REGEXP_MODE === 2)) {
1128
- if (se)
1129
- r = Ue(e, "string.split(separator, limit)", {
1130
- string: a,
1131
- separator: r,
1132
- limit: o
1133
- }, r, s), r !== Ee && s(ie(e, r));
1134
- else {
1135
- var f = e.ha(), g = Le(e, r, f, s);
1136
- f.onmessage = function(O) {
1137
- clearTimeout(g), s(ie(e, O.data));
1138
- }, f.postMessage(["split", a, r, o]);
1139
- }
1140
- return;
1141
- }
1142
- r = a.split(r, o), s(ie(e, r));
1143
- }, _e(e, e.J, "split", n), n = function(r, o) {
1144
- var s = String(this);
1145
- if (r = _(e, r, e.I) ? r.data : new RegExp(r), Fe(e, r, o), e.REGEXP_MODE === 2)
1146
- if (se)
1147
- r = Ue(e, "string.match(regexp)", {
1148
- string: s,
1149
- regexp: r
1150
- }, r, o), r !== Ee && o(r && ie(e, r));
1151
- else {
1152
- var a = e.ha(), f = Le(e, r, a, o);
1153
- a.onmessage = function(g) {
1154
- clearTimeout(f), o(g.data && ie(e, g.data));
1155
- }, a.postMessage(["match", s, r]);
1156
- }
1157
- else
1158
- r = s.match(r), o(r && ie(e, r));
1159
- }, _e(e, e.J, "match", n), n = function(r, o) {
1160
- var s = String(this);
1161
- if (_(e, r, e.I) ? r = r.data : r = new RegExp(r), Fe(e, r, o), e.REGEXP_MODE === 2)
1162
- if (se)
1163
- r = Ue(e, "string.search(regexp)", {
1164
- string: s,
1165
- regexp: r
1166
- }, r, o), r !== Ee && o(r);
1167
- else {
1168
- var a = e.ha(), f = Le(e, r, a, o);
1169
- a.onmessage = function(g) {
1170
- clearTimeout(f), o(g.data);
1171
- }, a.postMessage(["search", s, r]);
1172
- }
1173
- else
1174
- o(s.search(r));
1175
- }, _e(e, e.J, "search", n), n = function(r, o, s) {
1176
- var a = String(this);
1177
- if (o = String(o), _(e, r, e.I) && (r = r.data, Fe(e, r, s), e.REGEXP_MODE === 2)) {
1178
- if (se)
1179
- r = Ue(e, "string.replace(substr, newSubstr)", {
1180
- string: a,
1181
- substr: r,
1182
- newSubstr: o
1183
- }, r, s), r !== Ee && s(r);
1184
- else {
1185
- var f = e.ha(), g = Le(e, r, f, s);
1186
- f.onmessage = function(O) {
1187
- clearTimeout(g), s(O.data);
1188
- }, f.postMessage(["replace", a, r, o]);
1189
- }
1190
- return;
1191
- }
1192
- s(a.replace(r, o));
1193
- }, _e(e, e.J, "replace", n), e.ba.push("(function() {", "var replace_ = String.prototype.replace;", "String.prototype.replace = function replace(substr, newSubstr) {", "if (typeof newSubstr !== 'function') {", "return replace_.call(this, substr, newSubstr);", "}", "var str = this;", "if (substr instanceof RegExp) {", "var subs = [];", "var m = substr.exec(str);", "while (m) {", "m.push(m.index, str);", "var inject = newSubstr.apply(null, m);", "subs.push([m.index, m[0].length, inject]);", "m = substr.global ? substr.exec(str) : null;", "}", "for (var i = subs.length - 1; i >= 0; i--) {", "str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);", "}", "} else {", "var i = str.indexOf(substr);", "if (i !== -1) {", "var inject = newSubstr(str.substr(i, substr.length), i, str);", "str = str.substring(0, i) + inject + str.substring(i + substr.length);", "}", "}", "return str;", "};", "})();", "");
1194
- }
1195
- function Wn(e, t) {
1196
- e.mb = e.i(function(n) {
1197
- return n = he.Boolean(n), le(e) ? (this.data = n, this) : n;
1198
- }, !0), e.g(t, "Boolean", e.mb, y);
1199
- }
1200
- function $n(e, t) {
1201
- var n = function(r) {
1202
- return r = arguments.length ? he.Number(r) : 0, le(e) ? (this.data = r, this) : r;
1203
- };
1204
- for (e.aa = e.i(n, !0), e.g(t, "Number", e.aa, y), t = ["MAX_VALUE", "MIN_VALUE", "NaN", "NEGATIVE_INFINITY", "POSITIVE_INFINITY"], n = 0; n < t.length; n++)
1205
- e.g(e.aa, t[n], Number[t[n]], De);
1206
- n = function(r) {
1207
- try {
1208
- return Number(this).toExponential(r);
1209
- } catch (o) {
1210
- m(e, e.D, o.message);
1211
- }
1212
- }, F(e, e.aa, "toExponential", n), n = function(r) {
1213
- try {
1214
- return Number(this).toFixed(r);
1215
- } catch (o) {
1216
- m(e, e.D, o.message);
1217
- }
1218
- }, F(e, e.aa, "toFixed", n), n = function(r) {
1219
- try {
1220
- return Number(this).toPrecision(r);
1221
- } catch (o) {
1222
- m(e, e.D, o.message);
1223
- }
1224
- }, F(e, e.aa, "toPrecision", n), n = function(r) {
1225
- try {
1226
- return Number(this).toString(r);
1227
- } catch (o) {
1228
- m(e, e.D, o.message);
1229
- }
1230
- }, F(e, e.aa, "toString", n), n = function(r, o) {
1231
- r = r ? e.R(r) : void 0, o = o ? e.R(o) : void 0;
1232
- try {
1233
- return Number(this).toLocaleString(r, o);
1234
- } catch (s) {
1235
- m(e, e.D, "toLocaleString: " + s.message);
1236
- }
1237
- }, F(e, e.aa, "toLocaleString", n);
1238
- }
1239
- function Gn(e, t) {
1240
- var n = function(o, s) {
1241
- if (!le(e))
1242
- return he.Date();
1243
- var a = [null].concat(Array.from(arguments));
1244
- return this.data = new (Function.prototype.bind.apply(he.Date, a))(), this;
1245
- };
1246
- e.$ = e.i(n, !0), e.nb = e.$.h.prototype, e.g(t, "Date", e.$, y), e.g(e.$, "now", e.i(Date.now, !1), y), e.g(e.$, "parse", e.i(Date.parse, !1), y), e.g(e.$, "UTC", e.i(Date.UTC, !1), y), t = "getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getTime getTimezoneOffset getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getYear setDate setFullYear setHours setMilliseconds setMinutes setMonth setSeconds setTime setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setYear toDateString toISOString toJSON toGMTString toLocaleDateString toLocaleString toLocaleTimeString toTimeString toUTCString".split(" ");
1247
- for (var r = 0; r < t.length; r++)
1248
- n = function(o) {
1249
- return function(s) {
1250
- var a = this.data;
1251
- a instanceof Date || m(e, e.j, o + " not called on a Date");
1252
- for (var f = [], g = 0; g < arguments.length; g++)
1253
- f[g] = e.R(arguments[g]);
1254
- return a[o].apply(a, f);
1255
- };
1256
- }(t[r]), F(e, e.$, t[r], n);
1257
- }
1258
- function Vn(e, t) {
1259
- var n = function(r, o) {
1260
- if (le(e))
1261
- var s = this;
1262
- else {
1263
- if (o === void 0 && _(e, r, e.I))
1264
- return r;
1265
- s = e.s(e.Ma);
1266
- }
1267
- r = r === void 0 ? "" : String(r), o = o ? String(o) : "", /^[gmi]*$/.test(o) || m(e, e.T, "Invalid regexp flag: " + o);
1268
- try {
1269
- var a = new he.RegExp(r, o);
1270
- } catch (f) {
1271
- m(e, e.T, f.message);
1272
- }
1273
- return Vt(e, s, a), s;
1274
- };
1275
- e.I = e.i(n, !0), e.Ma = e.I.h.prototype, e.g(t, "RegExp", e.I, y), e.g(e.I.h.prototype, "global", void 0, X), e.g(e.I.h.prototype, "ignoreCase", void 0, X), e.g(e.I.h.prototype, "multiline", void 0, X), e.g(e.I.h.prototype, "source", "(?:)", X), e.ba.push("Object.defineProperty(RegExp.prototype, 'test',", "{configurable: true, writable: true, value:", "function test(str) {", "return !!this.exec(str);", "}", "});"), n = function(r, o) {
1276
- function s(C) {
1277
- if (C) {
1278
- var w = ie(e, C);
1279
- return e.g(w, "index", C.index), e.g(w, "input", C.input), w;
1280
- }
1281
- return null;
1282
- }
1283
- var a = this.data;
1284
- if (r = String(r), a.lastIndex = Number(e.G(this, "lastIndex")), Fe(e, a, o), e.REGEXP_MODE === 2)
1285
- if (se)
1286
- r = Ue(e, "regexp.exec(string)", {
1287
- string: r,
1288
- regexp: a
1289
- }, a, o), r !== Ee && (e.g(this, "lastIndex", a.lastIndex), o(s(r)));
1290
- else {
1291
- var f = e.ha(), g = Le(e, a, f, o), O = this;
1292
- f.onmessage = function(C) {
1293
- clearTimeout(g), e.g(O, "lastIndex", C.data[1]), o(s(C.data[0]));
1294
- }, f.postMessage(["exec", a, a.lastIndex, r]);
1295
- }
1296
- else
1297
- r = a.exec(r), e.g(this, "lastIndex", a.lastIndex), o(s(r));
1298
- }, _e(e, e.I, "exec", n);
1299
- }
1300
- function Xn(e, t) {
1301
- function n(r) {
1302
- var o = e.i(function(s) {
1303
- var a = le(e) ? this : e.Aa(o);
1304
- return Lt(e, a, s), a;
1305
- }, !0);
1306
- return e.g(o, "prototype", e.Aa(e.D), y), e.g(o.h.prototype, "name", r, y), e.g(t, r, o, y), o;
1307
- }
1308
- e.D = e.i(function(r) {
1309
- var o = le(e) ? this : e.Aa(e.D);
1310
- return Lt(e, o, r), o;
1311
- }, !0), e.g(t, "Error", e.D, y), e.g(e.D.h.prototype, "message", "", y), e.g(e.D.h.prototype, "name", "Error", y), n("EvalError"), e.ob = n("RangeError"), e.pb = n("ReferenceError"), e.T = n("SyntaxError"), e.j = n("TypeError"), e.Gb = n("URIError");
1312
- }
1313
- function Hn(e, t) {
1314
- var n = e.s(e.M);
1315
- e.g(t, "Math", n, y);
1316
- var r = "E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2".split(" ");
1317
- for (t = 0; t < r.length; t++)
1318
- e.g(n, r[t], Math[r[t]], X);
1319
- for (r = "abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan".split(" "), t = 0; t < r.length; t++)
1320
- e.g(n, r[t], e.i(Math[r[t]], !1), y);
1321
- }
1322
- function Jn(e, t) {
1323
- var n = e.s(e.M);
1324
- e.g(t, "JSON", n, y), t = function(r) {
1325
- try {
1326
- var o = JSON.parse(String(r));
1327
- } catch (s) {
1328
- m(e, e.T, s.message);
1329
- }
1330
- return e.Ia(o);
1331
- }, e.g(n, "parse", e.i(t, !1)), t = function(r, o, s) {
1332
- o && o.H === "Function" ? m(e, e.j, "Function replacer on JSON.stringify not supported") : o && o.H === "Array" ? (o = Zr(e, o), o = o.filter(function(f) {
1333
- return typeof f == "string" || typeof f == "number";
1334
- })) : o = null, typeof s != "string" && typeof s != "number" && (s = void 0), r = e.R(r);
1335
- try {
1336
- var a = JSON.stringify(r, o, s);
1337
- } catch (f) {
1338
- m(e, e.j, f.message);
1339
- }
1340
- return a;
1341
- }, e.g(n, "stringify", e.i(t, !1));
1342
- }
1343
- function _(e, t, n) {
1344
- if (t == null || !n)
1345
- return !1;
1346
- if (n = n.h.prototype, t === n)
1347
- return !0;
1348
- for (t = ae(e, t); t; ) {
1349
- if (t === n)
1350
- return !0;
1351
- t = t.xa;
1352
- }
1353
- return !1;
1354
- }
1355
- function Vt(e, t, n) {
1356
- t.data = new RegExp(n.source, n.flags), e.g(t, "lastIndex", n.lastIndex, y), e.g(t, "source", n.source, X), e.g(t, "global", n.global, X), e.g(t, "ignoreCase", n.ignoreCase, X), e.g(t, "multiline", n.multiline, X);
1357
- }
1358
- function Lt(e, t, n) {
1359
- n && e.g(t, "message", String(n), y), n = [];
1360
- for (var r = e.o.length - 1; 0 <= r; r--) {
1361
- var o = e.o[r], s = o.node;
1362
- s.type === "CallExpression" && (o = o.U) && n.length && (n[n.length - 1].Ob = e.G(o, "name")), !s.X || n.length && s.type !== "CallExpression" || n.push({
1363
- Nb: s.X
1364
- });
1365
- }
1366
- for (r = String(e.G(t, "name")), s = String(e.G(t, "message")), s = r + ": " + s + `
1367
- `, r = 0; r < n.length; r++) {
1368
- var a = n[r].Nb;
1369
- o = n[r].Ob, a = a.source + ":" + a.start.line + ":" + a.start.ab, s = o ? s + (" at " + o + " (" + a + `)
1370
- `) : s + (" at " + a + `
1371
- `);
1372
- }
1373
- e.g(t, "stack", s.trim(), y);
1374
- }
1375
- I.ha = function() {
1376
- var e = this.ha.Mb;
1377
- return e || (e = new Blob([Mn.join(`
1378
- `)], {
1379
- type: "application/javascript"
1380
- }), this.ha.Mb = e), new Worker(URL.createObjectURL(e));
1381
- };
1382
- function Ue(e, t, n, r, o) {
1383
- var s = {
1384
- timeout: e.REGEXP_THREAD_TIMEOUT
1385
- };
1386
- try {
1387
- return se.runInNewContext(t, n, s);
1388
- } catch {
1389
- o(null), m(e, e.D, "RegExp Timeout: " + r);
1390
- }
1391
- return Ee;
1392
- }
1393
- function Fe(e, t, n) {
1394
- if (e.REGEXP_MODE === 0)
1395
- var r = !1;
1396
- else if (e.REGEXP_MODE === 1)
1397
- r = !0;
1398
- else if (se)
1399
- r = !0;
1400
- else if (typeof Worker == "function" && typeof URL == "function")
1401
- r = !0;
1402
- else if (typeof require == "function") {
1403
- try {
1404
- se = require("vm");
1405
- } catch {
1406
- }
1407
- r = !!se;
1408
- } else
1409
- r = !1;
1410
- r || (n(null), m(e, e.D, "Regular expressions not supported: " + t));
1411
- }
1412
- function Le(e, t, n, r) {
1413
- return setTimeout(function() {
1414
- n.terminate(), r(null);
1415
- try {
1416
- m(e, e.D, "RegExp Timeout: " + t);
1417
- } catch {
1418
- }
1419
- }, e.REGEXP_THREAD_TIMEOUT);
1420
- }
1421
- I.Aa = function(e) {
1422
- return this.s(e && e.h.prototype);
1423
- };
1424
- I.s = function(e) {
1425
- if (typeof e != "object")
1426
- throw Error("Non object prototype");
1427
- return e = new A(e), _(this, e, this.D) && (e.H = "Error"), e;
1428
- };
1429
- function Oe(e) {
1430
- var t = e.s(e.La);
1431
- return e.g(t, "length", 0, {
1432
- configurable: !1,
1433
- enumerable: !1,
1434
- writable: !0
1435
- }), t.H = "Array", t;
1436
- }
1437
- function Xt(e, t, n) {
1438
- var r = e.s(e.Z);
1439
- return n ? (n = e.s(e.M), e.g(r, "prototype", n, y), e.g(n, "constructor", r, y)) : r.Ab = !0, e.g(r, "length", t, X), r.H = "Function", r;
1440
- }
1441
- function Ht(e, t, n, r) {
1442
- var o = Xt(e, t.oa.length, !0);
1443
- return o.Va = n, o.node = t, e.g(o, "name", t.id ? String(t.id.name) : r || "", X), o;
1444
- }
1445
- I.i = function(e, t) {
1446
- return t = Xt(this, e.length, t), t.Ta = e, e.id = this.Ya++, this.g(t, "name", e.name, X), t;
1447
- };
1448
- I.ub = function(e) {
1449
- var t = Xt(this, e.length, !0);
1450
- return t.Za = e, e.id = this.Ya++, this.g(t, "name", e.name, X), t;
1451
- };
1452
- I.Ia = function(e) {
1453
- if (e instanceof A)
1454
- throw Error("Object is already pseudo");
1455
- if (e == null || e === !0 || e === !1 || typeof e == "string" || typeof e == "number")
1456
- return e;
1457
- if (e instanceof RegExp) {
1458
- var t = this.s(this.Ma);
1459
- return Vt(this, t, e), t;
1460
- }
1461
- if (e instanceof Date)
1462
- return t = this.s(this.nb), t.data = new Date(e.valueOf()), t;
1463
- if (typeof e == "function") {
1464
- var n = this;
1465
- return t = Object.getOwnPropertyDescriptor(e, "prototype"), this.i(function() {
1466
- var o = Array.prototype.slice.call(arguments).map(function(s) {
1467
- return n.R(s);
1468
- });
1469
- return o = e.apply(n, o), n.Ia(o);
1470
- }, !!t);
1471
- }
1472
- if (Array.isArray(e)) {
1473
- t = Oe(this);
1474
- for (var r = 0; r < e.length; r++)
1475
- r in e && this.g(t, r, this.Ia(e[r]));
1476
- return t;
1477
- }
1478
- t = this.s(this.M);
1479
- for (r in e)
1480
- this.g(t, r, this.Ia(e[r]));
1481
- return t;
1482
- };
1483
- I.R = function(e, t) {
1484
- if (typeof e != "object" && typeof e != "function" || e === null)
1485
- return e;
1486
- if (!(e instanceof A))
1487
- throw Error("Object is not pseudo");
1488
- if (_(this, e, this.I))
1489
- return t = new RegExp(e.data.source, e.data.flags), t.lastIndex = e.data.lastIndex, t;
1490
- if (_(this, e, this.$))
1491
- return new Date(e.data.valueOf());
1492
- t = t || {
1493
- hb: [],
1494
- Sa: []
1495
- };
1496
- var n = t.hb.indexOf(e);
1497
- if (n !== -1)
1498
- return t.Sa[n];
1499
- if (t.hb.push(e), _(this, e, this.qa)) {
1500
- n = [], t.Sa.push(n);
1501
- for (var r = this.G(e, "length"), o = 0; o < r; o++)
1502
- at(this, e, o) && (n[o] = this.R(this.G(e, o), t));
1503
- } else
1504
- for (r in n = {}, t.Sa.push(n), e.h)
1505
- o = this.R(e.h[r], t), Object.defineProperty(n, r, {
1506
- value: o,
1507
- writable: !0,
1508
- enumerable: !0,
1509
- configurable: !0
1510
- });
1511
- return t.hb.pop(), t.Sa.pop(), n;
1512
- };
1513
- function ie(e, t) {
1514
- for (var n = Oe(e), r = Object.getOwnPropertyNames(t), o = 0; o < r.length; o++)
1515
- e.g(n, r[o], t[r[o]]);
1516
- return n;
1517
- }
1518
- function Zr(e, t) {
1519
- var n = [], r;
1520
- for (r in t.h)
1521
- n[r] = e.G(t, r);
1522
- return n.length = Gt(e.G(t, "length")) || 0, n;
1523
- }
1524
- function ae(e, t) {
1525
- switch (typeof t) {
1526
- case "number":
1527
- return e.aa.h.prototype;
1528
- case "boolean":
1529
- return e.mb.h.prototype;
1530
- case "string":
1531
- return e.J.h.prototype;
1532
- }
1533
- return t ? t.xa : null;
1534
- }
1535
- I.G = function(e, t) {
1536
- if (this.P)
1537
- throw Error("Getter not supported in that context");
1538
- if (t = String(t), e != null || m(this, this.j, "Cannot read property '" + t + "' of " + e), typeof e == "object" && !(e instanceof A))
1539
- throw TypeError("Expecting native value or pseudo object");
1540
- if (t === "length") {
1541
- if (_(this, e, this.J))
1542
- return String(e).length;
1543
- } else if (64 > t.charCodeAt(0) && _(this, e, this.J)) {
1544
- var n = $e(t);
1545
- if (!isNaN(n) && n < String(e).length)
1546
- return String(e)[n];
1547
- }
1548
- do
1549
- if (e.h && t in e.h)
1550
- return (n = e.V[t]) ? (this.P = !0, n) : e.h[t];
1551
- while (e = ae(this, e));
1552
- };
1553
- function at(e, t, n) {
1554
- if (!(t instanceof A))
1555
- throw TypeError("Primitive data type has no properties");
1556
- if (n = String(n), n === "length" && _(e, t, e.J))
1557
- return !0;
1558
- if (_(e, t, e.J)) {
1559
- var r = $e(n);
1560
- if (!isNaN(r) && r < String(t).length)
1561
- return !0;
1562
- }
1563
- do
1564
- if (t.h && n in t.h)
1565
- return !0;
1566
- while (t = ae(e, t));
1567
- return !1;
1568
- }
1569
- I.g = function(e, t, n, r) {
1570
- if (this.Ka)
1571
- throw Error("Setter not supported in that context");
1572
- if (t = String(t), e != null || m(this, this.j, "Cannot set property '" + t + "' of " + e), typeof e == "object" && !(e instanceof A))
1573
- throw TypeError("Expecting native value or pseudo object");
1574
- r && ("get" in r || "set" in r) && ("value" in r || "writable" in r) && m(this, this.j, "Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");
1575
- var o = !this.o || Jt(this).S;
1576
- if (e instanceof A) {
1577
- if (_(this, e, this.J)) {
1578
- var s = $e(t);
1579
- if (t === "length" || !isNaN(s) && s < String(e).length) {
1580
- o && m(this, this.j, "Cannot assign to read only property '" + t + "' of String '" + e.data + "'");
1581
- return;
1582
- }
1583
- }
1584
- if (e.H === "Array")
1585
- if (s = e.h.length, t === "length") {
1586
- if (r) {
1587
- if (!("value" in r))
1588
- return;
1589
- n = r.value;
1590
- }
1591
- if (n = Gt(n), isNaN(n) && m(this, this.ob, "Invalid array length"), n < s)
1592
- for (a in e.h) {
1593
- var a = $e(a);
1594
- !isNaN(a) && n <= a && delete e.h[a];
1595
- }
1596
- } else
1597
- isNaN(a = $e(t)) || (e.h.length = Math.max(s, a + 1));
1598
- if (!e.preventExtensions || t in e.h)
1599
- if (r) {
1600
- o = {}, "get" in r && r.get && (e.V[t] = r.get, o.get = this.g.ac), "set" in r && r.set && (e.Y[t] = r.set, o.set = this.g.bc), "configurable" in r && (o.configurable = r.configurable), "enumerable" in r && (o.enumerable = r.enumerable), "writable" in r && (o.writable = r.writable, delete e.V[t], delete e.Y[t]), "value" in r ? (o.value = r.value, delete e.V[t], delete e.Y[t]) : n !== Ve && (o.value = n, delete e.V[t], delete e.Y[t]);
1601
- try {
1602
- Object.defineProperty(e.h, t, o);
1603
- } catch {
1604
- m(this, this.j, "Cannot redefine property: " + t);
1605
- }
1606
- "get" in r && !r.get && delete e.V[t], "set" in r && !r.set && delete e.Y[t];
1607
- } else {
1608
- if (n === Ve)
1609
- throw ReferenceError("Value not specified");
1610
- for (r = e; !(t in r.h); )
1611
- if (r = ae(this, r), !r) {
1612
- r = e;
1613
- break;
1614
- }
1615
- if (r.Y && r.Y[t])
1616
- return this.Ka = !0, r.Y[t];
1617
- if (r.V && r.V[t])
1618
- o && m(this, this.j, "Cannot set property '" + t + "' of object '" + e + "' which only has a getter");
1619
- else
1620
- try {
1621
- e.h[t] = n;
1622
- } catch {
1623
- o && m(this, this.j, "Cannot assign to read only property '" + t + "' of object '" + e + "'");
1624
- }
1625
- }
1626
- else
1627
- o && m(this, this.j, "Can't add property '" + t + "', object is not extensible");
1628
- } else
1629
- o && m(this, this.j, "Can't create property '" + t + "' on '" + e + "'");
1630
- };
1631
- I.g.ac = function() {
1632
- throw Error("Placeholder getter");
1633
- };
1634
- I.g.bc = function() {
1635
- throw Error("Placeholder setter");
1636
- };
1637
- function F(e, t, n, r) {
1638
- e.g(t.h.prototype, n, e.i(r, !1), y);
1639
- }
1640
- function _e(e, t, n, r) {
1641
- e.g(t.h.prototype, n, e.ub(r), y);
1642
- }
1643
- function Jt(e) {
1644
- if (e = e.o[e.o.length - 1].scope, !e)
1645
- throw Error("No scope found");
1646
- return e;
1647
- }
1648
- function _t(e, t, n) {
1649
- var r = !1;
1650
- if (n && n.S)
1651
- r = !0;
1652
- else {
1653
- var o = t.body && t.body[0];
1654
- o && o.la && o.la.type === "Literal" && o.la.value === "use strict" && (r = !0);
1655
- }
1656
- return o = e.s(null), r = new qr(n, r, o), n || Dn(e, r.object), Xe(e, t, r), r;
1657
- }
1658
- function Kt(e, t, n) {
1659
- if (!t)
1660
- throw Error("parentScope required");
1661
- return e = n || e.s(null), new qr(t, t.S, e);
1662
- }
1663
- function Yt(e, t) {
1664
- for (var n = Jt(e); n && n !== e.N; ) {
1665
- if (t in n.object.h)
1666
- return n.object.h[t];
1667
- n = n.Va;
1668
- }
1669
- if (n === e.N && at(e, n.object, t))
1670
- return e.G(n.object, t);
1671
- n = e.o[e.o.length - 1].node, n.type === "UnaryExpression" && n.operator === "typeof" || m(e, e.pb, t + " is not defined");
1672
- }
1673
- function zr(e, t, n) {
1674
- for (var r = Jt(e), o = r.S; r && r !== e.N; ) {
1675
- if (t in r.object.h) {
1676
- try {
1677
- r.object.h[t] = n;
1678
- } catch {
1679
- o && m(e, e.j, "Cannot assign to read only variable '" + t + "'");
1680
- }
1681
- return;
1682
- }
1683
- r = r.Va;
1684
- }
1685
- if (r === e.N && (!o || at(e, r.object, t)))
1686
- return e.g(r.object, t, n);
1687
- m(e, e.pb, t + " is not defined");
1688
- }
1689
- function Xe(e, t, n) {
1690
- if (t.jb)
1691
- var r = t.jb;
1692
- else {
1693
- switch (r = /* @__PURE__ */ Object.create(null), t.type) {
1694
- case "VariableDeclaration":
1695
- for (var o = 0; o < t.fa.length; o++)
1696
- r[t.fa[o].id.name] = !0;
1697
- break;
1698
- case "FunctionDeclaration":
1699
- r[t.id.name] = t;
1700
- break;
1701
- case "BlockStatement":
1702
- case "CatchClause":
1703
- case "DoWhileStatement":
1704
- case "ForInStatement":
1705
- case "ForStatement":
1706
- case "IfStatement":
1707
- case "LabeledStatement":
1708
- case "Program":
1709
- case "SwitchCase":
1710
- case "SwitchStatement":
1711
- case "TryStatement":
1712
- case "WithStatement":
1713
- case "WhileStatement":
1714
- var s = t.constructor, a;
1715
- for (a in t)
1716
- if (a !== "loc") {
1717
- var f = t[a];
1718
- if (f && typeof f == "object") {
1719
- if (Array.isArray(f)) {
1720
- for (o = 0; o < f.length; o++)
1721
- if (f[o] && f[o].constructor === s) {
1722
- var g = Xe(e, f[o], n);
1723
- for (a in g)
1724
- r[a] = g[a];
1725
- }
1726
- } else if (f.constructor === s)
1727
- for (a in g = Xe(e, f, n), g)
1728
- r[a] = g[a];
1729
- }
1730
- }
1731
- }
1732
- t.jb = r;
1733
- }
1734
- for (a in r)
1735
- r[a] === !0 ? e.g(n.object, a, void 0, Mr) : e.g(n.object, a, Ht(e, r[a], n), Mr);
1736
- return r;
1737
- }
1738
- function le(e) {
1739
- return e.o[e.o.length - 1].isConstructor;
1740
- }
1741
- function Zt(e, t) {
1742
- return t[0] === Ae ? Yt(e, t[1]) : e.G(t[0], t[1]);
1743
- }
1744
- function zt(e, t, n) {
1745
- return t[0] === Ae ? zr(e, t[1], n) : e.g(t[0], t[1], n);
1746
- }
1747
- function m(e, t, n) {
1748
- throw e.N ? (n !== void 0 && t instanceof A && (t = e.Aa(t), Lt(e, t, n)), He(e, 4, t), Yr) : n === void 0 ? t : n;
1749
- }
1750
- function He(e, t, n, r) {
1751
- if (t === 0)
1752
- throw TypeError("Should not unwind for NORMAL completions");
1753
- var o = e.o;
1754
- e:
1755
- for (; 0 < o.length; o.pop()) {
1756
- var s = o[o.length - 1];
1757
- switch (s.node.type) {
1758
- case "TryStatement":
1759
- s.ea = {
1760
- type: t,
1761
- value: n,
1762
- label: r
1763
- };
1764
- return;
1765
- case "CallExpression":
1766
- case "NewExpression":
1767
- if (t === 3) {
1768
- s.value = n;
1769
- return;
1770
- }
1771
- if (t !== 4)
1772
- throw Error("Unsynatctic break/continue not rejected by Acorn");
1773
- break;
1774
- case "Program":
1775
- s.done = !0;
1776
- break e;
1777
- }
1778
- if (t === 1) {
1779
- if (r ? s.labels && s.labels.indexOf(r) !== -1 : s.W || s.Zb) {
1780
- o.pop();
1781
- return;
1782
- }
1783
- } else if (t === 2 && (r ? s.labels && s.labels.indexOf(r) !== -1 : s.W))
1784
- return;
1785
- }
1786
- throw _(e, n, e.D) ? (t = {
1787
- EvalError,
1788
- RangeError,
1789
- ReferenceError,
1790
- SyntaxError,
1791
- TypeError,
1792
- URIError
1793
- }, r = String(e.G(n, "name")), o = e.G(n, "message").valueOf(), t = (t[r] || Error)(o), t.stack = String(e.G(n, "stack"))) : t = String(n), e.value = t, t;
1794
- }
1795
- function V(e, t) {
1796
- switch (t.type) {
1797
- case "ArrayExpression":
1798
- return "[...]";
1799
- case "BinaryExpression":
1800
- case "LogicalExpression":
1801
- return V(e, t.left) + " " + t.operator + " " + V(e, t.right);
1802
- case "CallExpression":
1803
- return V(e, t.callee) + "(...)";
1804
- case "ConditionalExpression":
1805
- return V(e, t.test) + " ? " + V(e, t.da) + " : " + V(e, t.alternate);
1806
- case "Identifier":
1807
- return t.name;
1808
- case "Literal":
1809
- return t.raw;
1810
- case "MemberExpression":
1811
- var n = V(e, t.object);
1812
- return e = V(e, t.Wa), t.bb ? n + "[" + e + "]" : n + "." + e;
1813
- case "NewExpression":
1814
- return "new " + V(e, t.callee) + "(...)";
1815
- case "ObjectExpression":
1816
- return "{...}";
1817
- case "ThisExpression":
1818
- return "this";
1819
- case "UnaryExpression":
1820
- return t.operator + " " + V(e, t.K);
1821
- case "UpdateExpression":
1822
- return n = V(e, t.K), t.prefix ? t.operator + n : n + t.operator;
1823
- }
1824
- return "???";
1825
- }
1826
- function Ur(e, t, n) {
1827
- var r = e.o[e.o.length - 1], o = Array.from(n), s = o.shift();
1828
- n = Math.max(Number(o.shift() || 0), 0);
1829
- var a = e.ya();
1830
- if (s instanceof A && s.H === "Function") {
1831
- var f = s;
1832
- a.type = "CallExpression", r = r.scope;
1833
- } else {
1834
- try {
1835
- var g = je(String(s), "taskCode" + e.ic++);
1836
- } catch (O) {
1837
- m(e, e.T, "Invalid code: " + O.message);
1838
- }
1839
- a.type = "EvalProgram_", a.body = g.body, r = r.node.arguments[0], st(a, r ? r.start : void 0, r ? r.end : void 0), r = e.N, o.length = 0;
1840
- }
1841
- return t = new Kn(f, o, r, a, t ? n : -1), Qr(e, t, n), t.Db;
1842
- }
1843
- function Qr(e, t, n) {
1844
- t.time = Date.now() + n, e.ca.push(t), e.ca.sort(function(r, o) {
1845
- return r.time - o.time;
1846
- });
1847
- }
1848
- function Fr(e, t) {
1849
- for (var n = 0; n < e.ca.length; n++)
1850
- if (e.ca[n].Db == t) {
1851
- e.ca.splice(n, 1);
1852
- break;
1853
- }
1854
- }
1855
- function Je(e, t, n) {
1856
- if (!e.P)
1857
- throw Error("Unexpected call to createGetter");
1858
- e.P = !1, n = Array.isArray(n) ? n[0] : n;
1859
- var r = e.ya();
1860
- return r.type = "CallExpression", e = new v(r, e.o[e.o.length - 1].scope), e.ia = 2, e.B = n, e.U = t, e.Qa = !0, e.F = [], e;
1861
- }
1862
- function Qt(e, t, n, r) {
1863
- if (!e.Ka)
1864
- throw Error("Unexpected call to createSetter");
1865
- e.Ka = !1, n = Array.isArray(n) ? n[0] : e.Na;
1866
- var o = e.ya();
1867
- return o.type = "CallExpression", e = new v(o, e.o[e.o.length - 1].scope), e.ia = 2, e.B = n, e.U = t, e.Qa = !0, e.F = [r], e;
1868
- }
1869
- function Bt(e, t) {
1870
- return t == null ? e.Na : t instanceof A ? t : (e = e.s(ae(e, t)), e.data = t, e);
1871
- }
1872
- I.Xb = function() {
1873
- return this.N;
1874
- };
1875
- I.Yb = function() {
1876
- return this.o;
1877
- };
1878
- I.ec = function(e) {
1879
- this.o = e;
1880
- };
1881
- function v(e, t) {
1882
- this.node = e, this.scope = t;
1883
- }
1884
- function qr(e, t, n) {
1885
- this.Va = e, this.S = t, this.object = n;
1886
- }
1887
- function A(e) {
1888
- this.V = /* @__PURE__ */ Object.create(null), this.Y = /* @__PURE__ */ Object.create(null), this.h = /* @__PURE__ */ Object.create(null), this.xa = e;
1889
- }
1890
- I = A.prototype;
1891
- I.xa = null;
1892
- I.H = "Object";
1893
- I.data = null;
1894
- I.toString = function() {
1895
- if (!We)
1896
- return "[object Interpreter.Object]";
1897
- if (!(this instanceof A))
1898
- return String(this);
1899
- if (this.H === "Array") {
1900
- var e = Dr;
1901
- e.push(this);
1902
- try {
1903
- var t = [], n = this.h.length, r = !1;
1904
- 1024 < n && (n = 1e3, r = !0);
1905
- for (var o = 0; o < n; o++) {
1906
- var s = this.h[o];
1907
- t[o] = s instanceof A && e.indexOf(s) !== -1 ? "..." : s;
1908
- }
1909
- r && t.push("...");
1910
- } finally {
1911
- e.pop();
1912
- }
1913
- return t.join(",");
1914
- }
1915
- if (this.H === "Error") {
1916
- if (e = Dr, e.indexOf(this) !== -1)
1917
- return "[object Error]";
1918
- n = this;
1919
- do
1920
- if ("name" in n.h) {
1921
- t = n.h.name;
1922
- break;
1923
- }
1924
- while (n = n.xa);
1925
- n = this;
1926
- do
1927
- if ("message" in n.h) {
1928
- r = n.h.message;
1929
- break;
1930
- }
1931
- while (n = n.xa);
1932
- e.push(this);
1933
- try {
1934
- t = t && String(t), r = r && String(r);
1935
- } finally {
1936
- e.pop();
1937
- }
1938
- return r ? t + ": " + r : String(t);
1939
- }
1940
- return this.data !== null ? String(this.data) : "[object " + this.H + "]";
1941
- };
1942
- I.valueOf = function() {
1943
- return !We || this.data === void 0 || this.data === null || this.data instanceof RegExp ? this : this.data instanceof Date ? this.data.valueOf() : this.data;
1944
- };
1945
- function Kn(e, t, n, r, o) {
1946
- this.zb = e, this.Lb = t, this.scope = n, this.node = r, this.interval = o, this.Db = ++Yn, this.time = 0;
1947
- }
1948
- var Yn = 0;
1949
- h.prototype.stepArrayExpression = function(e, t, n) {
1950
- n = n.elements;
1951
- var r = t.A || 0;
1952
- for (t.Oa ? (this.g(t.Oa, r, t.value), r++) : (t.Oa = Oe(this), t.Oa.h.length = n.length); r < n.length; ) {
1953
- if (n[r])
1954
- return t.A = r, new v(n[r], t.scope);
1955
- r++;
1956
- }
1957
- e.pop(), e[e.length - 1].value = t.Oa;
1958
- };
1959
- h.prototype.stepAssignmentExpression = function(e, t, n) {
1960
- if (!t.ja)
1961
- return t.ja = !0, t = new v(n.left, t.scope), t.sa = !0, t;
1962
- if (!t.Da)
1963
- return t.Fa || (t.Fa = t.value), t.Ba && (t.ma = t.value), !t.Ba && n.operator !== "=" && (e = Zt(this, t.Fa), t.ma = e, this.P) ? (t.Ba = !0, Je(this, e, t.Fa)) : (t.Da = !0, n.operator === "=" && n.left.type === "Identifier" && (t.Pa = n.left.name), new v(n.right, t.scope));
1964
- if (t.ta)
1965
- e.pop(), e[e.length - 1].value = t.ib;
1966
- else {
1967
- var r = t.ma, o = t.value;
1968
- switch (n.operator) {
1969
- case "=":
1970
- r = o;
1971
- break;
1972
- case "+=":
1973
- r += o;
1974
- break;
1975
- case "-=":
1976
- r -= o;
1977
- break;
1978
- case "*=":
1979
- r *= o;
1980
- break;
1981
- case "/=":
1982
- r /= o;
1983
- break;
1984
- case "%=":
1985
- r %= o;
1986
- break;
1987
- case "<<=":
1988
- r <<= o;
1989
- break;
1990
- case ">>=":
1991
- r >>= o;
1992
- break;
1993
- case ">>>=":
1994
- r >>>= o;
1995
- break;
1996
- case "&=":
1997
- r &= o;
1998
- break;
1999
- case "^=":
2000
- r ^= o;
2001
- break;
2002
- case "|=":
2003
- r |= o;
2004
- break;
2005
- default:
2006
- throw SyntaxError("Unknown assignment expression: " + n.operator);
2007
- }
2008
- if (n = zt(this, t.Fa, r))
2009
- return t.ta = !0, t.ib = r, Qt(this, n, t.Fa, r);
2010
- e.pop(), e[e.length - 1].value = r;
2011
- }
2012
- };
2013
- h.prototype.stepBinaryExpression = function(e, t, n) {
2014
- if (!t.ja)
2015
- return t.ja = !0, new v(n.left, t.scope);
2016
- if (!t.Da)
2017
- return t.Da = !0, t.ma = t.value, new v(n.right, t.scope);
2018
- e.pop();
2019
- var r = t.ma;
2020
- switch (t = t.value, n.operator) {
2021
- case "==":
2022
- n = r == t;
2023
- break;
2024
- case "!=":
2025
- n = r != t;
2026
- break;
2027
- case "===":
2028
- n = r === t;
2029
- break;
2030
- case "!==":
2031
- n = r !== t;
2032
- break;
2033
- case ">":
2034
- n = r > t;
2035
- break;
2036
- case ">=":
2037
- n = r >= t;
2038
- break;
2039
- case "<":
2040
- n = r < t;
2041
- break;
2042
- case "<=":
2043
- n = r <= t;
2044
- break;
2045
- case "+":
2046
- n = r + t;
2047
- break;
2048
- case "-":
2049
- n = r - t;
2050
- break;
2051
- case "*":
2052
- n = r * t;
2053
- break;
2054
- case "/":
2055
- n = r / t;
2056
- break;
2057
- case "%":
2058
- n = r % t;
2059
- break;
2060
- case "&":
2061
- n = r & t;
2062
- break;
2063
- case "|":
2064
- n = r | t;
2065
- break;
2066
- case "^":
2067
- n = r ^ t;
2068
- break;
2069
- case "<<":
2070
- n = r << t;
2071
- break;
2072
- case ">>":
2073
- n = r >> t;
2074
- break;
2075
- case ">>>":
2076
- n = r >>> t;
2077
- break;
2078
- case "in":
2079
- t instanceof A || m(this, this.j, "'in' expects an object, not '" + t + "'"), n = at(this, t, r);
2080
- break;
2081
- case "instanceof":
2082
- _(this, t, this.O) || m(this, this.j, "'instanceof' expects an object, not '" + t + "'"), n = r instanceof A ? _(this, r, t) : !1;
2083
- break;
2084
- default:
2085
- throw SyntaxError("Unknown binary operator: " + n.operator);
2086
- }
2087
- e[e.length - 1].value = n;
2088
- };
2089
- h.prototype.stepBlockStatement = function(e, t, n) {
2090
- var r = t.A || 0;
2091
- if (n = n.body[r])
2092
- return t.A = r + 1, new v(n, t.scope);
2093
- e.pop();
2094
- };
2095
- h.prototype.stepBreakStatement = function(e, t, n) {
2096
- He(this, 1, void 0, n.label && n.label.name);
2097
- };
2098
- h.prototype.Hb = 0;
2099
- h.prototype.stepCallExpression = function(e, t, n) {
2100
- if (!t.ia) {
2101
- t.ia = 1;
2102
- var r = new v(n.callee, t.scope);
2103
- return r.sa = !0, r;
2104
- }
2105
- if (t.ia === 1) {
2106
- t.ia = 2;
2107
- var o = t.value;
2108
- if (Array.isArray(o)) {
2109
- if (t.U = Zt(this, o), o[0] === Ae ? t.Pb = o[1] === "eval" : t.B = o[0], o = t.U, this.P)
2110
- return t.ia = 1, Je(this, o, t.value);
2111
- } else
2112
- t.U = o;
2113
- t.F = [], t.A = 0;
2114
- }
2115
- if (o = t.U, !t.Qa) {
2116
- if (t.A !== 0 && t.F.push(t.value), n.arguments[t.A])
2117
- return new v(n.arguments[t.A++], t.scope);
2118
- if (n.type === "NewExpression") {
2119
- if (o instanceof A && !o.Ab || m(this, this.j, V(this, n.callee) + " is not a constructor"), o === this.qa)
2120
- t.B = Oe(this);
2121
- else {
2122
- var s = o.h.prototype;
2123
- (typeof s != "object" || s === null) && (s = this.M), t.B = this.s(s);
2124
- }
2125
- t.isConstructor = !0;
2126
- }
2127
- t.Qa = !0;
2128
- }
2129
- if (t.eb)
2130
- e.pop(), e[e.length - 1].value = t.isConstructor && typeof t.value != "object" ? t.B : t.value;
2131
- else {
2132
- if (t.eb = !0, o instanceof A || m(this, this.j, V(this, n.callee) + " is not a function"), e = o.node) {
2133
- for (n = _t(this, e.body, o.Va), r = Oe(this), o = 0; o < t.F.length; o++)
2134
- this.g(r, o, t.F[o]);
2135
- for (this.g(n.object, "arguments", r), o = 0; o < e.oa.length; o++)
2136
- this.g(n.object, e.oa[o].name, t.F.length > o ? t.F[o] : void 0);
2137
- return n.S || (t.B = Bt(this, t.B)), this.g(n.object, "this", t.B, $t), t.value = void 0, new v(e.body, n);
2138
- }
2139
- if (o.eval)
2140
- if (o = t.F[0], typeof o != "string")
2141
- t.value = o;
2142
- else {
2143
- try {
2144
- r = je(String(o), "eval" + this.Hb++);
2145
- } catch (f) {
2146
- m(this, this.T, "Invalid code: " + f.message);
2147
- }
2148
- return o = this.ya(), o.type = "EvalProgram_", o.body = r.body, st(o, n.start, n.end), n = t.Pb ? t.scope : this.N, n.S ? n = _t(this, r, n) : Xe(this, r, n), this.value = void 0, new v(o, n);
2149
- }
2150
- else if (o.Ta)
2151
- t.scope.S || (t.B = Bt(this, t.B)), t.value = o.Ta.apply(t.B, t.F);
2152
- else if (o.Za) {
2153
- var a = this;
2154
- r = o.Za.length - 1, r = t.F.concat(Array(r)).slice(0, r), r.push(function(f) {
2155
- t.value = f, a.za = !1;
2156
- }), this.za = !0, t.scope.S || (t.B = Bt(this, t.B)), o.Za.apply(t.B, r);
2157
- } else
2158
- m(this, this.j, V(this, n.callee) + " is not callable");
2159
- }
2160
- };
2161
- h.prototype.stepConditionalExpression = function(e, t, n) {
2162
- var r = t.na || 0;
2163
- if (r === 0)
2164
- return t.na = 1, new v(n.test, t.scope);
2165
- if (r === 1) {
2166
- if (t.na = 2, (r = !!t.value) && n.da)
2167
- return new v(n.da, t.scope);
2168
- if (!r && n.alternate)
2169
- return new v(n.alternate, t.scope);
2170
- this.value = void 0;
2171
- }
2172
- e.pop(), n.type === "ConditionalExpression" && (e[e.length - 1].value = t.value);
2173
- };
2174
- h.prototype.stepContinueStatement = function(e, t, n) {
2175
- He(this, 2, void 0, n.label && n.label.name);
2176
- };
2177
- h.prototype.stepDebuggerStatement = function(e) {
2178
- e.pop();
2179
- };
2180
- h.prototype.stepDoWhileStatement = function(e, t, n) {
2181
- if (n.type === "DoWhileStatement" && t.ga === void 0 && (t.value = !0, t.ga = !0), !t.ga)
2182
- return t.ga = !0, new v(n.test, t.scope);
2183
- if (!t.value)
2184
- e.pop();
2185
- else if (n.body)
2186
- return t.ga = !1, t.W = !0, new v(n.body, t.scope);
2187
- };
2188
- h.prototype.stepEmptyStatement = function(e) {
2189
- e.pop();
2190
- };
2191
- h.prototype.stepEvalProgram_ = function(e, t, n) {
2192
- var r = t.A || 0;
2193
- if (n = n.body[r])
2194
- return t.A = r + 1, new v(n, t.scope);
2195
- e.pop(), e[e.length - 1].value = this.value;
2196
- };
2197
- h.prototype.stepExpressionStatement = function(e, t, n) {
2198
- if (!t.ka)
2199
- return this.value = void 0, t.ka = !0, new v(n.la, t.scope);
2200
- e.pop(), this.value = t.value;
2201
- };
2202
- h.prototype.stepForInStatement = function(e, t, n) {
2203
- if (!t.Ub && (t.Ub = !0, n.left.fa && n.left.fa[0].ua))
2204
- return t.scope.S && m(this, this.T, "for-in loop variable declaration may not have an initializer"), new v(n.left, t.scope);
2205
- if (!t.Ca)
2206
- return t.Ca = !0, t.pa || (t.pa = t.value), new v(n.right, t.scope);
2207
- if (t.W || (t.W = !0, t.u = t.value, t.kb = /* @__PURE__ */ Object.create(null)), t.Ra === void 0)
2208
- e:
2209
- for (; ; ) {
2210
- if (t.u instanceof A)
2211
- for (t.wa || (t.wa = Object.getOwnPropertyNames(t.u.h)); ; ) {
2212
- var r = t.wa.shift();
2213
- if (r === void 0)
2214
- break;
2215
- if (Object.prototype.hasOwnProperty.call(t.u.h, r) && !t.kb[r] && (t.kb[r] = !0, Object.prototype.propertyIsEnumerable.call(t.u.h, r))) {
2216
- t.Ra = r;
2217
- break e;
2218
- }
2219
- }
2220
- else if (t.u !== null && t.u !== void 0) {
2221
- for (t.wa || (t.wa = Object.getOwnPropertyNames(t.u)); r = t.wa.shift(), r !== void 0; )
2222
- if (t.kb[r] = !0, Object.prototype.propertyIsEnumerable.call(t.u, r)) {
2223
- t.Ra = r;
2224
- break e;
2225
- }
2226
- }
2227
- if (t.u = ae(this, t.u), t.wa = null, t.u === null) {
2228
- e.pop();
2229
- return;
2230
- }
2231
- }
2232
- if (!t.wb)
2233
- if (t.wb = !0, e = n.left, e.type === "VariableDeclaration")
2234
- t.pa = [Ae, e.fa[0].id.name];
2235
- else
2236
- return t.pa = null, t = new v(e, t.scope), t.sa = !0, t;
2237
- if (t.pa || (t.pa = t.value), !t.ta && (t.ta = !0, e = t.Ra, r = zt(this, t.pa, e)))
2238
- return Qt(this, r, t.pa, e);
2239
- if (t.Ra = void 0, t.wb = !1, t.ta = !1, n.body)
2240
- return new v(n.body, t.scope);
2241
- };
2242
- h.prototype.stepForStatement = function(e, t, n) {
2243
- switch (t.na) {
2244
- default:
2245
- if (t.na = 1, n.ua)
2246
- return new v(n.ua, t.scope);
2247
- break;
2248
- case 1:
2249
- if (t.na = 2, n.test)
2250
- return new v(n.test, t.scope);
2251
- break;
2252
- case 2:
2253
- if (t.na = 3, n.test && !t.value)
2254
- e.pop();
2255
- else
2256
- return t.W = !0, new v(n.body, t.scope);
2257
- break;
2258
- case 3:
2259
- if (t.na = 1, n.update)
2260
- return new v(n.update, t.scope);
2261
- }
2262
- };
2263
- h.prototype.stepFunctionDeclaration = function(e) {
2264
- e.pop();
2265
- };
2266
- h.prototype.stepFunctionExpression = function(e, t, n) {
2267
- e.pop(), t = e[e.length - 1], e = t.scope, n.id && (e = Kt(this, e)), t.value = Ht(this, n, e, t.Pa), n.id && this.g(e.object, n.id.name, t.value, $t);
2268
- };
2269
- h.prototype.stepIdentifier = function(e, t, n) {
2270
- if (e.pop(), t.sa)
2271
- e[e.length - 1].value = [Ae, n.name];
2272
- else {
2273
- if (t = Yt(this, n.name), this.P)
2274
- return Je(this, t, this.Na);
2275
- e[e.length - 1].value = t;
2276
- }
2277
- };
2278
- h.prototype.stepIfStatement = h.prototype.stepConditionalExpression;
2279
- h.prototype.stepLabeledStatement = function(e, t, n) {
2280
- return e.pop(), e = t.labels || [], e.push(n.label.name), t = new v(n.body, t.scope), t.labels = e, t;
2281
- };
2282
- h.prototype.stepLiteral = function(e, t, n) {
2283
- e.pop(), t = n.value, t instanceof RegExp && (n = this.s(this.Ma), Vt(this, n, t), t = n), e[e.length - 1].value = t;
2284
- };
2285
- h.prototype.stepLogicalExpression = function(e, t, n) {
2286
- if (n.operator !== "&&" && n.operator !== "||")
2287
- throw SyntaxError("Unknown logical operator: " + n.operator);
2288
- if (!t.ja)
2289
- return t.ja = !0, new v(n.left, t.scope);
2290
- if (t.Da)
2291
- e.pop(), e[e.length - 1].value = t.value;
2292
- else if (n.operator === "&&" && !t.value || n.operator === "||" && t.value)
2293
- e.pop(), e[e.length - 1].value = t.value;
2294
- else
2295
- return t.Da = !0, new v(n.right, t.scope);
2296
- };
2297
- h.prototype.stepMemberExpression = function(e, t, n) {
2298
- if (!t.Ca)
2299
- return t.Ca = !0, new v(n.object, t.scope);
2300
- if (n.bb)
2301
- if (t.Vb)
2302
- n = t.value;
2303
- else
2304
- return t.u = t.value, t.Vb = !0, new v(n.Wa, t.scope);
2305
- else
2306
- t.u = t.value, n = n.Wa.name;
2307
- if (e.pop(), t.sa)
2308
- e[e.length - 1].value = [t.u, n];
2309
- else {
2310
- if (n = this.G(t.u, n), this.P)
2311
- return Je(this, n, t.u);
2312
- e[e.length - 1].value = n;
2313
- }
2314
- };
2315
- h.prototype.stepNewExpression = h.prototype.stepCallExpression;
2316
- h.prototype.stepObjectExpression = function(e, t, n) {
2317
- var r = t.A || 0, o = n.h[r];
2318
- if (t.u) {
2319
- var s = t.Pa;
2320
- t.Ja[s] || (t.Ja[s] = {}), t.Ja[s][o.kind] = t.value, t.A = ++r, o = n.h[r];
2321
- } else
2322
- t.u = this.s(this.M), t.Ja = /* @__PURE__ */ Object.create(null);
2323
- if (o) {
2324
- var a = o.key;
2325
- if (a.type === "Identifier")
2326
- s = a.name;
2327
- else if (a.type === "Literal")
2328
- s = a.value;
2329
- else
2330
- throw SyntaxError("Unknown object structure: " + a.type);
2331
- return t.Pa = s, new v(o.value, t.scope);
2332
- }
2333
- for (a in t.Ja)
2334
- n = t.Ja[a], "get" in n || "set" in n ? this.g(t.u, a, Ve, {
2335
- configurable: !0,
2336
- enumerable: !0,
2337
- get: n.get,
2338
- set: n.set
2339
- }) : this.g(t.u, a, n.init);
2340
- e.pop(), e[e.length - 1].value = t.u;
2341
- };
2342
- h.prototype.stepProgram = function(e, t, n) {
2343
- if (e = n.body.shift())
2344
- return t.done = !1, new v(e, t.scope);
2345
- t.done = !0;
2346
- };
2347
- h.prototype.stepReturnStatement = function(e, t, n) {
2348
- if (n.K && !t.ka)
2349
- return t.ka = !0, new v(n.K, t.scope);
2350
- He(this, 3, t.value);
2351
- };
2352
- h.prototype.stepSequenceExpression = function(e, t, n) {
2353
- var r = t.A || 0;
2354
- if (n = n.xb[r])
2355
- return t.A = r + 1, new v(n, t.scope);
2356
- e.pop(), e[e.length - 1].value = t.value;
2357
- };
2358
- h.prototype.stepSwitchStatement = function(e, t, n) {
2359
- if (!t.ga)
2360
- return t.ga = 1, new v(n.Qb, t.scope);
2361
- for (t.ga === 1 && (t.ga = 2, t.hc = t.value, t.cb = -1); ; ) {
2362
- var r = t.gb || 0, o = n.tb[r];
2363
- if (t.Ha || !o || o.test)
2364
- if (o || t.Ha || t.cb === -1)
2365
- if (o) {
2366
- if (!t.Ha && !t.Fb && o.test)
2367
- return t.Fb = !0, new v(o.test, t.scope);
2368
- if (t.Ha || t.value === t.hc) {
2369
- t.Ha = !0;
2370
- var s = t.A || 0;
2371
- if (o.da[s])
2372
- return t.Zb = !0, t.A = s + 1, new v(o.da[s], t.scope);
2373
- }
2374
- t.Fb = !1, t.A = 0, t.gb = r + 1;
2375
- } else {
2376
- e.pop();
2377
- break;
2378
- }
2379
- else
2380
- t.Ha = !0, t.gb = t.cb;
2381
- else
2382
- t.cb = r, t.gb = r + 1;
2383
- }
2384
- };
2385
- h.prototype.stepThisExpression = function(e) {
2386
- e.pop(), e[e.length - 1].value = Yt(this, "this");
2387
- };
2388
- h.prototype.stepThrowStatement = function(e, t, n) {
2389
- if (t.ka)
2390
- m(this, t.value);
2391
- else
2392
- return t.ka = !0, new v(n.K, t.scope);
2393
- };
2394
- h.prototype.stepTryStatement = function(e, t, n) {
2395
- if (!t.Rb)
2396
- return t.Rb = !0, new v(n.block, t.scope);
2397
- if (t.ea && t.ea.type === 4 && !t.Tb && n.Ea)
2398
- return t.Tb = !0, e = Kt(this, t.scope), this.g(e.object, n.Ea.Ua.name, t.ea.value), t.ea = void 0, new v(n.Ea.body, e);
2399
- if (!t.Sb && n.fb)
2400
- return t.Sb = !0, new v(n.fb, t.scope);
2401
- e.pop(), t.ea && He(this, t.ea.type, t.ea.value, t.ea.label);
2402
- };
2403
- h.prototype.stepUnaryExpression = function(e, t, n) {
2404
- if (!t.ka)
2405
- return t.ka = !0, e = new v(n.K, t.scope), e.sa = n.operator === "delete", e;
2406
- e.pop();
2407
- var r = t.value;
2408
- switch (n.operator) {
2409
- case "-":
2410
- r = -r;
2411
- break;
2412
- case "+":
2413
- r = +r;
2414
- break;
2415
- case "!":
2416
- r = !r;
2417
- break;
2418
- case "~":
2419
- r = ~r;
2420
- break;
2421
- case "delete":
2422
- if (n = !0, Array.isArray(r)) {
2423
- var o = r[0];
2424
- o === Ae && (o = t.scope), r = String(r[1]);
2425
- try {
2426
- delete o.h[r];
2427
- } catch {
2428
- t.scope.S ? m(this, this.j, "Cannot delete property '" + r + "' of '" + o + "'") : n = !1;
2429
- }
2430
- }
2431
- r = n;
2432
- break;
2433
- case "typeof":
2434
- r = r && r.H === "Function" ? "function" : typeof r;
2435
- break;
2436
- case "void":
2437
- r = void 0;
2438
- break;
2439
- default:
2440
- throw SyntaxError("Unknown unary operator: " + n.operator);
2441
- }
2442
- e[e.length - 1].value = r;
2443
- };
2444
- h.prototype.stepUpdateExpression = function(e, t, n) {
2445
- if (!t.ja)
2446
- return t.ja = !0, e = new v(n.K, t.scope), e.sa = !0, e;
2447
- if (t.Ga || (t.Ga = t.value), t.Ba && (t.ma = t.value), !t.Ba) {
2448
- var r = Zt(this, t.Ga);
2449
- if (t.ma = r, this.P)
2450
- return t.Ba = !0, Je(this, r, t.Ga);
2451
- }
2452
- if (t.ta)
2453
- e.pop(), e[e.length - 1].value = t.ib;
2454
- else {
2455
- if (r = Number(t.ma), n.operator === "++")
2456
- var o = r + 1;
2457
- else if (n.operator === "--")
2458
- o = r - 1;
2459
- else
2460
- throw SyntaxError("Unknown update expression: " + n.operator);
2461
- if (n = n.prefix ? o : r, r = zt(this, t.Ga, o))
2462
- return t.ta = !0, t.ib = n, Qt(this, r, t.Ga, o);
2463
- e.pop(), e[e.length - 1].value = n;
2464
- }
2465
- };
2466
- h.prototype.stepVariableDeclaration = function(e, t, n) {
2467
- n = n.fa;
2468
- var r = t.A || 0, o = n[r];
2469
- for (t.Bb && o && (zr(this, o.id.name, t.value), t.Bb = !1, o = n[++r]); o; ) {
2470
- if (o.ua)
2471
- return t.A = r, t.Bb = !0, t.Pa = o.id.name, new v(o.ua, t.scope);
2472
- o = n[++r];
2473
- }
2474
- e.pop();
2475
- };
2476
- h.prototype.stepWithStatement = function(e, t, n) {
2477
- return t.Ca ? (e.pop(), e = Kt(this, t.scope, t.value), new v(n.body, e)) : (t.Ca = !0, new v(n.object, t.scope));
2478
- };
2479
- h.prototype.stepWhileStatement = h.prototype.stepDoWhileStatement;
2480
- he.Interpreter = h;
2481
- h.prototype.step = h.prototype.lb;
2482
- h.prototype.run = h.prototype.Eb;
2483
- h.prototype.appendCode = h.prototype.Jb;
2484
- h.prototype.createObject = h.prototype.Aa;
2485
- h.prototype.createObjectProto = h.prototype.s;
2486
- h.prototype.createAsyncFunction = h.prototype.ub;
2487
- h.prototype.createNativeFunction = h.prototype.i;
2488
- h.prototype.getProperty = h.prototype.G;
2489
- h.prototype.setProperty = h.prototype.g;
2490
- h.prototype.nativeToPseudo = h.prototype.Ia;
2491
- h.prototype.pseudoToNative = h.prototype.R;
2492
- h.prototype.getGlobalScope = h.prototype.Xb;
2493
- h.prototype.getStateStack = h.prototype.Yb;
2494
- h.prototype.setStateStack = h.prototype.ec;
2495
- h.VALUE_IN_DESCRIPTOR = Ve;
2496
- const Zn = (e) => e.split(`
2497
- `).map((t) => {
2498
- const n = t.trim();
2499
- if (t.includes("__awaiter"))
2500
- return;
2501
- if (!n.startsWith("state."))
2502
- return t;
2503
- const [o, s] = n.split("="), f = `setRootState('${o.replace("state.", "").trim()}', ${s.trim()})`;
2504
- return `
2505
- ${t}
2506
- ${f}
2507
- `;
2508
- }).filter(Boolean).join(`
2509
- `), Lr = (e) => e + "JSON", zn = ({
2510
- builder: e,
2511
- context: t,
2512
- event: n,
2513
- rootState: r,
2514
- localState: o,
2515
- rootSetState: s,
2516
- code: a
2517
- }) => {
2518
- const f = {
2519
- ...r,
2520
- ...o
2521
- }, g = Jr({
2522
- builder: e,
2523
- context: t,
2524
- event: n,
2525
- state: f
2526
- }), O = g.map(([$]) => {
2527
- const H = Lr($);
2528
- return `var ${$} = ${H} === undefined ? undefined : JSON.parse(${H});`;
2529
- }).join(`
2530
- `), C = Zn(a);
2531
- if (C === "") {
2532
- Wt.warn("Skipping evaluation of empty code block.");
2533
- return;
2534
- }
2535
- const w = `
2536
- function theFunction() {
2537
- ${O}
2538
-
2539
- ${C}
2540
- }
2541
- theFunction();
2542
- `, T = ($, H) => {
2543
- const k = Hr(f, $, H);
2544
- s == null || s(k);
2545
- }, R = function($, H) {
2546
- g.forEach(([k, Q]) => {
2547
- const Ke = JSON.stringify(Q);
2548
- $.setProperty(H, Lr(k), Ke);
2549
- }), $.setProperty(H, "setRootState", $.createNativeFunction(T));
2550
- }, N = new h(w, R);
2551
- return N.run(), N.pseudoToNative(N.value);
2552
- };
2553
- function Qn() {
2554
- var e;
2555
- return typeof process != "undefined" && ot((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
2556
- }
2557
- const qn = () => {
2558
- var r;
2559
- if (!Qn())
2560
- return !1;
2561
- const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (r = process.env.NODE_OPTIONS) == null ? void 0 : r.includes("--no-node-snapshot");
2562
- return e && t && !n ? (Wt.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
2563
- }, eo = (e) => Ut() || qn() ? Rn(e) : zn(e), oe = class oe {
2564
- static getCacheKey(t) {
2565
- return JSON.stringify({
2566
- ...t,
2567
- // replace the event with a random number to break cache
2568
- // thats because we can't serialize the event object due to circular refs in DOM node refs.
2569
- event: t.event ? Math.random() : void 0
2570
- });
2571
- }
2572
- static getCachedValue(t) {
2573
- return oe.cache.get(t);
2574
- }
2575
- static setCachedValue(t, n) {
2576
- oe.cache.size > 20 && oe.cache.delete(oe.cache.keys().next().value), oe.cache.set(t, {
2577
- value: n
2578
- });
2579
- }
2580
- };
2581
- Rt(oe, "cacheLimit", 20), Rt(oe, "cache", /* @__PURE__ */ new Map());
2582
- let Ce = oe;
2583
- function qt({
2584
- code: e,
2585
- context: t,
2586
- localState: n,
2587
- rootState: r,
2588
- rootSetState: o,
2589
- event: s,
2590
- isExpression: a = !0,
2591
- enableCache: f
2592
- }) {
2593
- if (e === "")
2594
- return;
2595
- const g = {
2596
- code: Tn(e, {
2597
- isExpression: a
2598
- }),
2599
- builder: bn(),
2600
- context: t,
2601
- event: s,
2602
- rootSetState: o,
2603
- rootState: r,
2604
- localState: n
2605
- };
2606
- if (f) {
2607
- const O = Ce.getCacheKey(g), C = Ce.getCachedValue(O);
2608
- if (C)
2609
- return C.value;
2610
- }
2611
- try {
2612
- const O = eo(g);
2613
- if (f) {
2614
- const C = Ce.getCacheKey(g);
2615
- Ce.setCachedValue(C, O);
2616
- }
2617
- return O;
2618
- } catch (O) {
2619
- Wt.error("Failed code evaluation: " + O.message, {
2620
- code: e
2621
- });
2622
- return;
2623
- }
2624
- }
2625
- const to = ({
2626
- block: e,
2627
- context: t,
2628
- localState: n,
2629
- rootState: r,
2630
- rootSetState: o
2631
- }) => {
2632
- if (!e.bindings)
2633
- return e;
2634
- const s = Xr(e), a = {
2635
- ...s,
2636
- properties: {
2637
- ...s.properties
2638
- },
2639
- actions: {
2640
- ...s.actions
2641
- }
2642
- };
2643
- for (const f in e.bindings) {
2644
- const g = e.bindings[f], O = qt({
2645
- code: g,
2646
- localState: n,
2647
- rootState: r,
2648
- rootSetState: o,
2649
- context: t,
2650
- enableCache: !0
2651
- });
2652
- Hr(a, f, O);
2653
- }
2654
- return a;
2655
- };
2656
- function it({
2657
- block: e,
2658
- context: t,
2659
- shouldEvaluateBindings: n,
2660
- localState: r,
2661
- rootState: o,
2662
- rootSetState: s
2663
- }) {
2664
- const a = e;
2665
- return n ? to({
2666
- block: a,
2667
- localState: r,
2668
- rootState: o,
2669
- rootSetState: s,
2670
- context: t
2671
- }) : a;
2672
- }
2673
- const lt = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
2674
- function ro(e, t, n = {}) {
2675
- let r, o, s, a = null, f = 0;
2676
- const g = function() {
2677
- f = n.leading === !1 ? 0 : Date.now(), a = null, s = e.apply(r, o), a || (r = o = null);
2678
- };
2679
- return function() {
2680
- const O = Date.now();
2681
- !f && n.leading === !1 && (f = O);
2682
- const C = t - (O - f);
2683
- return r = this, o = arguments, C <= 0 || C > t ? (a && (clearTimeout(a), a = null), f = O, s = e.apply(r, o), a || (r = o = null)) : !a && n.trailing !== !1 && (a = setTimeout(g, C)), s;
2684
- };
2685
- }
2686
- function Ge(e, ...t) {
2687
- const n = Object(e);
2688
- for (let r = 1; r < arguments.length; r++) {
2689
- const o = arguments[r];
2690
- if (o != null)
2691
- for (const s in o)
2692
- Object.prototype.hasOwnProperty.call(o, s) && (n[s] = o[s]);
2693
- }
2694
- return n;
2695
- }
2696
- function no(e) {
2697
- for (const t of e)
2698
- switch (t.trigger) {
2699
- case "pageLoad":
2700
- io(t);
2701
- break;
2702
- case "scrollInView":
2703
- so(t);
2704
- break;
2705
- }
2706
- }
2707
- function en(e) {
2708
- console.warn(`Cannot animate element: element with ID ${e} not found!`);
2709
- }
2710
- function tn(e, t) {
2711
- const n = oo(e), r = getComputedStyle(t), o = e.steps[0].styles, s = e.steps[e.steps.length - 1].styles, a = [o, s];
2712
- for (const f of a)
2713
- for (const g of n)
2714
- g in f || (f[g] = r[g]);
2715
- }
2716
- function oo(e) {
2717
- const t = [];
2718
- for (const n of e.steps)
2719
- for (const r in n.styles)
2720
- t.indexOf(r) === -1 && t.push(r);
2721
- return t;
2722
- }
2723
- function io(e) {
2724
- const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
2725
- if (!t.length) {
2726
- en(e.elementId || e.id || "");
2727
- return;
2728
- }
2729
- Array.from(t).forEach((n) => {
2730
- tn(e, n), n.style.transition = "none", n.style.transitionDelay = "0", Ge(n.style, e.steps[0].styles), setTimeout(() => {
2731
- n.style.transition = `all ${e.duration}s ${lt(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), Ge(n.style, e.steps[1].styles), setTimeout(() => {
2732
- n.style.transition = "", n.style.transitionDelay = "";
2733
- }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
2734
- });
2735
- });
2736
- }
2737
- function so(e) {
2738
- const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
2739
- if (!t.length) {
2740
- en(e.elementId || e.id || "");
2741
- return;
2742
- }
2743
- Array.from(t).forEach((n) => {
2744
- tn(e, n);
2745
- let r = !1, o = !1;
2746
- function s() {
2747
- !r && f(n) ? (r = !0, o = !0, setTimeout(() => {
2748
- Ge(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", a), setTimeout(() => {
2749
- o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
2750
- }, (e.duration + (e.delay || 0)) * 1e3 + 100);
2751
- })) : e.repeat && r && !o && !f(n) && (r = !1, Ge(n.style, e.steps[0].styles));
2752
- }
2753
- const a = ro(s, 200, {
2754
- leading: !1
2755
- });
2756
- function f(C) {
2757
- const w = C.getBoundingClientRect(), T = window.innerHeight, N = (e.thresholdPercent || 0) / 100 * T;
2758
- return w.bottom > N && w.top < T - N;
2759
- }
2760
- const g = e.steps[0].styles;
2761
- function O() {
2762
- Ge(n.style, g);
2763
- }
2764
- O(), setTimeout(() => {
2765
- n.style.transition = `all ${e.duration}s ${lt(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
2766
- }), document.addEventListener("scroll", a, {
2767
- capture: !0,
2768
- passive: !0
2769
- }), s();
2770
- });
2771
- }
2772
- const rn = (e) => Object.entries(e).map(([n, r]) => {
2773
- if (typeof r == "string")
2774
- return `${lt(n)}: ${r};`;
2775
- }).filter(ot), ao = (e) => rn(e).join(`
2776
- `), nt = ({
2777
- mediaQuery: e,
2778
- className: t,
2779
- styles: n
2780
- }) => {
2781
- const r = `.${t} {
2782
- ${ao(n)}
2783
- }`;
2784
- return e ? `${e} {
2785
- ${r}
2786
- }` : r;
2787
- };
2788
- function lo({
2789
- style: e
2790
- }) {
2791
- return e;
2792
- }
2793
- const uo = ({
2794
- block: e,
2795
- context: t
2796
- }) => co(lo({
2797
- style: e.style || {},
2798
- context: t,
2799
- block: e
2800
- }));
2801
- function co(e) {
2802
- switch (Vr) {
2803
- case "svelte":
2804
- case "vue":
2805
- case "solid":
2806
- case "angular":
2807
- return rn(e).join(" ");
2808
- case "qwik":
2809
- case "reactNative":
2810
- case "react":
2811
- case "rsc":
2812
- return e;
2813
- }
2814
- }
2815
- const fo = ({
2816
- block: e,
2817
- context: t,
2818
- registeredComponents: n
2819
- }) => {
2820
- var s;
2821
- const r = (s = it({
2822
- block: e,
2823
- localState: t.localState,
2824
- rootState: t.rootState,
2825
- rootSetState: t.rootSetState,
2826
- context: t.context,
2827
- shouldEvaluateBindings: !1
2828
- }).component) == null ? void 0 : s.name;
2829
- if (!r)
2830
- return null;
2831
- const o = n[r];
2832
- if (o)
2833
- return o;
2834
- console.warn(`
2835
- Could not find a registered component named "${r}".
2836
- If you registered it, is the file that registered it imported by the file that needs to render it?`);
2837
- }, po = ({
2838
- block: e,
2839
- context: t
2840
- }) => {
2841
- const {
2842
- repeat: n,
2843
- ...r
2844
- } = e;
2845
- if (!(n != null && n.collection))
2846
- return;
2847
- const o = qt({
2848
- code: n.collection,
2849
- localState: t.localState,
2850
- rootState: t.rootState,
2851
- rootSetState: t.rootSetState,
2852
- context: t.context,
2853
- enableCache: !0
2854
- });
2855
- if (!Array.isArray(o))
2856
- return;
2857
- const s = n.collection.split(".").pop(), a = n.itemName || (s ? s + "Item" : "item");
2858
- return o.map((g, O) => ({
2859
- context: {
2860
- ...t,
2861
- localState: {
2862
- ...t.localState,
2863
- $index: O,
2864
- $item: g,
2865
- [a]: g,
2866
- [`$${a}Index`]: O
2867
- }
2868
- },
2869
- block: r
2870
- }));
2871
- }, ho = (e, t) => {
2872
- var n;
2873
- return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
2874
- builderLinkComponent: t
2875
- } : {};
2876
- }, go = (e, t) => {
2877
- var n;
2878
- return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderComponents ? {
2879
- builderComponents: t
2880
- } : {};
2881
- }, yo = (e, t) => {
2882
- var n;
2883
- return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
2884
- builderBlock: t
2885
- } : {};
2886
- }, vo = (e, t) => {
2887
- var n;
2888
- return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
2889
- builderContext: t
2890
- } : {};
2891
- }, nn = {
2892
- small: {
2893
- min: 320,
2894
- default: 321,
2895
- max: 640
2896
- },
2897
- medium: {
2898
- min: 641,
2899
- default: 642,
2900
- max: 991
2901
- },
2902
- large: {
2903
- min: 990,
2904
- default: 991,
2905
- max: 1200
2906
- }
2907
- }, _r = (e, t = nn) => `@media (max-width: ${t[e].max}px)`, mo = ({
2908
- small: e,
2909
- medium: t
2910
- }) => {
2911
- const n = Xr(nn);
2912
- if (!e || !t)
2913
- return n;
2914
- const r = Math.floor(e / 2);
2915
- n.small = {
2916
- max: e,
2917
- min: r,
2918
- default: r + 1
2919
- };
2920
- const o = n.small.max + 1;
2921
- n.medium = {
2922
- max: t,
2923
- min: o,
2924
- default: o + 1
2925
- };
2926
- const s = n.medium.max + 1;
2927
- return n.large = {
2928
- max: 2e3,
2929
- // TODO: decide upper limit
2930
- min: s,
2931
- default: s + 1
2932
- }, n;
2933
- };
2934
- function wo(e) {
2935
- return /* @__PURE__ */ b(
2936
- "style",
2937
- {
2938
- dangerouslySetInnerHTML: { __html: e.styles },
2939
- "data-id": e.id,
2940
- nonce: e.nonce
2941
- }
2942
- );
2943
- }
2944
- function So(e) {
2945
- function t() {
2946
- const r = it({
2947
- block: e.block,
2948
- localState: e.context.localState,
2949
- rootState: e.context.rootState,
2950
- rootSetState: e.context.rootSetState,
2951
- context: e.context.context,
2952
- shouldEvaluateBindings: !0
2953
- });
2954
- return ot(r.hide) ? !r.hide : ot(r.show) ? r.show : !0;
2955
- }
2956
- function n() {
2957
- var $, H, k;
2958
- const r = it({
2959
- block: e.block,
2960
- localState: e.context.localState,
2961
- rootState: e.context.rootState,
2962
- rootSetState: e.context.rootSetState,
2963
- context: e.context.context,
2964
- shouldEvaluateBindings: !0
2965
- }), o = r.responsiveStyles, s = e.context.content, a = mo(
2966
- (($ = s == null ? void 0 : s.meta) == null ? void 0 : $.breakpoints) || {}
2967
- ), f = o == null ? void 0 : o.large, g = o == null ? void 0 : o.medium, O = o == null ? void 0 : o.small, C = r.id;
2968
- if (!C)
2969
- return "";
2970
- const w = f ? nt({
2971
- className: C,
2972
- styles: f
2973
- }) : "", T = g ? nt({
2974
- className: C,
2975
- styles: g,
2976
- mediaQuery: _r(
2977
- "medium",
2978
- a
2979
- )
2980
- }) : "", R = O ? nt({
2981
- className: C,
2982
- styles: O,
2983
- mediaQuery: _r(
2984
- "small",
2985
- a
2986
- )
2987
- }) : "", N = r.animations && r.animations.find((Q) => Q.trigger === "hover");
2988
- let ue = "";
2989
- if (N) {
2990
- const Q = ((k = (H = N.steps) == null ? void 0 : H[1]) == null ? void 0 : k.styles) || {};
2991
- ue = nt({
2992
- className: `${C}:hover`,
2993
- styles: {
2994
- ...Q,
2995
- transition: `all ${N.duration}s ${lt(
2996
- N.easing
2997
- )}`,
2998
- transitionDelay: N.delay ? `${N.delay}s` : "0s"
2999
- }
3000
- }) || "";
3001
- }
3002
- return [
3003
- w,
3004
- T,
3005
- R,
3006
- ue
3007
- ].join(" ");
3008
- }
3009
- return /* @__PURE__ */ b(Z, { children: n() && t() ? /* @__PURE__ */ b(Z, { children: /* @__PURE__ */ b(
3010
- wo,
3011
- {
3012
- id: "builderio-block",
3013
- styles: n(),
3014
- nonce: e.context.nonce
3015
- }
3016
- ) }) : null });
3017
- }
3018
- function xo(e) {
3019
- return e.charAt(0).toUpperCase() + e.slice(1);
3020
- }
3021
- const ko = (e) => `on${xo(e)}`, Eo = (e, t) => (n) => qt({
3022
- code: e,
3023
- context: t.context,
3024
- localState: t.localState,
3025
- rootState: t.rootState,
3026
- rootSetState: t.rootSetState,
3027
- event: n,
3028
- isExpression: !1,
3029
- enableCache: !0
3030
- });
3031
- function on(e) {
3032
- var r;
3033
- const t = {}, n = (r = e.block.actions) != null ? r : {};
3034
- for (const o in n) {
3035
- if (!n.hasOwnProperty(o))
3036
- continue;
3037
- const s = n[o];
3038
- let a = ko(o);
3039
- if (e.stripPrefix)
3040
- switch (Vr) {
3041
- case "vue":
3042
- a = a.replace("v-on:", "");
3043
- break;
3044
- case "svelte":
3045
- a = a.replace("on:", "");
3046
- break;
3047
- }
3048
- t[a] = Eo(s, e);
3049
- }
3050
- return t;
3051
- }
3052
- function Co({
3053
- properties: e
3054
- }) {
3055
- return e;
3056
- }
3057
- const jo = (e) => ({
3058
- href: e.href
3059
- });
3060
- function er({
3061
- block: e,
3062
- context: t
3063
- }) {
3064
- var r;
3065
- const n = {
3066
- ...jo(e),
3067
- ...e.properties,
3068
- "builder-id": e.id,
3069
- style: uo({
3070
- block: e,
3071
- context: t
3072
- }),
3073
- [An()]: [e.id, "builder-block", e.class, (r = e.properties) == null ? void 0 : r.class].filter(Boolean).join(" ")
3074
- };
3075
- return Co({
3076
- properties: n,
3077
- context: t,
3078
- block: e
3079
- });
3080
- }
3081
- function Oo(e) {
3082
- return /* @__PURE__ */ b(
3083
- In,
3084
- {
3085
- TagName: e.Wrapper,
3086
- attributes: er({
3087
- block: e.block,
3088
- context: e.context
3089
- }),
3090
- actionAttributes: on({
3091
- block: e.block,
3092
- rootState: e.context.rootState,
3093
- rootSetState: e.context.rootSetState,
3094
- localState: e.context.localState,
3095
- context: e.context.context,
3096
- stripPrefix: !0
3097
- }),
3098
- children: e.children
3099
- }
3100
- );
3101
- }
3102
- function Ao(e) {
3103
- function t() {
3104
- return e.includeBlockProps ? {
3105
- ...er({
3106
- block: e.block,
3107
- context: e.context
3108
- }),
3109
- ...on({
3110
- block: e.block,
3111
- rootState: e.context.rootState,
3112
- rootSetState: e.context.rootSetState,
3113
- localState: e.context.localState,
3114
- context: e.context.context
3115
- })
3116
- } : {};
3117
- }
3118
- return /* @__PURE__ */ b(e.Wrapper, { ...e.wrapperProps, attributes: t(), children: e.children });
3119
- }
3120
- const Io = ({
3121
- componentOptions: e,
3122
- builderBlock: t,
3123
- context: n,
3124
- componentRef: r,
3125
- includeBlockProps: o,
3126
- isInteractive: s,
3127
- contextValue: a
3128
- }) => {
3129
- const f = {
3130
- ...e,
3131
- /**
3132
- * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
3133
- * component itself directly. Otherwise, they are provided to the wrapper element.
3134
- */
3135
- ...o ? {
3136
- attributes: er({
3137
- block: t,
3138
- context: a
3139
- })
3140
- } : {}
3141
- };
3142
- return s ? {
3143
- Wrapper: r,
3144
- block: t,
3145
- context: n,
3146
- wrapperProps: e,
3147
- includeBlockProps: o
3148
- } : f;
3149
- };
3150
- function Wr(e) {
3151
- var r;
3152
- const [t, n] = $r(
3153
- () => e.isInteractive ? Ao : e.componentRef
3154
- );
3155
- return /* @__PURE__ */ b(Z, { children: e.componentRef ? /* @__PURE__ */ b(Z, { children: /* @__PURE__ */ b(
3156
- t,
3157
- {
3158
- ...Io({
3159
- componentOptions: e.componentOptions,
3160
- builderBlock: e.builderBlock,
3161
- context: e.context,
3162
- componentRef: e.componentRef,
3163
- linkComponent: e.linkComponent,
3164
- includeBlockProps: e.includeBlockProps,
3165
- isInteractive: e.isInteractive,
3166
- contextValue: e.context
3167
- }),
3168
- children: (r = e.blockChildren) == null ? void 0 : r.map((o) => /* @__PURE__ */ b(
3169
- ut,
3170
- {
3171
- block: o,
3172
- context: e.context,
3173
- registeredComponents: e.registeredComponents,
3174
- linkComponent: e.linkComponent
3175
- },
3176
- o.id
3177
- ))
3178
- }
3179
- ) }) : null });
3180
- }
3181
- function bo(e) {
3182
- const [t, n] = $r(() => e.repeatContext);
3183
- return /* @__PURE__ */ b(Gr.Provider, { value: t, children: /* @__PURE__ */ b(
3184
- ut,
3185
- {
3186
- block: e.block,
3187
- context: t,
3188
- registeredComponents: e.registeredComponents,
3189
- linkComponent: e.linkComponent
3190
- }
3191
- ) });
3192
- }
3193
- function ut(e) {
3194
- var g, O, C;
3195
- function t() {
3196
- return fo({
3197
- block: e.block,
3198
- context: e.context,
3199
- registeredComponents: e.registeredComponents
3200
- });
3201
- }
3202
- function n() {
3203
- return po({
3204
- block: e.block,
3205
- context: e.context
3206
- });
3207
- }
3208
- function r() {
3209
- var w;
3210
- return (w = e.block.repeat) != null && w.collection ? e.block : it({
3211
- block: e.block,
3212
- localState: e.context.localState,
3213
- rootState: e.context.rootState,
3214
- rootSetState: e.context.rootSetState,
3215
- context: e.context.context,
3216
- shouldEvaluateBindings: !0
3217
- });
3218
- }
3219
- function o() {
3220
- var T;
3221
- return e.block.tagName === "a" || ((T = r().properties) == null ? void 0 : T.href) || r().href ? e.linkComponent || "a" : e.block.tagName || "div";
3222
- }
3223
- function s() {
3224
- var R, N;
3225
- if ((R = e.block.repeat) != null && R.collection)
3226
- return !!((N = n == null ? void 0 : n()) != null && N.length);
3227
- const w = "hide" in r() ? r().hide : !1;
3228
- return ("show" in r() ? r().show : !0) && !w;
3229
- }
3230
- function a() {
3231
- var T, R;
3232
- return !((T = t == null ? void 0 : t()) != null && T.component) && !n() ? (R = r().children) != null ? R : [] : [];
3233
- }
3234
- function f() {
3235
- var w, T, R, N;
3236
- return {
3237
- blockChildren: (w = r().children) != null ? w : [],
3238
- componentRef: (T = t == null ? void 0 : t()) == null ? void 0 : T.component,
3239
- componentOptions: {
3240
- ...Nn(r()),
3241
- ...yo(t(), r()),
3242
- ...vo(t(), e.context),
3243
- ...ho(t(), e.linkComponent),
3244
- ...go(
3245
- t(),
3246
- e.registeredComponents
3247
- )
3248
- },
3249
- context: e.context,
3250
- linkComponent: e.linkComponent,
3251
- registeredComponents: e.registeredComponents,
3252
- builderBlock: r(),
3253
- includeBlockProps: ((R = t == null ? void 0 : t()) == null ? void 0 : R.noWrap) === !0,
3254
- isInteractive: !((N = t == null ? void 0 : t()) != null && N.isRSC)
3255
- };
3256
- }
3257
- return jn(() => {
3258
- const w = r().id, T = r().animations;
3259
- T && w && no(
3260
- T.map((R) => ({
3261
- ...R,
3262
- elementId: w
3263
- }))
3264
- );
3265
- }, []), /* @__PURE__ */ b(Z, { children: s() ? /* @__PURE__ */ Mt(Z, { children: [
3266
- /* @__PURE__ */ b(So, { block: e.block, context: e.context }),
3267
- (g = t == null ? void 0 : t()) != null && g.noWrap ? /* @__PURE__ */ b(Z, { children: /* @__PURE__ */ b(
3268
- Wr,
3269
- {
3270
- componentRef: f().componentRef,
3271
- componentOptions: f().componentOptions,
3272
- blockChildren: f().blockChildren,
3273
- context: f().context,
3274
- registeredComponents: f().registeredComponents,
3275
- linkComponent: f().linkComponent,
3276
- builderBlock: f().builderBlock,
3277
- includeBlockProps: f().includeBlockProps,
3278
- isInteractive: f().isInteractive
3279
- }
3280
- ) }) : /* @__PURE__ */ b(Z, { children: n() ? /* @__PURE__ */ b(Z, { children: (C = n()) == null ? void 0 : C.map((w, T) => /* @__PURE__ */ b(
3281
- bo,
3282
- {
3283
- repeatContext: w.context,
3284
- block: w.block,
3285
- registeredComponents: e.registeredComponents,
3286
- linkComponent: e.linkComponent
3287
- },
3288
- T
3289
- )) }) : /* @__PURE__ */ Mt(
3290
- Oo,
3291
- {
3292
- Wrapper: o(),
3293
- block: r(),
3294
- context: e.context,
3295
- children: [
3296
- /* @__PURE__ */ b(
3297
- Wr,
3298
- {
3299
- componentRef: f().componentRef,
3300
- componentOptions: f().componentOptions,
3301
- blockChildren: f().blockChildren,
3302
- context: f().context,
3303
- registeredComponents: f().registeredComponents,
3304
- linkComponent: f().linkComponent,
3305
- builderBlock: f().builderBlock,
3306
- includeBlockProps: f().includeBlockProps,
3307
- isInteractive: f().isInteractive
3308
- }
3309
- ),
3310
- (O = a()) == null ? void 0 : O.map((w) => /* @__PURE__ */ b(
3311
- ut,
3312
- {
3313
- block: w,
3314
- registeredComponents: e.registeredComponents,
3315
- linkComponent: e.linkComponent,
3316
- context: e.context
3317
- },
3318
- w.id
3319
- ))
3320
- ]
3321
- }
3322
- ) })
3323
- ] }) : null });
3324
- }
3325
- function To(e) {
3326
- function t() {
3327
- var o;
3328
- return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
3329
- }
3330
- function n() {
3331
- var o, s;
3332
- Dt() && !((o = e.blocks) != null && o.length) && ((s = window.parent) == null || s.postMessage(
3333
- {
3334
- type: "builder.clickEmptyBlocks",
3335
- data: {
3336
- parentElementId: e.parent,
3337
- dataPath: e.path
3338
- }
3339
- },
3340
- "*"
3341
- ));
3342
- }
3343
- function r() {
3344
- var o, s;
3345
- Dt() && !((o = e.blocks) != null && o.length) && ((s = window.parent) == null || s.postMessage(
3346
- {
3347
- type: "builder.hoverEmptyBlocks",
3348
- data: {
3349
- parentElementId: e.parent,
3350
- dataPath: e.path
3351
- }
3352
- },
3353
- "*"
3354
- ));
3355
- }
3356
- return /* @__PURE__ */ Mt(Z, { children: [
3357
- /* @__PURE__ */ b(
3358
- e.BlocksWrapper,
3359
- {
3360
- className: t() + " props-blocks-wrapper-7cd1560e",
3361
- "builder-path": e.path,
3362
- "builder-parent-id": e.parent,
3363
- style: e.styleProp,
3364
- onClick: (o) => n(),
3365
- onMouseEnter: (o) => r(),
3366
- onKeyPress: (o) => n(),
3367
- ...e.BlocksWrapperProps,
3368
- children: e.children
3369
- }
3370
- ),
3371
- /* @__PURE__ */ b("style", { children: `.props-blocks-wrapper-7cd1560e {
3372
- display: flex;
3373
- flex-direction: column;
3374
- align-items: stretch;
3375
- }` })
3376
- ] });
3377
- }
3378
- function Po(e) {
3379
- var r, o, s;
3380
- const t = Rr(Gr), n = Rr(Pn);
3381
- return /* @__PURE__ */ b(
3382
- To,
3383
- {
3384
- blocks: e.blocks,
3385
- parent: e.parent,
3386
- path: e.path,
3387
- styleProp: e.styleProp,
3388
- BlocksWrapper: ((r = e.context) == null ? void 0 : r.BlocksWrapper) || t.BlocksWrapper,
3389
- BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || t.BlocksWrapperProps,
3390
- children: e.blocks ? /* @__PURE__ */ b(Z, { children: (s = e.blocks) == null ? void 0 : s.map((a) => /* @__PURE__ */ b(
3391
- ut,
3392
- {
3393
- block: a,
3394
- linkComponent: e.linkComponent,
3395
- context: e.context || t,
3396
- registeredComponents: e.registeredComponents || n.registeredComponents
3397
- },
3398
- a.id
3399
- )) }) : null
3400
- }
3401
- );
3402
- }
3403
- const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3404
- __proto__: null,
3405
- default: Po
3406
- }, Symbol.toStringTag, { value: "Module" }));
3407
- export {
3408
- ut as Block,
3409
- Po as Blocks,
3410
- Pn as ComponentsContext,
3411
- wo as InlinedStyles,
3412
- Lo as blocks,
3413
- qt as evaluate,
3414
- Xr as fastClone,
3415
- mo as getSizesForBreakpoints,
3416
- co as mapStyleObjToStrIfNeeded,
3417
- Hr as set,
3418
- io as triggerAnimation
3419
- };