@metapages/metapage 1.8.26 → 1.8.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +254 -258
- package/dist/index.js.map +1 -1
- package/dist/metapage/Metaframe.d.ts +4 -4
- package/dist/metapage/Metaframe.d.ts.map +1 -1
- package/dist/metapage/Metapage.d.ts +5 -5
- package/dist/metapage/Metapage.d.ts.map +1 -1
- package/dist/metapage/MetapageIFrameRpcClient.d.ts +11 -11
- package/dist/metapage/MetapageIFrameRpcClient.d.ts.map +1 -1
- package/dist/metapage/core.d.ts +1 -0
- package/dist/metapage/core.d.ts.map +1 -1
- package/dist/metapage/metapageRenderer.d.ts +2 -2
- package/dist/metapage/metapageRenderer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/metapage/Metaframe.ts +5 -5
- package/src/metapage/Metapage.ts +5 -5
- package/src/metapage/MetapageIFrameRpcClient.ts +21 -20
- package/src/metapage/core.ts +1 -0
- package/src/metapage/metapageRenderer.ts +3 -3
package/dist/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Ct = [
|
|
2
2
|
"0.3",
|
|
3
3
|
"0.4",
|
|
4
4
|
"0.5",
|
|
5
5
|
"0.6",
|
|
6
6
|
"1",
|
|
7
7
|
"2"
|
|
8
|
-
],
|
|
8
|
+
], $t = ["0.2", "0.3", "1", "2"], We = "2", Le = "2", Ii = "metaframe.json", Ci = "metapage/definition", $i = "metapage/state", Wt = $t[$t.length - 1], As = Ct[Ct.length - 1], Es = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, xt = (t) => {
|
|
9
9
|
if (typeof t != "string")
|
|
10
10
|
throw new TypeError("Invalid argument expected string");
|
|
11
11
|
const e = t.match(Es);
|
|
12
12
|
if (!e)
|
|
13
13
|
throw new Error(`Invalid argument not valid semver ('${t}' received)`);
|
|
14
14
|
return e.shift(), e;
|
|
15
|
-
},
|
|
15
|
+
}, Lt = (t) => t === "*" || t === "x" || t === "X", Pt = (t) => {
|
|
16
16
|
const e = parseInt(t, 10);
|
|
17
17
|
return isNaN(e) ? t : e;
|
|
18
18
|
}, Ms = (t, e) => typeof t != typeof e ? [String(t), String(e)] : [t, e], Is = (t, e) => {
|
|
19
|
-
if (
|
|
19
|
+
if (Lt(t) || Lt(e))
|
|
20
20
|
return 0;
|
|
21
|
-
const [s, n] = Ms(
|
|
21
|
+
const [s, n] = Ms(Pt(t), Pt(e));
|
|
22
22
|
return s > n ? 1 : s < n ? -1 : 0;
|
|
23
|
-
},
|
|
23
|
+
}, Tt = (t, e) => {
|
|
24
24
|
for (let s = 0; s < Math.max(t.length, e.length); s++) {
|
|
25
25
|
const n = Is(t[s] || "0", e[s] || "0");
|
|
26
26
|
if (n !== 0)
|
|
@@ -28,14 +28,14 @@ const $t = [
|
|
|
28
28
|
}
|
|
29
29
|
return 0;
|
|
30
30
|
}, U = (t, e) => {
|
|
31
|
-
const s =
|
|
32
|
-
return r !== 0 ? r : i && o ?
|
|
31
|
+
const s = xt(t), n = xt(e), i = s.pop(), o = n.pop(), r = Tt(s, n);
|
|
32
|
+
return r !== 0 ? r : i && o ? Tt(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
33
33
|
};
|
|
34
34
|
var Cs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
35
|
-
function
|
|
35
|
+
function mt(t) {
|
|
36
36
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
37
37
|
}
|
|
38
|
-
var
|
|
38
|
+
var Kt = { exports: {} };
|
|
39
39
|
(function(t, e) {
|
|
40
40
|
(function(s, n) {
|
|
41
41
|
t.exports = n();
|
|
@@ -74,26 +74,26 @@ var Xt = { exports: {} };
|
|
|
74
74
|
else
|
|
75
75
|
throw new i("retryOn property expects an array or function");
|
|
76
76
|
return new Promise(function(y, O) {
|
|
77
|
-
var R = function(
|
|
77
|
+
var R = function(w) {
|
|
78
78
|
var A = typeof Request < "u" && l instanceof Request ? l.clone() : l;
|
|
79
79
|
o(A, c).then(function(C) {
|
|
80
80
|
if (Array.isArray(_) && _.indexOf(C.status) === -1)
|
|
81
81
|
y(C);
|
|
82
82
|
else if (typeof _ == "function")
|
|
83
83
|
try {
|
|
84
|
-
return Promise.resolve(_(
|
|
85
|
-
S ? $(
|
|
84
|
+
return Promise.resolve(_(w, null, C)).then(function(S) {
|
|
85
|
+
S ? $(w, null, C) : y(C);
|
|
86
86
|
}).catch(O);
|
|
87
87
|
} catch (S) {
|
|
88
88
|
O(S);
|
|
89
89
|
}
|
|
90
90
|
else
|
|
91
|
-
|
|
91
|
+
w < p ? $(w, null, C) : y(C);
|
|
92
92
|
}).catch(function(C) {
|
|
93
93
|
if (typeof _ == "function")
|
|
94
94
|
try {
|
|
95
|
-
Promise.resolve(_(
|
|
96
|
-
S ? $(
|
|
95
|
+
Promise.resolve(_(w, C, null)).then(function(S) {
|
|
96
|
+
S ? $(w, C, null) : O(C);
|
|
97
97
|
}).catch(function(S) {
|
|
98
98
|
O(S);
|
|
99
99
|
});
|
|
@@ -101,13 +101,13 @@ var Xt = { exports: {} };
|
|
|
101
101
|
O(S);
|
|
102
102
|
}
|
|
103
103
|
else
|
|
104
|
-
|
|
104
|
+
w < p ? $(w, C, null) : O(C);
|
|
105
105
|
});
|
|
106
106
|
};
|
|
107
|
-
function $(
|
|
108
|
-
var S = typeof m == "function" ? m(
|
|
107
|
+
function $(w, A, C) {
|
|
108
|
+
var S = typeof m == "function" ? m(w, A, C) : m;
|
|
109
109
|
setTimeout(function() {
|
|
110
|
-
R(++
|
|
110
|
+
R(++w);
|
|
111
111
|
}, S);
|
|
112
112
|
}
|
|
113
113
|
R(0);
|
|
@@ -122,20 +122,20 @@ var Xt = { exports: {} };
|
|
|
122
122
|
}
|
|
123
123
|
return s;
|
|
124
124
|
});
|
|
125
|
-
})(
|
|
126
|
-
var $s =
|
|
127
|
-
const
|
|
125
|
+
})(Kt);
|
|
126
|
+
var $s = Kt.exports;
|
|
127
|
+
const yt = /* @__PURE__ */ mt($s), z = {
|
|
128
128
|
Remove: "remove",
|
|
129
129
|
Replace: "replace",
|
|
130
130
|
Add: "add"
|
|
131
|
-
},
|
|
131
|
+
}, Xt = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), xs = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), Be = Symbol.iterator, Y = {
|
|
132
132
|
mutable: "mutable",
|
|
133
133
|
immutable: "immutable"
|
|
134
|
-
},
|
|
134
|
+
}, gt = {};
|
|
135
135
|
function Ie(t, e) {
|
|
136
136
|
return t instanceof Map ? t.has(e) : Object.prototype.hasOwnProperty.call(t, e);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Dt(t, e) {
|
|
139
139
|
if (e in t) {
|
|
140
140
|
let s = Reflect.getPrototypeOf(t);
|
|
141
141
|
for (; s; ) {
|
|
@@ -154,9 +154,9 @@ function be(t) {
|
|
|
154
154
|
return !!P(t);
|
|
155
155
|
}
|
|
156
156
|
function P(t) {
|
|
157
|
-
return typeof t != "object" ? null : t == null ? void 0 : t[
|
|
157
|
+
return typeof t != "object" ? null : t == null ? void 0 : t[Xt];
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function _t(t) {
|
|
160
160
|
var e;
|
|
161
161
|
const s = P(t);
|
|
162
162
|
return s ? (e = s.copy) !== null && e !== void 0 ? e : s.original : t;
|
|
@@ -167,7 +167,7 @@ function ne(t, e) {
|
|
|
167
167
|
let s;
|
|
168
168
|
return Object.getPrototypeOf(t) === Object.prototype || Array.isArray(t) || t instanceof Map || t instanceof Set || !!(e != null && e.mark) && ((s = e.mark(t, Y)) === Y.immutable || typeof s == "function");
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function qt(t, e = []) {
|
|
171
171
|
if (Object.hasOwnProperty.call(t, "key")) {
|
|
172
172
|
const s = t.parent.copy, n = P(pe(s, t.key));
|
|
173
173
|
if (n !== null && (n == null ? void 0 : n.original) !== t.original)
|
|
@@ -178,7 +178,7 @@ function Qt(t, e = []) {
|
|
|
178
178
|
e.push(o);
|
|
179
179
|
}
|
|
180
180
|
if (t.parent)
|
|
181
|
-
return
|
|
181
|
+
return qt(t.parent, e);
|
|
182
182
|
e.reverse();
|
|
183
183
|
try {
|
|
184
184
|
Ls(t.copy, e);
|
|
@@ -187,14 +187,14 @@ function Qt(t, e = []) {
|
|
|
187
187
|
}
|
|
188
188
|
return e;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function ve(t) {
|
|
191
191
|
return Array.isArray(t) ? 1 : t instanceof Map ? 2 : t instanceof Set ? 3 : 0;
|
|
192
192
|
}
|
|
193
193
|
function pe(t, e) {
|
|
194
|
-
return
|
|
194
|
+
return ve(t) === 2 ? t.get(e) : t[e];
|
|
195
195
|
}
|
|
196
196
|
function Pe(t, e, s) {
|
|
197
|
-
|
|
197
|
+
ve(t) === 2 ? t.set(e, s) : t[e] = s;
|
|
198
198
|
}
|
|
199
199
|
function et(t, e) {
|
|
200
200
|
const s = P(t);
|
|
@@ -217,7 +217,7 @@ function _e(t, e) {
|
|
|
217
217
|
function Ls(t, e) {
|
|
218
218
|
for (let s = 0; s < e.length - 1; s += 1) {
|
|
219
219
|
const n = e[s];
|
|
220
|
-
if (t = pe(
|
|
220
|
+
if (t = pe(ve(t) === 3 ? Array.from(t) : t, n), typeof t != "object")
|
|
221
221
|
throw new Error(`Cannot resolve patch at '${e.join("/")}'.`);
|
|
222
222
|
}
|
|
223
223
|
return t;
|
|
@@ -239,7 +239,7 @@ function Ps(t) {
|
|
|
239
239
|
}), e;
|
|
240
240
|
}
|
|
241
241
|
const Ts = Object.prototype.propertyIsEnumerable;
|
|
242
|
-
function
|
|
242
|
+
function Qt(t, e) {
|
|
243
243
|
let s;
|
|
244
244
|
if (Array.isArray(t))
|
|
245
245
|
return Array.prototype.concat.call(t);
|
|
@@ -267,11 +267,11 @@ function Yt(t, e) {
|
|
|
267
267
|
throw new Error("Please check mark() to ensure that it is a stable marker draftable function.");
|
|
268
268
|
}
|
|
269
269
|
function X(t) {
|
|
270
|
-
t.copy || (t.copy =
|
|
270
|
+
t.copy || (t.copy = Qt(t.original, t.options));
|
|
271
271
|
}
|
|
272
272
|
function Ae(t) {
|
|
273
273
|
if (!ne(t))
|
|
274
|
-
return
|
|
274
|
+
return _t(t);
|
|
275
275
|
if (Array.isArray(t))
|
|
276
276
|
return t.map(Ae);
|
|
277
277
|
if (t instanceof Map)
|
|
@@ -290,7 +290,7 @@ function ue(t) {
|
|
|
290
290
|
var e;
|
|
291
291
|
t.assignedMap = (e = t.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), t.operated || (t.operated = !0, t.parent && ue(t.parent));
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function kt() {
|
|
294
294
|
throw new Error("Cannot modify frozen object");
|
|
295
295
|
}
|
|
296
296
|
function Oe(t, e, s, n, i) {
|
|
@@ -314,16 +314,16 @@ function Oe(t, e, s, n, i) {
|
|
|
314
314
|
n.pop(), i.pop();
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
|
-
switch (
|
|
317
|
+
switch (ve(t)) {
|
|
318
318
|
case 2:
|
|
319
319
|
for (const [a, u] of t)
|
|
320
320
|
Oe(a, a, s, n, i), Oe(u, a, s, n, i);
|
|
321
|
-
t.set = t.clear = t.delete =
|
|
321
|
+
t.set = t.clear = t.delete = kt;
|
|
322
322
|
break;
|
|
323
323
|
case 3:
|
|
324
324
|
for (const a of t)
|
|
325
325
|
Oe(a, a, s, n, i);
|
|
326
|
-
t.add = t.clear = t.delete =
|
|
326
|
+
t.add = t.clear = t.delete = kt;
|
|
327
327
|
break;
|
|
328
328
|
case 1:
|
|
329
329
|
Object.freeze(t);
|
|
@@ -339,8 +339,8 @@ function Oe(t, e, s, n, i) {
|
|
|
339
339
|
}
|
|
340
340
|
n.pop(), i.pop();
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
const s =
|
|
342
|
+
function bt(t, e) {
|
|
343
|
+
const s = ve(t);
|
|
344
344
|
if (s === 0)
|
|
345
345
|
Reflect.ownKeys(t).forEach((n) => {
|
|
346
346
|
e(n, t[n], t);
|
|
@@ -352,11 +352,11 @@ function wt(t, e) {
|
|
|
352
352
|
} else
|
|
353
353
|
t.forEach((n, i) => e(i, n, t));
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Yt(t, e, s) {
|
|
356
356
|
if (be(t) || !ne(t, s) || e.has(t) || Object.isFrozen(t))
|
|
357
357
|
return;
|
|
358
358
|
const n = t instanceof Set, i = n ? /* @__PURE__ */ new Map() : void 0;
|
|
359
|
-
if (e.add(t),
|
|
359
|
+
if (e.add(t), bt(t, (o, r) => {
|
|
360
360
|
var a;
|
|
361
361
|
if (be(r)) {
|
|
362
362
|
const u = P(r);
|
|
@@ -364,7 +364,7 @@ function Zt(t, e, s) {
|
|
|
364
364
|
const l = !((a = u.assignedMap) === null || a === void 0) && a.size || u.operated ? u.copy : u.original;
|
|
365
365
|
Pe(n ? i : t, o, l);
|
|
366
366
|
} else
|
|
367
|
-
|
|
367
|
+
Yt(r, e, s);
|
|
368
368
|
}), i) {
|
|
369
369
|
const o = t, r = Array.from(o);
|
|
370
370
|
o.clear(), r.forEach((a) => {
|
|
@@ -374,17 +374,17 @@ function Zt(t, e, s) {
|
|
|
374
374
|
}
|
|
375
375
|
function Ds(t, e) {
|
|
376
376
|
const s = t.type === 3 ? t.setMap : t.copy;
|
|
377
|
-
t.finalities.revoke.length > 1 && t.assignedMap.get(e) && s &&
|
|
377
|
+
t.finalities.revoke.length > 1 && t.assignedMap.get(e) && s && Yt(pe(s, e), t.finalities.handledSet, t.options);
|
|
378
378
|
}
|
|
379
379
|
function at(t) {
|
|
380
380
|
t.type === 3 && t.copy && (t.copy.clear(), t.setMap.forEach((e) => {
|
|
381
|
-
t.copy.add(
|
|
381
|
+
t.copy.add(_t(e));
|
|
382
382
|
}));
|
|
383
383
|
}
|
|
384
384
|
function ut(t, e, s, n) {
|
|
385
385
|
if (t.operated && t.assignedMap && t.assignedMap.size > 0 && !t.finalized) {
|
|
386
386
|
if (s && n) {
|
|
387
|
-
const o =
|
|
387
|
+
const o = qt(t);
|
|
388
388
|
o && e(t, o, s, n);
|
|
389
389
|
}
|
|
390
390
|
t.finalized = !0;
|
|
@@ -544,7 +544,7 @@ const ze = (t, e, s = !1) => {
|
|
|
544
544
|
const n = P(this), i = Q(n).get(t), o = ((s = (e = n.options).mark) === null || s === void 0 ? void 0 : s.call(e, i, Y)) === Y.mutable;
|
|
545
545
|
if (n.options.strict && ze(i, n.options, o), o || n.finalized || !ne(i, n.options) || i !== n.original.get(t))
|
|
546
546
|
return i;
|
|
547
|
-
const r =
|
|
547
|
+
const r = gt.createDraft({
|
|
548
548
|
original: i,
|
|
549
549
|
parentDraft: n,
|
|
550
550
|
key: t,
|
|
@@ -588,7 +588,7 @@ const ze = (t, e, s = !1) => {
|
|
|
588
588
|
[Be]() {
|
|
589
589
|
return this.entries();
|
|
590
590
|
}
|
|
591
|
-
}, Us = Reflect.ownKeys(ct),
|
|
591
|
+
}, Us = Reflect.ownKeys(ct), Nt = (t, e, { isValuesIterator: s }) => () => {
|
|
592
592
|
var n, i;
|
|
593
593
|
const o = e.next();
|
|
594
594
|
if (o.done)
|
|
@@ -597,7 +597,7 @@ const ze = (t, e, s = !1) => {
|
|
|
597
597
|
let a = t.setMap.get(r);
|
|
598
598
|
const u = P(a), l = ((i = (n = t.options).mark) === null || i === void 0 ? void 0 : i.call(n, a, Y)) === Y.mutable;
|
|
599
599
|
if (t.options.strict && ze(r, t.options, l), !l && !u && ne(r, t.options) && !t.finalized && t.original.has(r)) {
|
|
600
|
-
const c =
|
|
600
|
+
const c = gt.createDraft({
|
|
601
601
|
original: r,
|
|
602
602
|
parentDraft: t,
|
|
603
603
|
key: r,
|
|
@@ -650,7 +650,7 @@ const ze = (t, e, s = !1) => {
|
|
|
650
650
|
const e = t.setMap.keys();
|
|
651
651
|
return {
|
|
652
652
|
[Symbol.iterator]: () => this.values(),
|
|
653
|
-
next:
|
|
653
|
+
next: Nt(t, e, { isValuesIterator: !0 })
|
|
654
654
|
};
|
|
655
655
|
},
|
|
656
656
|
entries() {
|
|
@@ -659,7 +659,7 @@ const ze = (t, e, s = !1) => {
|
|
|
659
659
|
const e = t.setMap.keys();
|
|
660
660
|
return {
|
|
661
661
|
[Symbol.iterator]: () => this.entries(),
|
|
662
|
-
next:
|
|
662
|
+
next: Nt(t, e, {
|
|
663
663
|
isValuesIterator: !1
|
|
664
664
|
})
|
|
665
665
|
};
|
|
@@ -676,13 +676,13 @@ const ze = (t, e, s = !1) => {
|
|
|
676
676
|
for (; !n.done; )
|
|
677
677
|
t.call(e, n.value, n.value, this), n = s.next();
|
|
678
678
|
}
|
|
679
|
-
}, Bs = Reflect.ownKeys(lt),
|
|
679
|
+
}, Bs = Reflect.ownKeys(lt), Zt = /* @__PURE__ */ new WeakSet(), es = {
|
|
680
680
|
get(t, e, s) {
|
|
681
681
|
var n, i;
|
|
682
682
|
const o = (n = t.copy) === null || n === void 0 ? void 0 : n[e];
|
|
683
|
-
if (o &&
|
|
683
|
+
if (o && Zt.has(o))
|
|
684
684
|
return o;
|
|
685
|
-
if (e ===
|
|
685
|
+
if (e === Xt)
|
|
686
686
|
return t;
|
|
687
687
|
let r;
|
|
688
688
|
if (t.options.mark) {
|
|
@@ -706,7 +706,7 @@ const ze = (t, e, s = !1) => {
|
|
|
706
706
|
return l.bind(t.proxy);
|
|
707
707
|
}
|
|
708
708
|
if (!Ie(a, e)) {
|
|
709
|
-
const l =
|
|
709
|
+
const l = Dt(a, e);
|
|
710
710
|
return l ? "value" in l ? l.value : (
|
|
711
711
|
// !case: support for getter
|
|
712
712
|
(i = l.get) === null || i === void 0 ? void 0 : i.call(t.proxy)
|
|
@@ -716,7 +716,7 @@ const ze = (t, e, s = !1) => {
|
|
|
716
716
|
if (t.options.strict && ze(u, t.options), t.finalized || !ne(u, t.options))
|
|
717
717
|
return u;
|
|
718
718
|
if (u === et(t.original, e)) {
|
|
719
|
-
if (X(t), t.copy[e] =
|
|
719
|
+
if (X(t), t.copy[e] = wt({
|
|
720
720
|
original: t.original[e],
|
|
721
721
|
parentDraft: t,
|
|
722
722
|
key: t.type === 1 ? Number(e) : e,
|
|
@@ -737,7 +737,7 @@ const ze = (t, e, s = !1) => {
|
|
|
737
737
|
let i;
|
|
738
738
|
if (t.type === 1 && e !== "length" && !(Number.isInteger(i = Number(e)) && i >= 0 && (e === 0 || i === 0 || String(i) === String(e))))
|
|
739
739
|
throw new Error("Only supports setting array indices and the 'length' property.");
|
|
740
|
-
const o =
|
|
740
|
+
const o = Dt(Q(t), e);
|
|
741
741
|
if (o != null && o.set)
|
|
742
742
|
return o.set.call(t.proxy, s), !0;
|
|
743
743
|
const r = et(Q(t), e), a = P(r);
|
|
@@ -769,11 +769,11 @@ const ze = (t, e, s = !1) => {
|
|
|
769
769
|
},
|
|
770
770
|
deleteProperty(t, e) {
|
|
771
771
|
var s;
|
|
772
|
-
return t.type === 1 ?
|
|
772
|
+
return t.type === 1 ? es.set.call(this, t, e, void 0, t.proxy) : (et(t.original, e) !== void 0 || e in t.original ? (X(t), ue(t), t.assignedMap.set(e, !1)) : (t.assignedMap = (s = t.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), t.assignedMap.delete(e)), t.copy && delete t.copy[e], !0);
|
|
773
773
|
}
|
|
774
774
|
};
|
|
775
|
-
function
|
|
776
|
-
const { original: e, parentDraft: s, key: n, finalities: i, options: o } = t, r =
|
|
775
|
+
function wt(t) {
|
|
776
|
+
const { original: e, parentDraft: s, key: n, finalities: i, options: o } = t, r = ve(e), a = {
|
|
777
777
|
type: r,
|
|
778
778
|
finalized: !1,
|
|
779
779
|
parent: s,
|
|
@@ -786,17 +786,17 @@ function Ot(t) {
|
|
|
786
786
|
setMap: r === 3 ? new Map(e.entries()) : void 0
|
|
787
787
|
};
|
|
788
788
|
(n || "key" in t) && (a.key = n);
|
|
789
|
-
const { proxy: u, revoke: l } = Proxy.revocable(r === 1 ? Object.assign([], a) : a,
|
|
790
|
-
if (i.revoke.push(l),
|
|
789
|
+
const { proxy: u, revoke: l } = Proxy.revocable(r === 1 ? Object.assign([], a) : a, es);
|
|
790
|
+
if (i.revoke.push(l), Zt.add(u), a.proxy = u, s) {
|
|
791
791
|
const c = s;
|
|
792
792
|
c.finalities.draft.push((p, m) => {
|
|
793
793
|
var _, y;
|
|
794
794
|
const O = P(u);
|
|
795
795
|
let R = c.type === 3 ? c.setMap : c.copy;
|
|
796
|
-
const $ = pe(R, n),
|
|
797
|
-
if (
|
|
798
|
-
let A =
|
|
799
|
-
|
|
796
|
+
const $ = pe(R, n), w = P($);
|
|
797
|
+
if (w) {
|
|
798
|
+
let A = w.original;
|
|
799
|
+
w.operated && (A = _t($)), at(w), ut(w, $e, p, m), c.options.enableAutoFreeze && (c.options.updatedValues = (_ = c.options.updatedValues) !== null && _ !== void 0 ? _ : /* @__PURE__ */ new WeakMap(), c.options.updatedValues.set(A, w.original)), Pe(R, n, A);
|
|
800
800
|
}
|
|
801
801
|
(y = O.callbacks) === null || y === void 0 || y.forEach((A) => {
|
|
802
802
|
A(p, m);
|
|
@@ -810,7 +810,7 @@ function Ot(t) {
|
|
|
810
810
|
}
|
|
811
811
|
return u;
|
|
812
812
|
}
|
|
813
|
-
|
|
813
|
+
gt.createDraft = wt;
|
|
814
814
|
function Fs(t, e, s, n, i) {
|
|
815
815
|
var o;
|
|
816
816
|
const r = P(t), a = (o = r == null ? void 0 : r.original) !== null && o !== void 0 ? o : t, u = !!e.length;
|
|
@@ -833,7 +833,7 @@ function zs(t, e) {
|
|
|
833
833
|
};
|
|
834
834
|
let i, o;
|
|
835
835
|
e.enablePatches && (i = [], o = []);
|
|
836
|
-
const a = ((s = e.mark) === null || s === void 0 ? void 0 : s.call(e, t, Y)) === Y.mutable || !ne(t, e) ? t :
|
|
836
|
+
const a = ((s = e.mark) === null || s === void 0 ? void 0 : s.call(e, t, Y)) === Y.mutable || !ne(t, e) ? t : wt({
|
|
837
837
|
original: t,
|
|
838
838
|
parentDraft: null,
|
|
839
839
|
finalities: n,
|
|
@@ -849,7 +849,7 @@ function zs(t, e) {
|
|
|
849
849
|
}
|
|
850
850
|
function ft(t) {
|
|
851
851
|
const { rootDraft: e, value: s, useRawReturn: n = !1, isRoot: i = !0 } = t;
|
|
852
|
-
|
|
852
|
+
bt(s, (o, r, a) => {
|
|
853
853
|
const u = P(r);
|
|
854
854
|
if (u && e && u.finalities === e.finalities) {
|
|
855
855
|
t.isContainDraft = !0;
|
|
@@ -863,16 +863,16 @@ function ft(t) {
|
|
|
863
863
|
typeof r == "object" && r !== null && (t.value = r, t.isRoot = !1, ft(t));
|
|
864
864
|
}), i && (t.isContainDraft || console.warn("The return value does not contain any draft, please use 'rawReturn()' to wrap the return value to improve performance."), n && console.warn("The return value contains drafts, please don't use 'rawReturn()' to wrap the return value."));
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function ts(t) {
|
|
867
867
|
const e = P(t);
|
|
868
868
|
if (!ne(t, e == null ? void 0 : e.options))
|
|
869
869
|
return t;
|
|
870
|
-
const s =
|
|
870
|
+
const s = ve(t);
|
|
871
871
|
if (e && !e.operated)
|
|
872
872
|
return e.original;
|
|
873
873
|
let n;
|
|
874
874
|
function i() {
|
|
875
|
-
n = s === 2 ? new Map(t) : s === 3 ? Array.from(e.setMap.values()) :
|
|
875
|
+
n = s === 2 ? new Map(t) : s === 3 ? Array.from(e.setMap.values()) : Qt(t, e == null ? void 0 : e.options);
|
|
876
876
|
}
|
|
877
877
|
if (e) {
|
|
878
878
|
e.finalized = !0;
|
|
@@ -883,17 +883,17 @@ function ss(t) {
|
|
|
883
883
|
}
|
|
884
884
|
} else
|
|
885
885
|
n = t;
|
|
886
|
-
return
|
|
886
|
+
return bt(n, (o, r) => {
|
|
887
887
|
if (e && fe(pe(e.original, o), r))
|
|
888
888
|
return;
|
|
889
|
-
const a =
|
|
889
|
+
const a = ts(r);
|
|
890
890
|
a !== r && (n === t && i(), Pe(n, o, a));
|
|
891
891
|
}), s === 3 ? new Set(n) : n;
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function Ht(t) {
|
|
894
894
|
if (!be(t))
|
|
895
895
|
throw new Error(`current() is only used for Draft, parameter: ${t}`);
|
|
896
|
-
return
|
|
896
|
+
return ts(t);
|
|
897
897
|
}
|
|
898
898
|
const Gs = (t) => {
|
|
899
899
|
if (t !== void 0 && Object.prototype.toString.call(t) !== "[object Object]")
|
|
@@ -909,13 +909,13 @@ const Gs = (t) => {
|
|
|
909
909
|
if (typeof n != "function" && (c = n), c !== void 0 && Object.prototype.toString.call(c) !== "[object Object]")
|
|
910
910
|
throw new Error(`Invalid options: ${c}, 'options' should be an object.`);
|
|
911
911
|
c = Object.assign(Object.assign({}, t), c);
|
|
912
|
-
const p = be(u) ?
|
|
912
|
+
const p = be(u) ? Ht(u) : u, m = Array.isArray(c.mark) ? (S, N) => {
|
|
913
913
|
for (const E of c.mark) {
|
|
914
914
|
if (typeof E != "function")
|
|
915
915
|
throw new Error(`Invalid mark: ${E}, 'mark' should be a function.`);
|
|
916
|
-
const
|
|
917
|
-
if (
|
|
918
|
-
return
|
|
916
|
+
const v = E(S, N);
|
|
917
|
+
if (v)
|
|
918
|
+
return v;
|
|
919
919
|
}
|
|
920
920
|
} : c.mark, _ = (o = c.enablePatches) !== null && o !== void 0 ? o : !1, y = (r = c.strict) !== null && r !== void 0 ? r : !1, R = {
|
|
921
921
|
enableAutoFreeze: (a = c.enableAutoFreeze) !== null && a !== void 0 ? a : !1,
|
|
@@ -925,11 +925,11 @@ const Gs = (t) => {
|
|
|
925
925
|
};
|
|
926
926
|
if (!ne(p, R) && typeof p == "object" && p !== null)
|
|
927
927
|
throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
|
|
928
|
-
const [$,
|
|
928
|
+
const [$, w] = zs(p, R);
|
|
929
929
|
if (typeof n != "function") {
|
|
930
930
|
if (!ne(p, R))
|
|
931
931
|
throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
|
|
932
|
-
return [$,
|
|
932
|
+
return [$, w];
|
|
933
933
|
}
|
|
934
934
|
let A;
|
|
935
935
|
try {
|
|
@@ -942,27 +942,27 @@ const Gs = (t) => {
|
|
|
942
942
|
if (!be(S)) {
|
|
943
943
|
if (S !== void 0 && !fe(S, $) && (N != null && N.operated))
|
|
944
944
|
throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
|
|
945
|
-
const
|
|
946
|
-
if (
|
|
947
|
-
const x =
|
|
945
|
+
const v = S == null ? void 0 : S[xs];
|
|
946
|
+
if (v) {
|
|
947
|
+
const x = v[0];
|
|
948
948
|
return R.strict && typeof S == "object" && S !== null && ft({
|
|
949
949
|
rootDraft: N,
|
|
950
950
|
value: S,
|
|
951
951
|
useRawReturn: !0
|
|
952
|
-
}),
|
|
952
|
+
}), w([x]);
|
|
953
953
|
}
|
|
954
954
|
if (S !== void 0)
|
|
955
|
-
return typeof S == "object" && S !== null && ft({ rootDraft: N, value: S }),
|
|
955
|
+
return typeof S == "object" && S !== null && ft({ rootDraft: N, value: S }), w([S]);
|
|
956
956
|
}
|
|
957
957
|
if (S === $ || S === void 0)
|
|
958
|
-
return
|
|
958
|
+
return w([]);
|
|
959
959
|
const E = P(S);
|
|
960
960
|
if (R === E.options) {
|
|
961
961
|
if (E.operated)
|
|
962
962
|
throw new Error("Cannot return a modified child draft.");
|
|
963
|
-
return
|
|
963
|
+
return w([Ht(S)]);
|
|
964
964
|
}
|
|
965
|
-
return
|
|
965
|
+
return w([S]);
|
|
966
966
|
};
|
|
967
967
|
return A instanceof Promise ? A.then(C, (S) => {
|
|
968
968
|
throw ot(P($)), S;
|
|
@@ -970,7 +970,7 @@ const Gs = (t) => {
|
|
|
970
970
|
};
|
|
971
971
|
}, M = Gs();
|
|
972
972
|
Object.prototype.constructor.toString();
|
|
973
|
-
const Js =
|
|
973
|
+
const Js = yt(fetch), ss = async (t, e) => {
|
|
974
974
|
if (!t)
|
|
975
975
|
throw "Metapage definition null";
|
|
976
976
|
if (t.version || (t = M(t, (n) => {
|
|
@@ -993,7 +993,7 @@ const Js = gt(fetch), ns = async (t, e) => {
|
|
|
993
993
|
throw `Error converting metapage definition to version ${e}: ${n}`;
|
|
994
994
|
}
|
|
995
995
|
return Ws(t, e);
|
|
996
|
-
}, Vs = async (t) =>
|
|
996
|
+
}, Vs = async (t) => ss(t, Le), Ws = (t, e) => {
|
|
997
997
|
if (!t)
|
|
998
998
|
throw "Metapage definition null";
|
|
999
999
|
if (!t.version)
|
|
@@ -1056,7 +1056,7 @@ const Js = gt(fetch), ns = async (t, e) => {
|
|
|
1056
1056
|
if (t === "2")
|
|
1057
1057
|
return "2";
|
|
1058
1058
|
throw `Unknown version: ${t}`;
|
|
1059
|
-
}, en =
|
|
1059
|
+
}, en = yt(fetch), ns = async (t, e) => {
|
|
1060
1060
|
if (!t)
|
|
1061
1061
|
throw "Metaframe definition null";
|
|
1062
1062
|
if (!t.version)
|
|
@@ -1079,7 +1079,7 @@ const Js = gt(fetch), ns = async (t, e) => {
|
|
|
1079
1079
|
throw `Error converting metapage definition to version ${e}: ${n}`;
|
|
1080
1080
|
}
|
|
1081
1081
|
return sn(t, e);
|
|
1082
|
-
}, tn = async (t) =>
|
|
1082
|
+
}, tn = async (t) => ns(t, We), sn = (t, e) => {
|
|
1083
1083
|
if (!t)
|
|
1084
1084
|
throw "Metaframe definition null";
|
|
1085
1085
|
t.version || (t = M(t, (i) => {
|
|
@@ -1211,11 +1211,11 @@ const Ke = async (t) => M(t, async (e) => {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
}), Ce = async (t) => M(t, async (e) => {
|
|
1213
1213
|
for (const s of Object.keys(t)) {
|
|
1214
|
-
const n = await
|
|
1214
|
+
const n = await is(t[s]);
|
|
1215
1215
|
return e[s] = n, e;
|
|
1216
1216
|
}
|
|
1217
1217
|
}), xi = async (t, e, s) => {
|
|
1218
|
-
if (t =
|
|
1218
|
+
if (t = is(t), s = s || {}, s.type || (s.type = "application/octet-stream"), t instanceof ArrayBuffer)
|
|
1219
1219
|
return new File([t], e, s);
|
|
1220
1220
|
if (t instanceof File || t instanceof Blob) {
|
|
1221
1221
|
const i = await t.arrayBuffer();
|
|
@@ -1278,7 +1278,7 @@ const Ke = async (t) => M(t, async (e) => {
|
|
|
1278
1278
|
return Promise.resolve(s);
|
|
1279
1279
|
}
|
|
1280
1280
|
return Promise.resolve(t);
|
|
1281
|
-
},
|
|
1281
|
+
}, is = (t) => {
|
|
1282
1282
|
if (!(t && typeof t == "object" && t._s === !0))
|
|
1283
1283
|
return t;
|
|
1284
1284
|
const e = t, s = e._c;
|
|
@@ -1358,7 +1358,7 @@ function Hi(t) {
|
|
|
1358
1358
|
return !1;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
var
|
|
1361
|
+
var rs = { exports: {} };
|
|
1362
1362
|
(function(t) {
|
|
1363
1363
|
var e = Object.prototype.hasOwnProperty, s = "~";
|
|
1364
1364
|
function n() {
|
|
@@ -1402,7 +1402,7 @@ var os = { exports: {} };
|
|
|
1402
1402
|
var O = s ? s + l : l;
|
|
1403
1403
|
if (!this._events[O])
|
|
1404
1404
|
return !1;
|
|
1405
|
-
var R = this._events[O], $ = arguments.length,
|
|
1405
|
+
var R = this._events[O], $ = arguments.length, w, A;
|
|
1406
1406
|
if (R.fn) {
|
|
1407
1407
|
switch (R.once && this.removeListener(l, R.fn, void 0, !0), $) {
|
|
1408
1408
|
case 1:
|
|
@@ -1418,9 +1418,9 @@ var os = { exports: {} };
|
|
|
1418
1418
|
case 6:
|
|
1419
1419
|
return R.fn.call(R.context, c, p, m, _, y), !0;
|
|
1420
1420
|
}
|
|
1421
|
-
for (A = 1,
|
|
1422
|
-
|
|
1423
|
-
R.fn.apply(R.context,
|
|
1421
|
+
for (A = 1, w = new Array($ - 1); A < $; A++)
|
|
1422
|
+
w[A - 1] = arguments[A];
|
|
1423
|
+
R.fn.apply(R.context, w);
|
|
1424
1424
|
} else {
|
|
1425
1425
|
var C = R.length, S;
|
|
1426
1426
|
for (A = 0; A < C; A++)
|
|
@@ -1438,10 +1438,10 @@ var os = { exports: {} };
|
|
|
1438
1438
|
R[A].fn.call(R[A].context, c, p, m);
|
|
1439
1439
|
break;
|
|
1440
1440
|
default:
|
|
1441
|
-
if (!
|
|
1442
|
-
for (S = 1,
|
|
1443
|
-
|
|
1444
|
-
R[A].fn.apply(R[A].context,
|
|
1441
|
+
if (!w)
|
|
1442
|
+
for (S = 1, w = new Array($ - 1); S < $; S++)
|
|
1443
|
+
w[S - 1] = arguments[S];
|
|
1444
|
+
R[A].fn.apply(R[A].context, w);
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
1447
|
return !0;
|
|
@@ -1468,8 +1468,8 @@ var os = { exports: {} };
|
|
|
1468
1468
|
var c;
|
|
1469
1469
|
return l ? (c = s ? s + l : l, this._events[c] && r(this, c)) : (this._events = new n(), this._eventsCount = 0), this;
|
|
1470
1470
|
}, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = s, a.EventEmitter = a, t.exports = a;
|
|
1471
|
-
})(
|
|
1472
|
-
var
|
|
1471
|
+
})(rs);
|
|
1472
|
+
var Ot = rs.exports;
|
|
1473
1473
|
function mn(t) {
|
|
1474
1474
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1475
1475
|
}
|
|
@@ -1511,22 +1511,18 @@ var yn = function(t, e) {
|
|
|
1511
1511
|
}
|
|
1512
1512
|
}(t);
|
|
1513
1513
|
};
|
|
1514
|
-
const gn = /* @__PURE__ */ mn(yn), _n = (t) =>
|
|
1514
|
+
const gn = /* @__PURE__ */ mn(yn), _n = (t) => os(gn(t)), bn = (t) => {
|
|
1515
1515
|
if (t && t.length > 0)
|
|
1516
1516
|
try {
|
|
1517
|
-
return JSON.parse(
|
|
1518
|
-
} catch
|
|
1519
|
-
|
|
1520
|
-
return JSON.parse(decodeURIComponent(ht(t)));
|
|
1521
|
-
} catch {
|
|
1522
|
-
throw e;
|
|
1523
|
-
}
|
|
1517
|
+
return JSON.parse(as(t));
|
|
1518
|
+
} catch {
|
|
1519
|
+
return JSON.parse(decodeURIComponent(atob(decodeURIComponent(t))));
|
|
1524
1520
|
}
|
|
1525
|
-
},
|
|
1521
|
+
}, os = (t) => btoa(encodeURIComponent(t)), as = (t) => {
|
|
1526
1522
|
try {
|
|
1527
|
-
return atob(t);
|
|
1523
|
+
return decodeURIComponent(atob(t));
|
|
1528
1524
|
} catch {
|
|
1529
|
-
return atob(decodeURIComponent(t));
|
|
1525
|
+
return decodeURIComponent(atob(decodeURIComponent(t)));
|
|
1530
1526
|
}
|
|
1531
1527
|
}, us = (t) => {
|
|
1532
1528
|
const e = t instanceof URL ? t : new URL(t);
|
|
@@ -1555,7 +1551,7 @@ const gn = /* @__PURE__ */ mn(yn), _n = (t) => as(gn(t)), bn = (t) => {
|
|
|
1555
1551
|
}, Te = (t, e) => {
|
|
1556
1552
|
const [s, n] = us(t);
|
|
1557
1553
|
return n[e];
|
|
1558
|
-
},
|
|
1554
|
+
}, vn = (t) => wn()[1][t], wn = () => us(window.location.href), Se = (t, e, s) => {
|
|
1559
1555
|
const n = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, i = On(n, t, e);
|
|
1560
1556
|
i !== n && (s != null && s.modifyHistory ? window.location.hash = i : (window.history.replaceState(null, document.title, `${window.location.pathname}${window.location.search}${i.startsWith("#") ? "" : "#"}${i}`), window.dispatchEvent(new HashChangeEvent("hashchange"))));
|
|
1561
1557
|
}, On = (t, e, s) => {
|
|
@@ -1570,14 +1566,14 @@ const gn = /* @__PURE__ */ mn(yn), _n = (t) => as(gn(t)), bn = (t) => {
|
|
|
1570
1566
|
return /^[A-Za-z0-9+/]+={0,2}$/.test(c) && c.length % 4, `${u}=${c}`;
|
|
1571
1567
|
}).join("&");
|
|
1572
1568
|
return !n && !a ? "" : `${n || ""}${a ? "?" + a : ""}`;
|
|
1573
|
-
},
|
|
1569
|
+
}, Rt = (t, e) => {
|
|
1574
1570
|
const s = Te(t, e);
|
|
1575
1571
|
if (s && s !== "")
|
|
1576
1572
|
return bn(s);
|
|
1577
1573
|
}, Rn = (t, e, s) => {
|
|
1578
1574
|
const n = e ? _n(e) : void 0;
|
|
1579
1575
|
Se(t, n, s);
|
|
1580
|
-
}, Sn = (t) =>
|
|
1576
|
+
}, Sn = (t) => Rt(window.location.href, t), An = (t, e) => {
|
|
1581
1577
|
const s = Te(t, e);
|
|
1582
1578
|
return s ? parseFloat(s) : void 0;
|
|
1583
1579
|
}, ls = (t, e, s) => {
|
|
@@ -1591,9 +1587,9 @@ const gn = /* @__PURE__ */ mn(yn), _n = (t) => as(gn(t)), bn = (t) => {
|
|
|
1591
1587
|
Se(t, e ? "true" : void 0, s);
|
|
1592
1588
|
}, Ln = (t) => $n(window.location.href, t), Pn = (t, e) => {
|
|
1593
1589
|
const s = Te(t, e);
|
|
1594
|
-
return s && s !== "" ?
|
|
1590
|
+
return s && s !== "" ? as(s) : void 0;
|
|
1595
1591
|
}, Tn = (t, e, s) => {
|
|
1596
|
-
const n = e == null ? void 0 :
|
|
1592
|
+
const n = e == null ? void 0 : os(e);
|
|
1597
1593
|
Se(t, n, s);
|
|
1598
1594
|
}, Dn = (t) => Pn(window.location.href, t);
|
|
1599
1595
|
var kn = function(t, e) {
|
|
@@ -1634,7 +1630,7 @@ var kn = function(t, e) {
|
|
|
1634
1630
|
}
|
|
1635
1631
|
}(t);
|
|
1636
1632
|
};
|
|
1637
|
-
const fs = /* @__PURE__ */
|
|
1633
|
+
const fs = /* @__PURE__ */ mt(kn);
|
|
1638
1634
|
var xe;
|
|
1639
1635
|
(function(t) {
|
|
1640
1636
|
t.mp_debug = "mp_debug";
|
|
@@ -1649,7 +1645,7 @@ const Nn = () => {
|
|
|
1649
1645
|
version: Le,
|
|
1650
1646
|
metaframes: {}
|
|
1651
1647
|
};
|
|
1652
|
-
class Hn extends
|
|
1648
|
+
class Hn extends Ot.EventEmitter {
|
|
1653
1649
|
constructor() {
|
|
1654
1650
|
super(), this._definition = ps, this.getDefinition = this.getDefinition.bind(this);
|
|
1655
1651
|
}
|
|
@@ -1664,14 +1660,14 @@ const Ge = (t, e) => e ? M(t, (s) => {
|
|
|
1664
1660
|
Object.keys(e).forEach((n) => {
|
|
1665
1661
|
e[n] === void 0 ? delete s[n] : s[n] = e[n];
|
|
1666
1662
|
});
|
|
1667
|
-
}) : t, ji = (t) => window.location.search ? new URLSearchParams(window.location.search).get(t) : null, Ui = () => new URLSearchParams(window.location.search).has(xe.mp_debug),
|
|
1663
|
+
}) : t, ji = (t) => window.location.search ? new URLSearchParams(window.location.search).get(t) : null, Ui = () => new URLSearchParams(window.location.search).has(xe.mp_debug), ht = () => {
|
|
1668
1664
|
const t = new URLSearchParams(window.location.search).get(xe.mp_debug);
|
|
1669
1665
|
return t === "true" || t === "1";
|
|
1670
|
-
}, Bi = (t = 8) =>
|
|
1671
|
-
for (var e = "", s =
|
|
1672
|
-
e +=
|
|
1666
|
+
}, Bi = (t = 8) => St(t), jn = (t = 8) => St(t), Fi = (t = 8) => St(t), jt = "abcdefghijklmnopqrstuvwxyz0123456789", St = (t = 8) => {
|
|
1667
|
+
for (var e = "", s = jt.length, n = 0; n < t; n++)
|
|
1668
|
+
e += jt.charAt(Math.floor(Math.random() * s));
|
|
1673
1669
|
return e;
|
|
1674
|
-
},
|
|
1670
|
+
}, At = (t, e, s) => {
|
|
1675
1671
|
e = e || "000", e && e.trim() == "" && (e = void 0);
|
|
1676
1672
|
let n;
|
|
1677
1673
|
if (typeof t == "string" ? n = t : typeof t == "number" ? n = t + "" : n = JSON.stringify(t, null, " "), e && e.trim() != "") {
|
|
@@ -1720,9 +1716,9 @@ var F;
|
|
|
1720
1716
|
(function(t) {
|
|
1721
1717
|
t.Connected = "connected", t.Error = "error", t.Input = "input", t.Inputs = "inputs", t.Message = "message";
|
|
1722
1718
|
})(F || (F = {}));
|
|
1723
|
-
class ie extends
|
|
1719
|
+
class ie extends Ot.EventEmitter {
|
|
1724
1720
|
constructor(e) {
|
|
1725
|
-
if (super(), this._inputPipeValues = {}, this._outputPipeValues = {}, this._state = ae.WaitingForPageLoad, this._messageSendCount = 0, this.debug =
|
|
1721
|
+
if (super(), this._inputPipeValues = {}, this._outputPipeValues = {}, this._state = ae.WaitingForPageLoad, this._messageSendCount = 0, this.debug = ht(), this.isInputOutputBlobSerialization = !0, this.id = window.name, this.debug = ht(), this._isIframe = Nn(), this.addListener = this.addListener.bind(this), this.dispose = this.dispose.bind(this), this.error = this.error.bind(this), this.getInput = this.getInput.bind(this), this.getInputs = this.getInputs.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.onInput = this.onInput.bind(this), this.onInputs = this.onInputs.bind(this), this.onMessage = this.onMessage.bind(this), this.sendRpc = this.sendRpc.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInternalInputsAndNotify = this.setInternalInputsAndNotify.bind(this), this.setOutput = this.setOutput.bind(this), this.setOutputs = this.setOutputs.bind(this), this.warn = this.warn.bind(this), this._resolveSetupIframeServerResponse = this._resolveSetupIframeServerResponse.bind(this), this.addListenerReturnDisposer = this.addListenerReturnDisposer.bind(this), this.connected = this.connected.bind(this), this.isConnected = this.isConnected.bind(this), this.disableNotifyOnHashUrlChange = this.disableNotifyOnHashUrlChange.bind(this), this._onHashUrlChange = this._onHashUrlChange.bind(this), this.setParameter = this.setParameter.bind(this), this.setParameterBoolean = this.setParameterBoolean.bind(this), this.setParameterJson = this.setParameterJson.bind(this), this.setParameterBase64 = this.setParameterBase64.bind(this), this.setParameterFloat = this.setParameterFloat.bind(this), this.setParameterInt = this.setParameterInt.bind(this), this.getParameter = this.getParameter.bind(this), this.getParameterBoolean = this.getParameterBoolean.bind(this), this.getParameterJson = this.getParameterJson.bind(this), this.getParameterBase64 = this.getParameterBase64.bind(this), this.getParameterFloat = this.getParameterFloat.bind(this), this.getParameterInt = this.getParameterInt.bind(this), this.deleteParameter = this.deleteParameter.bind(this), !this._isIframe) {
|
|
1726
1722
|
this.log("Not an iframe, metaframe code disabled");
|
|
1727
1723
|
return;
|
|
1728
1724
|
}
|
|
@@ -1771,7 +1767,7 @@ class ie extends Rt.EventEmitter {
|
|
|
1771
1767
|
}
|
|
1772
1768
|
logInternal(e, s, n) {
|
|
1773
1769
|
let i;
|
|
1774
|
-
typeof e == "string" ? i = e : typeof e == "number" ? i = e + "" : i = JSON.stringify(e), s = s && s + "", i = (this.id ? `Metaframe[${this.id}] ` : "") + `${i}`,
|
|
1770
|
+
typeof e == "string" ? i = e : typeof e == "number" ? i = e + "" : i = JSON.stringify(e), s = s && s + "", i = (this.id ? `Metaframe[${this.id}] ` : "") + `${i}`, At(i, s, n);
|
|
1775
1771
|
}
|
|
1776
1772
|
dispose() {
|
|
1777
1773
|
super.removeAllListeners(), window.removeEventListener("message", this.onMessage), this.disableNotifyOnHashUrlChange(), this._inputPipeValues = void 0, this._outputPipeValues = void 0;
|
|
@@ -1887,7 +1883,7 @@ class ie extends Rt.EventEmitter {
|
|
|
1887
1883
|
Se(e, s);
|
|
1888
1884
|
}
|
|
1889
1885
|
getParameter(e) {
|
|
1890
|
-
return
|
|
1886
|
+
return vn(e);
|
|
1891
1887
|
}
|
|
1892
1888
|
setParameterBoolean(e, s) {
|
|
1893
1889
|
xn(e, s);
|
|
@@ -1932,15 +1928,15 @@ ie.MESSAGE = F.Message;
|
|
|
1932
1928
|
ie.deserializeInputs = Ce;
|
|
1933
1929
|
ie.serializeInputs = Ke;
|
|
1934
1930
|
var qe = {};
|
|
1935
|
-
const oe = "\\\\/",
|
|
1931
|
+
const oe = "\\\\/", Ut = `[^${oe}]`, le = "\\.", Fn = "\\+", zn = "\\?", Qe = "\\/", Gn = "(?=.)", ms = "[^/]", Et = `(?:${Qe}|$)`, ys = `(?:^|${Qe})`, Mt = `${le}{1,2}${Et}`, Jn = `(?!${le})`, Vn = `(?!${ys}${Mt})`, Wn = `(?!${le}{0,1}${Et})`, Kn = `(?!${Mt})`, Xn = `[^.${Qe}]`, qn = `${ms}*?`, Qn = "/", gs = {
|
|
1936
1932
|
DOT_LITERAL: le,
|
|
1937
1933
|
PLUS_LITERAL: Fn,
|
|
1938
1934
|
QMARK_LITERAL: zn,
|
|
1939
1935
|
SLASH_LITERAL: Qe,
|
|
1940
1936
|
ONE_CHAR: Gn,
|
|
1941
1937
|
QMARK: ms,
|
|
1942
|
-
END_ANCHOR:
|
|
1943
|
-
DOTS_SLASH:
|
|
1938
|
+
END_ANCHOR: Et,
|
|
1939
|
+
DOTS_SLASH: Mt,
|
|
1944
1940
|
NO_DOT: Jn,
|
|
1945
1941
|
NO_DOTS: Vn,
|
|
1946
1942
|
NO_DOT_SLASH: Wn,
|
|
@@ -1952,8 +1948,8 @@ const oe = "\\\\/", Bt = `[^${oe}]`, le = "\\.", Fn = "\\+", zn = "\\?", Qe = "\
|
|
|
1952
1948
|
}, Yn = {
|
|
1953
1949
|
...gs,
|
|
1954
1950
|
SLASH_LITERAL: `[${oe}]`,
|
|
1955
|
-
QMARK:
|
|
1956
|
-
STAR: `${
|
|
1951
|
+
QMARK: Ut,
|
|
1952
|
+
STAR: `${Ut}*?`,
|
|
1957
1953
|
DOTS_SLASH: `${le}{1,2}(?:[${oe}]|$)`,
|
|
1958
1954
|
NO_DOT: `(?!${le})`,
|
|
1959
1955
|
NO_DOTS: `(?!(?:^|[${oe}])${le}{1,2}(?:[${oe}]|$))`,
|
|
@@ -2125,7 +2121,7 @@ var Ye = {
|
|
|
2125
2121
|
return r.negated === !0 && (c = `(?:^(?!${c}).*$)`), c;
|
|
2126
2122
|
}, t.basename = (o, { windows: r } = {}) => r ? o.replace(/[\\/]$/, "").replace(/.*[\\/]/, "") : o.replace(/\/$/, "").replace(/.*\//, "");
|
|
2127
2123
|
})(qe);
|
|
2128
|
-
const
|
|
2124
|
+
const Bt = qe, {
|
|
2129
2125
|
CHAR_ASTERISK: st,
|
|
2130
2126
|
/* * */
|
|
2131
2127
|
CHAR_AT: ei,
|
|
@@ -2136,7 +2132,7 @@ const Ft = qe, {
|
|
|
2136
2132
|
/* , */
|
|
2137
2133
|
CHAR_DOT: nt,
|
|
2138
2134
|
/* . */
|
|
2139
|
-
CHAR_EXCLAMATION_MARK:
|
|
2135
|
+
CHAR_EXCLAMATION_MARK: Ft,
|
|
2140
2136
|
/* ! */
|
|
2141
2137
|
CHAR_FORWARD_SLASH: _s,
|
|
2142
2138
|
/* / */
|
|
@@ -2148,31 +2144,31 @@ const Ft = qe, {
|
|
|
2148
2144
|
/* [ */
|
|
2149
2145
|
CHAR_PLUS: ni,
|
|
2150
2146
|
/* + */
|
|
2151
|
-
CHAR_QUESTION_MARK:
|
|
2147
|
+
CHAR_QUESTION_MARK: zt,
|
|
2152
2148
|
/* ? */
|
|
2153
2149
|
CHAR_RIGHT_CURLY_BRACE: ii,
|
|
2154
2150
|
/* } */
|
|
2155
|
-
CHAR_RIGHT_PARENTHESES:
|
|
2151
|
+
CHAR_RIGHT_PARENTHESES: Gt,
|
|
2156
2152
|
/* ) */
|
|
2157
2153
|
CHAR_RIGHT_SQUARE_BRACKET: ri
|
|
2158
2154
|
/* ] */
|
|
2159
|
-
} = Ye,
|
|
2155
|
+
} = Ye, Jt = (t) => t === _s || t === Me, Vt = (t) => {
|
|
2160
2156
|
t.isPrefix !== !0 && (t.depth = t.isGlobstar ? 1 / 0 : 1);
|
|
2161
2157
|
}, oi = (t, e) => {
|
|
2162
2158
|
const s = e || {}, n = t.length - 1, i = s.parts === !0 || s.scanToEnd === !0, o = [], r = [], a = [];
|
|
2163
|
-
let u = t, l = -1, c = 0, p = 0, m = !1, _ = !1, y = !1, O = !1, R = !1, $ = !1,
|
|
2159
|
+
let u = t, l = -1, c = 0, p = 0, m = !1, _ = !1, y = !1, O = !1, R = !1, $ = !1, w = !1, A = !1, C = !1, S = 0, N, E, v = { value: "", depth: 0, isGlob: !1 };
|
|
2164
2160
|
const x = () => l >= n, d = () => u.charCodeAt(l + 1), T = () => (N = E, u.charCodeAt(++l));
|
|
2165
2161
|
for (; l < n; ) {
|
|
2166
2162
|
E = T();
|
|
2167
2163
|
let V;
|
|
2168
2164
|
if (E === Me) {
|
|
2169
|
-
|
|
2165
|
+
w = v.backslashes = !0, E = T(), E === it && ($ = !0);
|
|
2170
2166
|
continue;
|
|
2171
2167
|
}
|
|
2172
2168
|
if ($ === !0 || E === it) {
|
|
2173
2169
|
for (S++; x() !== !0 && (E = T()); ) {
|
|
2174
2170
|
if (E === Me) {
|
|
2175
|
-
|
|
2171
|
+
w = v.backslashes = !0, T();
|
|
2176
2172
|
continue;
|
|
2177
2173
|
}
|
|
2178
2174
|
if (E === it) {
|
|
@@ -2180,17 +2176,17 @@ const Ft = qe, {
|
|
|
2180
2176
|
continue;
|
|
2181
2177
|
}
|
|
2182
2178
|
if ($ !== !0 && E === nt && (E = T()) === nt) {
|
|
2183
|
-
if (m =
|
|
2179
|
+
if (m = v.isBrace = !0, y = v.isGlob = !0, C = !0, i === !0)
|
|
2184
2180
|
continue;
|
|
2185
2181
|
break;
|
|
2186
2182
|
}
|
|
2187
2183
|
if ($ !== !0 && E === ti) {
|
|
2188
|
-
if (m =
|
|
2184
|
+
if (m = v.isBrace = !0, y = v.isGlob = !0, C = !0, i === !0)
|
|
2189
2185
|
continue;
|
|
2190
2186
|
break;
|
|
2191
2187
|
}
|
|
2192
2188
|
if (E === ii && (S--, S === 0)) {
|
|
2193
|
-
$ = !1, m =
|
|
2189
|
+
$ = !1, m = v.isBrace = !0, C = !0;
|
|
2194
2190
|
break;
|
|
2195
2191
|
}
|
|
2196
2192
|
}
|
|
@@ -2199,7 +2195,7 @@ const Ft = qe, {
|
|
|
2199
2195
|
break;
|
|
2200
2196
|
}
|
|
2201
2197
|
if (E === _s) {
|
|
2202
|
-
if (o.push(l), r.push(
|
|
2198
|
+
if (o.push(l), r.push(v), v = { value: "", depth: 0, isGlob: !1 }, C === !0)
|
|
2203
2199
|
continue;
|
|
2204
2200
|
if (N === nt && l === c + 1) {
|
|
2205
2201
|
c += 2;
|
|
@@ -2208,15 +2204,15 @@ const Ft = qe, {
|
|
|
2208
2204
|
p = l + 1;
|
|
2209
2205
|
continue;
|
|
2210
2206
|
}
|
|
2211
|
-
if (s.noext !== !0 && (E === ni || E === ei || E === st || E ===
|
|
2212
|
-
if (y =
|
|
2207
|
+
if (s.noext !== !0 && (E === ni || E === ei || E === st || E === zt || E === Ft) === !0 && d() === rt) {
|
|
2208
|
+
if (y = v.isGlob = !0, O = v.isExtglob = !0, C = !0, i === !0) {
|
|
2213
2209
|
for (; x() !== !0 && (E = T()); ) {
|
|
2214
2210
|
if (E === Me) {
|
|
2215
|
-
|
|
2211
|
+
w = v.backslashes = !0, E = T();
|
|
2216
2212
|
continue;
|
|
2217
2213
|
}
|
|
2218
|
-
if (E ===
|
|
2219
|
-
y =
|
|
2214
|
+
if (E === Gt) {
|
|
2215
|
+
y = v.isGlob = !0, C = !0;
|
|
2220
2216
|
break;
|
|
2221
2217
|
}
|
|
2222
2218
|
}
|
|
@@ -2225,39 +2221,39 @@ const Ft = qe, {
|
|
|
2225
2221
|
break;
|
|
2226
2222
|
}
|
|
2227
2223
|
if (E === st) {
|
|
2228
|
-
if (N === st && (R =
|
|
2224
|
+
if (N === st && (R = v.isGlobstar = !0), y = v.isGlob = !0, C = !0, i === !0)
|
|
2229
2225
|
continue;
|
|
2230
2226
|
break;
|
|
2231
2227
|
}
|
|
2232
|
-
if (E ===
|
|
2233
|
-
if (y =
|
|
2228
|
+
if (E === zt) {
|
|
2229
|
+
if (y = v.isGlob = !0, C = !0, i === !0)
|
|
2234
2230
|
continue;
|
|
2235
2231
|
break;
|
|
2236
2232
|
}
|
|
2237
2233
|
if (E === si)
|
|
2238
2234
|
for (; x() !== !0 && (V = T()); ) {
|
|
2239
2235
|
if (V === Me) {
|
|
2240
|
-
|
|
2236
|
+
w = v.backslashes = !0, T();
|
|
2241
2237
|
continue;
|
|
2242
2238
|
}
|
|
2243
2239
|
if (V === ri) {
|
|
2244
|
-
if (_ =
|
|
2240
|
+
if (_ = v.isBracket = !0, y = v.isGlob = !0, C = !0, i === !0)
|
|
2245
2241
|
continue;
|
|
2246
2242
|
break;
|
|
2247
2243
|
}
|
|
2248
2244
|
}
|
|
2249
|
-
if (s.nonegate !== !0 && E ===
|
|
2250
|
-
A =
|
|
2245
|
+
if (s.nonegate !== !0 && E === Ft && l === c) {
|
|
2246
|
+
A = v.negated = !0, c++;
|
|
2251
2247
|
continue;
|
|
2252
2248
|
}
|
|
2253
2249
|
if (s.noparen !== !0 && E === rt) {
|
|
2254
|
-
if (y =
|
|
2250
|
+
if (y = v.isGlob = !0, i === !0) {
|
|
2255
2251
|
for (; x() !== !0 && (E = T()); ) {
|
|
2256
2252
|
if (E === rt) {
|
|
2257
|
-
|
|
2253
|
+
w = v.backslashes = !0, E = T();
|
|
2258
2254
|
continue;
|
|
2259
2255
|
}
|
|
2260
|
-
if (E ===
|
|
2256
|
+
if (E === Gt) {
|
|
2261
2257
|
C = !0;
|
|
2262
2258
|
break;
|
|
2263
2259
|
}
|
|
@@ -2274,7 +2270,7 @@ const Ft = qe, {
|
|
|
2274
2270
|
}
|
|
2275
2271
|
s.noext === !0 && (O = !1, y = !1);
|
|
2276
2272
|
let H = u, Z = "", f = "";
|
|
2277
|
-
c > 0 && (Z = u.slice(0, c), u = u.slice(c), p -= c), H && y === !0 && p > 0 ? (H = u.slice(0, p), f = u.slice(p)) : y === !0 ? (H = "", f = u) : H = u, H && H !== "" && H !== "/" && H !== u &&
|
|
2273
|
+
c > 0 && (Z = u.slice(0, c), u = u.slice(c), p -= c), H && y === !0 && p > 0 ? (H = u.slice(0, p), f = u.slice(p)) : y === !0 ? (H = "", f = u) : H = u, H && H !== "" && H !== "/" && H !== u && Jt(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), s.unescape === !0 && (f && (f = Bt.removeBackslashes(f)), H && w === !0 && (H = Bt.removeBackslashes(H)));
|
|
2278
2274
|
const h = {
|
|
2279
2275
|
prefix: Z,
|
|
2280
2276
|
input: t,
|
|
@@ -2288,15 +2284,15 @@ const Ft = qe, {
|
|
|
2288
2284
|
isGlobstar: R,
|
|
2289
2285
|
negated: A
|
|
2290
2286
|
};
|
|
2291
|
-
if (s.tokens === !0 && (h.maxDepth = 0,
|
|
2287
|
+
if (s.tokens === !0 && (h.maxDepth = 0, Jt(E) || r.push(v), h.tokens = r), s.parts === !0 || s.tokens === !0) {
|
|
2292
2288
|
let V;
|
|
2293
2289
|
for (let k = 0; k < o.length; k++) {
|
|
2294
2290
|
const re = V ? V + 1 : c, ce = o[k], q = t.slice(re, ce);
|
|
2295
|
-
s.tokens && (k === 0 && c !== 0 ? (r[k].isPrefix = !0, r[k].value = Z) : r[k].value = q,
|
|
2291
|
+
s.tokens && (k === 0 && c !== 0 ? (r[k].isPrefix = !0, r[k].value = Z) : r[k].value = q, Vt(r[k]), h.maxDepth += r[k].depth), (k !== 0 || q !== "") && a.push(q), V = ce;
|
|
2296
2292
|
}
|
|
2297
2293
|
if (V && V + 1 < t.length) {
|
|
2298
2294
|
const k = t.slice(V + 1);
|
|
2299
|
-
a.push(k), s.tokens && (r[r.length - 1].value = k,
|
|
2295
|
+
a.push(k), s.tokens && (r[r.length - 1].value = k, Vt(r[r.length - 1]), h.maxDepth += r[r.length - 1].depth);
|
|
2300
2296
|
}
|
|
2301
2297
|
h.slashes = o, h.parts = a;
|
|
2302
2298
|
}
|
|
@@ -2320,7 +2316,7 @@ const Je = Ye, se = qe, {
|
|
|
2320
2316
|
return t.map((i) => se.escapeRegex(i)).join("..");
|
|
2321
2317
|
}
|
|
2322
2318
|
return s;
|
|
2323
|
-
},
|
|
2319
|
+
}, we = (t, e) => `Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`, vs = (t, e) => {
|
|
2324
2320
|
if (typeof t != "string")
|
|
2325
2321
|
throw new TypeError("Expected a string");
|
|
2326
2322
|
t = bs[t] || t;
|
|
@@ -2337,11 +2333,11 @@ const Je = Ye, se = qe, {
|
|
|
2337
2333
|
NO_DOT: O,
|
|
2338
2334
|
NO_DOT_SLASH: R,
|
|
2339
2335
|
NO_DOTS_SLASH: $,
|
|
2340
|
-
QMARK:
|
|
2336
|
+
QMARK: w,
|
|
2341
2337
|
QMARK_NO_DOT: A,
|
|
2342
2338
|
STAR: C,
|
|
2343
2339
|
START_ANCHOR: S
|
|
2344
|
-
} = u, N = (b) => `(${a}(?:(?!${S}${b.dot ? y : c}).)*?)`, E = s.dot ? "" : O,
|
|
2340
|
+
} = u, N = (b) => `(${a}(?:(?!${S}${b.dot ? y : c}).)*?)`, E = s.dot ? "" : O, v = s.dot ? w : A;
|
|
2345
2341
|
let x = s.bash === !0 ? N(s) : C;
|
|
2346
2342
|
s.capture && (x = `(${x})`), typeof s.noext == "boolean" && (s.noextglob = s.noext);
|
|
2347
2343
|
const d = {
|
|
@@ -2401,7 +2397,7 @@ const Je = Ye, se = qe, {
|
|
|
2401
2397
|
L({ type: "paren", extglob: !0, value: h, output: j }), ye("parens");
|
|
2402
2398
|
};
|
|
2403
2399
|
if (s.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(t)) {
|
|
2404
|
-
let b = !1, j = t.replace(li, (g, D, B, W, J, Ze) => W === "\\" ? (b = !0, g) : W === "?" ? D ? D + W + (J ?
|
|
2400
|
+
let b = !1, j = t.replace(li, (g, D, B, W, J, Ze) => W === "\\" ? (b = !0, g) : W === "?" ? D ? D + W + (J ? w.repeat(J.length) : "") : Ze === 0 ? v + (J ? w.repeat(J.length) : "") : w.repeat(B.length) : W === "." ? c.repeat(B.length) : W === "*" ? D ? D + W + (J ? x : "") : x : D ? g : `\\${g}`);
|
|
2405
2401
|
return b === !0 && (s.unescape === !0 ? j = j.replace(/\\/g, "") : j = j.replace(/\\+/g, (g) => g.length % 2 === 0 ? "\\\\" : g ? "\\" : "")), j === t && s.contains === !0 ? (d.output = t, d) : (d.output = se.wrapOutput(j, d, e), d);
|
|
2406
2402
|
}
|
|
2407
2403
|
for (; !V(); ) {
|
|
@@ -2450,7 +2446,7 @@ const Je = Ye, se = qe, {
|
|
|
2450
2446
|
}
|
|
2451
2447
|
if (h === ")") {
|
|
2452
2448
|
if (d.parens === 0 && s.strictBrackets === !0)
|
|
2453
|
-
throw new SyntaxError(
|
|
2449
|
+
throw new SyntaxError(we("opening", "("));
|
|
2454
2450
|
const g = T[T.length - 1];
|
|
2455
2451
|
if (g && d.parens === g.parens + 1) {
|
|
2456
2452
|
Ss(T.pop());
|
|
@@ -2462,7 +2458,7 @@ const Je = Ye, se = qe, {
|
|
|
2462
2458
|
if (h === "[") {
|
|
2463
2459
|
if (s.nobracket === !0 || !ce().includes("]")) {
|
|
2464
2460
|
if (s.nobracket !== !0 && s.strictBrackets === !0)
|
|
2465
|
-
throw new SyntaxError(
|
|
2461
|
+
throw new SyntaxError(we("closing", "]"));
|
|
2466
2462
|
h = `\\${h}`;
|
|
2467
2463
|
} else
|
|
2468
2464
|
ke("brackets");
|
|
@@ -2476,7 +2472,7 @@ const Je = Ye, se = qe, {
|
|
|
2476
2472
|
}
|
|
2477
2473
|
if (d.brackets === 0) {
|
|
2478
2474
|
if (s.strictBrackets === !0)
|
|
2479
|
-
throw new SyntaxError(
|
|
2475
|
+
throw new SyntaxError(we("opening", "["));
|
|
2480
2476
|
L({ type: "text", value: h, output: `\\${h}` });
|
|
2481
2477
|
continue;
|
|
2482
2478
|
}
|
|
@@ -2575,7 +2571,7 @@ const Je = Ye, se = qe, {
|
|
|
2575
2571
|
L({ type: "qmark", value: h, output: A });
|
|
2576
2572
|
continue;
|
|
2577
2573
|
}
|
|
2578
|
-
L({ type: "qmark", value: h, output:
|
|
2574
|
+
L({ type: "qmark", value: h, output: w });
|
|
2579
2575
|
continue;
|
|
2580
2576
|
}
|
|
2581
2577
|
if (h === "!") {
|
|
@@ -2681,17 +2677,17 @@ const Je = Ye, se = qe, {
|
|
|
2681
2677
|
}
|
|
2682
2678
|
for (; d.brackets > 0; ) {
|
|
2683
2679
|
if (s.strictBrackets === !0)
|
|
2684
|
-
throw new SyntaxError(
|
|
2680
|
+
throw new SyntaxError(we("closing", "]"));
|
|
2685
2681
|
d.output = se.escapeLast(d.output, "["), ye("brackets");
|
|
2686
2682
|
}
|
|
2687
2683
|
for (; d.parens > 0; ) {
|
|
2688
2684
|
if (s.strictBrackets === !0)
|
|
2689
|
-
throw new SyntaxError(
|
|
2685
|
+
throw new SyntaxError(we("closing", ")"));
|
|
2690
2686
|
d.output = se.escapeLast(d.output, "("), ye("parens");
|
|
2691
2687
|
}
|
|
2692
2688
|
for (; d.braces > 0; ) {
|
|
2693
2689
|
if (s.strictBrackets === !0)
|
|
2694
|
-
throw new SyntaxError(
|
|
2690
|
+
throw new SyntaxError(we("closing", "}"));
|
|
2695
2691
|
d.output = se.escapeLast(d.output, "{"), ye("braces");
|
|
2696
2692
|
}
|
|
2697
2693
|
if (s.strictSlashes !== !0 && (f.type === "star" || f.type === "bracket") && L({ type: "maybe_slash", value: "", output: `${m}?` }), d.backtrack === !0) {
|
|
@@ -2701,7 +2697,7 @@ const Je = Ye, se = qe, {
|
|
|
2701
2697
|
}
|
|
2702
2698
|
return d;
|
|
2703
2699
|
};
|
|
2704
|
-
|
|
2700
|
+
vs.fastpaths = (t, e) => {
|
|
2705
2701
|
const s = { ...e }, n = typeof s.maxLength == "number" ? Math.min(Ve, s.maxLength) : Ve, i = t.length;
|
|
2706
2702
|
if (i > n)
|
|
2707
2703
|
throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);
|
|
@@ -2717,40 +2713,40 @@ ws.fastpaths = (t, e) => {
|
|
|
2717
2713
|
STAR: m,
|
|
2718
2714
|
START_ANCHOR: _
|
|
2719
2715
|
} = Je.globChars(s.windows), y = s.dot ? c : l, O = s.dot ? p : l, R = s.capture ? "" : "?:", $ = { negated: !1, prefix: "" };
|
|
2720
|
-
let
|
|
2721
|
-
s.capture && (
|
|
2722
|
-
const A = (E) => E.noglobstar === !0 ?
|
|
2716
|
+
let w = s.bash === !0 ? ".*?" : m;
|
|
2717
|
+
s.capture && (w = `(${w})`);
|
|
2718
|
+
const A = (E) => E.noglobstar === !0 ? w : `(${R}(?:(?!${_}${E.dot ? u : o}).)*?)`, C = (E) => {
|
|
2723
2719
|
switch (E) {
|
|
2724
2720
|
case "*":
|
|
2725
|
-
return `${y}${a}${
|
|
2721
|
+
return `${y}${a}${w}`;
|
|
2726
2722
|
case ".*":
|
|
2727
|
-
return `${o}${a}${
|
|
2723
|
+
return `${o}${a}${w}`;
|
|
2728
2724
|
case "*.*":
|
|
2729
|
-
return `${y}${
|
|
2725
|
+
return `${y}${w}${o}${a}${w}`;
|
|
2730
2726
|
case "*/*":
|
|
2731
|
-
return `${y}${
|
|
2727
|
+
return `${y}${w}${r}${a}${O}${w}`;
|
|
2732
2728
|
case "**":
|
|
2733
2729
|
return y + A(s);
|
|
2734
2730
|
case "**/*":
|
|
2735
|
-
return `(?:${y}${A(s)}${r})?${O}${a}${
|
|
2731
|
+
return `(?:${y}${A(s)}${r})?${O}${a}${w}`;
|
|
2736
2732
|
case "**/*.*":
|
|
2737
|
-
return `(?:${y}${A(s)}${r})?${O}${
|
|
2733
|
+
return `(?:${y}${A(s)}${r})?${O}${w}${o}${a}${w}`;
|
|
2738
2734
|
case "**/.*":
|
|
2739
|
-
return `(?:${y}${A(s)}${r})?${o}${a}${
|
|
2735
|
+
return `(?:${y}${A(s)}${r})?${o}${a}${w}`;
|
|
2740
2736
|
default: {
|
|
2741
|
-
const
|
|
2742
|
-
if (!
|
|
2737
|
+
const v = /^(.*?)\.(\w+)$/.exec(E);
|
|
2738
|
+
if (!v)
|
|
2743
2739
|
return;
|
|
2744
|
-
const x = C(
|
|
2745
|
-
return x ? x + o +
|
|
2740
|
+
const x = C(v[1]);
|
|
2741
|
+
return x ? x + o + v[2] : void 0;
|
|
2746
2742
|
}
|
|
2747
2743
|
}
|
|
2748
2744
|
}, S = se.removePrefix(t, $);
|
|
2749
2745
|
let N = C(S);
|
|
2750
2746
|
return N && s.strictSlashes !== !0 && (N += `${r}?`), N;
|
|
2751
2747
|
};
|
|
2752
|
-
var pi =
|
|
2753
|
-
const hi = ai,
|
|
2748
|
+
var pi = vs;
|
|
2749
|
+
const hi = ai, dt = pi, ws = qe, di = Ye, mi = (t) => t && typeof t == "object" && !Array.isArray(t), G = (t, e, s = !1) => {
|
|
2754
2750
|
if (Array.isArray(t)) {
|
|
2755
2751
|
const c = t.map((m) => G(m, e, s));
|
|
2756
2752
|
return (m) => {
|
|
@@ -2783,13 +2779,13 @@ G.test = (t, e, s, { glob: n, posix: i } = {}) => {
|
|
|
2783
2779
|
throw new TypeError("Expected input to be a string");
|
|
2784
2780
|
if (t === "")
|
|
2785
2781
|
return { isMatch: !1, output: "" };
|
|
2786
|
-
const o = s || {}, r = o.format || (i ?
|
|
2782
|
+
const o = s || {}, r = o.format || (i ? ws.toPosixSlashes : null);
|
|
2787
2783
|
let a = t === n, u = a && r ? r(t) : t;
|
|
2788
2784
|
return a === !1 && (u = r ? r(t) : t, a = u === n), (a === !1 || o.capture === !0) && (o.matchBase === !0 || o.basename === !0 ? a = G.matchBase(t, e, s, i) : a = e.exec(u)), { isMatch: !!a, match: a, output: u };
|
|
2789
2785
|
};
|
|
2790
|
-
G.matchBase = (t, e, s) => (e instanceof RegExp ? e : G.makeRe(e, s)).test(
|
|
2786
|
+
G.matchBase = (t, e, s) => (e instanceof RegExp ? e : G.makeRe(e, s)).test(ws.basename(t));
|
|
2791
2787
|
G.isMatch = (t, e, s) => G(e, s)(t);
|
|
2792
|
-
G.parse = (t, e) => Array.isArray(t) ? t.map((s) => G.parse(s, e)) :
|
|
2788
|
+
G.parse = (t, e) => Array.isArray(t) ? t.map((s) => G.parse(s, e)) : dt(t, { ...e, fastpaths: !1 });
|
|
2793
2789
|
G.scan = (t, e) => hi(t, e);
|
|
2794
2790
|
G.compileRe = (t, e, s = !1, n = !1) => {
|
|
2795
2791
|
if (s === !0)
|
|
@@ -2805,7 +2801,7 @@ G.makeRe = (t, e, s = !1, n = !1) => {
|
|
|
2805
2801
|
throw new TypeError("Expected a non-empty string");
|
|
2806
2802
|
const i = e || {};
|
|
2807
2803
|
let o = { negated: !1, fastpaths: !0 }, r = "", a;
|
|
2808
|
-
return t.startsWith("./") && (t = t.slice(2), r = o.prefix = "./"), i.fastpaths !== !1 && (t[0] === "." || t[0] === "*") && (a =
|
|
2804
|
+
return t.startsWith("./") && (t = t.slice(2), r = o.prefix = "./"), i.fastpaths !== !1 && (t[0] === "." || t[0] === "*") && (a = dt.fastpaths(t, e)), a === void 0 ? (o = dt(t, e), o.prefix = r + (o.prefix || "")) : o.output = a, G.compileRe(o, e, s, n);
|
|
2809
2805
|
};
|
|
2810
2806
|
G.toRegex = (t, e) => {
|
|
2811
2807
|
try {
|
|
@@ -2819,7 +2815,7 @@ G.toRegex = (t, e) => {
|
|
|
2819
2815
|
};
|
|
2820
2816
|
G.constants = di;
|
|
2821
2817
|
var yi = G, gi = yi;
|
|
2822
|
-
const _i = /* @__PURE__ */
|
|
2818
|
+
const _i = /* @__PURE__ */ mt(gi), Os = yt(fetch), bi = async (t, e) => {
|
|
2823
2819
|
const s = new URL(t);
|
|
2824
2820
|
s.pathname = s.pathname + (s.pathname.endsWith("/") ? "metapage.json" : "/metapage.json");
|
|
2825
2821
|
const i = await (await Os(s.href, {
|
|
@@ -2827,14 +2823,14 @@ const _i = /* @__PURE__ */ yt(gi), Os = gt(fetch), bi = async (t, e) => {
|
|
|
2827
2823
|
retries: 3,
|
|
2828
2824
|
retryDelay: 1e3
|
|
2829
2825
|
})).json();
|
|
2830
|
-
return await
|
|
2831
|
-
},
|
|
2826
|
+
return await ss(i, e || Le);
|
|
2827
|
+
}, vi = async (t, e) => {
|
|
2832
2828
|
if (t.startsWith("data:") || t.startsWith("https://docs.google.com"))
|
|
2833
2829
|
return;
|
|
2834
2830
|
const s = new URL(t);
|
|
2835
2831
|
if (s.origin.endsWith(".notion.site"))
|
|
2836
2832
|
return;
|
|
2837
|
-
let n =
|
|
2833
|
+
let n = Rt(t, "definition");
|
|
2838
2834
|
if (n != null && n.version)
|
|
2839
2835
|
return pt(n);
|
|
2840
2836
|
s.pathname.endsWith("metaframe.json") || (s.pathname = s.pathname + (s.pathname.endsWith("/") ? "metaframe.json" : "/metaframe.json"));
|
|
@@ -2847,13 +2843,13 @@ const _i = /* @__PURE__ */ yt(gi), Os = gt(fetch), bi = async (t, e) => {
|
|
|
2847
2843
|
if (i.status !== 200)
|
|
2848
2844
|
return;
|
|
2849
2845
|
const o = await i.json();
|
|
2850
|
-
return await
|
|
2846
|
+
return await ns(o, e || We);
|
|
2851
2847
|
} catch (i) {
|
|
2852
2848
|
console.error(`Error fetching metaframe definition from ${s.href}: ${i}`);
|
|
2853
2849
|
return;
|
|
2854
2850
|
}
|
|
2855
2851
|
}, Ji = (t) => t ? !(t != null && t.inputs && Object.keys(t.inputs).length > 0 || t != null && t.outputs && Object.keys(t.outputs).length > 0 || t != null && t.allow || t != null && t.metadata && Object.keys(t.metadata).length > 0) : !0;
|
|
2856
|
-
class
|
|
2852
|
+
class wi extends Ot.EventEmitter {
|
|
2857
2853
|
constructor(e, s, n, i, o, r = !1) {
|
|
2858
2854
|
if (super(), this.inputs = {}, this.outputs = {}, this._disposables = [], this._rpcListeners = [], this._loaded = !1, this._onLoaded = [], this._sendInputsAfterRegistration = !1, this._cachedEventInputsUpdate = {
|
|
2859
2855
|
iframeId: void 0,
|
|
@@ -2879,7 +2875,7 @@ class vi extends Rt.EventEmitter {
|
|
|
2879
2875
|
if ((_ = (m = (p = (c = this._metapage) == null ? void 0 : c._definition) == null ? void 0 : p.metaframes) == null ? void 0 : m[this.id]) != null && _.allow)
|
|
2880
2876
|
u._iframe.allow = this._metapage._definition.metaframes[this.id].allow, this._debug && this.log(`mf allow=${u._iframe.allow} from this._metapage?._definition`);
|
|
2881
2877
|
else {
|
|
2882
|
-
let y =
|
|
2878
|
+
let y = Rt(this.url, "definition");
|
|
2883
2879
|
if (y = y && (y != null && y.version) ? await pt(y) : void 0, !u._iframe)
|
|
2884
2880
|
return;
|
|
2885
2881
|
if (y != null && y.allow)
|
|
@@ -2912,7 +2908,7 @@ class vi extends Rt.EventEmitter {
|
|
|
2912
2908
|
if (this._definition)
|
|
2913
2909
|
return this._definition;
|
|
2914
2910
|
try {
|
|
2915
|
-
const s = await
|
|
2911
|
+
const s = await vi(this.url);
|
|
2916
2912
|
if (s)
|
|
2917
2913
|
return this._definition = s, this._definition;
|
|
2918
2914
|
} catch (s) {
|
|
@@ -2948,7 +2944,7 @@ Error: ${s != null && s.message ? s == null ? void 0 : s.message : s == null ? v
|
|
|
2948
2944
|
return this;
|
|
2949
2945
|
if (this.emit(I.Outputs, e), this._metapage.listenerCount(I.Outputs) > 0) {
|
|
2950
2946
|
var n = {};
|
|
2951
|
-
n[this.id] =
|
|
2947
|
+
n[this.id] = e, this._metapage.emit(I.Outputs, n);
|
|
2952
2948
|
}
|
|
2953
2949
|
}
|
|
2954
2950
|
onInputs(e) {
|
|
@@ -2986,7 +2982,7 @@ Error: ${s != null && s.message ? s == null ? void 0 : s.message : s == null ? v
|
|
|
2986
2982
|
state: {
|
|
2987
2983
|
inputs: this.inputs
|
|
2988
2984
|
},
|
|
2989
|
-
version:
|
|
2985
|
+
version: Wt
|
|
2990
2986
|
};
|
|
2991
2987
|
this.sendRpcInternal(me.SetupIframeServerResponse, e);
|
|
2992
2988
|
}
|
|
@@ -3031,7 +3027,7 @@ Error: ${s != null && s.message ? s == null ? void 0 : s.message : s == null ? v
|
|
|
3031
3027
|
}
|
|
3032
3028
|
logInternal(e) {
|
|
3033
3029
|
let s;
|
|
3034
|
-
typeof e == "string" ? s = e : typeof e == "string" ? s = e + "" : s = JSON.stringify(e),
|
|
3030
|
+
typeof e == "string" ? s = e : typeof e == "string" ? s = e + "" : s = JSON.stringify(e), At(`Metapage[${this._parentId}] Metaframe[${this.id}] ${s}`, this._color, this._consoleBackgroundColor);
|
|
3035
3031
|
}
|
|
3036
3032
|
sendRpcInternal(e, s) {
|
|
3037
3033
|
const n = {
|
|
@@ -3078,7 +3074,7 @@ class ee extends Hn {
|
|
|
3078
3074
|
return n.setDefinition(e);
|
|
3079
3075
|
}
|
|
3080
3076
|
constructor(e) {
|
|
3081
|
-
super(), this._state = ge, this._metaframes = M({}, (s) => s), this.debug =
|
|
3077
|
+
super(), this._state = ge, this._metaframes = M({}, (s) => s), this.debug = ht(), this._internalReceivedMessageCounter = 0, this._cachedInputLookupMap = M({}, (s) => s), this._inputMap = {}, this._id = e && e.id ? e.id : jn(), this._consoleBackgroundColor = e && e.color ? e.color : Ri, this.addPipe = this.addPipe.bind(this), this.dispose = this.dispose.bind(this), this.addMetaframe = this.addMetaframe.bind(this), this.getInputsFromOutput = this.getInputsFromOutput.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframeIds = this.getMetaframeIds.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframes = this.getMetaframes.bind(this), this.getState = this.getState.bind(this), this.getStateMetaframes = this.getStateMetaframes.bind(this), this.isValidJSONRpcMessage = this.isValidJSONRpcMessage.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.metaframeIds = this.metaframeIds.bind(this), this.metaframes = this.metaframes.bind(this), this.onMessage = this.onMessage.bind(this), this.onMessageJsonRpc = this.onMessageJsonRpc.bind(this), this.removeAll = this.removeAll.bind(this), this.removeMetaframe = this.removeMetaframe.bind(this), this.setDebugFromUrlParams = this.setDebugFromUrlParams.bind(this), this.setDefinition = this.setDefinition.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setOutputs = this.setOutputs.bind(this), this.onInputs = this.onInputs.bind(this), this.onOutputs = this.onOutputs.bind(this), this.onState = this.onState.bind(this), this.setMetaframeOutputs = this.setMetaframeOutputs.bind(this), this.setInputStateOnlyMetaframeInputValue = this.setInputStateOnlyMetaframeInputValue.bind(this), this.setInputStateOnlyMetaframeInputMap = this.setInputStateOnlyMetaframeInputMap.bind(this), this.setInputStateOnlyMetapageInstanceInputs = this.setInputStateOnlyMetapageInstanceInputs.bind(this), this.setOutputStateOnlyMetaframeInputValue = this.setOutputStateOnlyMetaframeInputValue.bind(this), this.setOutputStateOnlyMetaframeInputMap = this.setOutputStateOnlyMetaframeInputMap.bind(this), this.setOutputStateOnlyMetapageInstanceInputs = this.setOutputStateOnlyMetapageInstanceInputs.bind(this), this.setMetadata = this.setMetadata.bind(this), this.setMetaframeClientInputAndSentClientEvent = this.setMetaframeClientInputAndSentClientEvent.bind(this), this.setState = this.setState.bind(this), this.isDisposed = this.isDisposed.bind(this), this._emitDefinitionEvent = this._emitDefinitionEvent.bind(this), Xe().then(() => {
|
|
3082
3078
|
this.isDisposed() || (window.addEventListener("message", this.onMessage), this.log("Initialized"));
|
|
3083
3079
|
});
|
|
3084
3080
|
}
|
|
@@ -3204,7 +3200,7 @@ class ee extends Hn {
|
|
|
3204
3200
|
throw this.emitErrorMessage(`Existing metaframe for id=${e}`), `Existing metaframe for id=${e}`;
|
|
3205
3201
|
if (!s.url)
|
|
3206
3202
|
throw this.emitErrorMessage(`Metaframe definition missing url id=${e}`), `Metaframe definition missing url id=${e}`;
|
|
3207
|
-
var n = new
|
|
3203
|
+
var n = new wi(this, s.url, e, this._id, this._consoleBackgroundColor, this.debug).setMetapage(this);
|
|
3208
3204
|
return this._metaframes = M(this._metaframes, (i) => {
|
|
3209
3205
|
i[e] = n;
|
|
3210
3206
|
}), n.addListener(I.Error, (i) => {
|
|
@@ -3419,10 +3415,10 @@ class ee extends Hn {
|
|
|
3419
3415
|
logInternal(e, s, n) {
|
|
3420
3416
|
n = n || this._consoleBackgroundColor;
|
|
3421
3417
|
let i;
|
|
3422
|
-
typeof e == "string" ? i = e : typeof e == "number" ? i = e + "" : i = JSON.stringify(e), i = this._id ? `Metapage[${this._id}] ${i}` : i,
|
|
3418
|
+
typeof e == "string" ? i = e : typeof e == "number" ? i = e + "" : i = JSON.stringify(e), i = this._id ? `Metapage[${this._id}] ${i}` : i, At(i, s, n);
|
|
3423
3419
|
}
|
|
3424
3420
|
}
|
|
3425
|
-
ee.version =
|
|
3421
|
+
ee.version = Wt;
|
|
3426
3422
|
ee.DEFINITION = I.Definition;
|
|
3427
3423
|
ee.ERROR = I.Error;
|
|
3428
3424
|
ee.INPUTS = I.Inputs;
|
|
@@ -3431,7 +3427,7 @@ ee.OUTPUTS = I.Outputs;
|
|
|
3431
3427
|
ee.STATE = I.State;
|
|
3432
3428
|
ee.deserializeInputs = Ce;
|
|
3433
3429
|
ee.serializeInputs = Ke;
|
|
3434
|
-
function
|
|
3430
|
+
function It(t) {
|
|
3435
3431
|
return t.startsWith("data:") ? t.includes("type=metapage-divider") : !1;
|
|
3436
3432
|
}
|
|
3437
3433
|
function Si(t) {
|
|
@@ -3456,7 +3452,7 @@ function Si(t) {
|
|
|
3456
3452
|
x: 0,
|
|
3457
3453
|
y: o,
|
|
3458
3454
|
w: s.props.cols,
|
|
3459
|
-
h:
|
|
3455
|
+
h: It(e.metaframes[i].url) ? 1 : 3
|
|
3460
3456
|
});
|
|
3461
3457
|
}
|
|
3462
3458
|
});
|
|
@@ -3474,7 +3470,7 @@ const Ai = (t) => {
|
|
|
3474
3470
|
throw new Error("No valid layout found in metapage definition");
|
|
3475
3471
|
const n = /* @__PURE__ */ new Set(), i = s.map((m, _) => {
|
|
3476
3472
|
const y = t.metaframes[m.i];
|
|
3477
|
-
return y &&
|
|
3473
|
+
return y && It(y.url) ? { index: _, y: m.y, id: m.i } : null;
|
|
3478
3474
|
}).filter((m) => m !== null);
|
|
3479
3475
|
if (i.length > 0) {
|
|
3480
3476
|
const m = i.reduce((y, O) => O.y < y.y ? O : y), _ = ((p = s.find((y) => y.i === m.id)) == null ? void 0 : p.y) ?? 0;
|
|
@@ -3507,8 +3503,8 @@ async function Wi(t) {
|
|
|
3507
3503
|
r.debug = o.debug || !1;
|
|
3508
3504
|
try {
|
|
3509
3505
|
await r.setDefinition(JSON.parse(JSON.stringify(s)));
|
|
3510
|
-
} catch (
|
|
3511
|
-
throw r.dispose(), new Error(`Failed to set metapage definition: ${
|
|
3506
|
+
} catch (v) {
|
|
3507
|
+
throw r.dispose(), new Error(`Failed to set metapage definition: ${v}`);
|
|
3512
3508
|
}
|
|
3513
3509
|
const a = [];
|
|
3514
3510
|
n && a.push(r.addListenerReturnDisposer(I.Outputs, n));
|
|
@@ -3519,17 +3515,17 @@ async function Wi(t) {
|
|
|
3519
3515
|
if (c.length === 0)
|
|
3520
3516
|
return {
|
|
3521
3517
|
metapage: r,
|
|
3522
|
-
setInputs: (
|
|
3523
|
-
r.isDisposed() || r.setInputs(
|
|
3518
|
+
setInputs: (v) => {
|
|
3519
|
+
r.isDisposed() || r.setInputs(v);
|
|
3524
3520
|
},
|
|
3525
|
-
setOutputs: (
|
|
3526
|
-
r.isDisposed() || r.setOutputs(
|
|
3521
|
+
setOutputs: (v) => {
|
|
3522
|
+
r.isDisposed() || r.setOutputs(v);
|
|
3527
3523
|
},
|
|
3528
3524
|
dispose: () => {
|
|
3529
|
-
a.forEach((
|
|
3525
|
+
a.forEach((v) => v()), r.dispose();
|
|
3530
3526
|
}
|
|
3531
3527
|
};
|
|
3532
|
-
c.sort((
|
|
3528
|
+
c.sort((v, x) => v.y !== x.y ? v.y - x.y : v.x - x.x);
|
|
3533
3529
|
const _ = {
|
|
3534
3530
|
display: "grid",
|
|
3535
3531
|
gridTemplateColumns: "repeat(1, 1fr)",
|
|
@@ -3554,11 +3550,11 @@ async function Wi(t) {
|
|
|
3554
3550
|
const R = document.createElement("div");
|
|
3555
3551
|
Object.assign(R.style, _);
|
|
3556
3552
|
const $ = [];
|
|
3557
|
-
for (const
|
|
3558
|
-
const x = l.find((f) => f.i ===
|
|
3553
|
+
for (const v of m) {
|
|
3554
|
+
const x = l.find((f) => f.i === v);
|
|
3559
3555
|
if (!x)
|
|
3560
3556
|
continue;
|
|
3561
|
-
const d = r.getMetaframes()[
|
|
3557
|
+
const d = r.getMetaframes()[v], T = await d.iframe;
|
|
3562
3558
|
if (!d)
|
|
3563
3559
|
continue;
|
|
3564
3560
|
$.push(x);
|
|
@@ -3575,29 +3571,29 @@ async function Wi(t) {
|
|
|
3575
3571
|
}, Z = document.createElement("div");
|
|
3576
3572
|
Object.assign(Z.style, H), Z.appendChild(T), R.appendChild(Z);
|
|
3577
3573
|
}
|
|
3578
|
-
const
|
|
3579
|
-
Math.max(...$.map((
|
|
3574
|
+
const w = Math.max(...$.map((v) => v.x + v.w));
|
|
3575
|
+
Math.max(...$.map((v) => v.y + v.h)), R.style.gridTemplateColumns = `repeat(${Math.max(1, w)}, 1fr)`;
|
|
3580
3576
|
const A = document.createElement("div");
|
|
3581
3577
|
A.style.position = "absolute", A.style.top = "-9999px", A.style.left = "-9999px", A.style.width = "1px", A.style.height = "1px", A.style.overflow = "hidden", A.style.pointerEvents = "none";
|
|
3582
|
-
for (const
|
|
3583
|
-
const x = r.getMetaframes()[
|
|
3578
|
+
for (const v of Object.keys(r.getMetaframes()).filter((x) => p.has(x))) {
|
|
3579
|
+
const x = r.getMetaframes()[v];
|
|
3584
3580
|
if (!x)
|
|
3585
3581
|
continue;
|
|
3586
3582
|
const d = document.createElement("div");
|
|
3587
|
-
d.setAttribute("data-metaframe-id",
|
|
3583
|
+
d.setAttribute("data-metaframe-id", v), d.style.width = "100px", d.style.height = "100px";
|
|
3588
3584
|
let T;
|
|
3589
3585
|
x.iframe ? T = await x.iframe : (T = document.createElement("iframe"), T.src = x.url, T.style.border = "none", T.style.width = "100%", T.style.height = "100%"), d.appendChild(T), A.appendChild(d);
|
|
3590
3586
|
}
|
|
3591
3587
|
return O.appendChild(R), O.appendChild(A), i.appendChild(O), {
|
|
3592
3588
|
metapage: r,
|
|
3593
|
-
setInputs: (
|
|
3594
|
-
r.isDisposed() || r.setInputs(
|
|
3589
|
+
setInputs: (v) => {
|
|
3590
|
+
r.isDisposed() || r.setInputs(v);
|
|
3595
3591
|
},
|
|
3596
|
-
setOutputs: (
|
|
3597
|
-
r.isDisposed() || r.setOutputs(
|
|
3592
|
+
setOutputs: (v) => {
|
|
3593
|
+
r.isDisposed() || r.setOutputs(v);
|
|
3598
3594
|
},
|
|
3599
3595
|
dispose: () => {
|
|
3600
|
-
a.forEach((
|
|
3596
|
+
a.forEach((v) => v()), r.dispose(), O.parentNode && O.parentNode.removeChild(O);
|
|
3601
3597
|
}
|
|
3602
3598
|
};
|
|
3603
3599
|
}
|
|
@@ -3609,7 +3605,7 @@ const Ki = (t, e) => {
|
|
|
3609
3605
|
const i = /* @__PURE__ */ new Set(), o = n.map((l, c) => {
|
|
3610
3606
|
var m;
|
|
3611
3607
|
const p = (m = t == null ? void 0 : t.metaframes) == null ? void 0 : m[l.i];
|
|
3612
|
-
return p &&
|
|
3608
|
+
return p && It(p.url) ? { index: c, y: l.y, id: l.i } : null;
|
|
3613
3609
|
}).filter((l) => l !== null);
|
|
3614
3610
|
if (o.length > 0) {
|
|
3615
3611
|
const l = o.reduce((p, m) => m.y < p.y ? m : p), c = ((u = n.find((p) => p.i === l.id)) == null ? void 0 : u.y) ?? 0;
|
|
@@ -3654,52 +3650,52 @@ export {
|
|
|
3654
3650
|
F as MetaframeEvents,
|
|
3655
3651
|
ae as MetaframeLoadingState,
|
|
3656
3652
|
We as MetaframeVersionCurrent,
|
|
3657
|
-
|
|
3653
|
+
Ct as MetaframeVersionsAll,
|
|
3658
3654
|
ee as Metapage,
|
|
3659
3655
|
I as MetapageEvents,
|
|
3660
3656
|
xe as MetapageHashParams,
|
|
3661
|
-
|
|
3657
|
+
wi as MetapageIFrameRpcClient,
|
|
3662
3658
|
Hn as MetapageShared,
|
|
3663
3659
|
Le as MetapageVersionCurrent,
|
|
3664
|
-
|
|
3660
|
+
$t as MetapageVersionsAll,
|
|
3665
3661
|
Pi as PARSE_ERROR,
|
|
3666
3662
|
As as VERSION_METAFRAME,
|
|
3667
|
-
|
|
3663
|
+
Wt as VERSION_METAPAGE,
|
|
3668
3664
|
tn as convertMetaframeDefinitionToCurrentVersion,
|
|
3669
|
-
|
|
3665
|
+
ns as convertMetaframeDefinitionToVersion,
|
|
3670
3666
|
pt as convertMetaframeJsonToCurrentVersion,
|
|
3671
3667
|
Vs as convertMetapageDefinitionToCurrentVersion,
|
|
3672
|
-
|
|
3668
|
+
ss as convertMetapageDefinitionToVersion,
|
|
3673
3669
|
Ce as deserializeInputs,
|
|
3674
|
-
|
|
3670
|
+
St as generateId,
|
|
3675
3671
|
Bi as generateMetaframeId,
|
|
3676
3672
|
jn as generateMetapageId,
|
|
3677
3673
|
Fi as generateNonce,
|
|
3678
3674
|
Vi as getLibraryVersionMatching,
|
|
3679
3675
|
te as getMatchingMetaframeVersion,
|
|
3680
3676
|
he as getMatchingMetapageVersion,
|
|
3681
|
-
|
|
3677
|
+
vi as getMetaframeDefinitionFromUrl,
|
|
3682
3678
|
bi as getMetapageDefinitionFromUrl,
|
|
3683
3679
|
ji as getUrlParam,
|
|
3684
3680
|
Ui as getUrlParamDebug,
|
|
3685
3681
|
Ai as getVisibleGridLayoutData,
|
|
3686
3682
|
Un as hashCode,
|
|
3687
3683
|
Bn as intToRGB,
|
|
3688
|
-
|
|
3684
|
+
ht as isDebugFromUrlsParams,
|
|
3689
3685
|
Ji as isEmptyMetaframeDefinition,
|
|
3690
3686
|
Nn as isIframe,
|
|
3691
3687
|
Hi as isJsonRpcId,
|
|
3692
|
-
|
|
3688
|
+
It as isMetaframeDivider,
|
|
3693
3689
|
Ki as isMetaframeHidden,
|
|
3694
3690
|
tt as isPageLoaded,
|
|
3695
|
-
|
|
3691
|
+
At as log,
|
|
3696
3692
|
Oi as matchPipe,
|
|
3697
3693
|
Ge as merge,
|
|
3698
3694
|
zi as metapageAllSha256Hash,
|
|
3699
3695
|
Gi as metapageOnlyEssentailSha256Hash,
|
|
3700
3696
|
Xe as pageLoaded,
|
|
3701
3697
|
Li as possiblyDeserializeDatarefToFile,
|
|
3702
|
-
|
|
3698
|
+
is as possiblyDeserializeDatarefToValue,
|
|
3703
3699
|
dn as possiblySerializeValueToDataref,
|
|
3704
3700
|
Wi as renderMetapage,
|
|
3705
3701
|
Ke as serializeInputs,
|