@soyio/soyio-widget 2.13.4 → 2.13.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.js +1890 -2082
- package/dist/index.umd.cjs +15 -15
- package/package.json +12 -10
package/dist/index.js
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
1
|
+
var fn = Object.defineProperty;
|
|
2
|
+
var xt = Object.getOwnPropertySymbols, ln = Object.getPrototypeOf, hn = Object.prototype.hasOwnProperty, mn = Object.prototype.propertyIsEnumerable, pn = Reflect.get;
|
|
3
|
+
var St = (c) => {
|
|
4
|
+
throw TypeError(c);
|
|
5
|
+
};
|
|
6
|
+
var vn = (c, d, h) => d in c ? fn(c, d, { enumerable: !0, configurable: !0, writable: !0, value: h }) : c[d] = h;
|
|
7
|
+
var bt = (c, d) => {
|
|
5
8
|
var h = {};
|
|
6
|
-
for (var f in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var f of
|
|
10
|
-
|
|
9
|
+
for (var f in c)
|
|
10
|
+
hn.call(c, f) && d.indexOf(f) < 0 && (h[f] = c[f]);
|
|
11
|
+
if (c != null && xt)
|
|
12
|
+
for (var f of xt(c))
|
|
13
|
+
d.indexOf(f) < 0 && mn.call(c, f) && (h[f] = c[f]);
|
|
11
14
|
return h;
|
|
12
15
|
};
|
|
13
|
-
var N = (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
if (c.has(d))
|
|
19
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
-
c instanceof WeakSet ? c.add(d) : c.set(d, h);
|
|
21
|
-
};
|
|
22
|
-
var xt = (d, c, h) => (hn(d, c, "access private method"), h), St = (d, c, h) => fn(un(d), h, c);
|
|
23
|
-
var _ = (d, c, h) => new Promise((f, v) => {
|
|
16
|
+
var N = (c, d, h) => vn(c, typeof d != "symbol" ? d + "" : d, h), wn = (c, d, h) => d.has(c) || St("Cannot " + h);
|
|
17
|
+
var It = (c, d, h) => d.has(c) ? St("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(c) : d.set(c, h);
|
|
18
|
+
var Wt = (c, d, h) => (wn(c, d, "access private method"), h);
|
|
19
|
+
var Pt = (c, d, h) => pn(ln(c), h, d);
|
|
20
|
+
var _ = (c, d, h) => new Promise((f, v) => {
|
|
24
21
|
var y = (A) => {
|
|
25
22
|
try {
|
|
26
23
|
I(h.next(A));
|
|
@@ -34,37 +31,37 @@ var _ = (d, c, h) => new Promise((f, v) => {
|
|
|
34
31
|
v(D);
|
|
35
32
|
}
|
|
36
33
|
}, I = (A) => A.done ? f(A.value) : Promise.resolve(A.value).then(y, E);
|
|
37
|
-
I((h = h.apply(
|
|
34
|
+
I((h = h.apply(c, d)).next());
|
|
38
35
|
});
|
|
39
|
-
function
|
|
40
|
-
for (var h = 0; h <
|
|
41
|
-
const f =
|
|
36
|
+
function gn(c, d) {
|
|
37
|
+
for (var h = 0; h < d.length; h++) {
|
|
38
|
+
const f = d[h];
|
|
42
39
|
if (typeof f != "string" && !Array.isArray(f)) {
|
|
43
40
|
for (const v in f)
|
|
44
|
-
if (v !== "default" && !(v in
|
|
41
|
+
if (v !== "default" && !(v in c)) {
|
|
45
42
|
const y = Object.getOwnPropertyDescriptor(f, v);
|
|
46
|
-
y && Object.defineProperty(
|
|
43
|
+
y && Object.defineProperty(c, v, y.get ? y : {
|
|
47
44
|
enumerable: !0,
|
|
48
45
|
get: () => f[v]
|
|
49
46
|
});
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
|
-
return Object.freeze(Object.defineProperty(
|
|
50
|
+
return Object.freeze(Object.defineProperty(c, Symbol.toStringTag, { value: "Module" }));
|
|
54
51
|
}
|
|
55
|
-
const
|
|
56
|
-
class
|
|
52
|
+
const be = !!(typeof window != "undefined" && window.document && window.document.createElement), Ct = 200;
|
|
53
|
+
class Fe {
|
|
57
54
|
constructor() {
|
|
58
55
|
N(this, "tooltipElement", null);
|
|
59
56
|
N(this, "tooltipContent", null);
|
|
60
57
|
N(this, "tooltipClass", "soyio-tooltip");
|
|
61
58
|
N(this, "hideTimeout", null);
|
|
62
|
-
|
|
59
|
+
be && this.createTooltipElement();
|
|
63
60
|
}
|
|
64
61
|
createTooltipElement() {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
this.tooltipElement =
|
|
62
|
+
const d = document.querySelector(`.${this.tooltipClass}`);
|
|
63
|
+
if (d) {
|
|
64
|
+
this.tooltipElement = d, this.tooltipContent = this.tooltipElement.querySelector(".soyio-tooltip-content");
|
|
68
65
|
return;
|
|
69
66
|
}
|
|
70
67
|
this.tooltipElement = document.createElement("div"), this.tooltipElement.className = this.tooltipClass, this.tooltipElement.style.cssText = `
|
|
@@ -81,77 +78,76 @@ class ke {
|
|
|
81
78
|
word-wrap: break-word;
|
|
82
79
|
pointer-events: none;
|
|
83
80
|
opacity: 0;
|
|
84
|
-
transition: opacity ${
|
|
81
|
+
transition: opacity ${Ct}ms ease, transform ${Ct}ms ease;
|
|
85
82
|
backdrop-filter: blur(5px);
|
|
86
83
|
-webkit-backdrop-filter: blur(5px);
|
|
87
84
|
transform: scale(0.95);
|
|
88
85
|
`, this.tooltipContent = document.createElement("div"), this.tooltipContent.className = "soyio-tooltip-content", this.tooltipElement.appendChild(this.tooltipContent), document.body.appendChild(this.tooltipElement);
|
|
89
86
|
}
|
|
90
|
-
show(
|
|
91
|
-
if (!this.tooltipElement || !this.tooltipContent)
|
|
92
|
-
|
|
93
|
-
this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipContent.textContent = c, this.tooltipElement.style.opacity = "0", this.tooltipElement.style.transform = "scale(0.95)";
|
|
87
|
+
show(d, h, f) {
|
|
88
|
+
if (!this.tooltipElement || !this.tooltipContent) return;
|
|
89
|
+
this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipContent.textContent = d, this.tooltipElement.style.opacity = "0", this.tooltipElement.style.transform = "scale(0.95)";
|
|
94
90
|
const v = this.calculateOptimalPlacement(h, f);
|
|
95
91
|
this.applyPlacement(v), requestAnimationFrame(() => {
|
|
96
92
|
this.tooltipElement && (this.tooltipElement.style.opacity = "1", this.tooltipElement.style.transform = "scale(1)");
|
|
97
93
|
});
|
|
98
94
|
}
|
|
99
|
-
calculateOptimalPlacement(
|
|
95
|
+
calculateOptimalPlacement(d, h) {
|
|
100
96
|
const f = this.tooltipElement.offsetWidth, v = this.tooltipElement.offsetHeight, { innerWidth: y, innerHeight: E } = window, I = 4, A = {
|
|
101
97
|
top: {
|
|
102
98
|
top: h - v - I,
|
|
103
|
-
left:
|
|
99
|
+
left: d - f / 2,
|
|
104
100
|
placement: "top"
|
|
105
101
|
},
|
|
106
102
|
bottom: {
|
|
107
103
|
top: h + I,
|
|
108
|
-
left:
|
|
104
|
+
left: d - f / 2,
|
|
109
105
|
placement: "bottom"
|
|
110
106
|
},
|
|
111
107
|
right: {
|
|
112
108
|
top: h - v / 2,
|
|
113
|
-
left:
|
|
109
|
+
left: d + I,
|
|
114
110
|
placement: "right"
|
|
115
111
|
},
|
|
116
112
|
left: {
|
|
117
113
|
top: h - v / 2,
|
|
118
|
-
left:
|
|
114
|
+
left: d - f - I,
|
|
119
115
|
placement: "left"
|
|
120
116
|
}
|
|
121
117
|
};
|
|
122
118
|
for (const [, k] of Object.entries(A))
|
|
123
|
-
if (
|
|
119
|
+
if (Fe.fitsInViewport(k, f, v, y, E))
|
|
124
120
|
return k;
|
|
125
121
|
const D = A.top;
|
|
126
122
|
return D.left = Math.max(I, Math.min(D.left, y - f - I)), D.top = Math.max(I, Math.min(D.top, E - v - I)), D;
|
|
127
123
|
}
|
|
128
|
-
static fitsInViewport(
|
|
129
|
-
return
|
|
124
|
+
static fitsInViewport(d, h, f, v, y) {
|
|
125
|
+
return d.top >= 0 && d.left >= 0 && d.top + f <= y && d.left + h <= v;
|
|
130
126
|
}
|
|
131
|
-
applyPlacement(
|
|
132
|
-
this.tooltipElement && (this.tooltipElement.style.left = `${
|
|
127
|
+
applyPlacement(d) {
|
|
128
|
+
this.tooltipElement && (this.tooltipElement.style.left = `${d.left}px`, this.tooltipElement.style.top = `${d.top}px`);
|
|
133
129
|
}
|
|
134
130
|
hide() {
|
|
135
131
|
this.tooltipElement && (this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipElement.style.opacity = "0", this.tooltipElement.style.transform = "scale(0.95)");
|
|
136
132
|
}
|
|
137
133
|
destroy() {
|
|
138
|
-
var
|
|
139
|
-
(
|
|
134
|
+
var d;
|
|
135
|
+
(d = this.tooltipElement) == null || d.remove(), this.tooltipElement = null, this.tooltipContent = null, this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null);
|
|
140
136
|
}
|
|
141
137
|
}
|
|
142
|
-
function
|
|
138
|
+
function yn(c, d, h) {
|
|
143
139
|
return _(this, null, function* () {
|
|
144
|
-
if (!
|
|
140
|
+
if (!c.contentWindow)
|
|
145
141
|
throw new Error("Invalid iframe: contentWindow is null");
|
|
146
|
-
const f = yield Promise.resolve().then(() =>
|
|
142
|
+
const f = yield Promise.resolve().then(() => qe);
|
|
147
143
|
try {
|
|
148
|
-
yield f.send(
|
|
144
|
+
yield f.send(c.contentWindow, "SET_APPEARANCE", { appearance: d, identifier: h });
|
|
149
145
|
} catch (v) {
|
|
150
146
|
console.error("Failed to send appearance config:", v);
|
|
151
147
|
}
|
|
152
148
|
});
|
|
153
149
|
}
|
|
154
|
-
const
|
|
150
|
+
const En = "IFRAME_READY", xn = "IFRAME_HEIGHT_CHANGE", Sn = "TOOLTIP_STATE_CHANGE", bn = "INFO_EVENT", In = "CONSENT_STATE_CHANGE", U = {
|
|
155
151
|
// BASE
|
|
156
152
|
onHeightChange: {},
|
|
157
153
|
onIframeReady: {},
|
|
@@ -160,52 +156,52 @@ const vn = "IFRAME_READY", wn = "IFRAME_HEIGHT_CHANGE", gn = "TOOLTIP_STATE_CHAN
|
|
|
160
156
|
// CONSENT
|
|
161
157
|
onStateChange: {}
|
|
162
158
|
};
|
|
163
|
-
let
|
|
164
|
-
function
|
|
159
|
+
let Tt, Rt, Ot, At, Nt;
|
|
160
|
+
function Wn() {
|
|
165
161
|
return _(this, null, function* () {
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
const h =
|
|
162
|
+
const c = yield Promise.resolve().then(() => qe);
|
|
163
|
+
Tt || Rt || Ot || At || Nt || (Tt = c.on(xn, (d) => _(null, null, function* () {
|
|
164
|
+
const h = d.data, f = U.onHeightChange[h.identifier];
|
|
169
165
|
return f && f(h.height), Promise.resolve();
|
|
170
|
-
})),
|
|
171
|
-
const h =
|
|
166
|
+
})), Rt = c.on(En, (d) => _(null, null, function* () {
|
|
167
|
+
const h = d.data, f = U.onIframeReady[h.identifier];
|
|
172
168
|
return f && f(), Promise.resolve();
|
|
173
|
-
})),
|
|
174
|
-
const h =
|
|
169
|
+
})), Ot = c.on(Sn, (d) => _(null, null, function* () {
|
|
170
|
+
const h = d.data, f = U.onTooltipChange[h.identifier];
|
|
175
171
|
return f && f(h), Promise.resolve();
|
|
176
|
-
})),
|
|
177
|
-
const h =
|
|
172
|
+
})), At = c.on(In, (d) => _(null, null, function* () {
|
|
173
|
+
const h = d.data, f = U.onStateChange[h.identifier];
|
|
178
174
|
return f && f(h), Promise.resolve();
|
|
179
|
-
})),
|
|
180
|
-
const E =
|
|
175
|
+
})), Nt = c.on(bn, (h) => _(null, [h], function* ({ data: d }) {
|
|
176
|
+
const E = d, { identifier: f } = E, v = bt(E, ["identifier"]), y = U.onInfo[f];
|
|
181
177
|
return y && y(v), Promise.resolve();
|
|
182
178
|
})));
|
|
183
179
|
});
|
|
184
180
|
}
|
|
185
|
-
function
|
|
181
|
+
function zt(c, d) {
|
|
186
182
|
const {
|
|
187
183
|
onHeightChange: h,
|
|
188
184
|
onIframeReady: f,
|
|
189
185
|
onTooltipChange: v,
|
|
190
186
|
onStateChange: y,
|
|
191
187
|
onInfo: E
|
|
192
|
-
} =
|
|
193
|
-
h && (U.onHeightChange[
|
|
188
|
+
} = d;
|
|
189
|
+
h && (U.onHeightChange[c] = h), f && (U.onIframeReady[c] = f), v && (U.onTooltipChange[c] = v), y && (U.onStateChange[c] = y), E && (U.onInfo[c] = E);
|
|
194
190
|
}
|
|
195
|
-
function
|
|
196
|
-
delete U.onHeightChange[
|
|
191
|
+
function Pn(c) {
|
|
192
|
+
delete U.onHeightChange[c], delete U.onIframeReady[c], delete U.onTooltipChange[c], delete U.onStateChange[c], delete U.onInfo[c];
|
|
197
193
|
}
|
|
198
|
-
function
|
|
199
|
-
const
|
|
200
|
-
|
|
194
|
+
function Cn(c) {
|
|
195
|
+
const d = document.getElementById(c);
|
|
196
|
+
d && (console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."), d.remove());
|
|
201
197
|
}
|
|
202
|
-
function
|
|
203
|
-
const
|
|
204
|
-
if (!
|
|
205
|
-
throw new Error(`Iframe div container with id '${
|
|
206
|
-
if (
|
|
207
|
-
throw new Error(`Iframe container with id '${
|
|
208
|
-
const h =
|
|
198
|
+
function Tn(c) {
|
|
199
|
+
const d = document.querySelector(c);
|
|
200
|
+
if (!d)
|
|
201
|
+
throw new Error(`Iframe div container with id '${c}' not found`);
|
|
202
|
+
if (d.tagName.toLowerCase() !== "div")
|
|
203
|
+
throw new Error(`Iframe container with id '${c}' must be a <div> element`);
|
|
204
|
+
const h = d;
|
|
209
205
|
return h.style.position = "relative", h.style.cssText += `
|
|
210
206
|
padding: 0 !important;
|
|
211
207
|
margin: 0 !important;
|
|
@@ -217,9 +213,9 @@ function In(d) {
|
|
|
217
213
|
opacity: 1 !important;
|
|
218
214
|
`, h;
|
|
219
215
|
}
|
|
220
|
-
function
|
|
216
|
+
function Rn(c, d, h) {
|
|
221
217
|
const f = document.createElement("iframe");
|
|
222
|
-
return f.id =
|
|
218
|
+
return f.id = d, f.src = c, f.style.cssText += `
|
|
223
219
|
width: 100% !important;
|
|
224
220
|
min-width: ${h.minWidth} !important;
|
|
225
221
|
border: none !important;
|
|
@@ -229,10 +225,10 @@ function Wn(d, c, h) {
|
|
|
229
225
|
opacity 0.4s 0.1s;
|
|
230
226
|
`, f;
|
|
231
227
|
}
|
|
232
|
-
function
|
|
228
|
+
function On() {
|
|
233
229
|
return Math.random().toString(36).substring(2, 10);
|
|
234
230
|
}
|
|
235
|
-
const
|
|
231
|
+
const jt = "https://app.soyio.id", Lt = "https://sandbox.soyio.id", An = "https://privacy.soyio.id", Nn = "https://privacy-sandbox.soyio.id", Dn = [
|
|
236
232
|
"DISCLOSURE_REQUEST_SUCCESSFUL",
|
|
237
233
|
"IDENTITY_REGISTERED",
|
|
238
234
|
"IDENTITY_SIGNATURE",
|
|
@@ -240,27 +236,27 @@ const Rt = "https://app.soyio.id", At = "https://sandbox.soyio.id", Cn = "https:
|
|
|
240
236
|
"DENIED_CAMERA_PERMISSION",
|
|
241
237
|
"REJECTED_SIGNATURE",
|
|
242
238
|
"CLOSE_POPUP"
|
|
243
|
-
],
|
|
239
|
+
], Mn = "WIDGET_CLOSED", zn = 420, jn = 720, Ln = 500, kn = {
|
|
244
240
|
minWidth: "375px"
|
|
245
|
-
},
|
|
241
|
+
}, Un = {
|
|
246
242
|
minWidth: "0px"
|
|
247
|
-
},
|
|
243
|
+
}, Fn = {
|
|
248
244
|
minWidth: "375px"
|
|
249
245
|
};
|
|
250
|
-
class
|
|
251
|
-
constructor(
|
|
246
|
+
class We {
|
|
247
|
+
constructor(d) {
|
|
252
248
|
N(this, "iframe", null);
|
|
253
249
|
N(this, "skeleton", null);
|
|
254
250
|
N(this, "options");
|
|
255
251
|
N(this, "appearance");
|
|
256
252
|
N(this, "tooltipManager");
|
|
257
|
-
N(this, "defaultIframeCSSConfig",
|
|
253
|
+
N(this, "defaultIframeCSSConfig", kn);
|
|
258
254
|
N(this, "Skeleton", null);
|
|
259
255
|
N(this, "defaultUniqueId");
|
|
260
|
-
this.options =
|
|
256
|
+
this.options = d, this.appearance = d.appearance || null, this.tooltipManager = new Fe(), this.defaultUniqueId = We.generateUniqueId();
|
|
261
257
|
}
|
|
262
258
|
static generateUniqueId() {
|
|
263
|
-
return
|
|
259
|
+
return On();
|
|
264
260
|
}
|
|
265
261
|
get uniqueIdentifier() {
|
|
266
262
|
return this.defaultUniqueId;
|
|
@@ -268,53 +264,50 @@ class Ie {
|
|
|
268
264
|
get iframeIdentifier() {
|
|
269
265
|
return `${this.defaultIframePrefix}-${this.uniqueIdentifier}`;
|
|
270
266
|
}
|
|
271
|
-
handleHeightChange(
|
|
272
|
-
if (!this.iframe || (this.iframe.style.height = `${
|
|
273
|
-
return;
|
|
267
|
+
handleHeightChange(d) {
|
|
268
|
+
if (!this.iframe || (this.iframe.style.height = `${d}px`, d > 0)) return;
|
|
274
269
|
const { parentElement: h } = this.iframe;
|
|
275
270
|
h && (h.style.display = "none");
|
|
276
271
|
}
|
|
277
272
|
handleIframeReady() {
|
|
278
273
|
return _(this, null, function* () {
|
|
279
|
-
this.iframe && (this.options.onReady && this.options.onReady(), yield
|
|
274
|
+
this.iframe && (this.options.onReady && this.options.onReady(), yield yn(this.iframe, this.appearance, this.uniqueIdentifier), this.skeleton && this.skeleton.hide());
|
|
280
275
|
});
|
|
281
276
|
}
|
|
282
|
-
handleTooltipChange(
|
|
283
|
-
if (!this.iframe)
|
|
284
|
-
|
|
285
|
-
const h = this.iframe.getBoundingClientRect(), { text: f, coordinates: v, isVisible: y } = c, E = v.x + h.left, I = v.y + h.top;
|
|
277
|
+
handleTooltipChange(d) {
|
|
278
|
+
if (!this.iframe) return;
|
|
279
|
+
const h = this.iframe.getBoundingClientRect(), { text: f, coordinates: v, isVisible: y } = d, E = v.x + h.left, I = v.y + h.top;
|
|
286
280
|
y ? this.tooltipManager.show(f, E, I) : this.tooltipManager.hide();
|
|
287
281
|
}
|
|
288
282
|
setupListeners() {
|
|
289
283
|
return _(this, null, function* () {
|
|
290
|
-
yield
|
|
291
|
-
const
|
|
284
|
+
yield Wn();
|
|
285
|
+
const d = {
|
|
292
286
|
onHeightChange: this.handleHeightChange.bind(this),
|
|
293
287
|
onIframeReady: this.handleIframeReady.bind(this),
|
|
294
288
|
onTooltipChange: this.handleTooltipChange.bind(this),
|
|
295
289
|
onInfo: this.options.onEvent.bind(this)
|
|
296
290
|
};
|
|
297
|
-
|
|
291
|
+
zt(this.uniqueIdentifier, d);
|
|
298
292
|
});
|
|
299
293
|
}
|
|
300
|
-
mount(
|
|
294
|
+
mount(d) {
|
|
301
295
|
return _(this, null, function* () {
|
|
302
|
-
if (!
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return this.iframe = Wn(f, this.iframeIdentifier, this.defaultIframeCSSConfig), this.Skeleton && (this.skeleton = new this.Skeleton(this.uniqueIdentifier), this.skeleton.mount(h)), h.appendChild(this.iframe), this;
|
|
296
|
+
if (!be) return this;
|
|
297
|
+
yield this.setupListeners(), Cn(this.iframeIdentifier);
|
|
298
|
+
const h = Tn(d), f = this.iframeUrl();
|
|
299
|
+
return this.iframe = Rn(f, this.iframeIdentifier, this.defaultIframeCSSConfig), this.Skeleton && (this.skeleton = new this.Skeleton(this.uniqueIdentifier), this.skeleton.mount(h)), h.appendChild(this.iframe), this;
|
|
307
300
|
});
|
|
308
301
|
}
|
|
309
302
|
unmount() {
|
|
310
|
-
|
|
303
|
+
be && (Pn(this.uniqueIdentifier), this.skeleton && (this.skeleton.hide(), this.skeleton = null), this.iframe && (this.iframe.remove(), this.iframe = null));
|
|
311
304
|
}
|
|
312
305
|
}
|
|
313
|
-
class
|
|
314
|
-
constructor(
|
|
306
|
+
class Hn {
|
|
307
|
+
constructor(d) {
|
|
315
308
|
N(this, "element");
|
|
316
309
|
N(this, "identifier");
|
|
317
|
-
this.identifier = `skeleton-${
|
|
310
|
+
this.identifier = `skeleton-${d}`, this.element = document.createElement("div"), this.element.id = this.identifier, this.element.style.cssText = `
|
|
318
311
|
position: absolute;
|
|
319
312
|
left: 50%;
|
|
320
313
|
top: 50%;
|
|
@@ -429,47 +422,48 @@ class Ln {
|
|
|
429
422
|
f.appendChild(v), f.appendChild(y), f.appendChild(E), D.appendChild(k), D.appendChild(oe), I.appendChild(A), I.appendChild(D), h.appendChild(f), h.appendChild(I), this.element.appendChild(h);
|
|
430
423
|
}
|
|
431
424
|
cleanupExistingSkeleton() {
|
|
432
|
-
const
|
|
433
|
-
|
|
425
|
+
const d = document.getElementById(this.identifier);
|
|
426
|
+
d && d.remove();
|
|
434
427
|
}
|
|
435
|
-
mount(
|
|
436
|
-
this.cleanupExistingSkeleton(),
|
|
428
|
+
mount(d) {
|
|
429
|
+
this.cleanupExistingSkeleton(), d.appendChild(this.element);
|
|
437
430
|
}
|
|
438
431
|
hide() {
|
|
439
432
|
this.element.style.opacity = "0", setTimeout(() => this.element.remove(), 300);
|
|
440
433
|
}
|
|
441
434
|
}
|
|
442
|
-
|
|
435
|
+
const He = "2.13.6";
|
|
436
|
+
function _n(c) {
|
|
443
437
|
var E;
|
|
444
|
-
const
|
|
438
|
+
const d = [
|
|
445
439
|
"actionToken",
|
|
446
440
|
"entityId",
|
|
447
441
|
"context",
|
|
448
442
|
"optionalReconsentBehavior",
|
|
449
443
|
"mandatoryReconsentBehavior"
|
|
450
|
-
], h = (E =
|
|
451
|
-
|
|
452
|
-
|
|
444
|
+
], h = (E = c.isSandbox) != null ? E : !1, f = c.developmentUrl || (h ? Lt : jt), v = new URLSearchParams();
|
|
445
|
+
v.set("sdkVersion", He), d.forEach((I) => {
|
|
446
|
+
c[I] && v.set(I, c[I]);
|
|
453
447
|
});
|
|
454
448
|
const y = v.toString();
|
|
455
|
-
return `${f}/embed/consents/${
|
|
449
|
+
return `${f}/embed/consents/${c.consentTemplateId}${y ? `?${y}` : ""}`;
|
|
456
450
|
}
|
|
457
|
-
class
|
|
451
|
+
class kt extends We {
|
|
458
452
|
constructor(h) {
|
|
459
453
|
super(h);
|
|
460
454
|
N(this, "defaultIframePrefix", "consent-box");
|
|
461
|
-
N(this, "defaultIframeCSSConfig",
|
|
455
|
+
N(this, "defaultIframeCSSConfig", Un);
|
|
462
456
|
N(this, "state", {
|
|
463
457
|
isSelected: !1,
|
|
464
458
|
actionToken: null
|
|
465
459
|
});
|
|
466
|
-
this.Skeleton =
|
|
460
|
+
this.Skeleton = Hn;
|
|
467
461
|
}
|
|
468
462
|
get uniqueIdentifier() {
|
|
469
463
|
return this.options.consentTemplateId;
|
|
470
464
|
}
|
|
471
465
|
iframeUrl() {
|
|
472
|
-
return
|
|
466
|
+
return _n(this.options);
|
|
473
467
|
}
|
|
474
468
|
handleStateChange(h) {
|
|
475
469
|
const { isSelected: f, actionToken: v } = h;
|
|
@@ -481,7 +475,7 @@ class Nt extends Ie {
|
|
|
481
475
|
}
|
|
482
476
|
setupListeners() {
|
|
483
477
|
return _(this, null, function* () {
|
|
484
|
-
yield
|
|
478
|
+
yield Pt(kt.prototype, this, "setupListeners").call(this), zt(this.uniqueIdentifier, {
|
|
485
479
|
onStateChange: this.handleStateChange.bind(this)
|
|
486
480
|
});
|
|
487
481
|
});
|
|
@@ -490,793 +484,713 @@ class Nt extends Ie {
|
|
|
490
484
|
return this.state;
|
|
491
485
|
}
|
|
492
486
|
}
|
|
493
|
-
function
|
|
487
|
+
function qn(c) {
|
|
494
488
|
var y, E;
|
|
495
|
-
const
|
|
496
|
-
|
|
489
|
+
const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Nn : An), f = new URLSearchParams();
|
|
490
|
+
f.set("sdkVersion", He), c.sessionToken ? f.set("sessionToken", c.sessionToken) : c.companyId && (f.set("companyId", c.companyId), c.subjectId && f.set("subjectId", c.subjectId)), (E = c.enabledFeatures) != null && E.length && f.set("enabledFeatures", c.enabledFeatures.join(","));
|
|
497
491
|
const v = f.toString();
|
|
498
492
|
return `${h}${v ? `?${v}` : ""}`;
|
|
499
493
|
}
|
|
500
|
-
class
|
|
494
|
+
class ir extends We {
|
|
501
495
|
constructor() {
|
|
502
496
|
super(...arguments);
|
|
503
497
|
N(this, "defaultIframePrefix", "privacy-center");
|
|
504
498
|
N(this, "_uniqueIdentifier", "privacy-center");
|
|
505
|
-
N(this, "defaultIframeCSSConfig",
|
|
499
|
+
N(this, "defaultIframeCSSConfig", Fn);
|
|
506
500
|
}
|
|
507
501
|
get uniqueIdentifier() {
|
|
508
502
|
return this._uniqueIdentifier;
|
|
509
503
|
}
|
|
510
504
|
iframeUrl() {
|
|
511
|
-
return
|
|
505
|
+
return qn(this.options);
|
|
512
506
|
}
|
|
513
507
|
}
|
|
514
|
-
const
|
|
508
|
+
const ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
515
509
|
__proto__: null
|
|
516
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
517
|
-
function
|
|
518
|
-
let
|
|
519
|
-
return "disclosureRequestId" in
|
|
510
|
+
}, Symbol.toStringTag, { value: "Module" })), $n = "WIDGET_EVENT";
|
|
511
|
+
function Bn(c) {
|
|
512
|
+
let d = "widget/";
|
|
513
|
+
return "disclosureRequestId" in c.configProps ? d += ["disclosures", c.configProps.disclosureRequestId].join("/") : d += c.request, d;
|
|
520
514
|
}
|
|
521
|
-
function
|
|
515
|
+
function Gn(c) {
|
|
522
516
|
var y;
|
|
523
|
-
const
|
|
524
|
-
return `${h}/${v}?sdk=web&${f}`;
|
|
517
|
+
const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Lt : jt), f = Object.entries(c.configProps).filter(([E, I]) => I || E === "disclosureRequestId").map(([E, I]) => `${E}=${encodeURIComponent(I)}`).join("&"), v = Bn(c);
|
|
518
|
+
return `${h}/${v}?sdk=web&sdkVersion=${He}&${f}`;
|
|
525
519
|
}
|
|
526
|
-
let Y = null,
|
|
527
|
-
function
|
|
528
|
-
Y && !Y.closed && Y.focus(),
|
|
520
|
+
let Y = null, Le = null;
|
|
521
|
+
function Ue(c = null) {
|
|
522
|
+
Y && !Y.closed && Y.focus(), c == null || c.preventDefault();
|
|
529
523
|
}
|
|
530
|
-
function
|
|
531
|
-
document.body.style.filter = "", document.body.removeEventListener("click",
|
|
524
|
+
function _e() {
|
|
525
|
+
document.body.style.filter = "", document.body.removeEventListener("click", Ue);
|
|
532
526
|
}
|
|
533
|
-
function
|
|
534
|
-
|
|
535
|
-
(!Y || Y.closed) && (
|
|
536
|
-
},
|
|
527
|
+
function Vn() {
|
|
528
|
+
Le = setInterval(() => {
|
|
529
|
+
(!Y || Y.closed) && (Le && clearInterval(Le), _e());
|
|
530
|
+
}, Ln);
|
|
537
531
|
}
|
|
538
|
-
function
|
|
539
|
-
const
|
|
540
|
-
document.body.style.filter = "blur(5px)", document.body.addEventListener("click",
|
|
541
|
-
|
|
532
|
+
function Jn(c) {
|
|
533
|
+
const d = Gn(c), h = zn, f = jn, v = window.screenLeft !== void 0 ? window.screenLeft : window.screenX, y = window.screenTop !== void 0 ? window.screenTop : window.screenY, E = window.innerWidth || document.documentElement.clientWidth || window.screen.width, I = window.innerHeight || document.documentElement.clientHeight || window.screen.height, A = E / window.screen.availWidth, D = (E - h) / 2 / A + v, k = (I - f) / 2 / A + y;
|
|
534
|
+
document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Ue), Y = window.open(
|
|
535
|
+
d,
|
|
542
536
|
"Soyio",
|
|
543
537
|
`scrollbars=yes,
|
|
544
538
|
width=${h},
|
|
545
539
|
height=${f},
|
|
546
540
|
top=${k},
|
|
547
541
|
left=${D}`
|
|
548
|
-
),
|
|
542
|
+
), Ue(), Vn();
|
|
549
543
|
}
|
|
550
|
-
function
|
|
551
|
-
Y && (Y.close(), Y = null),
|
|
544
|
+
function Yn() {
|
|
545
|
+
Y && (Y.close(), Y = null), _e();
|
|
552
546
|
}
|
|
553
547
|
let me = null;
|
|
554
|
-
function
|
|
548
|
+
function Zn() {
|
|
555
549
|
me && (me.cancel(), me = null);
|
|
556
550
|
}
|
|
557
|
-
function
|
|
551
|
+
function Kn(c) {
|
|
558
552
|
return _(this, null, function* () {
|
|
559
|
-
const { onEvent:
|
|
560
|
-
me &&
|
|
561
|
-
return
|
|
553
|
+
const { onEvent: d } = c, h = yield Promise.resolve().then(() => qe);
|
|
554
|
+
me && Zn(), me = h.on($n, (v) => _(null, [v], function* ({ data: f }) {
|
|
555
|
+
return d(f), Dn.includes(f.eventName) ? Yn() : f.eventName === Mn && _e(), Promise.resolve();
|
|
562
556
|
}));
|
|
563
557
|
});
|
|
564
558
|
}
|
|
565
|
-
function
|
|
566
|
-
|
|
559
|
+
function Xn(c) {
|
|
560
|
+
Kn(c);
|
|
567
561
|
}
|
|
568
|
-
var
|
|
569
|
-
class
|
|
570
|
-
constructor(
|
|
571
|
-
|
|
562
|
+
var Ie, Ut;
|
|
563
|
+
class sr {
|
|
564
|
+
constructor(d) {
|
|
565
|
+
It(this, Ie);
|
|
572
566
|
N(this, "onEvent");
|
|
573
|
-
this.onEvent =
|
|
574
|
-
onEvent:
|
|
567
|
+
this.onEvent = d.onEvent, be && (Jn(d), Xn({
|
|
568
|
+
onEvent: Wt(this, Ie, Ut).bind(this)
|
|
575
569
|
}));
|
|
576
570
|
}
|
|
577
571
|
}
|
|
578
|
-
|
|
579
|
-
this.onEvent(
|
|
572
|
+
Ie = new WeakSet(), Ut = function(d) {
|
|
573
|
+
this.onEvent(d);
|
|
580
574
|
};
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
575
|
+
function Qn(c) {
|
|
576
|
+
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
584
577
|
}
|
|
585
|
-
var
|
|
586
|
-
|
|
587
|
-
(function(
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
return f[y].exports;
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
578
|
+
var ke = { exports: {} }, Se = { exports: {} }, er = Se.exports, Dt;
|
|
579
|
+
function tr() {
|
|
580
|
+
return Dt || (Dt = 1, function(c, d) {
|
|
581
|
+
(function(h, f) {
|
|
582
|
+
c.exports = f();
|
|
583
|
+
})(typeof self != "undefined" ? self : er, function() {
|
|
584
|
+
return function(h) {
|
|
585
|
+
var f = {};
|
|
586
|
+
function v(y) {
|
|
587
|
+
if (f[y]) return f[y].exports;
|
|
588
|
+
var E = f[y] = {
|
|
589
|
+
i: y,
|
|
590
|
+
l: !1,
|
|
591
|
+
exports: {}
|
|
592
|
+
};
|
|
593
|
+
return h[y].call(E.exports, E, E.exports, v), E.l = !0, E.exports;
|
|
594
|
+
}
|
|
595
|
+
return v.m = h, v.c = f, v.d = function(y, E, I) {
|
|
596
|
+
v.o(y, E) || Object.defineProperty(y, E, {
|
|
597
|
+
enumerable: !0,
|
|
598
|
+
get: I
|
|
599
|
+
});
|
|
600
|
+
}, v.r = function(y) {
|
|
601
|
+
typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(y, Symbol.toStringTag, {
|
|
602
|
+
value: "Module"
|
|
603
|
+
}), Object.defineProperty(y, "__esModule", {
|
|
604
|
+
value: !0
|
|
605
|
+
});
|
|
606
|
+
}, v.t = function(y, E) {
|
|
607
|
+
if (1 & E && (y = v(y)), 8 & E || 4 & E && typeof y == "object" && y && y.__esModule) return y;
|
|
608
|
+
var I = /* @__PURE__ */ Object.create(null);
|
|
609
|
+
if (v.r(I), Object.defineProperty(I, "default", {
|
|
610
|
+
enumerable: !0,
|
|
611
|
+
value: y
|
|
612
|
+
}), 2 & E && typeof y != "string") for (var A in y) v.d(I, A, function(D) {
|
|
613
|
+
return y[D];
|
|
614
|
+
}.bind(null, A));
|
|
615
|
+
return I;
|
|
616
|
+
}, v.n = function(y) {
|
|
617
|
+
var E = y && y.__esModule ? function() {
|
|
618
|
+
return y.default;
|
|
619
|
+
} : function() {
|
|
620
|
+
return y;
|
|
621
|
+
};
|
|
622
|
+
return v.d(E, "a", E), E;
|
|
623
|
+
}, v.o = function(y, E) {
|
|
624
|
+
return {}.hasOwnProperty.call(y, E);
|
|
625
|
+
}, v.p = "", v(v.s = 0);
|
|
626
|
+
}([function(h, f, v) {
|
|
627
|
+
v.r(f), v.d(f, "Promise", function() {
|
|
628
|
+
return P;
|
|
629
|
+
}), v.d(f, "TYPES", function() {
|
|
630
|
+
return cn;
|
|
631
|
+
}), v.d(f, "ProxyWindow", function() {
|
|
632
|
+
return B;
|
|
633
|
+
}), v.d(f, "setup", function() {
|
|
634
|
+
return Et;
|
|
635
|
+
}), v.d(f, "destroy", function() {
|
|
636
|
+
return un;
|
|
637
|
+
}), v.d(f, "serializeMessage", function() {
|
|
638
|
+
return rn;
|
|
639
|
+
}), v.d(f, "deserializeMessage", function() {
|
|
640
|
+
return on;
|
|
641
|
+
}), v.d(f, "createProxyWindow", function() {
|
|
642
|
+
return an;
|
|
643
|
+
}), v.d(f, "toProxyWindow", function() {
|
|
644
|
+
return sn;
|
|
645
|
+
}), v.d(f, "on", function() {
|
|
646
|
+
return ne;
|
|
647
|
+
}), v.d(f, "once", function() {
|
|
648
|
+
return nn;
|
|
649
|
+
}), v.d(f, "send", function() {
|
|
650
|
+
return K;
|
|
651
|
+
}), v.d(f, "markWindowKnown", function() {
|
|
652
|
+
return ut;
|
|
653
|
+
}), v.d(f, "cleanUpWindow", function() {
|
|
654
|
+
return dn;
|
|
655
|
+
}), v.d(f, "bridge", function() {
|
|
612
656
|
});
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
var
|
|
617
|
-
if (v.r(I), Object.defineProperty(I, "default", {
|
|
618
|
-
enumerable: !0,
|
|
619
|
-
value: y
|
|
620
|
-
}), 2 & E && typeof y != "string")
|
|
621
|
-
for (var A in y)
|
|
622
|
-
v.d(I, A, function(D) {
|
|
623
|
-
return y[D];
|
|
624
|
-
}.bind(null, A));
|
|
625
|
-
return I;
|
|
626
|
-
}, v.n = function(y) {
|
|
627
|
-
var E = y && y.__esModule ? function() {
|
|
628
|
-
return y.default;
|
|
629
|
-
} : function() {
|
|
630
|
-
return y;
|
|
631
|
-
};
|
|
632
|
-
return v.d(E, "a", E), E;
|
|
633
|
-
}, v.o = function(y, E) {
|
|
634
|
-
return {}.hasOwnProperty.call(y, E);
|
|
635
|
-
}, v.p = "", v(v.s = 0);
|
|
636
|
-
}([function(h, f, v) {
|
|
637
|
-
v.r(f), v.d(f, "Promise", function() {
|
|
638
|
-
return P;
|
|
639
|
-
}), v.d(f, "TYPES", function() {
|
|
640
|
-
return on;
|
|
641
|
-
}), v.d(f, "ProxyWindow", function() {
|
|
642
|
-
return G;
|
|
643
|
-
}), v.d(f, "setup", function() {
|
|
644
|
-
return wt;
|
|
645
|
-
}), v.d(f, "destroy", function() {
|
|
646
|
-
return rn;
|
|
647
|
-
}), v.d(f, "serializeMessage", function() {
|
|
648
|
-
return Qt;
|
|
649
|
-
}), v.d(f, "deserializeMessage", function() {
|
|
650
|
-
return en;
|
|
651
|
-
}), v.d(f, "createProxyWindow", function() {
|
|
652
|
-
return tn;
|
|
653
|
-
}), v.d(f, "toProxyWindow", function() {
|
|
654
|
-
return nn;
|
|
655
|
-
}), v.d(f, "on", function() {
|
|
656
|
-
return K;
|
|
657
|
-
}), v.d(f, "once", function() {
|
|
658
|
-
return Xt;
|
|
659
|
-
}), v.d(f, "send", function() {
|
|
660
|
-
return X;
|
|
661
|
-
}), v.d(f, "markWindowKnown", function() {
|
|
662
|
-
return it;
|
|
663
|
-
}), v.d(f, "cleanUpWindow", function() {
|
|
664
|
-
return an;
|
|
665
|
-
}), v.d(f, "bridge", function() {
|
|
666
|
-
});
|
|
667
|
-
function y(e) {
|
|
668
|
-
return {}.toString.call(e) === "[object RegExp]";
|
|
669
|
-
}
|
|
670
|
-
var E = `Call was rejected by callee.\r
|
|
657
|
+
function y(e) {
|
|
658
|
+
return {}.toString.call(e) === "[object RegExp]";
|
|
659
|
+
}
|
|
660
|
+
var E = `Call was rejected by callee.\r
|
|
671
661
|
`;
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
}
|
|
675
|
-
function A(e) {
|
|
676
|
-
if (e === void 0 && (e = window), e.mockDomain) {
|
|
677
|
-
var n = e.mockDomain.split("//")[0];
|
|
678
|
-
if (n)
|
|
679
|
-
return n;
|
|
662
|
+
function I(e) {
|
|
663
|
+
return e === void 0 && (e = window), e.location.protocol;
|
|
680
664
|
}
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
665
|
+
function A(e) {
|
|
666
|
+
if (e === void 0 && (e = window), e.mockDomain) {
|
|
667
|
+
var n = e.mockDomain.split("//")[0];
|
|
668
|
+
if (n) return n;
|
|
669
|
+
}
|
|
670
|
+
return I(e);
|
|
671
|
+
}
|
|
672
|
+
function D(e) {
|
|
673
|
+
return e === void 0 && (e = window), A(e) === "about:";
|
|
674
|
+
}
|
|
675
|
+
function k(e) {
|
|
676
|
+
if (e === void 0 && (e = window), e) try {
|
|
677
|
+
if (e.parent && e.parent !== e) return e.parent;
|
|
691
678
|
} catch (n) {
|
|
692
679
|
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
try {
|
|
680
|
+
}
|
|
681
|
+
function oe(e) {
|
|
682
|
+
if (e === void 0 && (e = window), e && !k(e)) try {
|
|
697
683
|
return e.opener;
|
|
698
684
|
} catch (n) {
|
|
699
685
|
}
|
|
700
|
-
}
|
|
701
|
-
function Z(e) {
|
|
702
|
-
try {
|
|
703
|
-
return !0;
|
|
704
|
-
} catch (n) {
|
|
705
686
|
}
|
|
706
|
-
|
|
707
|
-
}
|
|
708
|
-
function pe(e) {
|
|
709
|
-
e === void 0 && (e = window);
|
|
710
|
-
var n = e.location;
|
|
711
|
-
if (!n)
|
|
712
|
-
throw new Error("Can not read window location");
|
|
713
|
-
var t = I(e);
|
|
714
|
-
if (!t)
|
|
715
|
-
throw new Error("Can not read window protocol");
|
|
716
|
-
if (t === "file:")
|
|
717
|
-
return "file://";
|
|
718
|
-
if (t === "about:") {
|
|
719
|
-
var r = k(e);
|
|
720
|
-
return r && Z() ? pe(r) : "about://";
|
|
721
|
-
}
|
|
722
|
-
var o = n.host;
|
|
723
|
-
if (!o)
|
|
724
|
-
throw new Error("Can not read window host");
|
|
725
|
-
return t + "//" + o;
|
|
726
|
-
}
|
|
727
|
-
function F(e) {
|
|
728
|
-
e === void 0 && (e = window);
|
|
729
|
-
var n = pe(e);
|
|
730
|
-
return n && e.mockDomain && e.mockDomain.indexOf("mock:") === 0 ? e.mockDomain : n;
|
|
731
|
-
}
|
|
732
|
-
function Q(e) {
|
|
733
|
-
if (!function(n) {
|
|
687
|
+
function Z(e) {
|
|
734
688
|
try {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
} catch (r) {
|
|
689
|
+
return !0;
|
|
690
|
+
} catch (n) {
|
|
738
691
|
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
692
|
+
return !1;
|
|
693
|
+
}
|
|
694
|
+
function pe(e) {
|
|
695
|
+
e === void 0 && (e = window);
|
|
696
|
+
var n = e.location;
|
|
697
|
+
if (!n) throw new Error("Can not read window location");
|
|
698
|
+
var t = I(e);
|
|
699
|
+
if (!t) throw new Error("Can not read window protocol");
|
|
700
|
+
if (t === "file:") return "file://";
|
|
701
|
+
if (t === "about:") {
|
|
702
|
+
var r = k(e);
|
|
703
|
+
return r && Z() ? pe(r) : "about://";
|
|
744
704
|
}
|
|
705
|
+
var o = n.host;
|
|
706
|
+
if (!o) throw new Error("Can not read window host");
|
|
707
|
+
return t + "//" + o;
|
|
708
|
+
}
|
|
709
|
+
function F(e) {
|
|
710
|
+
e === void 0 && (e = window);
|
|
711
|
+
var n = pe(e);
|
|
712
|
+
return n && e.mockDomain && e.mockDomain.indexOf("mock:") === 0 ? e.mockDomain : n;
|
|
713
|
+
}
|
|
714
|
+
function X(e) {
|
|
715
|
+
if (!function(n) {
|
|
716
|
+
try {
|
|
717
|
+
if (n === window) return !0;
|
|
718
|
+
} catch (r) {
|
|
719
|
+
}
|
|
720
|
+
try {
|
|
721
|
+
var t = Object.getOwnPropertyDescriptor(n, "location");
|
|
722
|
+
if (t && t.enumerable === !1) return !1;
|
|
723
|
+
} catch (r) {
|
|
724
|
+
}
|
|
725
|
+
try {
|
|
726
|
+
if (D(n) && Z()) return !0;
|
|
727
|
+
} catch (r) {
|
|
728
|
+
}
|
|
729
|
+
try {
|
|
730
|
+
if (function(r) {
|
|
731
|
+
return r === void 0 && (r = window), A(r) === "mock:";
|
|
732
|
+
}(n) && Z()) return !0;
|
|
733
|
+
} catch (r) {
|
|
734
|
+
}
|
|
735
|
+
try {
|
|
736
|
+
if (pe(n) === pe(window)) return !0;
|
|
737
|
+
} catch (r) {
|
|
738
|
+
}
|
|
739
|
+
return !1;
|
|
740
|
+
}(e)) return !1;
|
|
745
741
|
try {
|
|
746
|
-
if (D(
|
|
747
|
-
|
|
748
|
-
} catch (r) {
|
|
742
|
+
if (e === window || D(e) && Z() || F(window) === F(e)) return !0;
|
|
743
|
+
} catch (n) {
|
|
749
744
|
}
|
|
745
|
+
return !1;
|
|
746
|
+
}
|
|
747
|
+
function ve(e) {
|
|
748
|
+
if (!X(e)) throw new Error("Expected window to be same domain");
|
|
749
|
+
return e;
|
|
750
|
+
}
|
|
751
|
+
function $e(e, n) {
|
|
752
|
+
if (!e || !n) return !1;
|
|
753
|
+
var t = k(n);
|
|
754
|
+
return t ? t === e : function(r) {
|
|
755
|
+
var o = [];
|
|
756
|
+
try {
|
|
757
|
+
for (; r.parent !== r; )
|
|
758
|
+
o.push(r.parent), r = r.parent;
|
|
759
|
+
} catch (i) {
|
|
760
|
+
}
|
|
761
|
+
return o;
|
|
762
|
+
}(n).indexOf(e) !== -1;
|
|
763
|
+
}
|
|
764
|
+
function Be(e) {
|
|
765
|
+
var n = [], t;
|
|
750
766
|
try {
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
return !0;
|
|
755
|
-
} catch (r) {
|
|
767
|
+
t = e.frames;
|
|
768
|
+
} catch (u) {
|
|
769
|
+
t = e;
|
|
756
770
|
}
|
|
771
|
+
var r;
|
|
757
772
|
try {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
} catch (r) {
|
|
773
|
+
r = t.length;
|
|
774
|
+
} catch (u) {
|
|
761
775
|
}
|
|
762
|
-
return
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
throw new Error("Expected window to be same domain");
|
|
775
|
-
return e;
|
|
776
|
-
}
|
|
777
|
-
function He(e, n) {
|
|
778
|
-
if (!e || !n)
|
|
779
|
-
return !1;
|
|
780
|
-
var t = k(n);
|
|
781
|
-
return t ? t === e : function(r) {
|
|
782
|
-
var o = [];
|
|
783
|
-
try {
|
|
784
|
-
for (; r.parent !== r; )
|
|
785
|
-
o.push(r.parent), r = r.parent;
|
|
786
|
-
} catch (i) {
|
|
776
|
+
if (r === 0) return n;
|
|
777
|
+
if (r) {
|
|
778
|
+
for (var o = 0; o < r; o++) {
|
|
779
|
+
var i = void 0;
|
|
780
|
+
try {
|
|
781
|
+
i = t[o];
|
|
782
|
+
} catch (u) {
|
|
783
|
+
continue;
|
|
784
|
+
}
|
|
785
|
+
n.push(i);
|
|
786
|
+
}
|
|
787
|
+
return n;
|
|
787
788
|
}
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}
|
|
791
|
-
function _e(e) {
|
|
792
|
-
var n = [], t;
|
|
793
|
-
try {
|
|
794
|
-
t = e.frames;
|
|
795
|
-
} catch (u) {
|
|
796
|
-
t = e;
|
|
797
|
-
}
|
|
798
|
-
var r;
|
|
799
|
-
try {
|
|
800
|
-
r = t.length;
|
|
801
|
-
} catch (u) {
|
|
802
|
-
}
|
|
803
|
-
if (r === 0)
|
|
804
|
-
return n;
|
|
805
|
-
if (r) {
|
|
806
|
-
for (var o = 0; o < r; o++) {
|
|
807
|
-
var i = void 0;
|
|
789
|
+
for (var a = 0; a < 100; a++) {
|
|
790
|
+
var l = void 0;
|
|
808
791
|
try {
|
|
809
|
-
|
|
792
|
+
l = t[a];
|
|
810
793
|
} catch (u) {
|
|
811
|
-
|
|
794
|
+
return n;
|
|
812
795
|
}
|
|
813
|
-
|
|
796
|
+
if (!l) return n;
|
|
797
|
+
n.push(l);
|
|
814
798
|
}
|
|
815
799
|
return n;
|
|
816
800
|
}
|
|
817
|
-
|
|
818
|
-
|
|
801
|
+
var Ht = [], _t = [];
|
|
802
|
+
function G(e, n) {
|
|
803
|
+
n === void 0 && (n = !0);
|
|
819
804
|
try {
|
|
820
|
-
|
|
821
|
-
} catch (
|
|
822
|
-
return n;
|
|
823
|
-
}
|
|
824
|
-
if (!l)
|
|
825
|
-
return n;
|
|
826
|
-
n.push(l);
|
|
827
|
-
}
|
|
828
|
-
return n;
|
|
829
|
-
}
|
|
830
|
-
var Lt = [], kt = [];
|
|
831
|
-
function $(e, n) {
|
|
832
|
-
n === void 0 && (n = !0);
|
|
833
|
-
try {
|
|
834
|
-
if (e === window)
|
|
835
|
-
return !1;
|
|
836
|
-
} catch (o) {
|
|
837
|
-
return !0;
|
|
838
|
-
}
|
|
839
|
-
try {
|
|
840
|
-
if (!e)
|
|
805
|
+
if (e === window) return !1;
|
|
806
|
+
} catch (o) {
|
|
841
807
|
return !0;
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
if (e.closed)
|
|
808
|
+
}
|
|
809
|
+
try {
|
|
810
|
+
if (!e) return !0;
|
|
811
|
+
} catch (o) {
|
|
847
812
|
return !0;
|
|
848
|
-
|
|
849
|
-
return !o || o.message !== E;
|
|
850
|
-
}
|
|
851
|
-
if (n && Q(e))
|
|
813
|
+
}
|
|
852
814
|
try {
|
|
853
|
-
if (e.
|
|
854
|
-
return !0;
|
|
815
|
+
if (e.closed) return !0;
|
|
855
816
|
} catch (o) {
|
|
817
|
+
return !o || o.message !== E;
|
|
856
818
|
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
819
|
+
if (n && X(e)) try {
|
|
820
|
+
if (e.mockclosed) return !0;
|
|
821
|
+
} catch (o) {
|
|
822
|
+
}
|
|
823
|
+
try {
|
|
824
|
+
if (!e.parent || !e.top) return !0;
|
|
825
|
+
} catch (o) {
|
|
826
|
+
}
|
|
827
|
+
var t = function(o, i) {
|
|
828
|
+
for (var a = 0; a < o.length; a++) try {
|
|
829
|
+
if (o[a] === i) return a;
|
|
867
830
|
} catch (l) {
|
|
868
831
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
}(r))
|
|
885
|
-
return !0;
|
|
886
|
-
}
|
|
887
|
-
return !1;
|
|
888
|
-
}
|
|
889
|
-
function qe(e) {
|
|
890
|
-
return e === void 0 && (e = window), oe(e = e || window) || k(e) || void 0;
|
|
891
|
-
}
|
|
892
|
-
function re(e, n) {
|
|
893
|
-
if (typeof e == "string") {
|
|
894
|
-
if (typeof n == "string")
|
|
895
|
-
return e === "*" || n === e;
|
|
896
|
-
if (y(n) || Array.isArray(n))
|
|
897
|
-
return !1;
|
|
898
|
-
}
|
|
899
|
-
return y(e) ? y(n) ? e.toString() === n.toString() : !Array.isArray(n) && !!n.match(e) : !!Array.isArray(e) && (Array.isArray(n) ? JSON.stringify(e) === JSON.stringify(n) : !y(n) && e.some(function(t) {
|
|
900
|
-
return re(t, n);
|
|
901
|
-
}));
|
|
902
|
-
}
|
|
903
|
-
function we(e) {
|
|
904
|
-
try {
|
|
905
|
-
if (e === window)
|
|
906
|
-
return !0;
|
|
907
|
-
} catch (n) {
|
|
908
|
-
if (n && n.message === E)
|
|
909
|
-
return !0;
|
|
910
|
-
}
|
|
911
|
-
try {
|
|
912
|
-
if ({}.toString.call(e) === "[object Window]")
|
|
913
|
-
return !0;
|
|
914
|
-
} catch (n) {
|
|
915
|
-
if (n && n.message === E)
|
|
916
|
-
return !0;
|
|
917
|
-
}
|
|
918
|
-
try {
|
|
919
|
-
if (window.Window && e instanceof window.Window)
|
|
920
|
-
return !0;
|
|
921
|
-
} catch (n) {
|
|
922
|
-
if (n && n.message === E)
|
|
923
|
-
return !0;
|
|
924
|
-
}
|
|
925
|
-
try {
|
|
926
|
-
if (e && e.self === e)
|
|
927
|
-
return !0;
|
|
928
|
-
} catch (n) {
|
|
929
|
-
if (n && n.message === E)
|
|
930
|
-
return !0;
|
|
931
|
-
}
|
|
932
|
-
try {
|
|
933
|
-
if (e && e.parent === e)
|
|
934
|
-
return !0;
|
|
935
|
-
} catch (n) {
|
|
936
|
-
if (n && n.message === E)
|
|
937
|
-
return !0;
|
|
938
|
-
}
|
|
939
|
-
try {
|
|
940
|
-
if (e && e.top === e)
|
|
941
|
-
return !0;
|
|
942
|
-
} catch (n) {
|
|
943
|
-
if (n && n.message === E)
|
|
944
|
-
return !0;
|
|
945
|
-
}
|
|
946
|
-
try {
|
|
947
|
-
if (e && e.__cross_domain_utils_window_check__ === "__unlikely_value__")
|
|
948
|
-
return !1;
|
|
949
|
-
} catch (n) {
|
|
950
|
-
return !0;
|
|
951
|
-
}
|
|
952
|
-
try {
|
|
953
|
-
if ("postMessage" in e && "self" in e && "location" in e)
|
|
954
|
-
return !0;
|
|
955
|
-
} catch (n) {
|
|
832
|
+
return -1;
|
|
833
|
+
}(Ht, e);
|
|
834
|
+
if (t !== -1) {
|
|
835
|
+
var r = _t[t];
|
|
836
|
+
if (r && function(o) {
|
|
837
|
+
if (!o.contentWindow || !o.parentNode) return !0;
|
|
838
|
+
var i = o.ownerDocument;
|
|
839
|
+
if (i && i.documentElement && !i.documentElement.contains(o)) {
|
|
840
|
+
for (var a = o; a.parentNode && a.parentNode !== a; ) a = a.parentNode;
|
|
841
|
+
if (!a.host || !i.documentElement.contains(a.host)) return !0;
|
|
842
|
+
}
|
|
843
|
+
return !1;
|
|
844
|
+
}(r)) return !0;
|
|
845
|
+
}
|
|
846
|
+
return !1;
|
|
956
847
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
function Be(e) {
|
|
960
|
-
if (Q(e))
|
|
961
|
-
return ve(e).frameElement;
|
|
962
|
-
for (var n = 0, t = document.querySelectorAll("iframe"); n < t.length; n++) {
|
|
963
|
-
var r = t[n];
|
|
964
|
-
if (r && r.contentWindow && r.contentWindow === e)
|
|
965
|
-
return r;
|
|
848
|
+
function Ge(e) {
|
|
849
|
+
return e === void 0 && (e = window), oe(e = e || window) || k(e) || void 0;
|
|
966
850
|
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}(e)) {
|
|
972
|
-
var n = Be(e);
|
|
973
|
-
if (n && n.parentElement) {
|
|
974
|
-
n.parentElement.removeChild(n);
|
|
975
|
-
return;
|
|
851
|
+
function re(e, n) {
|
|
852
|
+
if (typeof e == "string") {
|
|
853
|
+
if (typeof n == "string") return e === "*" || n === e;
|
|
854
|
+
if (y(n) || Array.isArray(n)) return !1;
|
|
976
855
|
}
|
|
856
|
+
return y(e) ? y(n) ? e.toString() === n.toString() : !Array.isArray(n) && !!n.match(e) : !!Array.isArray(e) && (Array.isArray(n) ? JSON.stringify(e) === JSON.stringify(n) : !y(n) && e.some(function(t) {
|
|
857
|
+
return re(t, n);
|
|
858
|
+
}));
|
|
977
859
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
return !
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
860
|
+
function we(e) {
|
|
861
|
+
try {
|
|
862
|
+
if (e === window) return !0;
|
|
863
|
+
} catch (n) {
|
|
864
|
+
if (n && n.message === E) return !0;
|
|
865
|
+
}
|
|
866
|
+
try {
|
|
867
|
+
if ({}.toString.call(e) === "[object Window]") return !0;
|
|
868
|
+
} catch (n) {
|
|
869
|
+
if (n && n.message === E) return !0;
|
|
870
|
+
}
|
|
871
|
+
try {
|
|
872
|
+
if (window.Window && e instanceof window.Window) return !0;
|
|
873
|
+
} catch (n) {
|
|
874
|
+
if (n && n.message === E) return !0;
|
|
875
|
+
}
|
|
876
|
+
try {
|
|
877
|
+
if (e && e.self === e) return !0;
|
|
878
|
+
} catch (n) {
|
|
879
|
+
if (n && n.message === E) return !0;
|
|
880
|
+
}
|
|
881
|
+
try {
|
|
882
|
+
if (e && e.parent === e) return !0;
|
|
883
|
+
} catch (n) {
|
|
884
|
+
if (n && n.message === E) return !0;
|
|
885
|
+
}
|
|
886
|
+
try {
|
|
887
|
+
if (e && e.top === e) return !0;
|
|
888
|
+
} catch (n) {
|
|
889
|
+
if (n && n.message === E) return !0;
|
|
996
890
|
}
|
|
997
|
-
|
|
891
|
+
try {
|
|
892
|
+
if (e && e.__cross_domain_utils_window_check__ === "__unlikely_value__") return !1;
|
|
893
|
+
} catch (n) {
|
|
998
894
|
return !0;
|
|
999
|
-
|
|
895
|
+
}
|
|
896
|
+
try {
|
|
897
|
+
if ("postMessage" in e && "self" in e && "location" in e) return !0;
|
|
898
|
+
} catch (n) {
|
|
899
|
+
}
|
|
1000
900
|
return !1;
|
|
1001
901
|
}
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
ae = null, e.resolve();
|
|
902
|
+
function Ve(e) {
|
|
903
|
+
if (X(e)) return ve(e).frameElement;
|
|
904
|
+
for (var n = 0, t = document.querySelectorAll("iframe"); n < t.length; n++) {
|
|
905
|
+
var r = t[n];
|
|
906
|
+
if (r && r.contentWindow && r.contentWindow === e) return r;
|
|
907
|
+
}
|
|
1009
908
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
var P = function() {
|
|
1018
|
-
function e(t) {
|
|
1019
|
-
var r = this;
|
|
1020
|
-
if (this.resolved = void 0, this.rejected = void 0, this.errorHandled = void 0, this.value = void 0, this.error = void 0, this.handlers = void 0, this.dispatching = void 0, this.stack = void 0, this.resolved = !1, this.rejected = !1, this.errorHandled = !1, this.handlers = [], t) {
|
|
1021
|
-
var o, i, a = !1, l = !1, u = !1;
|
|
1022
|
-
Pe();
|
|
1023
|
-
try {
|
|
1024
|
-
t(function(s) {
|
|
1025
|
-
u ? r.resolve(s) : (a = !0, o = s);
|
|
1026
|
-
}, function(s) {
|
|
1027
|
-
u ? r.reject(s) : (l = !0, i = s);
|
|
1028
|
-
});
|
|
1029
|
-
} catch (s) {
|
|
1030
|
-
se(), this.reject(s);
|
|
909
|
+
function qt(e) {
|
|
910
|
+
if (function(t) {
|
|
911
|
+
return t === void 0 && (t = window), !!k(t);
|
|
912
|
+
}(e)) {
|
|
913
|
+
var n = Ve(e);
|
|
914
|
+
if (n && n.parentElement) {
|
|
915
|
+
n.parentElement.removeChild(n);
|
|
1031
916
|
return;
|
|
1032
917
|
}
|
|
1033
|
-
se(), u = !0, a ? this.resolve(o) : l && this.reject(i);
|
|
1034
918
|
}
|
|
919
|
+
try {
|
|
920
|
+
e.close();
|
|
921
|
+
} catch (t) {
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
function Q(e) {
|
|
925
|
+
try {
|
|
926
|
+
if (!e) return !1;
|
|
927
|
+
if (typeof Promise != "undefined" && e instanceof Promise) return !0;
|
|
928
|
+
if (typeof window != "undefined" && typeof window.Window == "function" && e instanceof window.Window || typeof window != "undefined" && typeof window.constructor == "function" && e instanceof window.constructor) return !1;
|
|
929
|
+
var n = {}.toString;
|
|
930
|
+
if (n) {
|
|
931
|
+
var t = n.call(e);
|
|
932
|
+
if (t === "[object Window]" || t === "[object global]" || t === "[object DOMWindow]") return !1;
|
|
933
|
+
}
|
|
934
|
+
if (typeof e.then == "function") return !0;
|
|
935
|
+
} catch (r) {
|
|
936
|
+
return !1;
|
|
937
|
+
}
|
|
938
|
+
return !1;
|
|
1035
939
|
}
|
|
1036
|
-
var
|
|
1037
|
-
|
|
1038
|
-
if (
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
throw new Error("Can not resolve promise with another promise");
|
|
1042
|
-
return this.resolved = !0, this.value = t, this.dispatch(), this;
|
|
1043
|
-
}, n.reject = function(t) {
|
|
1044
|
-
var r = this;
|
|
1045
|
-
if (this.resolved || this.rejected)
|
|
1046
|
-
return this;
|
|
1047
|
-
if (ee(t))
|
|
1048
|
-
throw new Error("Can not reject promise with another promise");
|
|
1049
|
-
if (!t) {
|
|
1050
|
-
var o = t && typeof t.toString == "function" ? t.toString() : {}.toString.call(t);
|
|
1051
|
-
t = new Error("Expected reject to be called with Error, got " + o);
|
|
940
|
+
var Je = [], ie = [], Pe = 0, ae;
|
|
941
|
+
function Ye() {
|
|
942
|
+
if (!Pe && ae) {
|
|
943
|
+
var e = ae;
|
|
944
|
+
ae = null, e.resolve();
|
|
1052
945
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
946
|
+
}
|
|
947
|
+
function Ce() {
|
|
948
|
+
Pe += 1;
|
|
949
|
+
}
|
|
950
|
+
function se() {
|
|
951
|
+
Pe -= 1, Ye();
|
|
952
|
+
}
|
|
953
|
+
var P = function() {
|
|
954
|
+
function e(t) {
|
|
955
|
+
var r = this;
|
|
956
|
+
if (this.resolved = void 0, this.rejected = void 0, this.errorHandled = void 0, this.value = void 0, this.error = void 0, this.handlers = void 0, this.dispatching = void 0, this.stack = void 0, this.resolved = !1, this.rejected = !1, this.errorHandled = !1, this.handlers = [], t) {
|
|
957
|
+
var o, i, a = !1, l = !1, u = !1;
|
|
958
|
+
Ce();
|
|
959
|
+
try {
|
|
960
|
+
t(function(s) {
|
|
961
|
+
u ? r.resolve(s) : (a = !0, o = s);
|
|
962
|
+
}, function(s) {
|
|
963
|
+
u ? r.reject(s) : (l = !0, i = s);
|
|
964
|
+
});
|
|
965
|
+
} catch (s) {
|
|
966
|
+
se(), this.reject(s);
|
|
967
|
+
return;
|
|
1061
968
|
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
this.
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
});
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
969
|
+
se(), u = !0, a ? this.resolve(o) : l && this.reject(i);
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
var n = e.prototype;
|
|
973
|
+
return n.resolve = function(t) {
|
|
974
|
+
if (this.resolved || this.rejected) return this;
|
|
975
|
+
if (Q(t)) throw new Error("Can not resolve promise with another promise");
|
|
976
|
+
return this.resolved = !0, this.value = t, this.dispatch(), this;
|
|
977
|
+
}, n.reject = function(t) {
|
|
978
|
+
var r = this;
|
|
979
|
+
if (this.resolved || this.rejected) return this;
|
|
980
|
+
if (Q(t)) throw new Error("Can not reject promise with another promise");
|
|
981
|
+
if (!t) {
|
|
982
|
+
var o = t && typeof t.toString == "function" ? t.toString() : {}.toString.call(t);
|
|
983
|
+
t = new Error("Expected reject to be called with Error, got " + o);
|
|
984
|
+
}
|
|
985
|
+
return this.rejected = !0, this.error = t, this.errorHandled || setTimeout(function() {
|
|
986
|
+
r.errorHandled || function(i, a) {
|
|
987
|
+
if (Je.indexOf(i) === -1) {
|
|
988
|
+
Je.push(i), setTimeout(function() {
|
|
989
|
+
throw i;
|
|
990
|
+
}, 1);
|
|
991
|
+
for (var l = 0; l < ie.length; l++) ie[l](i, a);
|
|
992
|
+
}
|
|
993
|
+
}(t, r);
|
|
994
|
+
}, 1), this.dispatch(), this;
|
|
995
|
+
}, n.asyncReject = function(t) {
|
|
996
|
+
return this.errorHandled = !0, this.reject(t), this;
|
|
997
|
+
}, n.dispatch = function() {
|
|
998
|
+
var t = this.resolved, r = this.rejected, o = this.handlers;
|
|
999
|
+
if (!this.dispatching && (t || r)) {
|
|
1000
|
+
this.dispatching = !0, Ce();
|
|
1001
|
+
for (var i = function(g, b) {
|
|
1002
|
+
return g.then(function(x) {
|
|
1003
|
+
b.resolve(x);
|
|
1004
|
+
}, function(x) {
|
|
1005
|
+
b.reject(x);
|
|
1006
|
+
});
|
|
1007
|
+
}, a = 0; a < o.length; a++) {
|
|
1008
|
+
var l = o[a], u = l.onSuccess, s = l.onError, w = l.promise, m = void 0;
|
|
1009
|
+
if (t) try {
|
|
1080
1010
|
m = u ? u(this.value) : this.value;
|
|
1081
1011
|
} catch (g) {
|
|
1082
1012
|
w.reject(g);
|
|
1083
1013
|
continue;
|
|
1084
1014
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1015
|
+
else if (r) {
|
|
1016
|
+
if (!s) {
|
|
1017
|
+
w.reject(this.error);
|
|
1018
|
+
continue;
|
|
1019
|
+
}
|
|
1020
|
+
try {
|
|
1021
|
+
m = s(this.error);
|
|
1022
|
+
} catch (g) {
|
|
1023
|
+
w.reject(g);
|
|
1024
|
+
continue;
|
|
1025
|
+
}
|
|
1095
1026
|
}
|
|
1027
|
+
if (m instanceof e && (m.resolved || m.rejected)) {
|
|
1028
|
+
var p = m;
|
|
1029
|
+
p.resolved ? w.resolve(p.value) : w.reject(p.error), p.errorHandled = !0;
|
|
1030
|
+
} else Q(m) ? m instanceof e && (m.resolved || m.rejected) ? m.resolved ? w.resolve(m.value) : w.reject(m.error) : i(m, w) : w.resolve(m);
|
|
1096
1031
|
}
|
|
1097
|
-
|
|
1098
|
-
var p = m;
|
|
1099
|
-
p.resolved ? w.resolve(p.value) : w.reject(p.error), p.errorHandled = !0;
|
|
1100
|
-
} else
|
|
1101
|
-
ee(m) ? m instanceof e && (m.resolved || m.rejected) ? m.resolved ? w.resolve(m.value) : w.reject(m.error) : i(m, w) : w.resolve(m);
|
|
1032
|
+
o.length = 0, this.dispatching = !1, se();
|
|
1102
1033
|
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
});
|
|
1125
|
-
}, function(r) {
|
|
1126
|
-
return e.try(t).then(function() {
|
|
1127
|
-
throw r;
|
|
1034
|
+
}, n.then = function(t, r) {
|
|
1035
|
+
if (t && typeof t != "function" && !t.call) throw new Error("Promise.then expected a function for success handler");
|
|
1036
|
+
if (r && typeof r != "function" && !r.call) throw new Error("Promise.then expected a function for error handler");
|
|
1037
|
+
var o = new e();
|
|
1038
|
+
return this.handlers.push({
|
|
1039
|
+
promise: o,
|
|
1040
|
+
onSuccess: t,
|
|
1041
|
+
onError: r
|
|
1042
|
+
}), this.errorHandled = !0, this.dispatch(), o;
|
|
1043
|
+
}, n.catch = function(t) {
|
|
1044
|
+
return this.then(void 0, t);
|
|
1045
|
+
}, n.finally = function(t) {
|
|
1046
|
+
if (t && typeof t != "function" && !t.call) throw new Error("Promise.finally expected a function");
|
|
1047
|
+
return this.then(function(r) {
|
|
1048
|
+
return e.try(t).then(function() {
|
|
1049
|
+
return r;
|
|
1050
|
+
});
|
|
1051
|
+
}, function(r) {
|
|
1052
|
+
return e.try(t).then(function() {
|
|
1053
|
+
throw r;
|
|
1054
|
+
});
|
|
1128
1055
|
});
|
|
1129
|
-
})
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
return this.then(function(a) {
|
|
1138
|
-
return clearTimeout(i), a;
|
|
1139
|
-
});
|
|
1140
|
-
}, n.toPromise = function() {
|
|
1141
|
-
if (typeof Promise == "undefined")
|
|
1142
|
-
throw new TypeError("Could not find Promise");
|
|
1143
|
-
return Promise.resolve(this);
|
|
1144
|
-
}, n.lazy = function() {
|
|
1145
|
-
return this.errorHandled = !0, this;
|
|
1146
|
-
}, e.resolve = function(t) {
|
|
1147
|
-
return t instanceof e ? t : ee(t) ? new e(function(r, o) {
|
|
1148
|
-
return t.then(r, o);
|
|
1149
|
-
}) : new e().resolve(t);
|
|
1150
|
-
}, e.reject = function(t) {
|
|
1151
|
-
return new e().reject(t);
|
|
1152
|
-
}, e.asyncReject = function(t) {
|
|
1153
|
-
return new e().asyncReject(t);
|
|
1154
|
-
}, e.all = function(t) {
|
|
1155
|
-
var r = new e(), o = t.length, i = [].slice();
|
|
1156
|
-
if (!o)
|
|
1157
|
-
return r.resolve(i), r;
|
|
1158
|
-
for (var a = function(s, w, m) {
|
|
1159
|
-
return w.then(function(p) {
|
|
1160
|
-
i[s] = p, (o -= 1) == 0 && r.resolve(i);
|
|
1161
|
-
}, function(p) {
|
|
1162
|
-
m.reject(p);
|
|
1056
|
+
}, n.timeout = function(t, r) {
|
|
1057
|
+
var o = this;
|
|
1058
|
+
if (this.resolved || this.rejected) return this;
|
|
1059
|
+
var i = setTimeout(function() {
|
|
1060
|
+
o.resolved || o.rejected || o.reject(r || new Error("Promise timed out after " + t + "ms"));
|
|
1061
|
+
}, t);
|
|
1062
|
+
return this.then(function(a) {
|
|
1063
|
+
return clearTimeout(i), a;
|
|
1163
1064
|
});
|
|
1164
|
-
},
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1065
|
+
}, n.toPromise = function() {
|
|
1066
|
+
if (typeof Promise == "undefined") throw new TypeError("Could not find Promise");
|
|
1067
|
+
return Promise.resolve(this);
|
|
1068
|
+
}, n.lazy = function() {
|
|
1069
|
+
return this.errorHandled = !0, this;
|
|
1070
|
+
}, e.resolve = function(t) {
|
|
1071
|
+
return t instanceof e ? t : Q(t) ? new e(function(r, o) {
|
|
1072
|
+
return t.then(r, o);
|
|
1073
|
+
}) : new e().resolve(t);
|
|
1074
|
+
}, e.reject = function(t) {
|
|
1075
|
+
return new e().reject(t);
|
|
1076
|
+
}, e.asyncReject = function(t) {
|
|
1077
|
+
return new e().asyncReject(t);
|
|
1078
|
+
}, e.all = function(t) {
|
|
1079
|
+
var r = new e(), o = t.length, i = [].slice();
|
|
1080
|
+
if (!o)
|
|
1081
|
+
return r.resolve(i), r;
|
|
1082
|
+
for (var a = function(s, w, m) {
|
|
1083
|
+
return w.then(function(p) {
|
|
1084
|
+
i[s] = p, (o -= 1) == 0 && r.resolve(i);
|
|
1085
|
+
}, function(p) {
|
|
1086
|
+
m.reject(p);
|
|
1087
|
+
});
|
|
1088
|
+
}, l = 0; l < t.length; l++) {
|
|
1089
|
+
var u = t[l];
|
|
1090
|
+
if (u instanceof e) {
|
|
1091
|
+
if (u.resolved) {
|
|
1092
|
+
i[l] = u.value, o -= 1;
|
|
1093
|
+
continue;
|
|
1094
|
+
}
|
|
1095
|
+
} else if (!Q(u)) {
|
|
1096
|
+
i[l] = u, o -= 1;
|
|
1169
1097
|
continue;
|
|
1170
1098
|
}
|
|
1171
|
-
|
|
1172
|
-
i[l] = u, o -= 1;
|
|
1173
|
-
continue;
|
|
1174
|
-
}
|
|
1175
|
-
a(l, e.resolve(u), r);
|
|
1176
|
-
}
|
|
1177
|
-
return o === 0 && r.resolve(i), r;
|
|
1178
|
-
}, e.hash = function(t) {
|
|
1179
|
-
var r = {}, o = [], i = function(l) {
|
|
1180
|
-
if (t.hasOwnProperty(l)) {
|
|
1181
|
-
var u = t[l];
|
|
1182
|
-
ee(u) ? o.push(u.then(function(s) {
|
|
1183
|
-
r[l] = s;
|
|
1184
|
-
})) : r[l] = u;
|
|
1099
|
+
a(l, e.resolve(u), r);
|
|
1185
1100
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
i(
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
}, e.onPossiblyUnhandledException = function(t) {
|
|
1195
|
-
return function(r) {
|
|
1196
|
-
return ie.push(r), {
|
|
1197
|
-
cancel: function() {
|
|
1198
|
-
ie.splice(ie.indexOf(r), 1);
|
|
1101
|
+
return o === 0 && r.resolve(i), r;
|
|
1102
|
+
}, e.hash = function(t) {
|
|
1103
|
+
var r = {}, o = [], i = function(l) {
|
|
1104
|
+
if (t.hasOwnProperty(l)) {
|
|
1105
|
+
var u = t[l];
|
|
1106
|
+
Q(u) ? o.push(u.then(function(s) {
|
|
1107
|
+
r[l] = s;
|
|
1108
|
+
})) : r[l] = u;
|
|
1199
1109
|
}
|
|
1200
1110
|
};
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
}, e.flush = function() {
|
|
1220
|
-
return function(t) {
|
|
1221
|
-
var r = ae = ae || new t();
|
|
1222
|
-
return $e(), r;
|
|
1223
|
-
}(e);
|
|
1224
|
-
}, e;
|
|
1225
|
-
}();
|
|
1226
|
-
function ge(e, n) {
|
|
1227
|
-
for (var t = 0; t < e.length; t++)
|
|
1228
|
-
try {
|
|
1229
|
-
if (e[t] === n)
|
|
1230
|
-
return t;
|
|
1231
|
-
} catch (r) {
|
|
1232
|
-
}
|
|
1233
|
-
return -1;
|
|
1234
|
-
}
|
|
1235
|
-
var Ce = function() {
|
|
1236
|
-
function e() {
|
|
1237
|
-
if (this.name = void 0, this.weakmap = void 0, this.keys = void 0, this.values = void 0, this.name = "__weakmap_" + (1e9 * Math.random() >>> 0) + "__", function() {
|
|
1238
|
-
if (typeof WeakMap == "undefined" || Object.freeze === void 0)
|
|
1239
|
-
return !1;
|
|
1240
|
-
try {
|
|
1241
|
-
var t = /* @__PURE__ */ new WeakMap(), r = {};
|
|
1242
|
-
return Object.freeze(r), t.set(r, "__testvalue__"), t.get(r) === "__testvalue__";
|
|
1243
|
-
} catch (o) {
|
|
1244
|
-
return !1;
|
|
1245
|
-
}
|
|
1246
|
-
}())
|
|
1111
|
+
for (var a in t) i(a);
|
|
1112
|
+
return e.all(o).then(function() {
|
|
1113
|
+
return r;
|
|
1114
|
+
});
|
|
1115
|
+
}, e.map = function(t, r) {
|
|
1116
|
+
return e.all(t.map(r));
|
|
1117
|
+
}, e.onPossiblyUnhandledException = function(t) {
|
|
1118
|
+
return function(r) {
|
|
1119
|
+
return ie.push(r), {
|
|
1120
|
+
cancel: function() {
|
|
1121
|
+
ie.splice(ie.indexOf(r), 1);
|
|
1122
|
+
}
|
|
1123
|
+
};
|
|
1124
|
+
}(t);
|
|
1125
|
+
}, e.try = function(t, r, o) {
|
|
1126
|
+
if (t && typeof t != "function" && !t.call) throw new Error("Promise.try expected a function");
|
|
1127
|
+
var i;
|
|
1128
|
+
Ce();
|
|
1247
1129
|
try {
|
|
1248
|
-
|
|
1249
|
-
} catch (
|
|
1130
|
+
i = t.apply(r, o || []);
|
|
1131
|
+
} catch (a) {
|
|
1132
|
+
return se(), e.reject(a);
|
|
1250
1133
|
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1134
|
+
return se(), e.resolve(i);
|
|
1135
|
+
}, e.delay = function(t) {
|
|
1136
|
+
return new e(function(r) {
|
|
1137
|
+
setTimeout(r, t);
|
|
1138
|
+
});
|
|
1139
|
+
}, e.isPromise = function(t) {
|
|
1140
|
+
return !!(t && t instanceof e) || Q(t);
|
|
1141
|
+
}, e.flush = function() {
|
|
1142
|
+
return function(t) {
|
|
1143
|
+
var r = ae = ae || new t();
|
|
1144
|
+
return Ye(), r;
|
|
1145
|
+
}(e);
|
|
1146
|
+
}, e;
|
|
1147
|
+
}();
|
|
1148
|
+
function ge(e, n) {
|
|
1149
|
+
for (var t = 0; t < e.length; t++) try {
|
|
1150
|
+
if (e[t] === n) return t;
|
|
1151
|
+
} catch (r) {
|
|
1152
|
+
}
|
|
1153
|
+
return -1;
|
|
1154
|
+
}
|
|
1155
|
+
var Te = function() {
|
|
1156
|
+
function e() {
|
|
1157
|
+
if (this.name = void 0, this.weakmap = void 0, this.keys = void 0, this.values = void 0, this.name = "__weakmap_" + (1e9 * Math.random() >>> 0) + "__", function() {
|
|
1158
|
+
if (typeof WeakMap == "undefined" || Object.freeze === void 0) return !1;
|
|
1159
|
+
try {
|
|
1160
|
+
var t = /* @__PURE__ */ new WeakMap(), r = {};
|
|
1161
|
+
return Object.freeze(r), t.set(r, "__testvalue__"), t.get(r) === "__testvalue__";
|
|
1162
|
+
} catch (o) {
|
|
1163
|
+
return !1;
|
|
1164
|
+
}
|
|
1165
|
+
}()) try {
|
|
1166
|
+
this.weakmap = /* @__PURE__ */ new WeakMap();
|
|
1167
|
+
} catch (t) {
|
|
1264
1168
|
}
|
|
1169
|
+
this.keys = [], this.values = [];
|
|
1265
1170
|
}
|
|
1266
|
-
|
|
1267
|
-
return
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1171
|
+
var n = e.prototype;
|
|
1172
|
+
return n._cleanupClosedWindows = function() {
|
|
1173
|
+
for (var t = this.weakmap, r = this.keys, o = 0; o < r.length; o++) {
|
|
1174
|
+
var i = r[o];
|
|
1175
|
+
if (we(i) && G(i)) {
|
|
1176
|
+
if (t) try {
|
|
1177
|
+
t.delete(i);
|
|
1178
|
+
} catch (a) {
|
|
1179
|
+
}
|
|
1180
|
+
r.splice(o, 1), this.values.splice(o, 1), o -= 1;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
}, n.isSafeToReadWrite = function(t) {
|
|
1184
|
+
return !we(t);
|
|
1185
|
+
}, n.set = function(t, r) {
|
|
1186
|
+
if (!t) throw new Error("WeakMap expected key");
|
|
1187
|
+
var o = this.weakmap;
|
|
1188
|
+
if (o) try {
|
|
1274
1189
|
o.set(t, r);
|
|
1275
1190
|
} catch (w) {
|
|
1276
1191
|
delete this.weakmap;
|
|
1277
1192
|
}
|
|
1278
|
-
|
|
1279
|
-
try {
|
|
1193
|
+
if (this.isSafeToReadWrite(t)) try {
|
|
1280
1194
|
var i = this.name, a = t[i];
|
|
1281
1195
|
a && a[0] === t ? a[1] = r : Object.defineProperty(t, i, {
|
|
1282
1196
|
value: [t, r],
|
|
@@ -1285,532 +1199,488 @@ var Mt = { exports: {} }, jt = { exports: {} };
|
|
|
1285
1199
|
return;
|
|
1286
1200
|
} catch (w) {
|
|
1287
1201
|
}
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
try {
|
|
1297
|
-
if (r.has(t))
|
|
1298
|
-
return r.get(t);
|
|
1202
|
+
this._cleanupClosedWindows();
|
|
1203
|
+
var l = this.keys, u = this.values, s = ge(l, t);
|
|
1204
|
+
s === -1 ? (l.push(t), u.push(r)) : u[s] = r;
|
|
1205
|
+
}, n.get = function(t) {
|
|
1206
|
+
if (!t) throw new Error("WeakMap expected key");
|
|
1207
|
+
var r = this.weakmap;
|
|
1208
|
+
if (r) try {
|
|
1209
|
+
if (r.has(t)) return r.get(t);
|
|
1299
1210
|
} catch (a) {
|
|
1300
1211
|
delete this.weakmap;
|
|
1301
1212
|
}
|
|
1302
|
-
|
|
1303
|
-
try {
|
|
1213
|
+
if (this.isSafeToReadWrite(t)) try {
|
|
1304
1214
|
var o = t[this.name];
|
|
1305
1215
|
return o && o[0] === t ? o[1] : void 0;
|
|
1306
1216
|
} catch (a) {
|
|
1307
1217
|
}
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
var r = this.weakmap;
|
|
1316
|
-
if (r)
|
|
1317
|
-
try {
|
|
1218
|
+
this._cleanupClosedWindows();
|
|
1219
|
+
var i = ge(this.keys, t);
|
|
1220
|
+
if (i !== -1) return this.values[i];
|
|
1221
|
+
}, n.delete = function(t) {
|
|
1222
|
+
if (!t) throw new Error("WeakMap expected key");
|
|
1223
|
+
var r = this.weakmap;
|
|
1224
|
+
if (r) try {
|
|
1318
1225
|
r.delete(t);
|
|
1319
1226
|
} catch (l) {
|
|
1320
1227
|
delete this.weakmap;
|
|
1321
1228
|
}
|
|
1322
|
-
|
|
1323
|
-
try {
|
|
1229
|
+
if (this.isSafeToReadWrite(t)) try {
|
|
1324
1230
|
var o = t[this.name];
|
|
1325
1231
|
o && o[0] === t && (o[0] = o[1] = void 0);
|
|
1326
1232
|
} catch (l) {
|
|
1327
1233
|
}
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
try {
|
|
1337
|
-
if (r.has(t))
|
|
1338
|
-
return !0;
|
|
1234
|
+
this._cleanupClosedWindows();
|
|
1235
|
+
var i = this.keys, a = ge(i, t);
|
|
1236
|
+
a !== -1 && (i.splice(a, 1), this.values.splice(a, 1));
|
|
1237
|
+
}, n.has = function(t) {
|
|
1238
|
+
if (!t) throw new Error("WeakMap expected key");
|
|
1239
|
+
var r = this.weakmap;
|
|
1240
|
+
if (r) try {
|
|
1241
|
+
if (r.has(t)) return !0;
|
|
1339
1242
|
} catch (i) {
|
|
1340
1243
|
delete this.weakmap;
|
|
1341
1244
|
}
|
|
1342
|
-
|
|
1343
|
-
try {
|
|
1245
|
+
if (this.isSafeToReadWrite(t)) try {
|
|
1344
1246
|
var o = t[this.name];
|
|
1345
1247
|
return !(!o || o[0] !== t);
|
|
1346
1248
|
} catch (i) {
|
|
1347
1249
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
return e.name || e.__name__ || e.displayName || "anonymous";
|
|
1358
|
-
}
|
|
1359
|
-
function Je(e, n) {
|
|
1360
|
-
try {
|
|
1361
|
-
delete e.name, e.name = n;
|
|
1362
|
-
} catch (t) {
|
|
1250
|
+
return this._cleanupClosedWindows(), ge(this.keys, t) !== -1;
|
|
1251
|
+
}, n.getOrSet = function(t, r) {
|
|
1252
|
+
if (this.has(t)) return this.get(t);
|
|
1253
|
+
var o = r();
|
|
1254
|
+
return this.set(t, o), o;
|
|
1255
|
+
}, e;
|
|
1256
|
+
}();
|
|
1257
|
+
function Ze(e) {
|
|
1258
|
+
return e.name || e.__name__ || e.displayName || "anonymous";
|
|
1363
1259
|
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
return e.
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
|
|
1260
|
+
function Ke(e, n) {
|
|
1261
|
+
try {
|
|
1262
|
+
delete e.name, e.name = n;
|
|
1263
|
+
} catch (t) {
|
|
1264
|
+
}
|
|
1265
|
+
return e.__name__ = e.displayName = n, e;
|
|
1266
|
+
}
|
|
1267
|
+
function J() {
|
|
1268
|
+
var e = "0123456789abcdef";
|
|
1269
|
+
return "uid_" + "xxxxxxxxxx".replace(/./g, function() {
|
|
1270
|
+
return e.charAt(Math.floor(Math.random() * e.length));
|
|
1271
|
+
}) + "_" + function(n) {
|
|
1272
|
+
if (typeof btoa == "function") return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g, function(t, r) {
|
|
1373
1273
|
return String.fromCharCode(parseInt(r, 16));
|
|
1374
1274
|
})).replace(/[=]/g, "");
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
}((/* @__PURE__ */ new Date()).toISOString().slice(11, 19).replace("T", ".")).replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
1379
|
-
}
|
|
1380
|
-
var ye;
|
|
1381
|
-
function Ye(e) {
|
|
1382
|
-
try {
|
|
1383
|
-
return JSON.stringify([].slice.call(e), function(n, t) {
|
|
1384
|
-
return typeof t == "function" ? "memoize[" + function(r) {
|
|
1385
|
-
if (ye = ye || new Ce(), r == null || typeof r != "object" && typeof r != "function")
|
|
1386
|
-
throw new Error("Invalid object");
|
|
1387
|
-
var o = ye.get(r);
|
|
1388
|
-
return o || (o = typeof r + ":" + J(), ye.set(r, o)), o;
|
|
1389
|
-
}(t) + "]" : typeof window != "undefined" && t instanceof window.Element || t !== null && typeof t == "object" && t.nodeType === 1 && typeof t.style == "object" && typeof t.ownerDocument == "object" ? {} : t;
|
|
1390
|
-
});
|
|
1391
|
-
} catch (n) {
|
|
1392
|
-
throw new Error("Arguments not serializable -- can not be used to memoize");
|
|
1275
|
+
if (typeof Buffer != "undefined") return Buffer.from(n, "utf8").toString("base64").replace(/[=]/g, "");
|
|
1276
|
+
throw new Error("Can not find window.btoa or Buffer");
|
|
1277
|
+
}((/* @__PURE__ */ new Date()).toISOString().slice(11, 19).replace("T", ".")).replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
1393
1278
|
}
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
return {};
|
|
1397
|
-
}
|
|
1398
|
-
var ue = 0, Ze = 0;
|
|
1399
|
-
function ce(e, n) {
|
|
1400
|
-
n === void 0 && (n = {});
|
|
1401
|
-
var t = n.thisNamespace, r = t !== void 0 && t, o = n.time, i, a, l = ue;
|
|
1402
|
-
ue += 1;
|
|
1403
|
-
var u = function() {
|
|
1404
|
-
for (var s = arguments.length, w = new Array(s), m = 0; m < s; m++)
|
|
1405
|
-
w[m] = arguments[m];
|
|
1406
|
-
l < Ze && (i = null, a = null, l = ue, ue += 1);
|
|
1407
|
-
var p;
|
|
1408
|
-
p = r ? (a = a || new Ce()).getOrSet(this, Ft) : i = i || {};
|
|
1409
|
-
var g;
|
|
1279
|
+
var ye;
|
|
1280
|
+
function Xe(e) {
|
|
1410
1281
|
try {
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1282
|
+
return JSON.stringify([].slice.call(e), function(n, t) {
|
|
1283
|
+
return typeof t == "function" ? "memoize[" + function(r) {
|
|
1284
|
+
if (ye = ye || new Te(), r == null || typeof r != "object" && typeof r != "function") throw new Error("Invalid object");
|
|
1285
|
+
var o = ye.get(r);
|
|
1286
|
+
return o || (o = typeof r + ":" + J(), ye.set(r, o)), o;
|
|
1287
|
+
}(t) + "]" : typeof window != "undefined" && t instanceof window.Element || t !== null && typeof t == "object" && t.nodeType === 1 && typeof t.style == "object" && typeof t.ownerDocument == "object" ? {} : t;
|
|
1288
|
+
});
|
|
1289
|
+
} catch (n) {
|
|
1290
|
+
throw new Error("Arguments not serializable -- can not be used to memoize");
|
|
1414
1291
|
}
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1292
|
+
}
|
|
1293
|
+
function $t() {
|
|
1294
|
+
return {};
|
|
1295
|
+
}
|
|
1296
|
+
var ue = 0, Qe = 0;
|
|
1297
|
+
function ce(e, n) {
|
|
1298
|
+
n === void 0 && (n = {});
|
|
1299
|
+
var t = n.thisNamespace, r = t !== void 0 && t, o = n.time, i, a, l = ue;
|
|
1300
|
+
ue += 1;
|
|
1301
|
+
var u = function() {
|
|
1302
|
+
for (var s = arguments.length, w = new Array(s), m = 0; m < s; m++) w[m] = arguments[m];
|
|
1303
|
+
l < Qe && (i = null, a = null, l = ue, ue += 1);
|
|
1304
|
+
var p;
|
|
1305
|
+
p = r ? (a = a || new Te()).getOrSet(this, $t) : i = i || {};
|
|
1306
|
+
var g;
|
|
1307
|
+
try {
|
|
1308
|
+
g = Xe(w);
|
|
1309
|
+
} catch (C) {
|
|
1310
|
+
return e.apply(this, arguments);
|
|
1311
|
+
}
|
|
1312
|
+
var b = p[g];
|
|
1313
|
+
if (b && o && Date.now() - b.time < o && (delete p[g], b = null), b) return b.value;
|
|
1314
|
+
var x = Date.now(), S = e.apply(this, arguments);
|
|
1315
|
+
return p[g] = {
|
|
1316
|
+
time: x,
|
|
1317
|
+
value: S
|
|
1318
|
+
}, S;
|
|
1319
|
+
};
|
|
1320
|
+
return u.reset = function() {
|
|
1321
|
+
i = null, a = null;
|
|
1322
|
+
}, Ke(u, (n.name || Ze(e)) + "::memoized");
|
|
1323
|
+
}
|
|
1324
|
+
ce.clear = function() {
|
|
1325
|
+
Qe = ue;
|
|
1423
1326
|
};
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
for (var r = arguments, o = this, i = arguments.length, a = new Array(i), l = 0; l < i; l++)
|
|
1435
|
-
a[l] = arguments[l];
|
|
1436
|
-
var u = Ye(a);
|
|
1437
|
-
return n.hasOwnProperty(u) || (n[u] = P.try(function() {
|
|
1438
|
-
return e.apply(o, r);
|
|
1439
|
-
}).finally(function() {
|
|
1440
|
-
delete n[u];
|
|
1441
|
-
})), n[u];
|
|
1442
|
-
}
|
|
1443
|
-
return t.reset = function() {
|
|
1444
|
-
n = {};
|
|
1445
|
-
}, Je(t, Ve(e) + "::promiseMemoized");
|
|
1446
|
-
}
|
|
1447
|
-
function te() {
|
|
1448
|
-
}
|
|
1449
|
-
function de(e, n) {
|
|
1450
|
-
if (n === void 0 && (n = 1), n >= 3)
|
|
1451
|
-
return "stringifyError stack overflow";
|
|
1452
|
-
try {
|
|
1453
|
-
if (!e)
|
|
1454
|
-
return "<unknown error: " + {}.toString.call(e) + ">";
|
|
1455
|
-
if (typeof e == "string")
|
|
1456
|
-
return e;
|
|
1457
|
-
if (e instanceof Error) {
|
|
1458
|
-
var t = e && e.stack, r = e && e.message;
|
|
1459
|
-
if (t && r)
|
|
1460
|
-
return t.indexOf(r) !== -1 ? t : r + `
|
|
1461
|
-
` + t;
|
|
1462
|
-
if (t)
|
|
1463
|
-
return t;
|
|
1464
|
-
if (r)
|
|
1465
|
-
return r;
|
|
1327
|
+
function Bt(e) {
|
|
1328
|
+
var n = {};
|
|
1329
|
+
function t() {
|
|
1330
|
+
for (var r = arguments, o = this, i = arguments.length, a = new Array(i), l = 0; l < i; l++) a[l] = arguments[l];
|
|
1331
|
+
var u = Xe(a);
|
|
1332
|
+
return n.hasOwnProperty(u) || (n[u] = P.try(function() {
|
|
1333
|
+
return e.apply(o, r);
|
|
1334
|
+
}).finally(function() {
|
|
1335
|
+
delete n[u];
|
|
1336
|
+
})), n[u];
|
|
1466
1337
|
}
|
|
1467
|
-
return
|
|
1468
|
-
|
|
1469
|
-
|
|
1338
|
+
return t.reset = function() {
|
|
1339
|
+
n = {};
|
|
1340
|
+
}, Ke(t, Ze(e) + "::promiseMemoized");
|
|
1470
1341
|
}
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
ce(function(e) {
|
|
1476
|
-
if (Object.values)
|
|
1477
|
-
return Object.values(e);
|
|
1478
|
-
var n = [];
|
|
1479
|
-
for (var t in e)
|
|
1480
|
-
e.hasOwnProperty(t) && n.push(e[t]);
|
|
1481
|
-
return n;
|
|
1482
|
-
});
|
|
1483
|
-
function Te(e) {
|
|
1484
|
-
return {}.toString.call(e) === "[object RegExp]";
|
|
1485
|
-
}
|
|
1486
|
-
function fe(e, n, t) {
|
|
1487
|
-
if (e.hasOwnProperty(n))
|
|
1488
|
-
return e[n];
|
|
1489
|
-
var r = t();
|
|
1490
|
-
return e[n] = r, r;
|
|
1491
|
-
}
|
|
1492
|
-
function Xe() {
|
|
1493
|
-
var e = document.body;
|
|
1494
|
-
if (!e)
|
|
1495
|
-
throw new Error("Body element not found");
|
|
1496
|
-
return e;
|
|
1497
|
-
}
|
|
1498
|
-
function Qe() {
|
|
1499
|
-
return !!document.body && document.readyState === "complete";
|
|
1500
|
-
}
|
|
1501
|
-
function et() {
|
|
1502
|
-
return !!document.body && document.readyState === "interactive";
|
|
1503
|
-
}
|
|
1504
|
-
ce(function() {
|
|
1505
|
-
return new P(function(e) {
|
|
1506
|
-
if (Qe() || et())
|
|
1507
|
-
return e();
|
|
1508
|
-
var n = setInterval(function() {
|
|
1509
|
-
if (Qe() || et())
|
|
1510
|
-
return clearInterval(n), e();
|
|
1511
|
-
}, 10);
|
|
1512
|
-
});
|
|
1513
|
-
});
|
|
1514
|
-
var Ee = typeof document != "undefined" ? document.currentScript : null, _t = ce(function() {
|
|
1515
|
-
if (Ee || (Ee = function() {
|
|
1342
|
+
function ee() {
|
|
1343
|
+
}
|
|
1344
|
+
function de(e, n) {
|
|
1345
|
+
if (n === void 0 && (n = 1), n >= 3) return "stringifyError stack overflow";
|
|
1516
1346
|
try {
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
return;
|
|
1526
|
-
for (var r = 0, o = [].slice.call(document.getElementsByTagName("script")).reverse(); r < o.length; r++) {
|
|
1527
|
-
var i = o[r];
|
|
1528
|
-
if (i.src && i.src === t)
|
|
1529
|
-
return i;
|
|
1347
|
+
if (!e) return "<unknown error: " + {}.toString.call(e) + ">";
|
|
1348
|
+
if (typeof e == "string") return e;
|
|
1349
|
+
if (e instanceof Error) {
|
|
1350
|
+
var t = e && e.stack, r = e && e.message;
|
|
1351
|
+
if (t && r) return t.indexOf(r) !== -1 ? t : r + `
|
|
1352
|
+
` + t;
|
|
1353
|
+
if (t) return t;
|
|
1354
|
+
if (r) return r;
|
|
1530
1355
|
}
|
|
1531
|
-
|
|
1356
|
+
return e && e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
|
|
1357
|
+
} catch (o) {
|
|
1358
|
+
return "Error while stringifying error: " + de(o, n + 1);
|
|
1532
1359
|
}
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
e
|
|
1541
|
-
} catch (r) {
|
|
1542
|
-
return qt;
|
|
1543
|
-
}
|
|
1544
|
-
var n = e.getAttribute("data-uid");
|
|
1545
|
-
if (n && typeof n == "string" || (n = e.getAttribute("data-uid-auto")) && typeof n == "string")
|
|
1360
|
+
}
|
|
1361
|
+
function et(e) {
|
|
1362
|
+
return typeof e == "string" ? e : e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
|
|
1363
|
+
}
|
|
1364
|
+
ce(function(e) {
|
|
1365
|
+
if (Object.values) return Object.values(e);
|
|
1366
|
+
var n = [];
|
|
1367
|
+
for (var t in e) e.hasOwnProperty(t) && n.push(e[t]);
|
|
1546
1368
|
return n;
|
|
1547
|
-
if (e.src) {
|
|
1548
|
-
var t = function(r) {
|
|
1549
|
-
for (var o = "", i = 0; i < r.length; i++) {
|
|
1550
|
-
var a = r[i].charCodeAt(0) * i;
|
|
1551
|
-
r[i + 1] && (a += r[i + 1].charCodeAt(0) * (i - 1)), o += String.fromCharCode(97 + Math.abs(a) % 26);
|
|
1552
|
-
}
|
|
1553
|
-
return o;
|
|
1554
|
-
}(JSON.stringify({
|
|
1555
|
-
src: e.src,
|
|
1556
|
-
dataset: e.dataset
|
|
1557
|
-
}));
|
|
1558
|
-
n = "uid_" + t.slice(t.length - 30);
|
|
1559
|
-
} else
|
|
1560
|
-
n = J();
|
|
1561
|
-
return e.setAttribute("data-uid-auto", n), n;
|
|
1562
|
-
});
|
|
1563
|
-
function le(e) {
|
|
1564
|
-
e === void 0 && (e = window);
|
|
1565
|
-
var n = "__post_robot_10_0_46__";
|
|
1566
|
-
return e !== window ? e[n] : e[n] = e[n] || {};
|
|
1567
|
-
}
|
|
1568
|
-
var tt = function() {
|
|
1569
|
-
return {};
|
|
1570
|
-
};
|
|
1571
|
-
function z(e, n) {
|
|
1572
|
-
return e === void 0 && (e = "store"), n === void 0 && (n = tt), fe(le(), e, function() {
|
|
1573
|
-
var t = n();
|
|
1574
|
-
return {
|
|
1575
|
-
has: function(r) {
|
|
1576
|
-
return t.hasOwnProperty(r);
|
|
1577
|
-
},
|
|
1578
|
-
get: function(r, o) {
|
|
1579
|
-
return t.hasOwnProperty(r) ? t[r] : o;
|
|
1580
|
-
},
|
|
1581
|
-
set: function(r, o) {
|
|
1582
|
-
return t[r] = o, o;
|
|
1583
|
-
},
|
|
1584
|
-
del: function(r) {
|
|
1585
|
-
delete t[r];
|
|
1586
|
-
},
|
|
1587
|
-
getOrSet: function(r, o) {
|
|
1588
|
-
return fe(t, r, o);
|
|
1589
|
-
},
|
|
1590
|
-
reset: function() {
|
|
1591
|
-
t = n();
|
|
1592
|
-
},
|
|
1593
|
-
keys: function() {
|
|
1594
|
-
return Object.keys(t);
|
|
1595
|
-
}
|
|
1596
|
-
};
|
|
1597
|
-
});
|
|
1598
|
-
}
|
|
1599
|
-
var Bt = function() {
|
|
1600
|
-
};
|
|
1601
|
-
function xe() {
|
|
1602
|
-
var e = le();
|
|
1603
|
-
return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new Bt(), e.WINDOW_WILDCARD;
|
|
1604
|
-
}
|
|
1605
|
-
function H(e, n) {
|
|
1606
|
-
return e === void 0 && (e = "store"), n === void 0 && (n = tt), z("windowStore").getOrSet(e, function() {
|
|
1607
|
-
var t = new Ce(), r = function(o) {
|
|
1608
|
-
return t.getOrSet(o, n);
|
|
1609
|
-
};
|
|
1610
|
-
return {
|
|
1611
|
-
has: function(o) {
|
|
1612
|
-
return r(o).hasOwnProperty(e);
|
|
1613
|
-
},
|
|
1614
|
-
get: function(o, i) {
|
|
1615
|
-
var a = r(o);
|
|
1616
|
-
return a.hasOwnProperty(e) ? a[e] : i;
|
|
1617
|
-
},
|
|
1618
|
-
set: function(o, i) {
|
|
1619
|
-
return r(o)[e] = i, i;
|
|
1620
|
-
},
|
|
1621
|
-
del: function(o) {
|
|
1622
|
-
delete r(o)[e];
|
|
1623
|
-
},
|
|
1624
|
-
getOrSet: function(o, i) {
|
|
1625
|
-
return fe(r(o), e, i);
|
|
1626
|
-
}
|
|
1627
|
-
};
|
|
1628
|
-
});
|
|
1629
|
-
}
|
|
1630
|
-
function nt() {
|
|
1631
|
-
return z("instance").getOrSet("instanceID", J);
|
|
1632
|
-
}
|
|
1633
|
-
function rt(e, n) {
|
|
1634
|
-
var t = n.domain, r = H("helloPromises"), o = r.get(e);
|
|
1635
|
-
o && o.resolve({
|
|
1636
|
-
domain: t
|
|
1637
1369
|
});
|
|
1638
|
-
|
|
1639
|
-
|
|
1370
|
+
function Re(e) {
|
|
1371
|
+
return {}.toString.call(e) === "[object RegExp]";
|
|
1372
|
+
}
|
|
1373
|
+
function fe(e, n, t) {
|
|
1374
|
+
if (e.hasOwnProperty(n)) return e[n];
|
|
1375
|
+
var r = t();
|
|
1376
|
+
return e[n] = r, r;
|
|
1377
|
+
}
|
|
1378
|
+
function tt() {
|
|
1379
|
+
var e = document.body;
|
|
1380
|
+
if (!e) throw new Error("Body element not found");
|
|
1381
|
+
return e;
|
|
1382
|
+
}
|
|
1383
|
+
function nt() {
|
|
1384
|
+
return !!document.body && document.readyState === "complete";
|
|
1385
|
+
}
|
|
1386
|
+
function rt() {
|
|
1387
|
+
return !!document.body && document.readyState === "interactive";
|
|
1388
|
+
}
|
|
1389
|
+
ce(function() {
|
|
1390
|
+
return new P(function(e) {
|
|
1391
|
+
if (nt() || rt()) return e();
|
|
1392
|
+
var n = setInterval(function() {
|
|
1393
|
+
if (nt() || rt())
|
|
1394
|
+
return clearInterval(n), e();
|
|
1395
|
+
}, 10);
|
|
1396
|
+
});
|
|
1640
1397
|
});
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1398
|
+
var Ee = typeof document != "undefined" ? document.currentScript : null, Gt = ce(function() {
|
|
1399
|
+
if (Ee || (Ee = function() {
|
|
1400
|
+
try {
|
|
1401
|
+
var e = function() {
|
|
1402
|
+
try {
|
|
1403
|
+
throw new Error("_");
|
|
1404
|
+
} catch (a) {
|
|
1405
|
+
return a.stack || "";
|
|
1406
|
+
}
|
|
1407
|
+
}(), n = /.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e), t = n && n[1];
|
|
1408
|
+
if (!t) return;
|
|
1409
|
+
for (var r = 0, o = [].slice.call(document.getElementsByTagName("script")).reverse(); r < o.length; r++) {
|
|
1410
|
+
var i = o[r];
|
|
1411
|
+
if (i.src && i.src === t) return i;
|
|
1412
|
+
}
|
|
1413
|
+
} catch (a) {
|
|
1414
|
+
}
|
|
1415
|
+
}())) return Ee;
|
|
1416
|
+
throw new Error("Can not determine current script");
|
|
1417
|
+
}), Vt = J();
|
|
1418
|
+
ce(function() {
|
|
1419
|
+
var e;
|
|
1420
|
+
try {
|
|
1421
|
+
e = Gt();
|
|
1422
|
+
} catch (r) {
|
|
1423
|
+
return Vt;
|
|
1424
|
+
}
|
|
1425
|
+
var n = e.getAttribute("data-uid");
|
|
1426
|
+
if (n && typeof n == "string" || (n = e.getAttribute("data-uid-auto")) && typeof n == "string") return n;
|
|
1427
|
+
if (e.src) {
|
|
1428
|
+
var t = function(r) {
|
|
1429
|
+
for (var o = "", i = 0; i < r.length; i++) {
|
|
1430
|
+
var a = r[i].charCodeAt(0) * i;
|
|
1431
|
+
r[i + 1] && (a += r[i + 1].charCodeAt(0) * (i - 1)), o += String.fromCharCode(97 + Math.abs(a) % 26);
|
|
1432
|
+
}
|
|
1433
|
+
return o;
|
|
1434
|
+
}(JSON.stringify({
|
|
1435
|
+
src: e.src,
|
|
1436
|
+
dataset: e.dataset
|
|
1437
|
+
}));
|
|
1438
|
+
n = "uid_" + t.slice(t.length - 30);
|
|
1439
|
+
} else n = J();
|
|
1440
|
+
return e.setAttribute("data-uid-auto", n), n;
|
|
1658
1441
|
});
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1442
|
+
function le(e) {
|
|
1443
|
+
e === void 0 && (e = window);
|
|
1444
|
+
var n = "__post_robot_10_0_46__";
|
|
1445
|
+
return e !== window ? e[n] : e[n] = e[n] || {};
|
|
1446
|
+
}
|
|
1447
|
+
var ot = function() {
|
|
1448
|
+
return {};
|
|
1449
|
+
};
|
|
1450
|
+
function j(e, n) {
|
|
1451
|
+
return e === void 0 && (e = "store"), n === void 0 && (n = ot), fe(le(), e, function() {
|
|
1452
|
+
var t = n();
|
|
1453
|
+
return {
|
|
1454
|
+
has: function(r) {
|
|
1455
|
+
return t.hasOwnProperty(r);
|
|
1456
|
+
},
|
|
1457
|
+
get: function(r, o) {
|
|
1458
|
+
return t.hasOwnProperty(r) ? t[r] : o;
|
|
1459
|
+
},
|
|
1460
|
+
set: function(r, o) {
|
|
1461
|
+
return t[r] = o, o;
|
|
1462
|
+
},
|
|
1463
|
+
del: function(r) {
|
|
1464
|
+
delete t[r];
|
|
1465
|
+
},
|
|
1466
|
+
getOrSet: function(r, o) {
|
|
1467
|
+
return fe(t, r, o);
|
|
1468
|
+
},
|
|
1469
|
+
reset: function() {
|
|
1470
|
+
t = n();
|
|
1471
|
+
},
|
|
1472
|
+
keys: function() {
|
|
1473
|
+
return Object.keys(t);
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1667
1476
|
});
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
function it(e) {
|
|
1671
|
-
H("knownWindows").set(e, !0);
|
|
1672
|
-
}
|
|
1673
|
-
function Re(e) {
|
|
1674
|
-
return typeof e == "object" && e !== null && typeof e.__type__ == "string";
|
|
1675
|
-
}
|
|
1676
|
-
function at(e) {
|
|
1677
|
-
return e === void 0 ? "undefined" : e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "function" ? "function" : typeof e == "object" ? e instanceof Error ? "error" : typeof e.then == "function" ? "promise" : {}.toString.call(e) === "[object RegExp]" ? "regex" : {}.toString.call(e) === "[object Date]" ? "date" : "object" : typeof e == "string" ? "string" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : void 0;
|
|
1678
|
-
}
|
|
1679
|
-
function ne(e, n) {
|
|
1680
|
-
return {
|
|
1681
|
-
__type__: e,
|
|
1682
|
-
__val__: n
|
|
1477
|
+
}
|
|
1478
|
+
var Jt = function() {
|
|
1683
1479
|
};
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1480
|
+
function xe() {
|
|
1481
|
+
var e = le();
|
|
1482
|
+
return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new Jt(), e.WINDOW_WILDCARD;
|
|
1483
|
+
}
|
|
1484
|
+
function H(e, n) {
|
|
1485
|
+
return e === void 0 && (e = "store"), n === void 0 && (n = ot), j("windowStore").getOrSet(e, function() {
|
|
1486
|
+
var t = new Te(), r = function(o) {
|
|
1487
|
+
return t.getOrSet(o, n);
|
|
1488
|
+
};
|
|
1489
|
+
return {
|
|
1490
|
+
has: function(o) {
|
|
1491
|
+
return r(o).hasOwnProperty(e);
|
|
1492
|
+
},
|
|
1493
|
+
get: function(o, i) {
|
|
1494
|
+
var a = r(o);
|
|
1495
|
+
return a.hasOwnProperty(e) ? a[e] : i;
|
|
1496
|
+
},
|
|
1497
|
+
set: function(o, i) {
|
|
1498
|
+
return r(o)[e] = i, i;
|
|
1499
|
+
},
|
|
1500
|
+
del: function(o) {
|
|
1501
|
+
delete r(o)[e];
|
|
1502
|
+
},
|
|
1503
|
+
getOrSet: function(o, i) {
|
|
1504
|
+
return fe(r(o), e, i);
|
|
1505
|
+
}
|
|
1506
|
+
};
|
|
1507
|
+
});
|
|
1508
|
+
}
|
|
1509
|
+
function it() {
|
|
1510
|
+
return j("instance").getOrSet("instanceID", J);
|
|
1511
|
+
}
|
|
1512
|
+
function at(e, n) {
|
|
1513
|
+
var t = n.domain, r = H("helloPromises"), o = r.get(e);
|
|
1514
|
+
o && o.resolve({
|
|
1515
|
+
domain: t
|
|
1516
|
+
});
|
|
1517
|
+
var i = P.resolve({
|
|
1518
|
+
domain: t
|
|
1519
|
+
});
|
|
1520
|
+
return r.set(e, i), i;
|
|
1521
|
+
}
|
|
1522
|
+
function Oe(e, n) {
|
|
1523
|
+
return (0, n.send)(e, "postrobot_hello", {
|
|
1524
|
+
instanceID: it()
|
|
1525
|
+
}, {
|
|
1526
|
+
domain: "*",
|
|
1527
|
+
timeout: -1
|
|
1528
|
+
}).then(function(t) {
|
|
1529
|
+
var r = t.origin, o = t.data.instanceID;
|
|
1530
|
+
return at(e, {
|
|
1531
|
+
domain: r
|
|
1532
|
+
}), {
|
|
1533
|
+
win: e,
|
|
1534
|
+
domain: r,
|
|
1535
|
+
instanceID: o
|
|
1536
|
+
};
|
|
1537
|
+
});
|
|
1538
|
+
}
|
|
1539
|
+
function st(e, n) {
|
|
1540
|
+
var t = n.send;
|
|
1541
|
+
return H("windowInstanceIDPromises").getOrSet(e, function() {
|
|
1542
|
+
return Oe(e, {
|
|
1543
|
+
send: t
|
|
1544
|
+
}).then(function(r) {
|
|
1545
|
+
return r.instanceID;
|
|
1546
|
+
});
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
function ut(e) {
|
|
1550
|
+
H("knownWindows").set(e, !0);
|
|
1551
|
+
}
|
|
1552
|
+
function Ae(e) {
|
|
1553
|
+
return typeof e == "object" && e !== null && typeof e.__type__ == "string";
|
|
1554
|
+
}
|
|
1555
|
+
function ct(e) {
|
|
1556
|
+
return e === void 0 ? "undefined" : e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "function" ? "function" : typeof e == "object" ? e instanceof Error ? "error" : typeof e.then == "function" ? "promise" : {}.toString.call(e) === "[object RegExp]" ? "regex" : {}.toString.call(e) === "[object Date]" ? "date" : "object" : typeof e == "string" ? "string" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : void 0;
|
|
1557
|
+
}
|
|
1558
|
+
function te(e, n) {
|
|
1559
|
+
return {
|
|
1560
|
+
__type__: e,
|
|
1561
|
+
__val__: n
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
var q, Yt = ((q = {}).function = function() {
|
|
1565
|
+
}, q.error = function(e) {
|
|
1566
|
+
return te("error", {
|
|
1567
|
+
message: e.message,
|
|
1568
|
+
stack: e.stack,
|
|
1569
|
+
code: e.code,
|
|
1570
|
+
data: e.data
|
|
1571
|
+
});
|
|
1572
|
+
}, q.promise = function() {
|
|
1573
|
+
}, q.regex = function(e) {
|
|
1574
|
+
return te("regex", e.source);
|
|
1575
|
+
}, q.date = function(e) {
|
|
1576
|
+
return te("date", e.toJSON());
|
|
1577
|
+
}, q.array = function(e) {
|
|
1578
|
+
return e;
|
|
1579
|
+
}, q.object = function(e) {
|
|
1580
|
+
return e;
|
|
1581
|
+
}, q.string = function(e) {
|
|
1582
|
+
return e;
|
|
1583
|
+
}, q.number = function(e) {
|
|
1584
|
+
return e;
|
|
1585
|
+
}, q.boolean = function(e) {
|
|
1586
|
+
return e;
|
|
1587
|
+
}, q.null = function(e) {
|
|
1588
|
+
return e;
|
|
1589
|
+
}, q[void 0] = function(e) {
|
|
1590
|
+
return te("undefined", e);
|
|
1591
|
+
}, q), Zt = {}, $, Kt = (($ = {}).function = function() {
|
|
1592
|
+
throw new Error("Function serialization is not implemented; nothing to deserialize");
|
|
1593
|
+
}, $.error = function(e) {
|
|
1594
|
+
var n = e.stack, t = e.code, r = e.data, o = new Error(e.message);
|
|
1595
|
+
return o.code = t, r && (o.data = r), o.stack = n + `
|
|
1717
1596
|
|
|
1718
1597
|
` + o.stack, o;
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
}, 10);
|
|
1746
|
-
});
|
|
1747
|
-
function Ae() {
|
|
1748
|
-
for (var e = z("idToProxyWindow"), n = 0, t = e.keys(); n < t.length; n++) {
|
|
1749
|
-
var r = t[n];
|
|
1750
|
-
e.get(r).shouldClean() && e.del(r);
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
function st(e, n) {
|
|
1754
|
-
var t = n.send, r = n.id, o = r === void 0 ? J() : r, i = e.then(function(u) {
|
|
1755
|
-
if (Q(u))
|
|
1756
|
-
return ve(u).name;
|
|
1757
|
-
}), a = e.then(function(u) {
|
|
1758
|
-
if ($(u))
|
|
1759
|
-
throw new Error("Window is closed, can not determine type");
|
|
1760
|
-
return oe(u) ? "popup" : "iframe";
|
|
1598
|
+
}, $.promise = function() {
|
|
1599
|
+
throw new Error("Promise serialization is not implemented; nothing to deserialize");
|
|
1600
|
+
}, $.regex = function(e) {
|
|
1601
|
+
return new RegExp(e);
|
|
1602
|
+
}, $.date = function(e) {
|
|
1603
|
+
return new Date(e);
|
|
1604
|
+
}, $.array = function(e) {
|
|
1605
|
+
return e;
|
|
1606
|
+
}, $.object = function(e) {
|
|
1607
|
+
return e;
|
|
1608
|
+
}, $.string = function(e) {
|
|
1609
|
+
return e;
|
|
1610
|
+
}, $.number = function(e) {
|
|
1611
|
+
return e;
|
|
1612
|
+
}, $.boolean = function(e) {
|
|
1613
|
+
return e;
|
|
1614
|
+
}, $.null = function(e) {
|
|
1615
|
+
return e;
|
|
1616
|
+
}, $[void 0] = function() {
|
|
1617
|
+
}, $), Xt = {};
|
|
1618
|
+
new P(function(e) {
|
|
1619
|
+
if (window.document && window.document.body) return e(window.document.body);
|
|
1620
|
+
var n = setInterval(function() {
|
|
1621
|
+
if (window.document && window.document.body)
|
|
1622
|
+
return clearInterval(n), e(window.document.body);
|
|
1623
|
+
}, 10);
|
|
1761
1624
|
});
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1625
|
+
function Ne() {
|
|
1626
|
+
for (var e = j("idToProxyWindow"), n = 0, t = e.keys(); n < t.length; n++) {
|
|
1627
|
+
var r = t[n];
|
|
1628
|
+
e.get(r).shouldClean() && e.del(r);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
function dt(e, n) {
|
|
1632
|
+
var t = n.send, r = n.id, o = r === void 0 ? J() : r, i = e.then(function(u) {
|
|
1633
|
+
if (X(u)) return ve(u).name;
|
|
1634
|
+
}), a = e.then(function(u) {
|
|
1635
|
+
if (G(u)) throw new Error("Window is closed, can not determine type");
|
|
1636
|
+
return oe(u) ? "popup" : "iframe";
|
|
1767
1637
|
});
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
id: o,
|
|
1771
|
-
getType: function() {
|
|
1772
|
-
return a;
|
|
1773
|
-
},
|
|
1774
|
-
getInstanceID: Ht(function() {
|
|
1775
|
-
return e.then(function(u) {
|
|
1776
|
-
return ot(u, {
|
|
1777
|
-
send: t
|
|
1778
|
-
});
|
|
1779
|
-
});
|
|
1780
|
-
}),
|
|
1781
|
-
close: function() {
|
|
1782
|
-
return e.then(Ut);
|
|
1783
|
-
},
|
|
1784
|
-
getName: l,
|
|
1785
|
-
focus: function() {
|
|
1786
|
-
return e.then(function(u) {
|
|
1787
|
-
u.focus();
|
|
1788
|
-
});
|
|
1789
|
-
},
|
|
1790
|
-
isClosed: function() {
|
|
1638
|
+
i.catch(ee), a.catch(ee);
|
|
1639
|
+
var l = function() {
|
|
1791
1640
|
return e.then(function(u) {
|
|
1792
|
-
return
|
|
1641
|
+
if (!G(u)) return X(u) ? ve(u).name : i;
|
|
1793
1642
|
});
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1643
|
+
};
|
|
1644
|
+
return {
|
|
1645
|
+
id: o,
|
|
1646
|
+
getType: function() {
|
|
1647
|
+
return a;
|
|
1648
|
+
},
|
|
1649
|
+
getInstanceID: Bt(function() {
|
|
1650
|
+
return e.then(function(u) {
|
|
1651
|
+
return st(u, {
|
|
1652
|
+
send: t
|
|
1653
|
+
});
|
|
1654
|
+
});
|
|
1655
|
+
}),
|
|
1656
|
+
close: function() {
|
|
1657
|
+
return e.then(qt);
|
|
1658
|
+
},
|
|
1659
|
+
getName: l,
|
|
1660
|
+
focus: function() {
|
|
1661
|
+
return e.then(function(u) {
|
|
1662
|
+
u.focus();
|
|
1663
|
+
});
|
|
1664
|
+
},
|
|
1665
|
+
isClosed: function() {
|
|
1666
|
+
return e.then(function(u) {
|
|
1667
|
+
return G(u);
|
|
1668
|
+
});
|
|
1669
|
+
},
|
|
1670
|
+
setLocation: function(u, s) {
|
|
1671
|
+
return s === void 0 && (s = {}), e.then(function(w) {
|
|
1672
|
+
var m = window.location.protocol + "//" + window.location.host, p = s.method, g = p === void 0 ? "get" : p, b = s.body;
|
|
1673
|
+
if (u.indexOf("/") === 0) u = "" + m + u;
|
|
1674
|
+
else if (!u.match(/^https?:\/\//) && u.indexOf(m) !== 0) throw new Error("Expected url to be http or https url, or absolute path, got " + JSON.stringify(u));
|
|
1675
|
+
if (g === "post") return l().then(function(x) {
|
|
1676
|
+
if (!x) throw new Error("Can not post to window without target name");
|
|
1806
1677
|
(function(S) {
|
|
1807
|
-
var C = S.url,
|
|
1808
|
-
if (W.setAttribute("target",
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
Xe().appendChild(W), W.submit(), Xe().removeChild(W);
|
|
1678
|
+
var C = S.url, z = S.target, R = S.body, T = S.method, L = T === void 0 ? "post" : T, W = document.createElement("form");
|
|
1679
|
+
if (W.setAttribute("target", z), W.setAttribute("method", L), W.setAttribute("action", C), W.style.display = "none", R) for (var O = 0, V = Object.keys(R); O < V.length; O++) {
|
|
1680
|
+
var M, he = V[O], je = document.createElement("input");
|
|
1681
|
+
je.setAttribute("name", he), je.setAttribute("value", (M = R[he]) == null ? void 0 : M.toString()), W.appendChild(je);
|
|
1682
|
+
}
|
|
1683
|
+
tt().appendChild(W), W.submit(), tt().removeChild(W);
|
|
1814
1684
|
})({
|
|
1815
1685
|
url: u,
|
|
1816
1686
|
target: x,
|
|
@@ -1818,413 +1688,390 @@ var Mt = { exports: {} }, jt = { exports: {} };
|
|
|
1818
1688
|
body: b
|
|
1819
1689
|
});
|
|
1820
1690
|
});
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
if (Q(w))
|
|
1824
|
-
try {
|
|
1691
|
+
if (g !== "get") throw new Error("Unsupported method: " + g);
|
|
1692
|
+
if (X(w)) try {
|
|
1825
1693
|
if (w.location && typeof w.location.replace == "function") {
|
|
1826
1694
|
w.location.replace(u);
|
|
1827
1695
|
return;
|
|
1828
1696
|
}
|
|
1829
1697
|
} catch (x) {
|
|
1830
1698
|
}
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1699
|
+
w.location = u;
|
|
1700
|
+
});
|
|
1701
|
+
},
|
|
1702
|
+
setName: function(u) {
|
|
1703
|
+
return e.then(function(s) {
|
|
1704
|
+
var w = X(s), m = Ve(s);
|
|
1705
|
+
if (!w) throw new Error("Can not set name for cross-domain window: " + u);
|
|
1706
|
+
ve(s).name = u, m && m.setAttribute("name", u), i = P.resolve(u);
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1711
|
+
var B = function() {
|
|
1712
|
+
function e(t) {
|
|
1713
|
+
var r = t.send, o = t.win, i = t.serializedWindow;
|
|
1714
|
+
this.id = void 0, this.isProxyWindow = !0, this.serializedWindow = void 0, this.actualWindow = void 0, this.actualWindowPromise = void 0, this.send = void 0, this.name = void 0, this.actualWindowPromise = new P(), this.serializedWindow = i || dt(this.actualWindowPromise, {
|
|
1715
|
+
send: r
|
|
1716
|
+
}), j("idToProxyWindow").set(this.getID(), this), o && this.setWindow(o, {
|
|
1717
|
+
send: r
|
|
1840
1718
|
});
|
|
1841
1719
|
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
send: r
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
var n = e.prototype;
|
|
1854
|
-
return n.getID = function() {
|
|
1855
|
-
return this.serializedWindow.id;
|
|
1856
|
-
}, n.getType = function() {
|
|
1857
|
-
return this.serializedWindow.getType();
|
|
1858
|
-
}, n.isPopup = function() {
|
|
1859
|
-
return this.getType().then(function(t) {
|
|
1860
|
-
return t === "popup";
|
|
1861
|
-
});
|
|
1862
|
-
}, n.setLocation = function(t, r) {
|
|
1863
|
-
var o = this;
|
|
1864
|
-
return this.serializedWindow.setLocation(t, r).then(function() {
|
|
1865
|
-
return o;
|
|
1866
|
-
});
|
|
1867
|
-
}, n.getName = function() {
|
|
1868
|
-
return this.serializedWindow.getName();
|
|
1869
|
-
}, n.setName = function(t) {
|
|
1870
|
-
var r = this;
|
|
1871
|
-
return this.serializedWindow.setName(t).then(function() {
|
|
1872
|
-
return r;
|
|
1873
|
-
});
|
|
1874
|
-
}, n.close = function() {
|
|
1875
|
-
var t = this;
|
|
1876
|
-
return this.serializedWindow.close().then(function() {
|
|
1877
|
-
return t;
|
|
1878
|
-
});
|
|
1879
|
-
}, n.focus = function() {
|
|
1880
|
-
var t = this, r = this.isPopup(), o = this.getName(), i = P.hash({
|
|
1881
|
-
isPopup: r,
|
|
1882
|
-
name: o
|
|
1883
|
-
}).then(function(l) {
|
|
1884
|
-
var u = l.name;
|
|
1885
|
-
l.isPopup && u && window.open("", u, "noopener");
|
|
1886
|
-
}), a = this.serializedWindow.focus();
|
|
1887
|
-
return P.all([i, a]).then(function() {
|
|
1888
|
-
return t;
|
|
1889
|
-
});
|
|
1890
|
-
}, n.isClosed = function() {
|
|
1891
|
-
return this.serializedWindow.isClosed();
|
|
1892
|
-
}, n.getWindow = function() {
|
|
1893
|
-
return this.actualWindow;
|
|
1894
|
-
}, n.setWindow = function(t, r) {
|
|
1895
|
-
var o = r.send;
|
|
1896
|
-
this.actualWindow = t, this.actualWindowPromise.resolve(this.actualWindow), this.serializedWindow = st(this.actualWindowPromise, {
|
|
1897
|
-
send: o,
|
|
1898
|
-
id: this.getID()
|
|
1899
|
-
}), H("winToProxyWindow").set(t, this);
|
|
1900
|
-
}, n.awaitWindow = function() {
|
|
1901
|
-
return this.actualWindowPromise;
|
|
1902
|
-
}, n.matchWindow = function(t, r) {
|
|
1903
|
-
var o = this, i = r.send;
|
|
1904
|
-
return P.try(function() {
|
|
1905
|
-
return o.actualWindow ? t === o.actualWindow : P.hash({
|
|
1906
|
-
proxyInstanceID: o.getInstanceID(),
|
|
1907
|
-
knownWindowInstanceID: ot(t, {
|
|
1908
|
-
send: i
|
|
1909
|
-
})
|
|
1910
|
-
}).then(function(a) {
|
|
1911
|
-
var l = a.proxyInstanceID === a.knownWindowInstanceID;
|
|
1912
|
-
return l && o.setWindow(t, {
|
|
1913
|
-
send: i
|
|
1914
|
-
}), l;
|
|
1720
|
+
var n = e.prototype;
|
|
1721
|
+
return n.getID = function() {
|
|
1722
|
+
return this.serializedWindow.id;
|
|
1723
|
+
}, n.getType = function() {
|
|
1724
|
+
return this.serializedWindow.getType();
|
|
1725
|
+
}, n.isPopup = function() {
|
|
1726
|
+
return this.getType().then(function(t) {
|
|
1727
|
+
return t === "popup";
|
|
1915
1728
|
});
|
|
1916
|
-
})
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
})
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
}) : (a.del(e), i.getOrSet(r, function() {
|
|
1959
|
-
return {};
|
|
1960
|
-
})[e] = {
|
|
1961
|
-
domain: o,
|
|
1962
|
-
name: t,
|
|
1963
|
-
val: n,
|
|
1964
|
-
source: r
|
|
1965
|
-
});
|
|
1966
|
-
}
|
|
1967
|
-
function ut(e, n) {
|
|
1968
|
-
var t = H("methodStore"), r = z("proxyWindowMethods");
|
|
1969
|
-
return t.getOrSet(e, function() {
|
|
1970
|
-
return {};
|
|
1971
|
-
})[n] || r.get(n);
|
|
1972
|
-
}
|
|
1973
|
-
function ct(e, n, t, r, o) {
|
|
1974
|
-
a = (i = {
|
|
1975
|
-
on: o.on,
|
|
1976
|
-
send: o.send
|
|
1977
|
-
}).on, l = i.send, z("builtinListeners").getOrSet("functionCalls", function() {
|
|
1978
|
-
return a("postrobot_method", {
|
|
1979
|
-
domain: "*"
|
|
1980
|
-
}, function(w) {
|
|
1981
|
-
var m = w.source, p = w.origin, g = w.data, b = g.id, x = g.name, S = ut(m, b);
|
|
1982
|
-
if (!S)
|
|
1983
|
-
throw new Error("Could not find method '" + x + "' with id: " + g.id + " in " + F(window));
|
|
1984
|
-
var C = S.source, j = S.domain, O = S.val;
|
|
1729
|
+
}, n.setLocation = function(t, r) {
|
|
1730
|
+
var o = this;
|
|
1731
|
+
return this.serializedWindow.setLocation(t, r).then(function() {
|
|
1732
|
+
return o;
|
|
1733
|
+
});
|
|
1734
|
+
}, n.getName = function() {
|
|
1735
|
+
return this.serializedWindow.getName();
|
|
1736
|
+
}, n.setName = function(t) {
|
|
1737
|
+
var r = this;
|
|
1738
|
+
return this.serializedWindow.setName(t).then(function() {
|
|
1739
|
+
return r;
|
|
1740
|
+
});
|
|
1741
|
+
}, n.close = function() {
|
|
1742
|
+
var t = this;
|
|
1743
|
+
return this.serializedWindow.close().then(function() {
|
|
1744
|
+
return t;
|
|
1745
|
+
});
|
|
1746
|
+
}, n.focus = function() {
|
|
1747
|
+
var t = this, r = this.isPopup(), o = this.getName(), i = P.hash({
|
|
1748
|
+
isPopup: r,
|
|
1749
|
+
name: o
|
|
1750
|
+
}).then(function(l) {
|
|
1751
|
+
var u = l.name;
|
|
1752
|
+
l.isPopup && u && window.open("", u, "noopener");
|
|
1753
|
+
}), a = this.serializedWindow.focus();
|
|
1754
|
+
return P.all([i, a]).then(function() {
|
|
1755
|
+
return t;
|
|
1756
|
+
});
|
|
1757
|
+
}, n.isClosed = function() {
|
|
1758
|
+
return this.serializedWindow.isClosed();
|
|
1759
|
+
}, n.getWindow = function() {
|
|
1760
|
+
return this.actualWindow;
|
|
1761
|
+
}, n.setWindow = function(t, r) {
|
|
1762
|
+
var o = r.send;
|
|
1763
|
+
this.actualWindow = t, this.actualWindowPromise.resolve(this.actualWindow), this.serializedWindow = dt(this.actualWindowPromise, {
|
|
1764
|
+
send: o,
|
|
1765
|
+
id: this.getID()
|
|
1766
|
+
}), H("winToProxyWindow").set(t, this);
|
|
1767
|
+
}, n.awaitWindow = function() {
|
|
1768
|
+
return this.actualWindowPromise;
|
|
1769
|
+
}, n.matchWindow = function(t, r) {
|
|
1770
|
+
var o = this, i = r.send;
|
|
1985
1771
|
return P.try(function() {
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1772
|
+
return o.actualWindow ? t === o.actualWindow : P.hash({
|
|
1773
|
+
proxyInstanceID: o.getInstanceID(),
|
|
1774
|
+
knownWindowInstanceID: st(t, {
|
|
1775
|
+
send: i
|
|
1776
|
+
})
|
|
1777
|
+
}).then(function(a) {
|
|
1778
|
+
var l = a.proxyInstanceID === a.knownWindowInstanceID;
|
|
1779
|
+
return l && o.setWindow(t, {
|
|
1780
|
+
send: i
|
|
1781
|
+
}), l;
|
|
1782
|
+
});
|
|
1783
|
+
});
|
|
1784
|
+
}, n.unwrap = function() {
|
|
1785
|
+
return this.actualWindow || this;
|
|
1786
|
+
}, n.getInstanceID = function() {
|
|
1787
|
+
return this.serializedWindow.getInstanceID();
|
|
1788
|
+
}, n.shouldClean = function() {
|
|
1789
|
+
return !!(this.actualWindow && G(this.actualWindow));
|
|
1790
|
+
}, n.serialize = function() {
|
|
1791
|
+
return this.serializedWindow;
|
|
1792
|
+
}, e.unwrap = function(t) {
|
|
1793
|
+
return e.isProxyWindow(t) ? t.unwrap() : t;
|
|
1794
|
+
}, e.serialize = function(t, r) {
|
|
1795
|
+
var o = r.send;
|
|
1796
|
+
return Ne(), e.toProxyWindow(t, {
|
|
1797
|
+
send: o
|
|
1798
|
+
}).serialize();
|
|
1799
|
+
}, e.deserialize = function(t, r) {
|
|
1800
|
+
var o = r.send;
|
|
1801
|
+
return Ne(), j("idToProxyWindow").get(t.id) || new e({
|
|
1802
|
+
serializedWindow: t,
|
|
1803
|
+
send: o
|
|
1804
|
+
});
|
|
1805
|
+
}, e.isProxyWindow = function(t) {
|
|
1806
|
+
return !!(t && !we(t) && t.isProxyWindow);
|
|
1807
|
+
}, e.toProxyWindow = function(t, r) {
|
|
1808
|
+
var o = r.send;
|
|
1809
|
+
if (Ne(), e.isProxyWindow(t)) return t;
|
|
1810
|
+
var i = t;
|
|
1811
|
+
return H("winToProxyWindow").get(i) || new e({
|
|
1812
|
+
win: i,
|
|
1813
|
+
send: o
|
|
1814
|
+
});
|
|
1815
|
+
}, e;
|
|
1816
|
+
}();
|
|
1817
|
+
function De(e, n, t, r, o) {
|
|
1818
|
+
var i = H("methodStore"), a = j("proxyWindowMethods");
|
|
1819
|
+
B.isProxyWindow(r) ? a.set(e, {
|
|
1820
|
+
val: n,
|
|
1821
|
+
name: t,
|
|
1822
|
+
domain: o,
|
|
1823
|
+
source: r
|
|
1824
|
+
}) : (a.del(e), i.getOrSet(r, function() {
|
|
1825
|
+
return {};
|
|
1826
|
+
})[e] = {
|
|
1827
|
+
domain: o,
|
|
1828
|
+
name: t,
|
|
1829
|
+
val: n,
|
|
1830
|
+
source: r
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
function ft(e, n) {
|
|
1834
|
+
var t = H("methodStore"), r = j("proxyWindowMethods");
|
|
1835
|
+
return t.getOrSet(e, function() {
|
|
1836
|
+
return {};
|
|
1837
|
+
})[n] || r.get(n);
|
|
1838
|
+
}
|
|
1839
|
+
function lt(e, n, t, r, o) {
|
|
1840
|
+
a = (i = {
|
|
1841
|
+
on: o.on,
|
|
1842
|
+
send: o.send
|
|
1843
|
+
}).on, l = i.send, j("builtinListeners").getOrSet("functionCalls", function() {
|
|
1844
|
+
return a("postrobot_method", {
|
|
1845
|
+
domain: "*"
|
|
1846
|
+
}, function(w) {
|
|
1847
|
+
var m = w.source, p = w.origin, g = w.data, b = g.id, x = g.name, S = ft(m, b);
|
|
1848
|
+
if (!S) throw new Error("Could not find method '" + x + "' with id: " + g.id + " in " + F(window));
|
|
1849
|
+
var C = S.source, z = S.domain, R = S.val;
|
|
1850
|
+
return P.try(function() {
|
|
1851
|
+
if (!re(z, p)) throw new Error("Method '" + g.name + "' domain " + JSON.stringify(Re(S.domain) ? S.domain.source : S.domain) + " does not match origin " + p + " in " + F(window));
|
|
1852
|
+
if (B.isProxyWindow(C)) return C.matchWindow(m, {
|
|
1990
1853
|
send: l
|
|
1991
1854
|
}).then(function(T) {
|
|
1992
|
-
if (!T)
|
|
1993
|
-
throw new Error("Method call '" + g.name + "' failed - proxy window does not match source in " + F(window));
|
|
1855
|
+
if (!T) throw new Error("Method call '" + g.name + "' failed - proxy window does not match source in " + F(window));
|
|
1994
1856
|
});
|
|
1995
|
-
}).then(function() {
|
|
1996
|
-
return O.apply({
|
|
1997
|
-
source: m,
|
|
1998
|
-
origin: p
|
|
1999
|
-
}, g.args);
|
|
2000
|
-
}, function(T) {
|
|
2001
|
-
return P.try(function() {
|
|
2002
|
-
if (O.onError)
|
|
2003
|
-
return O.onError(T);
|
|
2004
1857
|
}).then(function() {
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1858
|
+
return R.apply({
|
|
1859
|
+
source: m,
|
|
1860
|
+
origin: p
|
|
1861
|
+
}, g.args);
|
|
1862
|
+
}, function(T) {
|
|
1863
|
+
return P.try(function() {
|
|
1864
|
+
if (R.onError) return R.onError(T);
|
|
1865
|
+
}).then(function() {
|
|
1866
|
+
throw T.stack && (T.stack = "Remote call to " + x + "(" + function(L) {
|
|
1867
|
+
return L === void 0 && (L = []), (W = L, [].slice.call(W)).map(function(O) {
|
|
1868
|
+
return typeof O == "string" ? "'" + O + "'" : O === void 0 ? "undefined" : O === null ? "null" : typeof O == "boolean" ? O.toString() : Array.isArray(O) ? "[ ... ]" : typeof O == "object" ? "{ ... }" : typeof O == "function" ? "() => { ... }" : "<" + typeof O + ">";
|
|
1869
|
+
}).join(", ");
|
|
1870
|
+
var W;
|
|
1871
|
+
}(g.args) + `) failed
|
|
2011
1872
|
|
|
2012
1873
|
` + T.stack), T;
|
|
1874
|
+
});
|
|
1875
|
+
}).then(function(T) {
|
|
1876
|
+
return {
|
|
1877
|
+
result: T,
|
|
1878
|
+
id: b,
|
|
1879
|
+
name: x
|
|
1880
|
+
};
|
|
2013
1881
|
});
|
|
2014
|
-
}).then(function(T) {
|
|
2015
|
-
return {
|
|
2016
|
-
result: T,
|
|
2017
|
-
id: b,
|
|
2018
|
-
name: x
|
|
2019
|
-
};
|
|
2020
1882
|
});
|
|
2021
1883
|
});
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
name: s
|
|
2031
|
-
});
|
|
2032
|
-
}
|
|
2033
|
-
function dt(e, n, t, r) {
|
|
2034
|
-
var o, i = r.on, a = r.send;
|
|
2035
|
-
return function(l, u) {
|
|
2036
|
-
u === void 0 && (u = $t);
|
|
2037
|
-
var s = JSON.stringify(l, function(w) {
|
|
2038
|
-
var m = this[w];
|
|
2039
|
-
if (Re(this))
|
|
2040
|
-
return m;
|
|
2041
|
-
var p = at(m);
|
|
2042
|
-
if (!p)
|
|
2043
|
-
return m;
|
|
2044
|
-
var g = u[p] || Gt[p];
|
|
2045
|
-
return g ? g(m, w) : m;
|
|
1884
|
+
var i, a, l, u = t.__id__ || J();
|
|
1885
|
+
e = B.unwrap(e);
|
|
1886
|
+
var s = t.__name__ || t.name || r;
|
|
1887
|
+
return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")), B.isProxyWindow(e) ? (De(u, t, s, e, n), e.awaitWindow().then(function(w) {
|
|
1888
|
+
De(u, t, s, w, n);
|
|
1889
|
+
})) : De(u, t, s, e, n), te("cross_domain_function", {
|
|
1890
|
+
id: u,
|
|
1891
|
+
name: s
|
|
2046
1892
|
});
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
1893
|
+
}
|
|
1894
|
+
function ht(e, n, t, r) {
|
|
1895
|
+
var o, i = r.on, a = r.send;
|
|
1896
|
+
return function(l, u) {
|
|
1897
|
+
u === void 0 && (u = Zt);
|
|
1898
|
+
var s = JSON.stringify(l, function(w) {
|
|
1899
|
+
var m = this[w];
|
|
1900
|
+
if (Ae(this)) return m;
|
|
1901
|
+
var p = ct(m);
|
|
1902
|
+
if (!p) return m;
|
|
1903
|
+
var g = u[p] || Yt[p];
|
|
1904
|
+
return g ? g(m, w) : m;
|
|
2057
1905
|
});
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
1906
|
+
return s === void 0 ? "undefined" : s;
|
|
1907
|
+
}(t, ((o = {}).promise = function(l, u) {
|
|
1908
|
+
return function(s, w, m, p, g) {
|
|
1909
|
+
return te("cross_domain_zalgo_promise", {
|
|
1910
|
+
then: lt(s, w, function(b, x) {
|
|
1911
|
+
return m.then(b, x);
|
|
1912
|
+
}, p, {
|
|
1913
|
+
on: g.on,
|
|
1914
|
+
send: g.send
|
|
1915
|
+
})
|
|
1916
|
+
});
|
|
1917
|
+
}(e, n, l, u, {
|
|
1918
|
+
on: i,
|
|
1919
|
+
send: a
|
|
1920
|
+
});
|
|
1921
|
+
}, o.function = function(l, u) {
|
|
1922
|
+
return lt(e, n, l, u, {
|
|
1923
|
+
on: i,
|
|
1924
|
+
send: a
|
|
1925
|
+
});
|
|
1926
|
+
}, o.object = function(l) {
|
|
1927
|
+
return we(l) || B.isProxyWindow(l) ? te("cross_domain_window", B.serialize(l, {
|
|
1928
|
+
send: a
|
|
1929
|
+
})) : l;
|
|
1930
|
+
}, o));
|
|
1931
|
+
}
|
|
1932
|
+
function mt(e, n, t, r) {
|
|
1933
|
+
var o, i = r.send;
|
|
1934
|
+
return function(a, l) {
|
|
1935
|
+
if (l === void 0 && (l = Xt), a !== "undefined") return JSON.parse(a, function(u, s) {
|
|
1936
|
+
if (Ae(this)) return s;
|
|
2080
1937
|
var w, m;
|
|
2081
|
-
if (
|
|
2082
|
-
|
|
2083
|
-
var p = l[w] || Vt[w];
|
|
1938
|
+
if (Ae(s) ? (w = s.__type__, m = s.__val__) : (w = ct(s), m = s), !w) return m;
|
|
1939
|
+
var p = l[w] || Kt[w];
|
|
2084
1940
|
return p ? p(m, u) : m;
|
|
2085
1941
|
});
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
return T.val.apply({
|
|
1942
|
+
}(t, ((o = {}).cross_domain_zalgo_promise = function(a) {
|
|
1943
|
+
return function(l, u, s) {
|
|
1944
|
+
return new P(s.then);
|
|
1945
|
+
}(0, 0, a);
|
|
1946
|
+
}, o.cross_domain_function = function(a) {
|
|
1947
|
+
return function(l, u, s, w) {
|
|
1948
|
+
var m = s.id, p = s.name, g = w.send, b = function(S) {
|
|
1949
|
+
S === void 0 && (S = {});
|
|
1950
|
+
function C() {
|
|
1951
|
+
var z = arguments;
|
|
1952
|
+
return B.toProxyWindow(l, {
|
|
1953
|
+
send: g
|
|
1954
|
+
}).awaitWindow().then(function(R) {
|
|
1955
|
+
var T = ft(R, m);
|
|
1956
|
+
if (T && T.val !== C) return T.val.apply({
|
|
2102
1957
|
source: window,
|
|
2103
1958
|
origin: F()
|
|
2104
|
-
},
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
1959
|
+
}, z);
|
|
1960
|
+
var L = [].slice.call(z);
|
|
1961
|
+
return S.fireAndForget ? g(R, "postrobot_method", {
|
|
1962
|
+
id: m,
|
|
1963
|
+
name: p,
|
|
1964
|
+
args: L
|
|
1965
|
+
}, {
|
|
1966
|
+
domain: u,
|
|
1967
|
+
fireAndForget: !0
|
|
1968
|
+
}) : g(R, "postrobot_method", {
|
|
1969
|
+
id: m,
|
|
1970
|
+
name: p,
|
|
1971
|
+
args: L
|
|
1972
|
+
}, {
|
|
1973
|
+
domain: u,
|
|
1974
|
+
fireAndForget: !1
|
|
1975
|
+
}).then(function(W) {
|
|
1976
|
+
return W.data.result;
|
|
1977
|
+
});
|
|
1978
|
+
}).catch(function(R) {
|
|
1979
|
+
throw R;
|
|
2122
1980
|
});
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
fireAndForget: !0
|
|
2131
|
-
}), x;
|
|
2132
|
-
}(e, n, a, {
|
|
2133
|
-
send: i
|
|
2134
|
-
});
|
|
2135
|
-
}, o.cross_domain_window = function(a) {
|
|
2136
|
-
return G.deserialize(a, {
|
|
2137
|
-
send: i
|
|
2138
|
-
});
|
|
2139
|
-
}, o));
|
|
2140
|
-
}
|
|
2141
|
-
var De = {};
|
|
2142
|
-
De.postrobot_post_message = function(e, n, t) {
|
|
2143
|
-
t.indexOf("file:") === 0 && (t = "*"), e.postMessage(n, t);
|
|
2144
|
-
};
|
|
2145
|
-
function Me(e, n, t, r) {
|
|
2146
|
-
var o = r.on, i = r.send;
|
|
2147
|
-
return P.try(function() {
|
|
2148
|
-
var a = H().getOrSet(e, function() {
|
|
2149
|
-
return {};
|
|
2150
|
-
});
|
|
2151
|
-
return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || P.flush().then(function() {
|
|
2152
|
-
if ($(e))
|
|
2153
|
-
throw new Error("Window is closed");
|
|
2154
|
-
var l = dt(e, n, ((u = {}).__post_robot_10_0_46__ = a.buffer || [], u), {
|
|
2155
|
-
on: o,
|
|
1981
|
+
}
|
|
1982
|
+
return C.__name__ = p, C.__origin__ = u, C.__source__ = l, C.__id__ = m, C.origin = u, C;
|
|
1983
|
+
}, x = b();
|
|
1984
|
+
return x.fireAndForget = b({
|
|
1985
|
+
fireAndForget: !0
|
|
1986
|
+
}), x;
|
|
1987
|
+
}(e, n, a, {
|
|
2156
1988
|
send: i
|
|
2157
|
-
})
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
1989
|
+
});
|
|
1990
|
+
}, o.cross_domain_window = function(a) {
|
|
1991
|
+
return B.deserialize(a, {
|
|
1992
|
+
send: i
|
|
1993
|
+
});
|
|
1994
|
+
}, o));
|
|
1995
|
+
}
|
|
1996
|
+
var Me = {};
|
|
1997
|
+
Me.postrobot_post_message = function(e, n, t) {
|
|
1998
|
+
t.indexOf("file:") === 0 && (t = "*"), e.postMessage(n, t);
|
|
1999
|
+
};
|
|
2000
|
+
function ze(e, n, t, r) {
|
|
2001
|
+
var o = r.on, i = r.send;
|
|
2002
|
+
return P.try(function() {
|
|
2003
|
+
var a = H().getOrSet(e, function() {
|
|
2004
|
+
return {};
|
|
2005
|
+
});
|
|
2006
|
+
return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || P.flush().then(function() {
|
|
2007
|
+
if (G(e)) throw new Error("Window is closed");
|
|
2008
|
+
var l = ht(e, n, ((u = {}).__post_robot_10_0_46__ = a.buffer || [], u), {
|
|
2009
|
+
on: o,
|
|
2010
|
+
send: i
|
|
2011
|
+
}), u;
|
|
2012
|
+
delete a.buffer;
|
|
2013
|
+
for (var s = Object.keys(Me), w = [], m = 0; m < s.length; m++) {
|
|
2014
|
+
var p = s[m];
|
|
2015
|
+
try {
|
|
2016
|
+
Me[p](e, l, n);
|
|
2017
|
+
} catch (g) {
|
|
2018
|
+
w.push(g);
|
|
2019
|
+
}
|
|
2165
2020
|
}
|
|
2166
|
-
|
|
2167
|
-
if (w.length === s.length)
|
|
2168
|
-
throw new Error(`All post-robot messaging strategies failed:
|
|
2021
|
+
if (w.length === s.length) throw new Error(`All post-robot messaging strategies failed:
|
|
2169
2022
|
|
|
2170
2023
|
` + w.map(function(g, b) {
|
|
2171
2024
|
return b + ". " + de(g);
|
|
2172
2025
|
}).join(`
|
|
2173
2026
|
|
|
2174
2027
|
`));
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
return s[r];
|
|
2203
|
-
if (s.__domain_regex__)
|
|
2204
|
-
for (var w = 0, m = s.__domain_regex__; w < m.length; w++) {
|
|
2028
|
+
}), a.flush.then(function() {
|
|
2029
|
+
delete a.flush;
|
|
2030
|
+
});
|
|
2031
|
+
}).then(ee);
|
|
2032
|
+
}
|
|
2033
|
+
function pt(e) {
|
|
2034
|
+
return j("responseListeners").get(e);
|
|
2035
|
+
}
|
|
2036
|
+
function vt(e) {
|
|
2037
|
+
j("responseListeners").del(e);
|
|
2038
|
+
}
|
|
2039
|
+
function wt(e) {
|
|
2040
|
+
return j("erroredResponseListeners").has(e);
|
|
2041
|
+
}
|
|
2042
|
+
function gt(e) {
|
|
2043
|
+
var n = e.name, t = e.win, r = e.domain, o = H("requestListeners");
|
|
2044
|
+
if (t === "*" && (t = null), r === "*" && (r = null), !n) throw new Error("Name required to get request listener");
|
|
2045
|
+
for (var i = 0, a = [t, xe()]; i < a.length; i++) {
|
|
2046
|
+
var l = a[i];
|
|
2047
|
+
if (l) {
|
|
2048
|
+
var u = o.get(l);
|
|
2049
|
+
if (u) {
|
|
2050
|
+
var s = u[n];
|
|
2051
|
+
if (s) {
|
|
2052
|
+
if (r && typeof r == "string") {
|
|
2053
|
+
if (s[r]) return s[r];
|
|
2054
|
+
if (s.__domain_regex__) for (var w = 0, m = s.__domain_regex__; w < m.length; w++) {
|
|
2205
2055
|
var p = m[w], g = p.listener;
|
|
2206
|
-
if (re(p.regex, r))
|
|
2207
|
-
return g;
|
|
2056
|
+
if (re(p.regex, r)) return g;
|
|
2208
2057
|
}
|
|
2058
|
+
}
|
|
2059
|
+
if (s["*"]) return s["*"];
|
|
2209
2060
|
}
|
|
2210
|
-
if (s["*"])
|
|
2211
|
-
return s["*"];
|
|
2212
2061
|
}
|
|
2213
2062
|
}
|
|
2214
2063
|
}
|
|
2215
2064
|
}
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
try {
|
|
2227
|
-
return Me(e, n, {
|
|
2065
|
+
function Qt(e, n, t, r) {
|
|
2066
|
+
var o = r.on, i = r.send, a = gt({
|
|
2067
|
+
name: t.name,
|
|
2068
|
+
win: e,
|
|
2069
|
+
domain: n
|
|
2070
|
+
}), l = t.name === "postrobot_method" && t.data && typeof t.data.name == "string" ? t.data.name + "()" : t.name;
|
|
2071
|
+
function u(s, w, m) {
|
|
2072
|
+
return P.flush().then(function() {
|
|
2073
|
+
if (!t.fireAndForget && !G(e)) try {
|
|
2074
|
+
return ze(e, n, {
|
|
2228
2075
|
id: J(),
|
|
2229
2076
|
origin: F(window),
|
|
2230
2077
|
type: "postrobot_message_response",
|
|
@@ -2242,12 +2089,11 @@ var Mt = { exports: {} }, jt = { exports: {} };
|
|
|
2242
2089
|
|
|
2243
2090
|
` + de(p));
|
|
2244
2091
|
}
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
return Me(e, n, {
|
|
2092
|
+
});
|
|
2093
|
+
}
|
|
2094
|
+
return P.all([P.flush().then(function() {
|
|
2095
|
+
if (!t.fireAndForget && !G(e)) try {
|
|
2096
|
+
return ze(e, n, {
|
|
2251
2097
|
id: J(),
|
|
2252
2098
|
origin: F(window),
|
|
2253
2099
|
type: "postrobot_message_ack",
|
|
@@ -2262,270 +2108,235 @@ var Mt = { exports: {} }, jt = { exports: {} };
|
|
|
2262
2108
|
|
|
2263
2109
|
` + de(s));
|
|
2264
2110
|
}
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2111
|
+
}), P.try(function() {
|
|
2112
|
+
if (!a) throw new Error("No handler found for post message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
|
|
2113
|
+
return a.handler({
|
|
2114
|
+
source: e,
|
|
2115
|
+
origin: n,
|
|
2116
|
+
data: t.data
|
|
2117
|
+
});
|
|
2118
|
+
}).then(function(s) {
|
|
2119
|
+
return u("success", s);
|
|
2120
|
+
}, function(s) {
|
|
2121
|
+
return u("error", null, s);
|
|
2122
|
+
})]).then(ee).catch(function(s) {
|
|
2123
|
+
if (a && a.handleError) return a.handleError(s);
|
|
2124
|
+
throw s;
|
|
2272
2125
|
});
|
|
2273
|
-
}).then(function(s) {
|
|
2274
|
-
return u("success", s);
|
|
2275
|
-
}, function(s) {
|
|
2276
|
-
return u("error", null, s);
|
|
2277
|
-
})]).then(te).catch(function(s) {
|
|
2278
|
-
if (a && a.handleError)
|
|
2279
|
-
return a.handleError(s);
|
|
2280
|
-
throw s;
|
|
2281
|
-
});
|
|
2282
|
-
}
|
|
2283
|
-
function Zt(e, n, t) {
|
|
2284
|
-
if (!mt(t.hash)) {
|
|
2285
|
-
var r = lt(t.hash);
|
|
2286
|
-
if (!r)
|
|
2287
|
-
throw new Error("No handler found for post message ack for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
|
|
2288
|
-
try {
|
|
2289
|
-
if (!re(r.domain, n))
|
|
2290
|
-
throw new Error("Ack origin " + n + " does not match domain " + r.domain.toString());
|
|
2291
|
-
if (e !== r.win)
|
|
2292
|
-
throw new Error("Ack source does not match registered window");
|
|
2293
|
-
} catch (o) {
|
|
2294
|
-
r.promise.reject(o);
|
|
2295
|
-
}
|
|
2296
|
-
r.ack = !0;
|
|
2297
2126
|
}
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
source: e,
|
|
2311
|
-
origin: n,
|
|
2312
|
-
data: t.data
|
|
2313
|
-
});
|
|
2127
|
+
function en(e, n, t) {
|
|
2128
|
+
if (!wt(t.hash)) {
|
|
2129
|
+
var r = pt(t.hash);
|
|
2130
|
+
if (!r) throw new Error("No handler found for post message ack for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
|
|
2131
|
+
try {
|
|
2132
|
+
if (!re(r.domain, n)) throw new Error("Ack origin " + n + " does not match domain " + r.domain.toString());
|
|
2133
|
+
if (e !== r.win) throw new Error("Ack source does not match registered window");
|
|
2134
|
+
} catch (o) {
|
|
2135
|
+
r.promise.reject(o);
|
|
2136
|
+
}
|
|
2137
|
+
r.ack = !0;
|
|
2138
|
+
}
|
|
2314
2139
|
}
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2140
|
+
function tn(e, n, t) {
|
|
2141
|
+
if (!wt(t.hash)) {
|
|
2142
|
+
var r = pt(t.hash);
|
|
2143
|
+
if (!r) throw new Error("No handler found for post message response for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
|
|
2144
|
+
if (!re(r.domain, n)) throw new Error("Response origin " + n + " does not match domain " + (o = r.domain, Array.isArray(o) ? "(" + o.join(" | ") + ")" : y(o) ? "RegExp(" + o.toString() + ")" : o.toString()));
|
|
2145
|
+
var o;
|
|
2146
|
+
if (e !== r.win) throw new Error("Response source does not match registered window");
|
|
2147
|
+
vt(t.hash), t.ack === "error" ? r.promise.reject(t.error) : t.ack === "success" && r.promise.resolve({
|
|
2148
|
+
source: e,
|
|
2149
|
+
origin: n,
|
|
2150
|
+
data: t.data
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2323
2153
|
}
|
|
2324
|
-
|
|
2325
|
-
var
|
|
2154
|
+
function yt(e, n) {
|
|
2155
|
+
var t = n.on, r = n.send, o = j("receivedMessages");
|
|
2326
2156
|
try {
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
send: x
|
|
2330
|
-
});
|
|
2331
|
-
} catch (j) {
|
|
2157
|
+
if (!window || window.closed || !e.source) return;
|
|
2158
|
+
} catch (w) {
|
|
2332
2159
|
return;
|
|
2333
2160
|
}
|
|
2334
|
-
|
|
2335
|
-
var
|
|
2336
|
-
if (Array.isArray(C))
|
|
2337
|
-
return C;
|
|
2338
|
-
}
|
|
2339
|
-
}(e.data, i, a, {
|
|
2340
|
-
on: t,
|
|
2341
|
-
send: r
|
|
2342
|
-
});
|
|
2343
|
-
if (l) {
|
|
2344
|
-
it(i);
|
|
2345
|
-
for (var u = 0; u < l.length; u++) {
|
|
2346
|
-
var s = l[u];
|
|
2347
|
-
if (o.has(s.id) || (o.set(s.id, !0), $(i) && !s.fireAndForget))
|
|
2348
|
-
return;
|
|
2349
|
-
s.origin.indexOf("file:") === 0 && (a = "file://");
|
|
2161
|
+
var i = e.source, a = e.origin, l = function(w, m, p, g) {
|
|
2162
|
+
var b = g.on, x = g.send, S;
|
|
2350
2163
|
try {
|
|
2351
|
-
|
|
2352
|
-
on:
|
|
2353
|
-
send:
|
|
2354
|
-
})
|
|
2355
|
-
} catch (
|
|
2356
|
-
|
|
2357
|
-
throw w;
|
|
2358
|
-
}, 0);
|
|
2164
|
+
S = mt(m, p, w, {
|
|
2165
|
+
on: b,
|
|
2166
|
+
send: x
|
|
2167
|
+
});
|
|
2168
|
+
} catch (z) {
|
|
2169
|
+
return;
|
|
2359
2170
|
}
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
return M.cancel();
|
|
2384
|
-
}, te);
|
|
2171
|
+
if (S && typeof S == "object" && S !== null) {
|
|
2172
|
+
var C = S.__post_robot_10_0_46__;
|
|
2173
|
+
if (Array.isArray(C)) return C;
|
|
2174
|
+
}
|
|
2175
|
+
}(e.data, i, a, {
|
|
2176
|
+
on: t,
|
|
2177
|
+
send: r
|
|
2178
|
+
});
|
|
2179
|
+
if (l) {
|
|
2180
|
+
ut(i);
|
|
2181
|
+
for (var u = 0; u < l.length; u++) {
|
|
2182
|
+
var s = l[u];
|
|
2183
|
+
if (o.has(s.id) || (o.set(s.id, !0), G(i) && !s.fireAndForget)) return;
|
|
2184
|
+
s.origin.indexOf("file:") === 0 && (a = "file://");
|
|
2185
|
+
try {
|
|
2186
|
+
s.type === "postrobot_message_request" ? Qt(i, a, s, {
|
|
2187
|
+
on: t,
|
|
2188
|
+
send: r
|
|
2189
|
+
}) : s.type === "postrobot_message_response" ? tn(i, a, s) : s.type === "postrobot_message_ack" && en(i, a, s);
|
|
2190
|
+
} catch (w) {
|
|
2191
|
+
setTimeout(function() {
|
|
2192
|
+
throw w;
|
|
2193
|
+
}, 0);
|
|
2385
2194
|
}
|
|
2386
|
-
}
|
|
2195
|
+
}
|
|
2387
2196
|
}
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2197
|
+
}
|
|
2198
|
+
function ne(e, n, t) {
|
|
2199
|
+
if (!e) throw new Error("Expected name");
|
|
2200
|
+
if (typeof (n = n || {}) == "function" && (t = n, n = {}), !t) throw new Error("Expected handler");
|
|
2201
|
+
var r = function o(i, a) {
|
|
2202
|
+
var l = i.name, u = i.win, s = i.domain, w = H("requestListeners");
|
|
2203
|
+
if (!l || typeof l != "string") throw new Error("Name required to add request listener");
|
|
2204
|
+
if (u && u !== "*" && B.isProxyWindow(u)) {
|
|
2205
|
+
var m = u.awaitWindow().then(function(M) {
|
|
2206
|
+
return o({
|
|
2207
|
+
name: l,
|
|
2208
|
+
win: M,
|
|
2209
|
+
domain: s
|
|
2210
|
+
}, a);
|
|
2211
|
+
});
|
|
2212
|
+
return {
|
|
2213
|
+
cancel: function() {
|
|
2214
|
+
m.then(function(M) {
|
|
2215
|
+
return M.cancel();
|
|
2216
|
+
}, ee);
|
|
2217
|
+
}
|
|
2218
|
+
};
|
|
2219
|
+
}
|
|
2220
|
+
var p = u;
|
|
2221
|
+
if (Array.isArray(p)) {
|
|
2222
|
+
for (var g = [], b = 0, x = p; b < x.length; b++) g.push(o({
|
|
2392
2223
|
name: l,
|
|
2393
2224
|
domain: s,
|
|
2394
2225
|
win: x[b]
|
|
2395
2226
|
}, a));
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
}
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
for (var S = [], C = 0, j = s; C < j.length; C++)
|
|
2405
|
-
S.push(o({
|
|
2227
|
+
return {
|
|
2228
|
+
cancel: function() {
|
|
2229
|
+
for (var M = 0; M < g.length; M++) g[M].cancel();
|
|
2230
|
+
}
|
|
2231
|
+
};
|
|
2232
|
+
}
|
|
2233
|
+
if (Array.isArray(s)) {
|
|
2234
|
+
for (var S = [], C = 0, z = s; C < z.length; C++) S.push(o({
|
|
2406
2235
|
name: l,
|
|
2407
2236
|
win: p,
|
|
2408
|
-
domain:
|
|
2237
|
+
domain: z[C]
|
|
2409
2238
|
}, a));
|
|
2410
|
-
|
|
2239
|
+
return {
|
|
2240
|
+
cancel: function() {
|
|
2241
|
+
for (var M = 0; M < S.length; M++) S[M].cancel();
|
|
2242
|
+
}
|
|
2243
|
+
};
|
|
2244
|
+
}
|
|
2245
|
+
var R = gt({
|
|
2246
|
+
name: l,
|
|
2247
|
+
win: p,
|
|
2248
|
+
domain: s
|
|
2249
|
+
});
|
|
2250
|
+
p && p !== "*" || (p = xe());
|
|
2251
|
+
var T = (s = s || "*").toString();
|
|
2252
|
+
if (R) throw p && s ? new Error("Request listener already exists for " + l + " on domain " + s.toString() + " for " + (p === xe() ? "wildcard" : "specified") + " window") : p ? new Error("Request listener already exists for " + l + " for " + (p === xe() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + l + " on domain " + s.toString()) : new Error("Request listener already exists for " + l);
|
|
2253
|
+
var L = w.getOrSet(p, function() {
|
|
2254
|
+
return {};
|
|
2255
|
+
}), W = fe(L, l, function() {
|
|
2256
|
+
return {};
|
|
2257
|
+
}), O, V;
|
|
2258
|
+
return Re(s) ? (O = fe(W, "__domain_regex__", function() {
|
|
2259
|
+
return [];
|
|
2260
|
+
})).push(V = {
|
|
2261
|
+
regex: s,
|
|
2262
|
+
listener: a
|
|
2263
|
+
}) : W[T] = a, {
|
|
2411
2264
|
cancel: function() {
|
|
2412
|
-
|
|
2413
|
-
S[M].cancel();
|
|
2265
|
+
delete W[T], V && (O.splice(O.indexOf(V, 1)), O.length || delete W.__domain_regex__), Object.keys(W).length || delete L[l], p && !Object.keys(L).length && w.del(p);
|
|
2414
2266
|
}
|
|
2415
2267
|
};
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2268
|
+
}({
|
|
2269
|
+
name: e,
|
|
2270
|
+
win: n.window,
|
|
2271
|
+
domain: n.domain || "*"
|
|
2272
|
+
}, {
|
|
2273
|
+
handler: t || n.handler,
|
|
2274
|
+
handleError: n.errorHandler || function(o) {
|
|
2275
|
+
throw o;
|
|
2276
|
+
}
|
|
2421
2277
|
});
|
|
2422
|
-
|
|
2423
|
-
var T = (s = s || "*").toString();
|
|
2424
|
-
if (O)
|
|
2425
|
-
throw p && s ? new Error("Request listener already exists for " + l + " on domain " + s.toString() + " for " + (p === xe() ? "wildcard" : "specified") + " window") : p ? new Error("Request listener already exists for " + l + " for " + (p === xe() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + l + " on domain " + s.toString()) : new Error("Request listener already exists for " + l);
|
|
2426
|
-
var L = w.getOrSet(p, function() {
|
|
2427
|
-
return {};
|
|
2428
|
-
}), W = fe(L, l, function() {
|
|
2429
|
-
return {};
|
|
2430
|
-
}), R, V;
|
|
2431
|
-
return Te(s) ? (R = fe(W, "__domain_regex__", function() {
|
|
2432
|
-
return [];
|
|
2433
|
-
})).push(V = {
|
|
2434
|
-
regex: s,
|
|
2435
|
-
listener: a
|
|
2436
|
-
}) : W[T] = a, {
|
|
2278
|
+
return {
|
|
2437
2279
|
cancel: function() {
|
|
2438
|
-
|
|
2280
|
+
r.cancel();
|
|
2439
2281
|
}
|
|
2440
2282
|
};
|
|
2441
|
-
}
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
}
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
return G.toProxyWindow(n, {
|
|
2470
|
-
send: e
|
|
2471
|
-
}).awaitWindow().then(function(s) {
|
|
2472
|
-
return P.try(function() {
|
|
2473
|
-
if (function(w, m, p) {
|
|
2474
|
-
if (!w)
|
|
2475
|
-
throw new Error("Expected name");
|
|
2476
|
-
if (p && typeof p != "string" && !Array.isArray(p) && !Te(p))
|
|
2477
|
-
throw new TypeError("Can not send " + w + ". Expected domain " + JSON.stringify(p) + " to be a string, array, or regex");
|
|
2478
|
-
if ($(m))
|
|
2479
|
-
throw new Error("Can not send " + w + ". Target window is closed");
|
|
2480
|
-
}(t, s, i), function(w, m) {
|
|
2481
|
-
var p = qe(m);
|
|
2482
|
-
if (p)
|
|
2483
|
-
return p === w;
|
|
2484
|
-
if (m === w || function(x) {
|
|
2485
|
-
x === void 0 && (x = window);
|
|
2486
|
-
try {
|
|
2487
|
-
if (x.top)
|
|
2488
|
-
return x.top;
|
|
2489
|
-
} catch (O) {
|
|
2490
|
-
}
|
|
2491
|
-
if (k(x) === x)
|
|
2492
|
-
return x;
|
|
2493
|
-
try {
|
|
2494
|
-
if (He(window, x) && window.top)
|
|
2495
|
-
return window.top;
|
|
2496
|
-
} catch (O) {
|
|
2497
|
-
}
|
|
2498
|
-
try {
|
|
2499
|
-
if (He(x, window) && window.top)
|
|
2500
|
-
return window.top;
|
|
2501
|
-
} catch (O) {
|
|
2502
|
-
}
|
|
2503
|
-
for (var S = 0, C = function O(T) {
|
|
2504
|
-
for (var L = [], W = 0, R = _e(T); W < R.length; W++) {
|
|
2505
|
-
var V = R[W];
|
|
2506
|
-
L.push(V);
|
|
2507
|
-
for (var M = 0, he = O(V); M < he.length; M++)
|
|
2508
|
-
L.push(he[M]);
|
|
2283
|
+
}
|
|
2284
|
+
function nn(e, n, t) {
|
|
2285
|
+
typeof (n = n || {}) == "function" && (t = n, n = {});
|
|
2286
|
+
var r = new P(), o;
|
|
2287
|
+
return n.errorHandler = function(i) {
|
|
2288
|
+
o.cancel(), r.reject(i);
|
|
2289
|
+
}, o = ne(e, n, function(i) {
|
|
2290
|
+
if (o.cancel(), r.resolve(i), t) return t(i);
|
|
2291
|
+
}), r.cancel = o.cancel, r;
|
|
2292
|
+
}
|
|
2293
|
+
var K = function e(n, t, r, o) {
|
|
2294
|
+
var i = (o = o || {}).domain || "*", a = o.timeout || -1, l = o.timeout || 5e3, u = o.fireAndForget || !1;
|
|
2295
|
+
return B.toProxyWindow(n, {
|
|
2296
|
+
send: e
|
|
2297
|
+
}).awaitWindow().then(function(s) {
|
|
2298
|
+
return P.try(function() {
|
|
2299
|
+
if (function(w, m, p) {
|
|
2300
|
+
if (!w) throw new Error("Expected name");
|
|
2301
|
+
if (typeof p != "string" && !Array.isArray(p) && !Re(p)) throw new TypeError("Can not send " + w + ". Expected domain " + JSON.stringify(p) + " to be a string, array, or regex");
|
|
2302
|
+
if (G(m)) throw new Error("Can not send " + w + ". Target window is closed");
|
|
2303
|
+
}(t, s, i), function(w, m) {
|
|
2304
|
+
var p = Ge(m);
|
|
2305
|
+
if (p) return p === w;
|
|
2306
|
+
if (m === w || function(x) {
|
|
2307
|
+
x === void 0 && (x = window);
|
|
2308
|
+
try {
|
|
2309
|
+
if (x.top) return x.top;
|
|
2310
|
+
} catch (R) {
|
|
2509
2311
|
}
|
|
2510
|
-
return
|
|
2511
|
-
}(x); S < C.length; S++) {
|
|
2512
|
-
var j = C[S];
|
|
2312
|
+
if (k(x) === x) return x;
|
|
2513
2313
|
try {
|
|
2514
|
-
if (
|
|
2515
|
-
|
|
2516
|
-
} catch (O) {
|
|
2314
|
+
if ($e(window, x) && window.top) return window.top;
|
|
2315
|
+
} catch (R) {
|
|
2517
2316
|
}
|
|
2518
|
-
|
|
2519
|
-
return
|
|
2520
|
-
|
|
2521
|
-
|
|
2317
|
+
try {
|
|
2318
|
+
if ($e(x, window) && window.top) return window.top;
|
|
2319
|
+
} catch (R) {
|
|
2320
|
+
}
|
|
2321
|
+
for (var S = 0, C = function R(T) {
|
|
2322
|
+
for (var L = [], W = 0, O = Be(T); W < O.length; W++) {
|
|
2323
|
+
var V = O[W];
|
|
2324
|
+
L.push(V);
|
|
2325
|
+
for (var M = 0, he = R(V); M < he.length; M++) L.push(he[M]);
|
|
2326
|
+
}
|
|
2327
|
+
return L;
|
|
2328
|
+
}(x); S < C.length; S++) {
|
|
2329
|
+
var z = C[S];
|
|
2330
|
+
try {
|
|
2331
|
+
if (z.top) return z.top;
|
|
2332
|
+
} catch (R) {
|
|
2333
|
+
}
|
|
2334
|
+
if (k(z) === z) return z;
|
|
2335
|
+
}
|
|
2336
|
+
}(m) === m) return !1;
|
|
2337
|
+
for (var g = 0, b = Be(w); g < b.length; g++) if (b[g] === m) return !0;
|
|
2522
2338
|
return !1;
|
|
2523
|
-
|
|
2524
|
-
if (b[g] === m)
|
|
2525
|
-
return !0;
|
|
2526
|
-
return !1;
|
|
2527
|
-
}(window, s))
|
|
2528
|
-
return function(w, m, p) {
|
|
2339
|
+
}(window, s)) return function(w, m, p) {
|
|
2529
2340
|
m === void 0 && (m = 5e3), p === void 0 && (p = "Window");
|
|
2530
2341
|
var g = function(b) {
|
|
2531
2342
|
return H("helloPromises").getOrSet(b, function() {
|
|
@@ -2534,214 +2345,211 @@ var Mt = { exports: {} }, jt = { exports: {} };
|
|
|
2534
2345
|
}(w);
|
|
2535
2346
|
return m !== -1 && (g = g.timeout(m, new Error(p + " did not load after " + m + "ms"))), g;
|
|
2536
2347
|
}(s, l);
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2348
|
+
}).then(function(w) {
|
|
2349
|
+
return function(m, p, g, b) {
|
|
2350
|
+
var x = b.send;
|
|
2351
|
+
return P.try(function() {
|
|
2352
|
+
return typeof p == "string" ? p : P.try(function() {
|
|
2353
|
+
return g || Oe(m, {
|
|
2354
|
+
send: x
|
|
2355
|
+
}).then(function(S) {
|
|
2356
|
+
return S.domain;
|
|
2357
|
+
});
|
|
2544
2358
|
}).then(function(S) {
|
|
2545
|
-
|
|
2359
|
+
if (!re(p, p)) throw new Error("Domain " + et(p) + " does not match " + et(p));
|
|
2360
|
+
return S;
|
|
2546
2361
|
});
|
|
2547
|
-
}).then(function(S) {
|
|
2548
|
-
if (!re(p, p))
|
|
2549
|
-
throw new Error("Domain " + Ke(p) + " does not match " + Ke(p));
|
|
2550
|
-
return S;
|
|
2551
2362
|
});
|
|
2363
|
+
}(s, i, (w === void 0 ? {} : w).domain, {
|
|
2364
|
+
send: e
|
|
2552
2365
|
});
|
|
2553
|
-
}(
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
win: s,
|
|
2562
|
-
domain: m,
|
|
2563
|
-
promise: g
|
|
2564
|
-
};
|
|
2565
|
-
(function(W, R) {
|
|
2566
|
-
z("responseListeners").set(W, R);
|
|
2567
|
-
})(b, x);
|
|
2568
|
-
var S = H("requestPromises").getOrSet(s, function() {
|
|
2569
|
-
return [];
|
|
2570
|
-
});
|
|
2571
|
-
S.push(g), g.catch(function() {
|
|
2572
|
-
(function(W) {
|
|
2573
|
-
z("erroredResponseListeners").set(W, !0);
|
|
2574
|
-
})(b), ht(b);
|
|
2575
|
-
});
|
|
2576
|
-
var C = function(W) {
|
|
2577
|
-
return H("knownWindows").get(W, !1);
|
|
2578
|
-
}(s) ? 1e4 : 2e3, j = a, O = C, T = j, L = function(W, R) {
|
|
2579
|
-
var V;
|
|
2580
|
-
return function M() {
|
|
2581
|
-
V = setTimeout(function() {
|
|
2582
|
-
(function() {
|
|
2583
|
-
if ($(s))
|
|
2584
|
-
return g.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
|
|
2585
|
-
if (x.cancelled)
|
|
2586
|
-
return g.reject(new Error("Response listener was cancelled for " + t));
|
|
2587
|
-
O = Math.max(O - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || O !== 0 ? T === 0 && g.reject(new Error("No response for postMessage " + p + " in " + F() + " in " + j + "ms")) : g.reject(new Error("No ack for postMessage " + p + " in " + F() + " in " + C + "ms"));
|
|
2588
|
-
})(), M();
|
|
2589
|
-
}, 500);
|
|
2590
|
-
}(), {
|
|
2591
|
-
cancel: function() {
|
|
2592
|
-
clearTimeout(V);
|
|
2593
|
-
}
|
|
2366
|
+
}).then(function(w) {
|
|
2367
|
+
var m = w, p = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, g = new P(), b = t + "_" + J();
|
|
2368
|
+
if (!u) {
|
|
2369
|
+
var x = {
|
|
2370
|
+
name: t,
|
|
2371
|
+
win: s,
|
|
2372
|
+
domain: m,
|
|
2373
|
+
promise: g
|
|
2594
2374
|
};
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2375
|
+
(function(W, O) {
|
|
2376
|
+
j("responseListeners").set(W, O);
|
|
2377
|
+
})(b, x);
|
|
2378
|
+
var S = H("requestPromises").getOrSet(s, function() {
|
|
2379
|
+
return [];
|
|
2380
|
+
});
|
|
2381
|
+
S.push(g), g.catch(function() {
|
|
2382
|
+
(function(W) {
|
|
2383
|
+
j("erroredResponseListeners").set(W, !0);
|
|
2384
|
+
})(b), vt(b);
|
|
2385
|
+
});
|
|
2386
|
+
var C = function(W) {
|
|
2387
|
+
return H("knownWindows").get(W, !1);
|
|
2388
|
+
}(s) ? 1e4 : 2e3, z = a, R = C, T = z, L = function(W, O) {
|
|
2389
|
+
var V;
|
|
2390
|
+
return function M() {
|
|
2391
|
+
V = setTimeout(function() {
|
|
2392
|
+
(function() {
|
|
2393
|
+
if (G(s)) return g.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
|
|
2394
|
+
if (x.cancelled) return g.reject(new Error("Response listener was cancelled for " + t));
|
|
2395
|
+
R = Math.max(R - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || R !== 0 ? T === 0 && g.reject(new Error("No response for postMessage " + p + " in " + F() + " in " + z + "ms")) : g.reject(new Error("No ack for postMessage " + p + " in " + F() + " in " + C + "ms"));
|
|
2396
|
+
})(), M();
|
|
2397
|
+
}, 500);
|
|
2398
|
+
}(), {
|
|
2399
|
+
cancel: function() {
|
|
2400
|
+
clearTimeout(V);
|
|
2401
|
+
}
|
|
2402
|
+
};
|
|
2403
|
+
}();
|
|
2404
|
+
g.finally(function() {
|
|
2405
|
+
L.cancel(), S.splice(S.indexOf(g, 1));
|
|
2406
|
+
}).catch(ee);
|
|
2407
|
+
}
|
|
2408
|
+
return ze(s, m, {
|
|
2409
|
+
id: J(),
|
|
2410
|
+
origin: F(window),
|
|
2411
|
+
type: "postrobot_message_request",
|
|
2412
|
+
hash: b,
|
|
2413
|
+
name: t,
|
|
2414
|
+
data: r,
|
|
2415
|
+
fireAndForget: u
|
|
2416
|
+
}, {
|
|
2417
|
+
on: ne,
|
|
2418
|
+
send: e
|
|
2419
|
+
}).then(function() {
|
|
2420
|
+
return u ? g.resolve() : g;
|
|
2421
|
+
}, function(W) {
|
|
2422
|
+
throw new Error("Send request message failed for " + p + " in " + F() + `
|
|
2615
2423
|
|
|
2616
2424
|
` + de(W));
|
|
2425
|
+
});
|
|
2617
2426
|
});
|
|
2618
2427
|
});
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
send: X
|
|
2625
|
-
});
|
|
2626
|
-
}
|
|
2627
|
-
function en(e, n, t) {
|
|
2628
|
-
return ft(e, n, t, {
|
|
2629
|
-
on: K,
|
|
2630
|
-
send: X
|
|
2631
|
-
});
|
|
2632
|
-
}
|
|
2633
|
-
function tn(e) {
|
|
2634
|
-
return new G({
|
|
2635
|
-
send: X,
|
|
2636
|
-
win: e
|
|
2637
|
-
});
|
|
2638
|
-
}
|
|
2639
|
-
function nn(e) {
|
|
2640
|
-
return G.toProxyWindow(e, {
|
|
2641
|
-
send: X
|
|
2642
|
-
});
|
|
2643
|
-
}
|
|
2644
|
-
function wt() {
|
|
2645
|
-
le().initialized || (le().initialized = !0, n = (e = {
|
|
2646
|
-
on: K,
|
|
2647
|
-
send: X
|
|
2648
|
-
}).on, t = e.send, (r = le()).receiveMessage = r.receiveMessage || function(o) {
|
|
2649
|
-
return vt(o, {
|
|
2650
|
-
on: n,
|
|
2651
|
-
send: t
|
|
2428
|
+
};
|
|
2429
|
+
function rn(e, n, t) {
|
|
2430
|
+
return ht(e, n, t, {
|
|
2431
|
+
on: ne,
|
|
2432
|
+
send: K
|
|
2652
2433
|
});
|
|
2653
|
-
}
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2434
|
+
}
|
|
2435
|
+
function on(e, n, t) {
|
|
2436
|
+
return mt(e, n, t, {
|
|
2437
|
+
send: K
|
|
2438
|
+
});
|
|
2439
|
+
}
|
|
2440
|
+
function an(e) {
|
|
2441
|
+
return new B({
|
|
2442
|
+
send: K,
|
|
2443
|
+
win: e
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
function sn(e) {
|
|
2447
|
+
return B.toProxyWindow(e, {
|
|
2448
|
+
send: K
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
function Et() {
|
|
2452
|
+
le().initialized || (le().initialized = !0, n = (e = {
|
|
2453
|
+
on: ne,
|
|
2454
|
+
send: K
|
|
2455
|
+
}).on, t = e.send, (r = le()).receiveMessage = r.receiveMessage || function(o) {
|
|
2456
|
+
return yt(o, {
|
|
2457
|
+
on: n,
|
|
2458
|
+
send: t
|
|
2459
|
+
});
|
|
2460
|
+
}, function(o) {
|
|
2461
|
+
var i = o.on, a = o.send;
|
|
2462
|
+
j().getOrSet("postMessageListener", function() {
|
|
2463
|
+
return function(l, u, s) {
|
|
2464
|
+
return l.addEventListener("message", s), {
|
|
2465
|
+
cancel: function() {
|
|
2466
|
+
l.removeEventListener("message", s);
|
|
2678
2467
|
}
|
|
2468
|
+
};
|
|
2469
|
+
}(window, 0, function(l) {
|
|
2470
|
+
(function(u, s) {
|
|
2471
|
+
var w = s.on, m = s.send;
|
|
2472
|
+
P.try(function() {
|
|
2473
|
+
var p = u.source || u.sourceElement, g = u.origin || u.originalEvent && u.originalEvent.origin, b = u.data;
|
|
2474
|
+
if (g === "null" && (g = "file://"), p) {
|
|
2475
|
+
if (!g) throw new Error("Post message did not have origin domain");
|
|
2476
|
+
yt({
|
|
2477
|
+
source: p,
|
|
2478
|
+
origin: g,
|
|
2479
|
+
data: b
|
|
2480
|
+
}, {
|
|
2481
|
+
on: w,
|
|
2482
|
+
send: m
|
|
2483
|
+
});
|
|
2484
|
+
}
|
|
2485
|
+
});
|
|
2486
|
+
})(l, {
|
|
2487
|
+
on: i,
|
|
2488
|
+
send: a
|
|
2679
2489
|
});
|
|
2680
|
-
})(l, {
|
|
2681
|
-
on: i,
|
|
2682
|
-
send: a
|
|
2683
2490
|
});
|
|
2684
2491
|
});
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
};
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
})
|
|
2705
|
-
}
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
(function(
|
|
2733
|
-
|
|
2734
|
-
}
|
|
2735
|
-
|
|
2736
|
-
|
|
2492
|
+
}({
|
|
2493
|
+
on: ne,
|
|
2494
|
+
send: K
|
|
2495
|
+
}), function(o) {
|
|
2496
|
+
var i = o.on, a = o.send;
|
|
2497
|
+
j("builtinListeners").getOrSet("helloListener", function() {
|
|
2498
|
+
var l = i("postrobot_hello", {
|
|
2499
|
+
domain: "*"
|
|
2500
|
+
}, function(s) {
|
|
2501
|
+
return at(s.source, {
|
|
2502
|
+
domain: s.origin
|
|
2503
|
+
}), {
|
|
2504
|
+
instanceID: it()
|
|
2505
|
+
};
|
|
2506
|
+
}), u = Ge();
|
|
2507
|
+
return u && Oe(u, {
|
|
2508
|
+
send: a
|
|
2509
|
+
}).catch(function(s) {
|
|
2510
|
+
}), l;
|
|
2511
|
+
});
|
|
2512
|
+
}({
|
|
2513
|
+
on: ne,
|
|
2514
|
+
send: K
|
|
2515
|
+
}));
|
|
2516
|
+
var e, n, t, r;
|
|
2517
|
+
}
|
|
2518
|
+
function un() {
|
|
2519
|
+
(function() {
|
|
2520
|
+
for (var n = j("responseListeners"), t = 0, r = n.keys(); t < r.length; t++) {
|
|
2521
|
+
var o = r[t], i = n.get(o);
|
|
2522
|
+
i && (i.cancelled = !0), n.del(o);
|
|
2523
|
+
}
|
|
2524
|
+
})(), (e = j().get("postMessageListener")) && e.cancel();
|
|
2525
|
+
var e;
|
|
2526
|
+
delete window.__post_robot_10_0_46__;
|
|
2527
|
+
}
|
|
2528
|
+
var cn = !0;
|
|
2529
|
+
function dn(e) {
|
|
2530
|
+
for (var n = 0, t = H("requestPromises").get(e, []); n < t.length; n++) t[n].reject(new Error("Window " + (G(e) ? "closed" : "cleaned up") + " before response")).catch(ee);
|
|
2531
|
+
}
|
|
2532
|
+
Et();
|
|
2533
|
+
}]);
|
|
2534
|
+
});
|
|
2535
|
+
}(Se)), Se.exports;
|
|
2536
|
+
}
|
|
2537
|
+
var Mt;
|
|
2538
|
+
function nr() {
|
|
2539
|
+
return Mt || (Mt = 1, function(c) {
|
|
2540
|
+
c.exports = tr(), c.exports.default = c.exports;
|
|
2541
|
+
}(ke)), ke.exports;
|
|
2542
|
+
}
|
|
2543
|
+
var Ft = nr();
|
|
2544
|
+
const rr = /* @__PURE__ */ Qn(Ft), qe = /* @__PURE__ */ gn({
|
|
2737
2545
|
__proto__: null,
|
|
2738
|
-
default:
|
|
2739
|
-
}, [
|
|
2546
|
+
default: rr
|
|
2547
|
+
}, [Ft]);
|
|
2740
2548
|
export {
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2549
|
+
kt as ConsentBox,
|
|
2550
|
+
ir as PrivacyCenterBox,
|
|
2551
|
+
ar as SoyioTypes,
|
|
2552
|
+
sr as SoyioWidget,
|
|
2553
|
+
Fe as _TooltipManager,
|
|
2554
|
+
sr as default
|
|
2747
2555
|
};
|