@persona/relay 0.1.4 → 0.1.6
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.d.ts +2 -1
- package/dist/relay.cjs +2 -2
- package/dist/relay.cjs.map +1 -1
- package/dist/relay.js +182 -178
- package/dist/relay.js.map +1 -1
- package/dist/relay.umd.js +3 -3
- package/dist/relay.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/relay.js
CHANGED
|
@@ -95,10 +95,10 @@ function fn(e, {
|
|
|
95
95
|
host: v
|
|
96
96
|
}) {
|
|
97
97
|
const O = (p) => {
|
|
98
|
-
const
|
|
98
|
+
const h = Fr(v ?? "production");
|
|
99
99
|
if (p.origin !== "")
|
|
100
100
|
try {
|
|
101
|
-
const M = jr(new URL(p.origin).host), A = jr(new URL(
|
|
101
|
+
const M = jr(new URL(p.origin).host), A = jr(new URL(h).host);
|
|
102
102
|
if (M !== A)
|
|
103
103
|
return;
|
|
104
104
|
} catch {
|
|
@@ -169,7 +169,7 @@ var Ue, Vr;
|
|
|
169
169
|
function _e() {
|
|
170
170
|
if (Vr) return Ue;
|
|
171
171
|
Vr = 1;
|
|
172
|
-
var e = typeof Map == "function" && Map.prototype, i = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, u = e && i && typeof i.get == "function" ? i.get : null, l = e && Map.prototype.forEach, g = typeof Set == "function" && Set.prototype, w = Object.getOwnPropertyDescriptor && g ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, R = g && w && typeof w.get == "function" ? w.get : null, v = g && Set.prototype.forEach, O = typeof WeakMap == "function" && WeakMap.prototype, p = O ? WeakMap.prototype.has : null,
|
|
172
|
+
var e = typeof Map == "function" && Map.prototype, i = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, u = e && i && typeof i.get == "function" ? i.get : null, l = e && Map.prototype.forEach, g = typeof Set == "function" && Set.prototype, w = Object.getOwnPropertyDescriptor && g ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, R = g && w && typeof w.get == "function" ? w.get : null, v = g && Set.prototype.forEach, O = typeof WeakMap == "function" && WeakMap.prototype, p = O ? WeakMap.prototype.has : null, h = typeof WeakSet == "function" && WeakSet.prototype, y = h ? WeakSet.prototype.has : null, M = typeof WeakRef == "function" && WeakRef.prototype, A = M ? WeakRef.prototype.deref : null, a = Boolean.prototype.valueOf, f = Object.prototype.toString, o = Function.prototype.toString, I = String.prototype.match, m = String.prototype.slice, S = String.prototype.replace, D = String.prototype.toUpperCase, P = String.prototype.toLowerCase, b = RegExp.prototype.test, n = Array.prototype.concat, c = Array.prototype.join, d = Array.prototype.slice, E = Math.floor, _ = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, x = Object.getOwnPropertySymbols, U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, F = typeof Symbol == "function" && typeof Symbol.iterator == "object", W = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === F || !0) ? Symbol.toStringTag : null, $ = Object.prototype.propertyIsEnumerable, G = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
|
|
173
173
|
return r.__proto__;
|
|
174
174
|
} : null);
|
|
175
175
|
function s(r, t) {
|
|
@@ -179,8 +179,8 @@ function _e() {
|
|
|
179
179
|
if (typeof r == "number") {
|
|
180
180
|
var B = r < 0 ? -E(-r) : E(r);
|
|
181
181
|
if (B !== r) {
|
|
182
|
-
var
|
|
183
|
-
return S.call(
|
|
182
|
+
var z = String(B), q = m.call(t, z.length + 1);
|
|
183
|
+
return S.call(z, N, "$&_") + "." + S.call(S.call(q, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
return S.call(t, N, "$&_");
|
|
@@ -194,7 +194,7 @@ function _e() {
|
|
|
194
194
|
double: /(["\\])/g,
|
|
195
195
|
single: /(['\\])/g
|
|
196
196
|
};
|
|
197
|
-
Ue = function r(t, N, B,
|
|
197
|
+
Ue = function r(t, N, B, z) {
|
|
198
198
|
var q = N || {};
|
|
199
199
|
if (J(q, "quoteStyle") && !J(ie, q.quoteStyle))
|
|
200
200
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -230,18 +230,18 @@ function _e() {
|
|
|
230
230
|
if (typeof B > "u" && (B = 0), B >= Fe && Fe > 0 && typeof t == "object")
|
|
231
231
|
return fe(t) ? "[Array]" : "[Object]";
|
|
232
232
|
var we = en(q, B);
|
|
233
|
-
if (typeof
|
|
234
|
-
|
|
235
|
-
else if (ce(
|
|
233
|
+
if (typeof z > "u")
|
|
234
|
+
z = [];
|
|
235
|
+
else if (ce(z, t) >= 0)
|
|
236
236
|
return "[Circular]";
|
|
237
237
|
function ne(Se, Ie, tn) {
|
|
238
|
-
if (Ie && (
|
|
238
|
+
if (Ie && (z = d.call(z), z.push(Ie)), tn) {
|
|
239
239
|
var Hr = {
|
|
240
240
|
depth: q.depth
|
|
241
241
|
};
|
|
242
|
-
return J(q, "quoteStyle") && (Hr.quoteStyle = q.quoteStyle), r(Se, Hr, B + 1,
|
|
242
|
+
return J(q, "quoteStyle") && (Hr.quoteStyle = q.quoteStyle), r(Se, Hr, B + 1, z);
|
|
243
243
|
}
|
|
244
|
-
return r(Se, q, B + 1,
|
|
244
|
+
return r(Se, q, B + 1, z);
|
|
245
245
|
}
|
|
246
246
|
if (typeof t == "function" && !j(t)) {
|
|
247
247
|
var Tr = ve(t), Br = Re(t, ne);
|
|
@@ -273,16 +273,16 @@ function _e() {
|
|
|
273
273
|
return t.inspect();
|
|
274
274
|
}
|
|
275
275
|
if (te(t)) {
|
|
276
|
-
var
|
|
276
|
+
var zr = [];
|
|
277
277
|
return l && l.call(t, function(Se, Ie) {
|
|
278
|
-
|
|
279
|
-
}), Lr("Map", u.call(t),
|
|
278
|
+
zr.push(ne(Ie, t, !0) + " => " + ne(Se, t));
|
|
279
|
+
}), Lr("Map", u.call(t), zr, we);
|
|
280
280
|
}
|
|
281
281
|
if (ge(t)) {
|
|
282
|
-
var
|
|
282
|
+
var Wr = [];
|
|
283
283
|
return v && v.call(t, function(Se) {
|
|
284
|
-
|
|
285
|
-
}), Lr("Set", R.call(t),
|
|
284
|
+
Wr.push(ne(Se, t));
|
|
285
|
+
}), Lr("Set", R.call(t), Wr, we);
|
|
286
286
|
}
|
|
287
287
|
if (he(t))
|
|
288
288
|
return qe("WeakMap");
|
|
@@ -303,20 +303,20 @@ function _e() {
|
|
|
303
303
|
if (typeof globalThis < "u" && t === globalThis || typeof Kr < "u" && t === Kr)
|
|
304
304
|
return "{ [object globalThis] }";
|
|
305
305
|
if (!ue(t) && !j(t)) {
|
|
306
|
-
var Ne = Re(t, ne), kr = G ? G(t) === Object.prototype : t instanceof Object || t.constructor === Object, Le = t instanceof Object ? "" : "null prototype", Gr = !kr &&
|
|
306
|
+
var Ne = Re(t, ne), kr = G ? G(t) === Object.prototype : t instanceof Object || t.constructor === Object, Le = t instanceof Object ? "" : "null prototype", Gr = !kr && W && Object(t) === t && W in t ? m.call(re(t), 8, -1) : Le ? "Object" : "", rn = kr || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", Te = rn + (Gr || Le ? "[" + c.call(n.call([], Gr || [], Le || []), ": ") + "] " : "");
|
|
307
307
|
return Ne.length === 0 ? Te + "{}" : we ? Te + "{" + Me(Ne, we) + "}" : Te + "{ " + c.call(Ne, ", ") + " }";
|
|
308
308
|
}
|
|
309
309
|
return String(t);
|
|
310
310
|
};
|
|
311
311
|
function le(r, t, N) {
|
|
312
|
-
var B = N.quoteStyle || t,
|
|
313
|
-
return
|
|
312
|
+
var B = N.quoteStyle || t, z = ie[B];
|
|
313
|
+
return z + r + z;
|
|
314
314
|
}
|
|
315
315
|
function ae(r) {
|
|
316
316
|
return S.call(String(r), /"/g, """);
|
|
317
317
|
}
|
|
318
318
|
function Z(r) {
|
|
319
|
-
return !
|
|
319
|
+
return !W || !(typeof r == "object" && (W in r || typeof r[W] < "u"));
|
|
320
320
|
}
|
|
321
321
|
function fe(r) {
|
|
322
322
|
return re(r) === "[object Array]" && Z(r);
|
|
@@ -459,11 +459,11 @@ function _e() {
|
|
|
459
459
|
function Nr(r, t) {
|
|
460
460
|
if (r.length > t.maxStringLength) {
|
|
461
461
|
var N = r.length - t.maxStringLength, B = "... " + N + " more character" + (N > 1 ? "s" : "");
|
|
462
|
-
return Nr(
|
|
462
|
+
return Nr(m.call(r, 0, t.maxStringLength), t) + B;
|
|
463
463
|
}
|
|
464
|
-
var
|
|
465
|
-
|
|
466
|
-
var q = S.call(S.call(r,
|
|
464
|
+
var z = oe[t.quoteStyle || "single"];
|
|
465
|
+
z.lastIndex = 0;
|
|
466
|
+
var q = S.call(S.call(r, z, "\\$1"), /[\x00-\x1f]/g, Xt);
|
|
467
467
|
return le(q, "single", t);
|
|
468
468
|
}
|
|
469
469
|
function Xt(r) {
|
|
@@ -483,8 +483,8 @@ function _e() {
|
|
|
483
483
|
return r + " { ? }";
|
|
484
484
|
}
|
|
485
485
|
function Lr(r, t, N, B) {
|
|
486
|
-
var
|
|
487
|
-
return r + " (" + t + ") {" +
|
|
486
|
+
var z = B ? Me(N, B) : c.call(N, ", ");
|
|
487
|
+
return r + " (" + t + ") {" + z + "}";
|
|
488
488
|
}
|
|
489
489
|
function Zt(r) {
|
|
490
490
|
for (var t = 0; t < r.length; t++)
|
|
@@ -518,8 +518,8 @@ function _e() {
|
|
|
518
518
|
var N = fe(r), B = [];
|
|
519
519
|
if (N) {
|
|
520
520
|
B.length = r.length;
|
|
521
|
-
for (var
|
|
522
|
-
B[
|
|
521
|
+
for (var z = 0; z < r.length; z++)
|
|
522
|
+
B[z] = J(r, z) ? t(r[z], r) : "";
|
|
523
523
|
}
|
|
524
524
|
var q = typeof x == "function" ? x(r) : [], se;
|
|
525
525
|
if (F) {
|
|
@@ -536,14 +536,14 @@ function _e() {
|
|
|
536
536
|
}
|
|
537
537
|
return Ue;
|
|
538
538
|
}
|
|
539
|
-
var
|
|
539
|
+
var ze, Jr;
|
|
540
540
|
function yn() {
|
|
541
|
-
if (Jr) return
|
|
541
|
+
if (Jr) return ze;
|
|
542
542
|
Jr = 1;
|
|
543
543
|
var e = /* @__PURE__ */ _e(), i = /* @__PURE__ */ be(), u = function(v, O, p) {
|
|
544
|
-
for (var
|
|
544
|
+
for (var h = v, y; (y = h.next) != null; h = y)
|
|
545
545
|
if (y.key === O)
|
|
546
|
-
return
|
|
546
|
+
return h.next = y.next, p || (y.next = /** @type {NonNullable<typeof list.next>} */
|
|
547
547
|
v.next, v.next = y), y;
|
|
548
548
|
}, l = function(v, O) {
|
|
549
549
|
if (v) {
|
|
@@ -551,8 +551,8 @@ function yn() {
|
|
|
551
551
|
return p && p.value;
|
|
552
552
|
}
|
|
553
553
|
}, g = function(v, O, p) {
|
|
554
|
-
var
|
|
555
|
-
|
|
554
|
+
var h = u(v, O);
|
|
555
|
+
h ? h.value = p : v.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
|
|
556
556
|
{
|
|
557
557
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
558
558
|
key: O,
|
|
@@ -565,39 +565,39 @@ function yn() {
|
|
|
565
565
|
if (v)
|
|
566
566
|
return u(v, O, !0);
|
|
567
567
|
};
|
|
568
|
-
return
|
|
568
|
+
return ze = function() {
|
|
569
569
|
var O, p = {
|
|
570
|
-
assert: function(
|
|
571
|
-
if (!p.has(
|
|
572
|
-
throw new i("Side channel does not contain " + e(
|
|
570
|
+
assert: function(h) {
|
|
571
|
+
if (!p.has(h))
|
|
572
|
+
throw new i("Side channel does not contain " + e(h));
|
|
573
573
|
},
|
|
574
|
-
delete: function(
|
|
575
|
-
var y = R(O,
|
|
574
|
+
delete: function(h) {
|
|
575
|
+
var y = R(O, h);
|
|
576
576
|
return y && O && !O.next && (O = void 0), !!y;
|
|
577
577
|
},
|
|
578
|
-
get: function(
|
|
579
|
-
return l(O,
|
|
578
|
+
get: function(h) {
|
|
579
|
+
return l(O, h);
|
|
580
580
|
},
|
|
581
|
-
has: function(
|
|
582
|
-
return w(O,
|
|
581
|
+
has: function(h) {
|
|
582
|
+
return w(O, h);
|
|
583
583
|
},
|
|
584
|
-
set: function(
|
|
584
|
+
set: function(h, y) {
|
|
585
585
|
O || (O = {
|
|
586
586
|
next: void 0
|
|
587
587
|
}), g(
|
|
588
588
|
/** @type {NonNullable<typeof $o>} */
|
|
589
589
|
O,
|
|
590
|
-
|
|
590
|
+
h,
|
|
591
591
|
y
|
|
592
592
|
);
|
|
593
593
|
}
|
|
594
594
|
};
|
|
595
595
|
return p;
|
|
596
|
-
},
|
|
596
|
+
}, ze;
|
|
597
597
|
}
|
|
598
|
-
var
|
|
598
|
+
var We, Yr;
|
|
599
599
|
function Ut() {
|
|
600
|
-
return Yr || (Yr = 1,
|
|
600
|
+
return Yr || (Yr = 1, We = Object), We;
|
|
601
601
|
}
|
|
602
602
|
var ke, Xr;
|
|
603
603
|
function dn() {
|
|
@@ -667,7 +667,7 @@ function _n() {
|
|
|
667
667
|
return pt || (pt = 1, nr = Object.getOwnPropertyDescriptor), nr;
|
|
668
668
|
}
|
|
669
669
|
var ar, yt;
|
|
670
|
-
function
|
|
670
|
+
function zt() {
|
|
671
671
|
if (yt) return ar;
|
|
672
672
|
yt = 1;
|
|
673
673
|
var e = /* @__PURE__ */ _n();
|
|
@@ -732,7 +732,7 @@ function Mn() {
|
|
|
732
732
|
}, lr;
|
|
733
733
|
}
|
|
734
734
|
var fr, mt;
|
|
735
|
-
function
|
|
735
|
+
function Wt() {
|
|
736
736
|
return mt || (mt = 1, fr = typeof Reflect < "u" && Reflect.getPrototypeOf || null), fr;
|
|
737
737
|
}
|
|
738
738
|
var ur, gt;
|
|
@@ -747,37 +747,37 @@ function Fn() {
|
|
|
747
747
|
if (wt) return cr;
|
|
748
748
|
wt = 1;
|
|
749
749
|
var e = "Function.prototype.bind called on incompatible ", i = Object.prototype.toString, u = Math.max, l = "[object Function]", g = function(O, p) {
|
|
750
|
-
for (var
|
|
751
|
-
|
|
750
|
+
for (var h = [], y = 0; y < O.length; y += 1)
|
|
751
|
+
h[y] = O[y];
|
|
752
752
|
for (var M = 0; M < p.length; M += 1)
|
|
753
|
-
|
|
754
|
-
return
|
|
753
|
+
h[M + O.length] = p[M];
|
|
754
|
+
return h;
|
|
755
755
|
}, w = function(O, p) {
|
|
756
|
-
for (var
|
|
757
|
-
|
|
758
|
-
return
|
|
756
|
+
for (var h = [], y = p, M = 0; y < O.length; y += 1, M += 1)
|
|
757
|
+
h[M] = O[y];
|
|
758
|
+
return h;
|
|
759
759
|
}, R = function(v, O) {
|
|
760
|
-
for (var p = "",
|
|
761
|
-
p += v[
|
|
760
|
+
for (var p = "", h = 0; h < v.length; h += 1)
|
|
761
|
+
p += v[h], h + 1 < v.length && (p += O);
|
|
762
762
|
return p;
|
|
763
763
|
};
|
|
764
764
|
return cr = function(O) {
|
|
765
765
|
var p = this;
|
|
766
766
|
if (typeof p != "function" || i.apply(p) !== l)
|
|
767
767
|
throw new TypeError(e + p);
|
|
768
|
-
for (var
|
|
768
|
+
for (var h = w(arguments, 1), y, M = function() {
|
|
769
769
|
if (this instanceof y) {
|
|
770
770
|
var I = p.apply(
|
|
771
771
|
this,
|
|
772
|
-
g(
|
|
772
|
+
g(h, arguments)
|
|
773
773
|
);
|
|
774
774
|
return Object(I) === I ? I : this;
|
|
775
775
|
}
|
|
776
776
|
return p.apply(
|
|
777
777
|
O,
|
|
778
|
-
g(
|
|
778
|
+
g(h, arguments)
|
|
779
779
|
);
|
|
780
|
-
}, A = u(0, p.length -
|
|
780
|
+
}, A = u(0, p.length - h.length), a = [], f = 0; f < A; f++)
|
|
781
781
|
a[f] = "$" + f;
|
|
782
782
|
if (y = Function("binder", "return function (" + R(a, ",") + "){ return binder.apply(this,arguments); }")(M), p.prototype) {
|
|
783
783
|
var o = function() {
|
|
@@ -828,7 +828,7 @@ var mr, Pt;
|
|
|
828
828
|
function $n() {
|
|
829
829
|
if (Pt) return mr;
|
|
830
830
|
Pt = 1;
|
|
831
|
-
var e = Ht(), i = /* @__PURE__ */
|
|
831
|
+
var e = Ht(), i = /* @__PURE__ */ zt(), u;
|
|
832
832
|
try {
|
|
833
833
|
u = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
834
834
|
[].__proto__ === Array.prototype;
|
|
@@ -852,7 +852,7 @@ var gr, It;
|
|
|
852
852
|
function Nn() {
|
|
853
853
|
if (It) return gr;
|
|
854
854
|
It = 1;
|
|
855
|
-
var e =
|
|
855
|
+
var e = Wt(), i = kt(), u = /* @__PURE__ */ $n();
|
|
856
856
|
return gr = e ? function(g) {
|
|
857
857
|
return e(g);
|
|
858
858
|
} : i ? function(g) {
|
|
@@ -874,24 +874,24 @@ var Sr, xt;
|
|
|
874
874
|
function Cr() {
|
|
875
875
|
if (xt) return Sr;
|
|
876
876
|
xt = 1;
|
|
877
|
-
var e, i = /* @__PURE__ */ Ut(), u = /* @__PURE__ */ dn(), l = /* @__PURE__ */ vn(), g = /* @__PURE__ */ hn(), w = /* @__PURE__ */ mn(), R = /* @__PURE__ */ gn(), v = /* @__PURE__ */ be(), O = /* @__PURE__ */ wn(), p = /* @__PURE__ */ Sn(),
|
|
877
|
+
var e, i = /* @__PURE__ */ Ut(), u = /* @__PURE__ */ dn(), l = /* @__PURE__ */ vn(), g = /* @__PURE__ */ hn(), w = /* @__PURE__ */ mn(), R = /* @__PURE__ */ gn(), v = /* @__PURE__ */ be(), O = /* @__PURE__ */ wn(), p = /* @__PURE__ */ Sn(), h = /* @__PURE__ */ bn(), y = /* @__PURE__ */ En(), M = /* @__PURE__ */ On(), A = /* @__PURE__ */ An(), a = /* @__PURE__ */ Rn(), f = /* @__PURE__ */ In(), o = Function, I = function(j) {
|
|
878
878
|
try {
|
|
879
879
|
return o('"use strict"; return (' + j + ").constructor;")();
|
|
880
880
|
} catch {
|
|
881
881
|
}
|
|
882
|
-
},
|
|
882
|
+
}, m = /* @__PURE__ */ zt(), S = /* @__PURE__ */ xn(), D = function() {
|
|
883
883
|
throw new v();
|
|
884
|
-
}, P =
|
|
884
|
+
}, P = m ? (function() {
|
|
885
885
|
try {
|
|
886
886
|
return arguments.callee, D;
|
|
887
887
|
} catch {
|
|
888
888
|
try {
|
|
889
|
-
return
|
|
889
|
+
return m(arguments, "callee").get;
|
|
890
890
|
} catch {
|
|
891
891
|
return D;
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
|
-
})() : D, b = Mn()(), n = Nn(), c = kt(), d =
|
|
894
|
+
})() : D, b = Mn()(), n = Nn(), c = kt(), d = Wt(), E = Gt(), _ = Dr(), x = {}, U = typeof Uint8Array > "u" || !n ? e : n(Uint8Array), F = {
|
|
895
895
|
__proto__: null,
|
|
896
896
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
897
897
|
"%Array%": Array,
|
|
@@ -935,7 +935,7 @@ function Cr() {
|
|
|
935
935
|
"%Math%": Math,
|
|
936
936
|
"%Number%": Number,
|
|
937
937
|
"%Object%": i,
|
|
938
|
-
"%Object.getOwnPropertyDescriptor%":
|
|
938
|
+
"%Object.getOwnPropertyDescriptor%": m,
|
|
939
939
|
"%parseFloat%": parseFloat,
|
|
940
940
|
"%parseInt%": parseInt,
|
|
941
941
|
"%Promise%": typeof Promise > "u" ? e : Promise,
|
|
@@ -967,7 +967,7 @@ function Cr() {
|
|
|
967
967
|
"%Object.defineProperty%": S,
|
|
968
968
|
"%Object.getPrototypeOf%": c,
|
|
969
969
|
"%Math.abs%": p,
|
|
970
|
-
"%Math.floor%":
|
|
970
|
+
"%Math.floor%": h,
|
|
971
971
|
"%Math.max%": y,
|
|
972
972
|
"%Math.min%": M,
|
|
973
973
|
"%Math.pow%": A,
|
|
@@ -979,8 +979,8 @@ function Cr() {
|
|
|
979
979
|
try {
|
|
980
980
|
null.error;
|
|
981
981
|
} catch (j) {
|
|
982
|
-
var
|
|
983
|
-
F["%Error.prototype%"] =
|
|
982
|
+
var W = n(n(j));
|
|
983
|
+
F["%Error.prototype%"] = W;
|
|
984
984
|
}
|
|
985
985
|
var $ = function j(C) {
|
|
986
986
|
var k;
|
|
@@ -1096,8 +1096,8 @@ function Cr() {
|
|
|
1096
1096
|
throw new v("base intrinsic for " + C + " exists, but the property is not available.");
|
|
1097
1097
|
return;
|
|
1098
1098
|
}
|
|
1099
|
-
if (
|
|
1100
|
-
var ge =
|
|
1099
|
+
if (m && ve + 1 >= T.length) {
|
|
1100
|
+
var ge = m(V, te);
|
|
1101
1101
|
ce = !!ge, ce && "get" in ge && !("originalValue" in ge.get) ? V = ge.get : V = V[te];
|
|
1102
1102
|
} else
|
|
1103
1103
|
ce = L(V, te), V = V[te];
|
|
@@ -1211,8 +1211,8 @@ function Qt() {
|
|
|
1211
1211
|
has: function(p) {
|
|
1212
1212
|
return !!v && v.has(p);
|
|
1213
1213
|
},
|
|
1214
|
-
set: function(p,
|
|
1215
|
-
v || (v = w()), v.set(p,
|
|
1214
|
+
set: function(p, h) {
|
|
1215
|
+
v || (v = w()), v.set(p, h);
|
|
1216
1216
|
}
|
|
1217
1217
|
};
|
|
1218
1218
|
return O;
|
|
@@ -1256,7 +1256,7 @@ function Vt() {
|
|
|
1256
1256
|
for (var b = [], n = 0; n < 256; ++n)
|
|
1257
1257
|
b[b.length] = "%" + ((n < 16 ? "0" : "") + n.toString(16)).toUpperCase();
|
|
1258
1258
|
return b;
|
|
1259
|
-
})(),
|
|
1259
|
+
})(), h = function(n) {
|
|
1260
1260
|
for (; n.length > 1; ) {
|
|
1261
1261
|
var c = n.pop(), d = c.obj[c.prop];
|
|
1262
1262
|
if (l(d)) {
|
|
@@ -1294,8 +1294,8 @@ function Vt() {
|
|
|
1294
1294
|
if (!n || typeof n != "object") {
|
|
1295
1295
|
if (R(c)) {
|
|
1296
1296
|
for (var x = Object.keys(c), U = d && d.plainObjects ? { __proto__: null, 0: n } : { 0: n }, F = 0; F < x.length; F++) {
|
|
1297
|
-
var
|
|
1298
|
-
U[
|
|
1297
|
+
var W = parseInt(x[F], 10);
|
|
1298
|
+
U[W + 1] = c[x[F]];
|
|
1299
1299
|
}
|
|
1300
1300
|
return w(U, v(c) + 1);
|
|
1301
1301
|
}
|
|
@@ -1339,10 +1339,10 @@ function Vt() {
|
|
|
1339
1339
|
return "%26%23" + parseInt(L.slice(2), 16) + "%3B";
|
|
1340
1340
|
});
|
|
1341
1341
|
for (var U = "", F = 0; F < x.length; F += f) {
|
|
1342
|
-
for (var
|
|
1343
|
-
var s =
|
|
1342
|
+
for (var W = x.length >= f ? x.slice(F, F + f) : x, $ = [], G = 0; G < W.length; ++G) {
|
|
1343
|
+
var s = W.charCodeAt(G);
|
|
1344
1344
|
if (s === 45 || s === 46 || s === 95 || s === 126 || s >= 48 && s <= 57 || s >= 65 && s <= 90 || s >= 97 && s <= 122 || _ === e.RFC1738 && (s === 40 || s === 41)) {
|
|
1345
|
-
$[$.length] =
|
|
1345
|
+
$[$.length] = W.charAt(G);
|
|
1346
1346
|
continue;
|
|
1347
1347
|
}
|
|
1348
1348
|
if (s < 128) {
|
|
@@ -1357,7 +1357,7 @@ function Vt() {
|
|
|
1357
1357
|
$[$.length] = p[224 | s >> 12] + p[128 | s >> 6 & 63] + p[128 | s & 63];
|
|
1358
1358
|
continue;
|
|
1359
1359
|
}
|
|
1360
|
-
G += 1, s = 65536 + ((s & 1023) << 10 |
|
|
1360
|
+
G += 1, s = 65536 + ((s & 1023) << 10 | W.charCodeAt(G) & 1023), $[$.length] = p[240 | s >> 18] + p[128 | s >> 12 & 63] + p[128 | s >> 6 & 63] + p[128 | s & 63];
|
|
1361
1361
|
}
|
|
1362
1362
|
U += $.join("");
|
|
1363
1363
|
}
|
|
@@ -1365,11 +1365,11 @@ function Vt() {
|
|
|
1365
1365
|
}, I = function(n) {
|
|
1366
1366
|
for (var c = [{ obj: { o: n }, prop: "o" }], d = [], E = 0; E < c.length; ++E)
|
|
1367
1367
|
for (var _ = c[E], x = _.obj[_.prop], U = Object.keys(x), F = 0; F < U.length; ++F) {
|
|
1368
|
-
var
|
|
1369
|
-
typeof $ == "object" && $ !== null && d.indexOf($) === -1 && (c[c.length] = { obj: x, prop:
|
|
1368
|
+
var W = U[F], $ = x[W];
|
|
1369
|
+
typeof $ == "object" && $ !== null && d.indexOf($) === -1 && (c[c.length] = { obj: x, prop: W }, d[d.length] = $);
|
|
1370
1370
|
}
|
|
1371
|
-
return
|
|
1372
|
-
},
|
|
1371
|
+
return h(c), n;
|
|
1372
|
+
}, m = function(n) {
|
|
1373
1373
|
return Object.prototype.toString.call(n) === "[object RegExp]";
|
|
1374
1374
|
}, S = function(n) {
|
|
1375
1375
|
return !n || typeof n != "object" ? !1 : !!(n.constructor && n.constructor.isBuffer && n.constructor.isBuffer(n));
|
|
@@ -1397,7 +1397,7 @@ function Vt() {
|
|
|
1397
1397
|
encode: o,
|
|
1398
1398
|
isBuffer: S,
|
|
1399
1399
|
isOverflow: R,
|
|
1400
|
-
isRegExp:
|
|
1400
|
+
isRegExp: m,
|
|
1401
1401
|
markOverflow: w,
|
|
1402
1402
|
maybeMap: P,
|
|
1403
1403
|
merge: M
|
|
@@ -1420,7 +1420,7 @@ function Bn() {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
}, w = Array.isArray, R = Array.prototype.push, v = function(f, o) {
|
|
1422
1422
|
R.apply(f, w(o) ? o : [o]);
|
|
1423
|
-
}, O = Date.prototype.toISOString, p = u.default,
|
|
1423
|
+
}, O = Date.prototype.toISOString, p = u.default, h = {
|
|
1424
1424
|
addQueryPrefix: !1,
|
|
1425
1425
|
allowDots: !1,
|
|
1426
1426
|
allowEmptyArrays: !1,
|
|
@@ -1445,7 +1445,7 @@ function Bn() {
|
|
|
1445
1445
|
strictNullHandling: !1
|
|
1446
1446
|
}, y = function(o) {
|
|
1447
1447
|
return typeof o == "string" || typeof o == "number" || typeof o == "boolean" || typeof o == "symbol" || typeof o == "bigint";
|
|
1448
|
-
}, M = {}, A = function f(o, I,
|
|
1448
|
+
}, M = {}, A = function f(o, I, m, S, D, P, b, n, c, d, E, _, x, U, F, W, $, G) {
|
|
1449
1449
|
for (var s = o, L = G, K = 0, X = !1; (L = L.get(M)) !== void 0 && !X; ) {
|
|
1450
1450
|
var ie = L.get(o);
|
|
1451
1451
|
if (K += 1, typeof ie < "u") {
|
|
@@ -1455,17 +1455,17 @@ function Bn() {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
typeof L.get(M) > "u" && (K = 0);
|
|
1457
1457
|
}
|
|
1458
|
-
if (typeof d == "function" ? s = d(I, s) : s instanceof Date ? s = x(s) :
|
|
1458
|
+
if (typeof d == "function" ? s = d(I, s) : s instanceof Date ? s = x(s) : m === "comma" && w(s) && (s = i.maybeMap(s, function(ee) {
|
|
1459
1459
|
return ee instanceof Date ? x(ee) : ee;
|
|
1460
1460
|
})), s === null) {
|
|
1461
1461
|
if (P)
|
|
1462
|
-
return c && !
|
|
1462
|
+
return c && !W ? c(I, h.encoder, $, "key", U) : I;
|
|
1463
1463
|
s = "";
|
|
1464
1464
|
}
|
|
1465
1465
|
if (y(s) || i.isBuffer(s)) {
|
|
1466
1466
|
if (c) {
|
|
1467
|
-
var oe =
|
|
1468
|
-
return [F(oe) + "=" + F(c(s,
|
|
1467
|
+
var oe = W ? I : c(I, h.encoder, $, "key", U);
|
|
1468
|
+
return [F(oe) + "=" + F(c(s, h.encoder, $, "value", U))];
|
|
1469
1469
|
}
|
|
1470
1470
|
return [F(I) + "=" + F(String(s))];
|
|
1471
1471
|
}
|
|
@@ -1473,8 +1473,8 @@ function Bn() {
|
|
|
1473
1473
|
if (typeof s > "u")
|
|
1474
1474
|
return le;
|
|
1475
1475
|
var ae;
|
|
1476
|
-
if (
|
|
1477
|
-
|
|
1476
|
+
if (m === "comma" && w(s))
|
|
1477
|
+
W && c && (s = i.maybeMap(s, c)), ae = [{ value: s.length > 0 ? s.join(",") || null : void 0 }];
|
|
1478
1478
|
else if (w(d))
|
|
1479
1479
|
ae = d;
|
|
1480
1480
|
else {
|
|
@@ -1487,26 +1487,26 @@ function Bn() {
|
|
|
1487
1487
|
for (var j = 0; j < ae.length; ++j) {
|
|
1488
1488
|
var C = ae[j], k = typeof C == "object" && C && typeof C.value < "u" ? C.value : s[C];
|
|
1489
1489
|
if (!(b && k === null)) {
|
|
1490
|
-
var T = _ && n ? String(C).replace(/\./g, "%2E") : String(C), H = w(s) ? typeof
|
|
1490
|
+
var T = _ && n ? String(C).replace(/\./g, "%2E") : String(C), H = w(s) ? typeof m == "function" ? m(ue, T) : ue : ue + (_ ? "." + T : "[" + T + "]");
|
|
1491
1491
|
G.set(o, K);
|
|
1492
1492
|
var Q = e();
|
|
1493
1493
|
Q.set(M, G), v(le, f(
|
|
1494
1494
|
k,
|
|
1495
1495
|
H,
|
|
1496
|
-
|
|
1496
|
+
m,
|
|
1497
1497
|
S,
|
|
1498
1498
|
D,
|
|
1499
1499
|
P,
|
|
1500
1500
|
b,
|
|
1501
1501
|
n,
|
|
1502
|
-
|
|
1502
|
+
m === "comma" && W && w(s) ? null : c,
|
|
1503
1503
|
d,
|
|
1504
1504
|
E,
|
|
1505
1505
|
_,
|
|
1506
1506
|
x,
|
|
1507
1507
|
U,
|
|
1508
1508
|
F,
|
|
1509
|
-
|
|
1509
|
+
W,
|
|
1510
1510
|
$,
|
|
1511
1511
|
Q
|
|
1512
1512
|
));
|
|
@@ -1515,83 +1515,83 @@ function Bn() {
|
|
|
1515
1515
|
return le;
|
|
1516
1516
|
}, a = function(o) {
|
|
1517
1517
|
if (!o)
|
|
1518
|
-
return
|
|
1518
|
+
return h;
|
|
1519
1519
|
if (typeof o.allowEmptyArrays < "u" && typeof o.allowEmptyArrays != "boolean")
|
|
1520
1520
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
1521
1521
|
if (typeof o.encodeDotInKeys < "u" && typeof o.encodeDotInKeys != "boolean")
|
|
1522
1522
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
1523
1523
|
if (o.encoder !== null && typeof o.encoder < "u" && typeof o.encoder != "function")
|
|
1524
1524
|
throw new TypeError("Encoder has to be a function.");
|
|
1525
|
-
var I = o.charset ||
|
|
1525
|
+
var I = o.charset || h.charset;
|
|
1526
1526
|
if (typeof o.charset < "u" && o.charset !== "utf-8" && o.charset !== "iso-8859-1")
|
|
1527
1527
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1528
|
-
var
|
|
1528
|
+
var m = u.default;
|
|
1529
1529
|
if (typeof o.format < "u") {
|
|
1530
1530
|
if (!l.call(u.formatters, o.format))
|
|
1531
1531
|
throw new TypeError("Unknown format option provided.");
|
|
1532
|
-
|
|
1532
|
+
m = o.format;
|
|
1533
1533
|
}
|
|
1534
|
-
var S = u.formatters[
|
|
1534
|
+
var S = u.formatters[m], D = h.filter;
|
|
1535
1535
|
(typeof o.filter == "function" || w(o.filter)) && (D = o.filter);
|
|
1536
1536
|
var P;
|
|
1537
|
-
if (o.arrayFormat in g ? P = o.arrayFormat : "indices" in o ? P = o.indices ? "indices" : "repeat" : P =
|
|
1537
|
+
if (o.arrayFormat in g ? P = o.arrayFormat : "indices" in o ? P = o.indices ? "indices" : "repeat" : P = h.arrayFormat, "commaRoundTrip" in o && typeof o.commaRoundTrip != "boolean")
|
|
1538
1538
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
1539
|
-
var b = typeof o.allowDots > "u" ? o.encodeDotInKeys === !0 ? !0 :
|
|
1539
|
+
var b = typeof o.allowDots > "u" ? o.encodeDotInKeys === !0 ? !0 : h.allowDots : !!o.allowDots;
|
|
1540
1540
|
return {
|
|
1541
|
-
addQueryPrefix: typeof o.addQueryPrefix == "boolean" ? o.addQueryPrefix :
|
|
1541
|
+
addQueryPrefix: typeof o.addQueryPrefix == "boolean" ? o.addQueryPrefix : h.addQueryPrefix,
|
|
1542
1542
|
allowDots: b,
|
|
1543
|
-
allowEmptyArrays: typeof o.allowEmptyArrays == "boolean" ? !!o.allowEmptyArrays :
|
|
1543
|
+
allowEmptyArrays: typeof o.allowEmptyArrays == "boolean" ? !!o.allowEmptyArrays : h.allowEmptyArrays,
|
|
1544
1544
|
arrayFormat: P,
|
|
1545
1545
|
charset: I,
|
|
1546
|
-
charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel :
|
|
1546
|
+
charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel : h.charsetSentinel,
|
|
1547
1547
|
commaRoundTrip: !!o.commaRoundTrip,
|
|
1548
|
-
delimiter: typeof o.delimiter > "u" ?
|
|
1549
|
-
encode: typeof o.encode == "boolean" ? o.encode :
|
|
1550
|
-
encodeDotInKeys: typeof o.encodeDotInKeys == "boolean" ? o.encodeDotInKeys :
|
|
1551
|
-
encoder: typeof o.encoder == "function" ? o.encoder :
|
|
1552
|
-
encodeValuesOnly: typeof o.encodeValuesOnly == "boolean" ? o.encodeValuesOnly :
|
|
1548
|
+
delimiter: typeof o.delimiter > "u" ? h.delimiter : o.delimiter,
|
|
1549
|
+
encode: typeof o.encode == "boolean" ? o.encode : h.encode,
|
|
1550
|
+
encodeDotInKeys: typeof o.encodeDotInKeys == "boolean" ? o.encodeDotInKeys : h.encodeDotInKeys,
|
|
1551
|
+
encoder: typeof o.encoder == "function" ? o.encoder : h.encoder,
|
|
1552
|
+
encodeValuesOnly: typeof o.encodeValuesOnly == "boolean" ? o.encodeValuesOnly : h.encodeValuesOnly,
|
|
1553
1553
|
filter: D,
|
|
1554
|
-
format:
|
|
1554
|
+
format: m,
|
|
1555
1555
|
formatter: S,
|
|
1556
|
-
serializeDate: typeof o.serializeDate == "function" ? o.serializeDate :
|
|
1557
|
-
skipNulls: typeof o.skipNulls == "boolean" ? o.skipNulls :
|
|
1556
|
+
serializeDate: typeof o.serializeDate == "function" ? o.serializeDate : h.serializeDate,
|
|
1557
|
+
skipNulls: typeof o.skipNulls == "boolean" ? o.skipNulls : h.skipNulls,
|
|
1558
1558
|
sort: typeof o.sort == "function" ? o.sort : null,
|
|
1559
|
-
strictNullHandling: typeof o.strictNullHandling == "boolean" ? o.strictNullHandling :
|
|
1559
|
+
strictNullHandling: typeof o.strictNullHandling == "boolean" ? o.strictNullHandling : h.strictNullHandling
|
|
1560
1560
|
};
|
|
1561
1561
|
};
|
|
1562
1562
|
return Ir = function(f, o) {
|
|
1563
|
-
var I = f,
|
|
1564
|
-
typeof
|
|
1563
|
+
var I = f, m = a(o), S, D;
|
|
1564
|
+
typeof m.filter == "function" ? (D = m.filter, I = D("", I)) : w(m.filter) && (D = m.filter, S = D);
|
|
1565
1565
|
var P = [];
|
|
1566
1566
|
if (typeof I != "object" || I === null)
|
|
1567
1567
|
return "";
|
|
1568
|
-
var b = g[
|
|
1569
|
-
S || (S = Object.keys(I)),
|
|
1568
|
+
var b = g[m.arrayFormat], n = b === "comma" && m.commaRoundTrip;
|
|
1569
|
+
S || (S = Object.keys(I)), m.sort && S.sort(m.sort);
|
|
1570
1570
|
for (var c = e(), d = 0; d < S.length; ++d) {
|
|
1571
1571
|
var E = S[d], _ = I[E];
|
|
1572
|
-
|
|
1572
|
+
m.skipNulls && _ === null || v(P, A(
|
|
1573
1573
|
_,
|
|
1574
1574
|
E,
|
|
1575
1575
|
b,
|
|
1576
1576
|
n,
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1577
|
+
m.allowEmptyArrays,
|
|
1578
|
+
m.strictNullHandling,
|
|
1579
|
+
m.skipNulls,
|
|
1580
|
+
m.encodeDotInKeys,
|
|
1581
|
+
m.encode ? m.encoder : null,
|
|
1582
|
+
m.filter,
|
|
1583
|
+
m.sort,
|
|
1584
|
+
m.allowDots,
|
|
1585
|
+
m.serializeDate,
|
|
1586
|
+
m.format,
|
|
1587
|
+
m.formatter,
|
|
1588
|
+
m.encodeValuesOnly,
|
|
1589
|
+
m.charset,
|
|
1590
1590
|
c
|
|
1591
1591
|
));
|
|
1592
1592
|
}
|
|
1593
|
-
var x = P.join(
|
|
1594
|
-
return
|
|
1593
|
+
var x = P.join(m.delimiter), U = m.addQueryPrefix === !0 ? "?" : "";
|
|
1594
|
+
return m.charsetSentinel && (m.charset === "iso-8859-1" ? U += "utf8=%26%2310003%3B&" : U += "utf8=%E2%9C%93&"), x.length > 0 ? U + x : "";
|
|
1595
1595
|
}, Ir;
|
|
1596
1596
|
}
|
|
1597
1597
|
var _r, Lt;
|
|
@@ -1634,12 +1634,12 @@ function Un() {
|
|
|
1634
1634
|
}, R = "utf8=%26%2310003%3B", v = "utf8=%E2%9C%93", O = function(a, f) {
|
|
1635
1635
|
var o = { __proto__: null }, I = f.ignoreQueryPrefix ? a.replace(/^\?/, "") : a;
|
|
1636
1636
|
I = I.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1637
|
-
var
|
|
1637
|
+
var m = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, S = I.split(
|
|
1638
1638
|
f.delimiter,
|
|
1639
|
-
f.throwOnLimitExceeded && typeof
|
|
1639
|
+
f.throwOnLimitExceeded && typeof m < "u" ? m + 1 : m
|
|
1640
1640
|
);
|
|
1641
|
-
if (f.throwOnLimitExceeded && typeof
|
|
1642
|
-
throw new RangeError("Parameter limit exceeded. Only " +
|
|
1641
|
+
if (f.throwOnLimitExceeded && typeof m < "u" && S.length > m)
|
|
1642
|
+
throw new RangeError("Parameter limit exceeded. Only " + m + " parameter" + (m === 1 ? "" : "s") + " allowed.");
|
|
1643
1643
|
var D = -1, P, b = f.charset;
|
|
1644
1644
|
if (f.charsetSentinel)
|
|
1645
1645
|
for (P = 0; P < S.length; ++P)
|
|
@@ -1675,8 +1675,8 @@ function Un() {
|
|
|
1675
1675
|
}, p = function(A, a, f, o) {
|
|
1676
1676
|
var I = 0;
|
|
1677
1677
|
if (A.length > 0 && A[A.length - 1] === "[]") {
|
|
1678
|
-
var
|
|
1679
|
-
I = Array.isArray(a) && a[
|
|
1678
|
+
var m = A.slice(0, -1).join("");
|
|
1679
|
+
I = Array.isArray(a) && a[m] ? a[m].length : 0;
|
|
1680
1680
|
}
|
|
1681
1681
|
for (var S = o ? a : w(a, f, I), D = A.length - 1; D >= 0; --D) {
|
|
1682
1682
|
var P, b = A[D];
|
|
@@ -1703,17 +1703,17 @@ function Un() {
|
|
|
1703
1703
|
S = P;
|
|
1704
1704
|
}
|
|
1705
1705
|
return S;
|
|
1706
|
-
},
|
|
1706
|
+
}, h = function(a, f) {
|
|
1707
1707
|
var o = f.allowDots ? a.replace(/\.([^.[]+)/g, "[$1]") : a;
|
|
1708
1708
|
if (f.depth <= 0)
|
|
1709
1709
|
return !f.plainObjects && i.call(Object.prototype, o) && !f.allowPrototypes ? void 0 : [o];
|
|
1710
|
-
var I = /(\[[^[\]]*])/,
|
|
1710
|
+
var I = /(\[[^[\]]*])/, m = /(\[[^[\]]*])/g, S = I.exec(o), D = S ? o.slice(0, S.index) : o, P = [];
|
|
1711
1711
|
if (D) {
|
|
1712
1712
|
if (!f.plainObjects && i.call(Object.prototype, D) && !f.allowPrototypes)
|
|
1713
1713
|
return;
|
|
1714
1714
|
P[P.length] = D;
|
|
1715
1715
|
}
|
|
1716
|
-
for (var b = 0; (S =
|
|
1716
|
+
for (var b = 0; (S = m.exec(o)) !== null && b < f.depth; ) {
|
|
1717
1717
|
b += 1;
|
|
1718
1718
|
var n = S[1].slice(1, -1);
|
|
1719
1719
|
if (!f.plainObjects && i.call(Object.prototype, n) && !f.allowPrototypes)
|
|
@@ -1728,9 +1728,9 @@ function Un() {
|
|
|
1728
1728
|
return P;
|
|
1729
1729
|
}, y = function(a, f, o, I) {
|
|
1730
1730
|
if (a) {
|
|
1731
|
-
var
|
|
1732
|
-
if (
|
|
1733
|
-
return p(
|
|
1731
|
+
var m = h(a, o);
|
|
1732
|
+
if (m)
|
|
1733
|
+
return p(m, f, o, I);
|
|
1734
1734
|
}
|
|
1735
1735
|
}, M = function(a) {
|
|
1736
1736
|
if (!a)
|
|
@@ -1779,15 +1779,15 @@ function Un() {
|
|
|
1779
1779
|
var f = M(a);
|
|
1780
1780
|
if (A === "" || A === null || typeof A > "u")
|
|
1781
1781
|
return f.plainObjects ? { __proto__: null } : {};
|
|
1782
|
-
for (var o = typeof A == "string" ? O(A, f) : A, I = f.plainObjects ? { __proto__: null } : {},
|
|
1783
|
-
var D =
|
|
1782
|
+
for (var o = typeof A == "string" ? O(A, f) : A, I = f.plainObjects ? { __proto__: null } : {}, m = Object.keys(o), S = 0; S < m.length; ++S) {
|
|
1783
|
+
var D = m[S], P = y(D, o[D], f, typeof A == "string");
|
|
1784
1784
|
I = e.merge(I, P, f);
|
|
1785
1785
|
}
|
|
1786
1786
|
return f.allowSparse === !0 ? I : e.compact(I);
|
|
1787
1787
|
}, _r;
|
|
1788
1788
|
}
|
|
1789
1789
|
var xr, Tt;
|
|
1790
|
-
function
|
|
1790
|
+
function zn() {
|
|
1791
1791
|
if (Tt) return xr;
|
|
1792
1792
|
Tt = 1;
|
|
1793
1793
|
var e = /* @__PURE__ */ Bn(), i = /* @__PURE__ */ Un(), u = /* @__PURE__ */ $r();
|
|
@@ -1797,8 +1797,8 @@ function Wn() {
|
|
|
1797
1797
|
stringify: e
|
|
1798
1798
|
}, xr;
|
|
1799
1799
|
}
|
|
1800
|
-
var
|
|
1801
|
-
const kn = "0.1.
|
|
1800
|
+
var Wn = /* @__PURE__ */ zn();
|
|
1801
|
+
const kn = "0.1.6", Gn = [
|
|
1802
1802
|
"allow-scripts",
|
|
1803
1803
|
// Run the widget app
|
|
1804
1804
|
"allow-same-origin",
|
|
@@ -1813,7 +1813,7 @@ const kn = "0.1.4", Gn = [
|
|
|
1813
1813
|
function qr(e, i, { accessToken: u, host: l, theme: g }, w = "/relay-widget") {
|
|
1814
1814
|
if (!u)
|
|
1815
1815
|
throw new Error("[PersonaRelay] accessToken is required to initialize the relay widget");
|
|
1816
|
-
const R = Fr(l), v =
|
|
1816
|
+
const R = Fr(l), v = Wn.stringify(
|
|
1817
1817
|
{
|
|
1818
1818
|
"client-version": kn,
|
|
1819
1819
|
"container-id": i,
|
|
@@ -1824,11 +1824,13 @@ function qr(e, i, { accessToken: u, host: l, theme: g }, w = "/relay-widget") {
|
|
|
1824
1824
|
addQueryPrefix: !0,
|
|
1825
1825
|
skipNulls: !0
|
|
1826
1826
|
}
|
|
1827
|
-
);
|
|
1828
|
-
|
|
1827
|
+
), O = new URL(R).origin, p = (...M) => M.map((A) => `${A} ${O}`).join(";");
|
|
1828
|
+
w === "/relay-popover" ? (e.title = "Relay popover", e.className = "relay-widget__popover-iframe", e.allow = p("clipboard-write")) : w === "/relay-fullscreen" ? (e.title = "Relay fullscreen", e.className = "relay-widget__fullscreen-iframe", e.allow = p("camera", "microphone", "clipboard-write")) : (e.title = "Verify via Relay", e.className = "relay-widget__iframe", e.allow = p("clipboard-write")), e.setAttribute(
|
|
1829
1829
|
"sandbox",
|
|
1830
1830
|
Gn.concat(Hn).join(" ")
|
|
1831
|
-
), e.referrerPolicy = "no-referrer"
|
|
1831
|
+
), e.referrerPolicy = "no-referrer";
|
|
1832
|
+
const h = R + w + v, y = h.replace(/&/g, "&").replace(/"/g, """);
|
|
1833
|
+
return e.srcdoc = `<!doctype html><meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0;url=${y}"><meta name="color-scheme" content="light dark">`, e.src = h, e;
|
|
1832
1834
|
}
|
|
1833
1835
|
class jn {
|
|
1834
1836
|
/**
|
|
@@ -1907,15 +1909,17 @@ class jn {
|
|
|
1907
1909
|
document.body.classList.remove("relay-widget__scroll-locked");
|
|
1908
1910
|
}
|
|
1909
1911
|
/**
|
|
1910
|
-
* Sends current document body dimensions to iframes for mobile
|
|
1912
|
+
* Sends current document body dimensions to the given iframes for mobile
|
|
1913
|
+
* detection.
|
|
1911
1914
|
*/
|
|
1912
|
-
sendResize() {
|
|
1913
|
-
const { clientWidth:
|
|
1915
|
+
sendResize(...i) {
|
|
1916
|
+
const { clientWidth: u, clientHeight: l } = document.body, g = {
|
|
1914
1917
|
action: Mr.Resize,
|
|
1915
1918
|
containerId: this.containerId,
|
|
1916
|
-
metadata: { width:
|
|
1919
|
+
metadata: { width: u, height: l }
|
|
1917
1920
|
};
|
|
1918
|
-
|
|
1921
|
+
for (const w of i)
|
|
1922
|
+
w.contentWindow?.postMessage(g, this.baseUrl);
|
|
1919
1923
|
}
|
|
1920
1924
|
/**
|
|
1921
1925
|
* Observes the document body for size changes and forwards
|
|
@@ -1923,14 +1927,14 @@ class jn {
|
|
|
1923
1927
|
* once to each on initial iframe load.
|
|
1924
1928
|
*/
|
|
1925
1929
|
setupResizeObserver() {
|
|
1926
|
-
this.iframeElement.addEventListener("load", () => this.sendResize(),
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
const i = () => this.sendResize();
|
|
1930
|
+
this.iframeElement.addEventListener("load", () => this.sendResize(this.iframeElement)), this.popoverIframeElement.addEventListener(
|
|
1931
|
+
"load",
|
|
1932
|
+
() => this.sendResize(this.popoverIframeElement)
|
|
1933
|
+
), this.fullscreenIframeElement.addEventListener(
|
|
1934
|
+
"load",
|
|
1935
|
+
() => this.sendResize(this.fullscreenIframeElement)
|
|
1936
|
+
);
|
|
1937
|
+
const i = () => this.sendResize(this.iframeElement, this.popoverIframeElement, this.fullscreenIframeElement);
|
|
1934
1938
|
window.addEventListener("resize", i), this.removeResizeListener = () => window.removeEventListener("resize", i);
|
|
1935
1939
|
}
|
|
1936
1940
|
/**
|