@soyio/soyio-widget 2.17.0 → 2.18.0

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/README.md CHANGED
@@ -164,6 +164,10 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
164
164
  // Feature flags (optional)
165
165
  enabledFeatures: ["DataSubjectRequest", "ConsentManagement"],
166
166
 
167
+ // DSR rights to show (optional)
168
+ // When omitted, the DSR form will use arsop right as default
169
+ enabledRights: ["arsop"],
170
+
167
171
  // Request reference (optional)
168
172
  // Will be attached to data subject requests
169
173
  requestReference: "<reference>", // e.g. some uuid or id to match our created records with your frontend flows
@@ -197,6 +201,7 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
197
201
  - `sessionToken`: Use this to authenticate a session directly.
198
202
  - `companyId`: The company identifier. Must start with `com_`. Use this when Privacy Center is mounted in a non authenticated environment.
199
203
  - `enabledFeatures`: Optional array of features to show. Supported values: `"DataSubjectRequest"`, `"ConsentManagement"`.
204
+ - `enabledRights`: Optional array of rights for the Data Subject Request (DSR) form. Supported values: `"arsop"`, `"redec"`. When multiple values are provided, the form starts with a right selection step. When a single value is provided, the selection step is skipped. When omitted, the form defaults to arsop rights.
200
205
  - `requestReference`: Optional string, intended to be a reference of the current session. It will be attached to created data subject requests.
201
206
  - `dataSubjects`: Optional array of data subject categories. When present, the consent management view only shows consent for the specified categories. Supported values include: `"anonymous_user"`, `"citizen_voter"`, `"commuter"`, `"consultant"`, `"customer"`, `"employee"`, `"job_applicant"`, `"next_of_kin"`, `"passenger"`, `"patient"`, `"prospect"`, `"shareholder"`, `"supplier_vendor"`, `"trainee"`, `"visitor"`.
202
207
  - `fileRequisites`: Optional object to configure file upload constraints.
package/dist/index.d.ts CHANGED
@@ -241,6 +241,7 @@ export declare class PrivacyCenterBox extends BaseIframeBox<PrivacyCenterConfig>
241
241
 
242
242
  declare type PrivacyCenterConfig = BaseConfig & {
243
243
  enabledFeatures?: PrivacyManagerFeature[];
244
+ enabledRights?: PrivacyCenterRight[];
244
245
  dataSubjects?: DataSubject[];
245
246
  requestReference?: string;
246
247
  fileRequisites?: {
@@ -255,6 +256,8 @@ declare type PrivacyCenterConfig = BaseConfig & {
255
256
  companyId?: never;
256
257
  });
257
258
 
259
+ declare type PrivacyCenterRight = 'arsop' | 'redec';
260
+
258
261
  declare type PrivacyManagerFeature = 'DataSubjectRequest' | 'ConsentManagement' | 'RequestTracking';
259
262
 
260
263
  declare type Request_2 = 'disclosure' | 'signature' | 'authentication';
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  var fn = Object.defineProperty;
2
2
  var St = Object.getOwnPropertySymbols, ln = Object.getPrototypeOf, hn = Object.prototype.hasOwnProperty, mn = Object.prototype.propertyIsEnumerable, pn = Reflect.get;
3
- var xt = (c) => {
3
+ var bt = (c) => {
4
4
  throw TypeError(c);
5
5
  };
6
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) => {
7
+ var xt = (c, d) => {
8
8
  var h = {};
9
9
  for (var f in c)
10
10
  hn.call(c, f) && d.indexOf(f) < 0 && (h[f] = c[f]);
@@ -13,24 +13,24 @@ var bt = (c, d) => {
13
13
  d.indexOf(f) < 0 && mn.call(c, f) && (h[f] = c[f]);
14
14
  return h;
15
15
  };
16
- var N = (c, d, h) => vn(c, typeof d != "symbol" ? d + "" : d, h), wn = (c, d, h) => d.has(c) || xt("Cannot " + h);
17
- var It = (c, d, h) => d.has(c) ? xt("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(c) : d.set(c, h);
16
+ var D = (c, d, h) => vn(c, typeof d != "symbol" ? d + "" : d, h), wn = (c, d, h) => d.has(c) || bt("Cannot " + h);
17
+ var It = (c, d, h) => d.has(c) ? bt("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(c) : d.set(c, h);
18
18
  var Wt = (c, d, h) => (wn(c, d, "access private method"), h);
19
19
  var Pt = (c, d, h) => pn(ln(c), h, d);
20
20
  var q = (c, d, h) => new Promise((f, v) => {
21
- var y = (R) => {
21
+ var y = (C) => {
22
22
  try {
23
- S(h.next(R));
24
- } catch (D) {
25
- v(D);
23
+ S(h.next(C));
24
+ } catch (N) {
25
+ v(N);
26
26
  }
27
- }, E = (R) => {
27
+ }, E = (C) => {
28
28
  try {
29
- S(h.throw(R));
30
- } catch (D) {
31
- v(D);
29
+ S(h.throw(C));
30
+ } catch (N) {
31
+ v(N);
32
32
  }
33
- }, S = (R) => R.done ? f(R.value) : Promise.resolve(R.value).then(y, E);
33
+ }, S = (C) => C.done ? f(C.value) : Promise.resolve(C.value).then(y, E);
34
34
  S((h = h.apply(c, d)).next());
35
35
  });
36
36
  function gn(c, d) {
@@ -49,14 +49,14 @@ function gn(c, d) {
49
49
  }
50
50
  return Object.freeze(Object.defineProperty(c, Symbol.toStringTag, { value: "Module" }));
51
51
  }
52
- const be = !!(typeof window != "undefined" && window.document && window.document.createElement), Tt = 200;
52
+ const xe = !!(typeof window != "undefined" && window.document && window.document.createElement), Tt = 200;
53
53
  class He {
54
54
  constructor() {
55
- N(this, "tooltipElement", null);
56
- N(this, "tooltipContent", null);
57
- N(this, "tooltipClass", "soyio-tooltip");
58
- N(this, "hideTimeout", null);
59
- be && this.createTooltipElement();
55
+ D(this, "tooltipElement", null);
56
+ D(this, "tooltipContent", null);
57
+ D(this, "tooltipClass", "soyio-tooltip");
58
+ D(this, "hideTimeout", null);
59
+ xe && this.createTooltipElement();
60
60
  }
61
61
  createTooltipElement() {
62
62
  const d = document.querySelector(`.${this.tooltipClass}`);
@@ -93,7 +93,7 @@ class He {
93
93
  });
94
94
  }
95
95
  calculateOptimalPlacement(d, h) {
96
- const f = this.tooltipElement.offsetWidth, v = this.tooltipElement.offsetHeight, { innerWidth: y, innerHeight: E } = window, S = 4, R = {
96
+ const f = this.tooltipElement.offsetWidth, v = this.tooltipElement.offsetHeight, { innerWidth: y, innerHeight: E } = window, S = 4, C = {
97
97
  top: {
98
98
  top: h - v - S,
99
99
  left: d - f / 2,
@@ -115,11 +115,11 @@ class He {
115
115
  placement: "left"
116
116
  }
117
117
  };
118
- for (const [, k] of Object.entries(R))
118
+ for (const [, k] of Object.entries(C))
119
119
  if (He.fitsInViewport(k, f, v, y, E))
120
120
  return k;
121
- const D = R.top;
122
- return D.left = Math.max(S, Math.min(D.left, y - f - S)), D.top = Math.max(S, Math.min(D.top, E - v - S)), D;
121
+ const N = C.top;
122
+ return N.left = Math.max(S, Math.min(N.left, y - f - S)), N.top = Math.max(S, Math.min(N.top, E - v - S)), N;
123
123
  }
124
124
  static fitsInViewport(d, h, f, v, y) {
125
125
  return d.top >= 0 && d.left >= 0 && d.top + f <= y && d.left + h <= v;
@@ -147,7 +147,7 @@ function yn(c, d, h) {
147
147
  }
148
148
  });
149
149
  }
150
- const En = "IFRAME_READY", Sn = "IFRAME_HEIGHT_CHANGE", xn = "TOOLTIP_STATE_CHANGE", bn = "INFO_EVENT", In = "CONSENT_STATE_CHANGE", U = {
150
+ const En = "IFRAME_READY", Sn = "IFRAME_HEIGHT_CHANGE", bn = "TOOLTIP_STATE_CHANGE", xn = "INFO_EVENT", In = "CONSENT_STATE_CHANGE", U = {
151
151
  // BASE
152
152
  onHeightChange: {},
153
153
  onIframeReady: {},
@@ -156,24 +156,24 @@ const En = "IFRAME_READY", Sn = "IFRAME_HEIGHT_CHANGE", xn = "TOOLTIP_STATE_CHAN
156
156
  // CONSENT
157
157
  onStateChange: {}
158
158
  };
159
- let Ct, Rt, Ot, At, Nt;
159
+ let Rt, Ct, Ot, At, Nt;
160
160
  function Wn() {
161
161
  return q(this, null, function* () {
162
162
  const c = yield Promise.resolve().then(() => _e);
163
- Ct || Rt || Ot || At || Nt || (Ct = c.on(Sn, (d) => q(null, null, function* () {
163
+ Rt || Ct || Ot || At || Nt || (Rt = c.on(Sn, (d) => q(null, null, function* () {
164
164
  const h = d.data, f = U.onHeightChange[h.identifier];
165
165
  return f && f(h.height), Promise.resolve();
166
- })), Rt = c.on(En, (d) => q(null, null, function* () {
166
+ })), Ct = c.on(En, (d) => q(null, null, function* () {
167
167
  const h = d.data, f = U.onIframeReady[h.identifier];
168
168
  return f && f(), Promise.resolve();
169
- })), Ot = c.on(xn, (d) => q(null, null, function* () {
169
+ })), Ot = c.on(bn, (d) => q(null, null, function* () {
170
170
  const h = d.data, f = U.onTooltipChange[h.identifier];
171
171
  return f && f(h), Promise.resolve();
172
172
  })), At = c.on(In, (d) => q(null, null, function* () {
173
173
  const h = d.data, f = U.onStateChange[h.identifier];
174
174
  return f && f(h), Promise.resolve();
175
- })), Nt = c.on(bn, (h) => q(null, [h], function* ({ data: d }) {
176
- const E = d, { identifier: f } = E, v = bt(E, ["identifier"]), y = U.onInfo[f];
175
+ })), Nt = c.on(xn, (h) => q(null, [h], function* ({ data: d }) {
176
+ const E = d, { identifier: f } = E, v = xt(E, ["identifier"]), y = U.onInfo[f];
177
177
  return y && y(v), Promise.resolve();
178
178
  })));
179
179
  });
@@ -195,7 +195,7 @@ function Tn(c) {
195
195
  const d = document.getElementById(c);
196
196
  d && (console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."), d.remove());
197
197
  }
198
- function Cn(c) {
198
+ function Rn(c) {
199
199
  const d = document.querySelector(c);
200
200
  if (!d)
201
201
  throw new Error(`Iframe div container with id '${c}' not found`);
@@ -213,7 +213,7 @@ function Cn(c) {
213
213
  opacity: 1 !important;
214
214
  `, h;
215
215
  }
216
- function Rn(c, d, h) {
216
+ function Cn(c, d, h) {
217
217
  const f = document.createElement("iframe");
218
218
  return f.id = d, f.src = c, f.style.cssText += `
219
219
  width: 100% !important;
@@ -245,14 +245,14 @@ const zt = "https://app.soyio.id", Lt = "https://sandbox.soyio.id", An = "https:
245
245
  };
246
246
  class We {
247
247
  constructor(d) {
248
- N(this, "iframe", null);
249
- N(this, "skeleton", null);
250
- N(this, "options");
251
- N(this, "appearance");
252
- N(this, "tooltipManager");
253
- N(this, "defaultIframeCSSConfig", kn);
254
- N(this, "Skeleton", null);
255
- N(this, "defaultUniqueId");
248
+ D(this, "iframe", null);
249
+ D(this, "skeleton", null);
250
+ D(this, "options");
251
+ D(this, "appearance");
252
+ D(this, "tooltipManager");
253
+ D(this, "defaultIframeCSSConfig", kn);
254
+ D(this, "Skeleton", null);
255
+ D(this, "defaultUniqueId");
256
256
  this.options = d, this.appearance = d.appearance || null, this.tooltipManager = new He(), this.defaultUniqueId = We.generateUniqueId();
257
257
  }
258
258
  static generateUniqueId() {
@@ -293,20 +293,20 @@ class We {
293
293
  }
294
294
  mount(d) {
295
295
  return q(this, null, function* () {
296
- if (!be) return this;
296
+ if (!xe) return this;
297
297
  yield this.setupListeners(), Tn(this.iframeIdentifier);
298
- const h = Cn(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;
298
+ const h = Rn(d), f = this.iframeUrl();
299
+ return this.iframe = Cn(f, this.iframeIdentifier, this.defaultIframeCSSConfig), this.Skeleton && (this.skeleton = new this.Skeleton(this.uniqueIdentifier), this.skeleton.mount(h)), h.appendChild(this.iframe), this;
300
300
  });
301
301
  }
302
302
  unmount() {
303
- be && (Pn(this.uniqueIdentifier), this.skeleton && (this.skeleton.hide(), this.skeleton = null), this.iframe && (this.iframe.remove(), this.iframe = null));
303
+ xe && (Pn(this.uniqueIdentifier), this.skeleton && (this.skeleton.hide(), this.skeleton = null), this.iframe && (this.iframe.remove(), this.iframe = null));
304
304
  }
305
305
  }
306
306
  class Hn {
307
307
  constructor(d) {
308
- N(this, "element");
309
- N(this, "identifier");
308
+ D(this, "element");
309
+ D(this, "identifier");
310
310
  this.identifier = `skeleton-${d}`, this.element = document.createElement("div"), this.element.id = this.identifier, this.element.style.cssText = `
311
311
  position: absolute;
312
312
  left: 50%;
@@ -375,8 +375,8 @@ class Hn {
375
375
  align-items: center;
376
376
  gap: 1rem;
377
377
  `;
378
- const R = document.createElement("div");
379
- R.style.cssText = `
378
+ const C = document.createElement("div");
379
+ C.style.cssText = `
380
380
  width: 1rem;
381
381
  height: 1rem;
382
382
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
@@ -386,8 +386,8 @@ class Hn {
386
386
  flex-shrink: 0;
387
387
  margin-left: 10px;
388
388
  `;
389
- const D = document.createElement("div");
390
- D.style.cssText = `
389
+ const N = document.createElement("div");
390
+ N.style.cssText = `
391
391
  flex-grow: 1;
392
392
  display: flex;
393
393
  flex-direction: column;
@@ -419,7 +419,7 @@ class Hn {
419
419
  }
420
420
  `, document.head.appendChild(J);
421
421
  }
422
- f.appendChild(v), f.appendChild(y), f.appendChild(E), D.appendChild(k), D.appendChild(X), S.appendChild(R), S.appendChild(D), h.appendChild(f), h.appendChild(S), this.element.appendChild(h);
422
+ f.appendChild(v), f.appendChild(y), f.appendChild(E), N.appendChild(k), N.appendChild(X), S.appendChild(C), S.appendChild(N), h.appendChild(f), h.appendChild(S), this.element.appendChild(h);
423
423
  }
424
424
  cleanupExistingSkeleton() {
425
425
  const d = document.getElementById(this.identifier);
@@ -432,7 +432,7 @@ class Hn {
432
432
  this.element.style.opacity = "0", setTimeout(() => this.element.remove(), 300);
433
433
  }
434
434
  }
435
- const qe = "2.17.0";
435
+ const qe = "2.18.0";
436
436
  function qn(c) {
437
437
  var E;
438
438
  const d = [
@@ -451,9 +451,9 @@ function qn(c) {
451
451
  class kt extends We {
452
452
  constructor(h) {
453
453
  super(h);
454
- N(this, "defaultIframePrefix", "consent-box");
455
- N(this, "defaultIframeCSSConfig", Un);
456
- N(this, "state", {
454
+ D(this, "defaultIframePrefix", "consent-box");
455
+ D(this, "defaultIframeCSSConfig", Un);
456
+ D(this, "state", {
457
457
  isSelected: !1,
458
458
  actionToken: null
459
459
  });
@@ -485,11 +485,11 @@ class kt extends We {
485
485
  }
486
486
  }
487
487
  function _n(c) {
488
- var y, E, S;
488
+ var y, E, S, C;
489
489
  const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Nn : An), f = new URLSearchParams();
490
- if (f.set("sdkVersion", qe), c.sessionToken ? f.set("sessionToken", c.sessionToken) : c.companyId && f.set("companyId", c.companyId), (E = c.enabledFeatures) != null && E.length && f.set("enabledFeatures", c.enabledFeatures.join(",")), (S = c.dataSubjects) != null && S.length && f.set("dataSubjects", c.dataSubjects.join(",")), c.requestReference && f.set("requestReference", c.requestReference), c.fileRequisites) {
491
- const R = JSON.stringify(c.fileRequisites);
492
- R !== "{}" && f.set("fileRequisites", R);
490
+ if (f.set("sdkVersion", qe), c.sessionToken ? f.set("sessionToken", c.sessionToken) : c.companyId && f.set("companyId", c.companyId), (E = c.enabledFeatures) != null && E.length && f.set("enabledFeatures", c.enabledFeatures.join(",")), (S = c.enabledRights) != null && S.length && f.set("enabledRights", c.enabledRights.join(",")), (C = c.dataSubjects) != null && C.length && f.set("dataSubjects", c.dataSubjects.join(",")), c.requestReference && f.set("requestReference", c.requestReference), c.fileRequisites) {
491
+ const N = JSON.stringify(c.fileRequisites);
492
+ N !== "{}" && f.set("fileRequisites", N);
493
493
  }
494
494
  const v = f.toString();
495
495
  return `${h}${v ? `?${v}` : ""}`;
@@ -497,9 +497,9 @@ function _n(c) {
497
497
  class ir extends We {
498
498
  constructor() {
499
499
  super(...arguments);
500
- N(this, "defaultIframePrefix", "privacy-center");
501
- N(this, "_uniqueIdentifier", "privacy-center");
502
- N(this, "defaultIframeCSSConfig", Fn);
500
+ D(this, "defaultIframePrefix", "privacy-center");
501
+ D(this, "_uniqueIdentifier", "privacy-center");
502
+ D(this, "defaultIframeCSSConfig", Fn);
503
503
  }
504
504
  get uniqueIdentifier() {
505
505
  return this._uniqueIdentifier;
@@ -533,12 +533,12 @@ function Vn() {
533
533
  }, Ln);
534
534
  }
535
535
  function Jn(c) {
536
- const d = Gn(c), h = Mn, f = zn, 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, S = window.innerHeight || document.documentElement.clientHeight || window.screen.height, R = E / window.screen.availWidth, D = (E - h) / 2 / R + v, k = (S - f) / 2 / R + y, X = [
536
+ const d = Gn(c), h = Mn, f = zn, 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, S = window.innerHeight || document.documentElement.clientHeight || window.screen.height, C = E / window.screen.availWidth, N = (E - h) / 2 / C + v, k = (S - f) / 2 / C + y, X = [
537
537
  "scrollbars=yes",
538
538
  `width=${h}`,
539
539
  `height=${f}`,
540
540
  `top=${k}`,
541
- `left=${D}`
541
+ `left=${N}`
542
542
  ].join(","), J = window.open("about:blank", "Soyio", X);
543
543
  J ? (Z = J, Z.location.href = d, document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Fe), Fe(), Vn()) : (Pe(), alert("Debes habilitar las ventanas emergentes para poder iniciar el flujo."));
544
544
  }
@@ -564,8 +564,8 @@ var Ie, Ut;
564
564
  class sr {
565
565
  constructor(d) {
566
566
  It(this, Ie);
567
- N(this, "onEvent");
568
- this.onEvent = d.onEvent, be && (Jn(d), Xn({
567
+ D(this, "onEvent");
568
+ this.onEvent = d.onEvent, xe && (Jn(d), Xn({
569
569
  onEvent: Wt(this, Ie, Ut).bind(this)
570
570
  }));
571
571
  }
@@ -576,7 +576,7 @@ Ie = new WeakSet(), Ut = function(d) {
576
576
  function Qn(c) {
577
577
  return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
578
578
  }
579
- var Ue = { exports: {} }, xe = { exports: {} }, er = xe.exports, Dt;
579
+ var Ue = { exports: {} }, be = { exports: {} }, er = be.exports, Dt;
580
580
  function tr() {
581
581
  return Dt || (Dt = 1, function(c, d) {
582
582
  (function(h, f) {
@@ -610,9 +610,9 @@ function tr() {
610
610
  if (v.r(S), Object.defineProperty(S, "default", {
611
611
  enumerable: !0,
612
612
  value: y
613
- }), 2 & E && typeof y != "string") for (var R in y) v.d(S, R, function(D) {
614
- return y[D];
615
- }.bind(null, R));
613
+ }), 2 & E && typeof y != "string") for (var C in y) v.d(S, C, function(N) {
614
+ return y[N];
615
+ }.bind(null, C));
616
616
  return S;
617
617
  }, v.n = function(y) {
618
618
  var E = y && y.__esModule ? function() {
@@ -663,15 +663,15 @@ function tr() {
663
663
  function S(e) {
664
664
  return e === void 0 && (e = window), e.location.protocol;
665
665
  }
666
- function R(e) {
666
+ function C(e) {
667
667
  if (e === void 0 && (e = window), e.mockDomain) {
668
668
  var n = e.mockDomain.split("//")[0];
669
669
  if (n) return n;
670
670
  }
671
671
  return S(e);
672
672
  }
673
- function D(e) {
674
- return e === void 0 && (e = window), R(e) === "about:";
673
+ function N(e) {
674
+ return e === void 0 && (e = window), C(e) === "about:";
675
675
  }
676
676
  function k(e) {
677
677
  if (e === void 0 && (e = window), e) try {
@@ -724,12 +724,12 @@ function tr() {
724
724
  } catch (r) {
725
725
  }
726
726
  try {
727
- if (D(n) && J()) return !0;
727
+ if (N(n) && J()) return !0;
728
728
  } catch (r) {
729
729
  }
730
730
  try {
731
731
  if (function(r) {
732
- return r === void 0 && (r = window), R(r) === "mock:";
732
+ return r === void 0 && (r = window), C(r) === "mock:";
733
733
  }(n) && J()) return !0;
734
734
  } catch (r) {
735
735
  }
@@ -740,7 +740,7 @@ function tr() {
740
740
  return !1;
741
741
  }(e)) return !1;
742
742
  try {
743
- if (e === window || D(e) && J() || F(window) === F(e)) return !0;
743
+ if (e === window || N(e) && J() || F(window) === F(e)) return !0;
744
744
  } catch (n) {
745
745
  }
746
746
  return !1;
@@ -945,7 +945,7 @@ function tr() {
945
945
  ae = null, e.resolve();
946
946
  }
947
947
  }
948
- function Ce() {
948
+ function Re() {
949
949
  Te += 1;
950
950
  }
951
951
  function se() {
@@ -956,7 +956,7 @@ function tr() {
956
956
  var r = this;
957
957
  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) {
958
958
  var o, i, a = !1, l = !1, u = !1;
959
- Ce();
959
+ Re();
960
960
  try {
961
961
  t(function(s) {
962
962
  u ? r.resolve(s) : (a = !0, o = s);
@@ -998,12 +998,12 @@ function tr() {
998
998
  }, n.dispatch = function() {
999
999
  var t = this.resolved, r = this.rejected, o = this.handlers;
1000
1000
  if (!this.dispatching && (t || r)) {
1001
- this.dispatching = !0, Ce();
1001
+ this.dispatching = !0, Re();
1002
1002
  for (var i = function(g, I) {
1003
- return g.then(function(x) {
1004
- I.resolve(x);
1005
- }, function(x) {
1006
- I.reject(x);
1003
+ return g.then(function(b) {
1004
+ I.resolve(b);
1005
+ }, function(b) {
1006
+ I.reject(b);
1007
1007
  });
1008
1008
  }, a = 0; a < o.length; a++) {
1009
1009
  var l = o[a], u = l.onSuccess, s = l.onError, w = l.promise, m = void 0;
@@ -1126,7 +1126,7 @@ function tr() {
1126
1126
  }, e.try = function(t, r, o) {
1127
1127
  if (t && typeof t != "function" && !t.call) throw new Error("Promise.try expected a function");
1128
1128
  var i;
1129
- Ce();
1129
+ Re();
1130
1130
  try {
1131
1131
  i = t.apply(r, o || []);
1132
1132
  } catch (a) {
@@ -1153,7 +1153,7 @@ function tr() {
1153
1153
  }
1154
1154
  return -1;
1155
1155
  }
1156
- var Re = function() {
1156
+ var Ce = function() {
1157
1157
  function e() {
1158
1158
  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() {
1159
1159
  if (typeof WeakMap == "undefined" || Object.freeze === void 0) return !1;
@@ -1282,7 +1282,7 @@ function tr() {
1282
1282
  try {
1283
1283
  return JSON.stringify([].slice.call(e), function(n, t) {
1284
1284
  return typeof t == "function" ? "memoize[" + function(r) {
1285
- if (ye = ye || new Re(), r == null || typeof r != "object" && typeof r != "function") throw new Error("Invalid object");
1285
+ if (ye = ye || new Ce(), r == null || typeof r != "object" && typeof r != "function") throw new Error("Invalid object");
1286
1286
  var o = ye.get(r);
1287
1287
  return o || (o = typeof r + ":" + Y(), ye.set(r, o)), o;
1288
1288
  }(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;
@@ -1303,7 +1303,7 @@ function tr() {
1303
1303
  for (var s = arguments.length, w = new Array(s), m = 0; m < s; m++) w[m] = arguments[m];
1304
1304
  l < Qe && (i = null, a = null, l = ue, ue += 1);
1305
1305
  var p;
1306
- p = r ? (a = a || new Re()).getOrSet(this, Bt) : i = i || {};
1306
+ p = r ? (a = a || new Ce()).getOrSet(this, Bt) : i = i || {};
1307
1307
  var g;
1308
1308
  try {
1309
1309
  g = Xe(w);
@@ -1312,11 +1312,11 @@ function tr() {
1312
1312
  }
1313
1313
  var I = p[g];
1314
1314
  if (I && o && Date.now() - I.time < o && (delete p[g], I = null), I) return I.value;
1315
- var x = Date.now(), b = e.apply(this, arguments);
1315
+ var b = Date.now(), x = e.apply(this, arguments);
1316
1316
  return p[g] = {
1317
- time: x,
1318
- value: b
1319
- }, b;
1317
+ time: b,
1318
+ value: x
1319
+ }, x;
1320
1320
  };
1321
1321
  return u.reset = function() {
1322
1322
  i = null, a = null;
@@ -1484,7 +1484,7 @@ function tr() {
1484
1484
  }
1485
1485
  function H(e, n) {
1486
1486
  return e === void 0 && (e = "store"), n === void 0 && (n = ot), z("windowStore").getOrSet(e, function() {
1487
- var t = new Re(), r = function(o) {
1487
+ var t = new Ce(), r = function(o) {
1488
1488
  return t.getOrSet(o, n);
1489
1489
  };
1490
1490
  return {
@@ -1673,10 +1673,10 @@ function tr() {
1673
1673
  var m = window.location.protocol + "//" + window.location.host, p = s.method, g = p === void 0 ? "get" : p, I = s.body;
1674
1674
  if (u.indexOf("/") === 0) u = "" + m + u;
1675
1675
  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));
1676
- if (g === "post") return l().then(function(x) {
1677
- if (!x) throw new Error("Can not post to window without target name");
1678
- (function(b) {
1679
- var T = b.url, M = b.target, O = b.body, C = b.method, L = C === void 0 ? "post" : C, W = document.createElement("form");
1676
+ if (g === "post") return l().then(function(b) {
1677
+ if (!b) throw new Error("Can not post to window without target name");
1678
+ (function(x) {
1679
+ var T = x.url, M = x.target, O = x.body, R = x.method, L = R === void 0 ? "post" : R, W = document.createElement("form");
1680
1680
  if (W.setAttribute("target", M), W.setAttribute("method", L), W.setAttribute("action", T), W.style.display = "none", O) for (var A = 0, V = Object.keys(O); A < V.length; A++) {
1681
1681
  var j, he = V[A], Le = document.createElement("input");
1682
1682
  Le.setAttribute("name", he), Le.setAttribute("value", (j = O[he]) == null ? void 0 : j.toString()), W.appendChild(Le);
@@ -1684,7 +1684,7 @@ function tr() {
1684
1684
  tt().appendChild(W), W.submit(), tt().removeChild(W);
1685
1685
  })({
1686
1686
  url: u,
1687
- target: x,
1687
+ target: b,
1688
1688
  method: g,
1689
1689
  body: I
1690
1690
  });
@@ -1695,7 +1695,7 @@ function tr() {
1695
1695
  w.location.replace(u);
1696
1696
  return;
1697
1697
  }
1698
- } catch (x) {
1698
+ } catch (b) {
1699
1699
  }
1700
1700
  w.location = u;
1701
1701
  });
@@ -1845,39 +1845,39 @@ function tr() {
1845
1845
  return a("postrobot_method", {
1846
1846
  domain: "*"
1847
1847
  }, function(w) {
1848
- var m = w.source, p = w.origin, g = w.data, I = g.id, x = g.name, b = ft(m, I);
1849
- if (!b) throw new Error("Could not find method '" + x + "' with id: " + g.id + " in " + F(window));
1850
- var T = b.source, M = b.domain, O = b.val;
1848
+ var m = w.source, p = w.origin, g = w.data, I = g.id, b = g.name, x = ft(m, I);
1849
+ if (!x) throw new Error("Could not find method '" + b + "' with id: " + g.id + " in " + F(window));
1850
+ var T = x.source, M = x.domain, O = x.val;
1851
1851
  return P.try(function() {
1852
- if (!oe(M, p)) throw new Error("Method '" + g.name + "' domain " + JSON.stringify(Oe(b.domain) ? b.domain.source : b.domain) + " does not match origin " + p + " in " + F(window));
1852
+ if (!oe(M, p)) throw new Error("Method '" + g.name + "' domain " + JSON.stringify(Oe(x.domain) ? x.domain.source : x.domain) + " does not match origin " + p + " in " + F(window));
1853
1853
  if ($.isProxyWindow(T)) return T.matchWindow(m, {
1854
1854
  send: l
1855
- }).then(function(C) {
1856
- if (!C) throw new Error("Method call '" + g.name + "' failed - proxy window does not match source in " + F(window));
1855
+ }).then(function(R) {
1856
+ if (!R) throw new Error("Method call '" + g.name + "' failed - proxy window does not match source in " + F(window));
1857
1857
  });
1858
1858
  }).then(function() {
1859
1859
  return O.apply({
1860
1860
  source: m,
1861
1861
  origin: p
1862
1862
  }, g.args);
1863
- }, function(C) {
1863
+ }, function(R) {
1864
1864
  return P.try(function() {
1865
- if (O.onError) return O.onError(C);
1865
+ if (O.onError) return O.onError(R);
1866
1866
  }).then(function() {
1867
- throw C.stack && (C.stack = "Remote call to " + x + "(" + function(L) {
1867
+ throw R.stack && (R.stack = "Remote call to " + b + "(" + function(L) {
1868
1868
  return L === void 0 && (L = []), (W = L, [].slice.call(W)).map(function(A) {
1869
1869
  return typeof A == "string" ? "'" + A + "'" : A === void 0 ? "undefined" : A === null ? "null" : typeof A == "boolean" ? A.toString() : Array.isArray(A) ? "[ ... ]" : typeof A == "object" ? "{ ... }" : typeof A == "function" ? "() => { ... }" : "<" + typeof A + ">";
1870
1870
  }).join(", ");
1871
1871
  var W;
1872
1872
  }(g.args) + `) failed
1873
1873
 
1874
- ` + C.stack), C;
1874
+ ` + R.stack), R;
1875
1875
  });
1876
- }).then(function(C) {
1876
+ }).then(function(R) {
1877
1877
  return {
1878
- result: C,
1878
+ result: R,
1879
1879
  id: I,
1880
- name: x
1880
+ name: b
1881
1881
  };
1882
1882
  });
1883
1883
  });
@@ -1908,8 +1908,8 @@ function tr() {
1908
1908
  }(t, ((o = {}).promise = function(l, u) {
1909
1909
  return function(s, w, m, p, g) {
1910
1910
  return ne("cross_domain_zalgo_promise", {
1911
- then: lt(s, w, function(I, x) {
1912
- return m.then(I, x);
1911
+ then: lt(s, w, function(I, b) {
1912
+ return m.then(I, b);
1913
1913
  }, p, {
1914
1914
  on: g.on,
1915
1915
  send: g.send
@@ -1946,20 +1946,20 @@ function tr() {
1946
1946
  }(0, 0, a);
1947
1947
  }, o.cross_domain_function = function(a) {
1948
1948
  return function(l, u, s, w) {
1949
- var m = s.id, p = s.name, g = w.send, I = function(b) {
1950
- b === void 0 && (b = {});
1949
+ var m = s.id, p = s.name, g = w.send, I = function(x) {
1950
+ x === void 0 && (x = {});
1951
1951
  function T() {
1952
1952
  var M = arguments;
1953
1953
  return $.toProxyWindow(l, {
1954
1954
  send: g
1955
1955
  }).awaitWindow().then(function(O) {
1956
- var C = ft(O, m);
1957
- if (C && C.val !== T) return C.val.apply({
1956
+ var R = ft(O, m);
1957
+ if (R && R.val !== T) return R.val.apply({
1958
1958
  source: window,
1959
1959
  origin: F()
1960
1960
  }, M);
1961
1961
  var L = [].slice.call(M);
1962
- return b.fireAndForget ? g(O, "postrobot_method", {
1962
+ return x.fireAndForget ? g(O, "postrobot_method", {
1963
1963
  id: m,
1964
1964
  name: p,
1965
1965
  args: L
@@ -1981,10 +1981,10 @@ function tr() {
1981
1981
  });
1982
1982
  }
1983
1983
  return T.__name__ = p, T.__origin__ = u, T.__source__ = l, T.__id__ = m, T.origin = u, T;
1984
- }, x = I();
1985
- return x.fireAndForget = I({
1984
+ }, b = I();
1985
+ return b.fireAndForget = I({
1986
1986
  fireAndForget: !0
1987
- }), x;
1987
+ }), b;
1988
1988
  }(e, n, a, {
1989
1989
  send: i
1990
1990
  });
@@ -2160,17 +2160,17 @@ function tr() {
2160
2160
  return;
2161
2161
  }
2162
2162
  var i = e.source, a = e.origin, l = function(w, m, p, g) {
2163
- var I = g.on, x = g.send, b;
2163
+ var I = g.on, b = g.send, x;
2164
2164
  try {
2165
- b = mt(m, p, w, {
2165
+ x = mt(m, p, w, {
2166
2166
  on: I,
2167
- send: x
2167
+ send: b
2168
2168
  });
2169
2169
  } catch (M) {
2170
2170
  return;
2171
2171
  }
2172
- if (b && typeof b == "object" && b !== null) {
2173
- var T = b.__post_robot_10_0_46__;
2172
+ if (x && typeof x == "object" && x !== null) {
2173
+ var T = x.__post_robot_10_0_46__;
2174
2174
  if (Array.isArray(T)) return T;
2175
2175
  }
2176
2176
  }(e.data, i, a, {
@@ -2220,10 +2220,10 @@ function tr() {
2220
2220
  }
2221
2221
  var p = u;
2222
2222
  if (Array.isArray(p)) {
2223
- for (var g = [], I = 0, x = p; I < x.length; I++) g.push(o({
2223
+ for (var g = [], I = 0, b = p; I < b.length; I++) g.push(o({
2224
2224
  name: l,
2225
2225
  domain: s,
2226
- win: x[I]
2226
+ win: b[I]
2227
2227
  }, a));
2228
2228
  return {
2229
2229
  cancel: function() {
@@ -2232,14 +2232,14 @@ function tr() {
2232
2232
  };
2233
2233
  }
2234
2234
  if (Array.isArray(s)) {
2235
- for (var b = [], T = 0, M = s; T < M.length; T++) b.push(o({
2235
+ for (var x = [], T = 0, M = s; T < M.length; T++) x.push(o({
2236
2236
  name: l,
2237
2237
  win: p,
2238
2238
  domain: M[T]
2239
2239
  }, a));
2240
2240
  return {
2241
2241
  cancel: function() {
2242
- for (var j = 0; j < b.length; j++) b[j].cancel();
2242
+ for (var j = 0; j < x.length; j++) x[j].cancel();
2243
2243
  }
2244
2244
  };
2245
2245
  }
@@ -2249,7 +2249,7 @@ function tr() {
2249
2249
  domain: s
2250
2250
  });
2251
2251
  p && p !== "*" || (p = Se());
2252
- var C = (s = s || "*").toString();
2252
+ var R = (s = s || "*").toString();
2253
2253
  if (O) throw p && s ? new Error("Request listener already exists for " + l + " on domain " + s.toString() + " for " + (p === Se() ? "wildcard" : "specified") + " window") : p ? new Error("Request listener already exists for " + l + " for " + (p === Se() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + l + " on domain " + s.toString()) : new Error("Request listener already exists for " + l);
2254
2254
  var L = w.getOrSet(p, function() {
2255
2255
  return {};
@@ -2261,9 +2261,9 @@ function tr() {
2261
2261
  })).push(V = {
2262
2262
  regex: s,
2263
2263
  listener: a
2264
- }) : W[C] = a, {
2264
+ }) : W[R] = a, {
2265
2265
  cancel: function() {
2266
- delete W[C], V && (A.splice(A.indexOf(V, 1)), A.length || delete W.__domain_regex__), Object.keys(W).length || delete L[l], p && !Object.keys(L).length && w.del(p);
2266
+ delete W[R], V && (A.splice(A.indexOf(V, 1)), A.length || delete W.__domain_regex__), Object.keys(W).length || delete L[l], p && !Object.keys(L).length && w.del(p);
2267
2267
  }
2268
2268
  };
2269
2269
  }({
@@ -2304,30 +2304,30 @@ function tr() {
2304
2304
  }(t, s, i), function(w, m) {
2305
2305
  var p = Ge(m);
2306
2306
  if (p) return p === w;
2307
- if (m === w || function(x) {
2308
- x === void 0 && (x = window);
2307
+ if (m === w || function(b) {
2308
+ b === void 0 && (b = window);
2309
2309
  try {
2310
- if (x.top) return x.top;
2310
+ if (b.top) return b.top;
2311
2311
  } catch (O) {
2312
2312
  }
2313
- if (k(x) === x) return x;
2313
+ if (k(b) === b) return b;
2314
2314
  try {
2315
- if (Be(window, x) && window.top) return window.top;
2315
+ if (Be(window, b) && window.top) return window.top;
2316
2316
  } catch (O) {
2317
2317
  }
2318
2318
  try {
2319
- if (Be(x, window) && window.top) return window.top;
2319
+ if (Be(b, window) && window.top) return window.top;
2320
2320
  } catch (O) {
2321
2321
  }
2322
- for (var b = 0, T = function O(C) {
2323
- for (var L = [], W = 0, A = $e(C); W < A.length; W++) {
2322
+ for (var x = 0, T = function O(R) {
2323
+ for (var L = [], W = 0, A = $e(R); W < A.length; W++) {
2324
2324
  var V = A[W];
2325
2325
  L.push(V);
2326
2326
  for (var j = 0, he = O(V); j < he.length; j++) L.push(he[j]);
2327
2327
  }
2328
2328
  return L;
2329
- }(x); b < T.length; b++) {
2330
- var M = T[b];
2329
+ }(b); x < T.length; x++) {
2330
+ var M = T[x];
2331
2331
  try {
2332
2332
  if (M.top) return M.top;
2333
2333
  } catch (O) {
@@ -2348,17 +2348,17 @@ function tr() {
2348
2348
  }(s, l);
2349
2349
  }).then(function(w) {
2350
2350
  return function(m, p, g, I) {
2351
- var x = I.send;
2351
+ var b = I.send;
2352
2352
  return P.try(function() {
2353
2353
  return typeof p == "string" ? p : P.try(function() {
2354
2354
  return g || Ae(m, {
2355
- send: x
2356
- }).then(function(b) {
2357
- return b.domain;
2355
+ send: b
2356
+ }).then(function(x) {
2357
+ return x.domain;
2358
2358
  });
2359
- }).then(function(b) {
2359
+ }).then(function(x) {
2360
2360
  if (!oe(p, p)) throw new Error("Domain " + et(p) + " does not match " + et(p));
2361
- return b;
2361
+ return x;
2362
2362
  });
2363
2363
  });
2364
2364
  }(s, i, (w === void 0 ? {} : w).domain, {
@@ -2367,7 +2367,7 @@ function tr() {
2367
2367
  }).then(function(w) {
2368
2368
  var m = w, p = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, g = new P(), I = t + "_" + Y();
2369
2369
  if (!u) {
2370
- var x = {
2370
+ var b = {
2371
2371
  name: t,
2372
2372
  win: s,
2373
2373
  domain: m,
@@ -2375,25 +2375,25 @@ function tr() {
2375
2375
  };
2376
2376
  (function(W, A) {
2377
2377
  z("responseListeners").set(W, A);
2378
- })(I, x);
2379
- var b = H("requestPromises").getOrSet(s, function() {
2378
+ })(I, b);
2379
+ var x = H("requestPromises").getOrSet(s, function() {
2380
2380
  return [];
2381
2381
  });
2382
- b.push(g), g.catch(function() {
2382
+ x.push(g), g.catch(function() {
2383
2383
  (function(W) {
2384
2384
  z("erroredResponseListeners").set(W, !0);
2385
2385
  })(I), vt(I);
2386
2386
  });
2387
2387
  var T = function(W) {
2388
2388
  return H("knownWindows").get(W, !1);
2389
- }(s) ? 1e4 : 2e3, M = a, O = T, C = M, L = function(W, A) {
2389
+ }(s) ? 1e4 : 2e3, M = a, O = T, R = M, L = function(W, A) {
2390
2390
  var V;
2391
2391
  return function j() {
2392
2392
  V = setTimeout(function() {
2393
2393
  (function() {
2394
- if (G(s)) return g.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
2395
- if (x.cancelled) return g.reject(new Error("Response listener was cancelled for " + t));
2396
- O = Math.max(O - 500, 0), C !== -1 && (C = Math.max(C - 500, 0)), x.ack || O !== 0 ? C === 0 && g.reject(new Error("No response for postMessage " + p + " in " + F() + " in " + M + "ms")) : g.reject(new Error("No ack for postMessage " + p + " in " + F() + " in " + T + "ms"));
2394
+ if (G(s)) return g.reject(new Error("Window closed for " + t + " before " + (b.ack ? "response" : "ack")));
2395
+ if (b.cancelled) return g.reject(new Error("Response listener was cancelled for " + t));
2396
+ O = Math.max(O - 500, 0), R !== -1 && (R = Math.max(R - 500, 0)), b.ack || O !== 0 ? R === 0 && g.reject(new Error("No response for postMessage " + p + " in " + F() + " in " + M + "ms")) : g.reject(new Error("No ack for postMessage " + p + " in " + F() + " in " + T + "ms"));
2397
2397
  })(), j();
2398
2398
  }, 500);
2399
2399
  }(), {
@@ -2403,7 +2403,7 @@ function tr() {
2403
2403
  };
2404
2404
  }();
2405
2405
  g.finally(function() {
2406
- L.cancel(), b.splice(b.indexOf(g, 1));
2406
+ L.cancel(), x.splice(x.indexOf(g, 1));
2407
2407
  }).catch(te);
2408
2408
  }
2409
2409
  return ze(s, m, {
@@ -2533,7 +2533,7 @@ function tr() {
2533
2533
  Et();
2534
2534
  }]);
2535
2535
  });
2536
- }(xe)), xe.exports;
2536
+ }(be)), be.exports;
2537
2537
  }
2538
2538
  var jt;
2539
2539
  function nr() {
@@ -1,4 +1,4 @@
1
- (function(I,T){typeof exports=="object"&&typeof module!="undefined"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(I=typeof globalThis!="undefined"?globalThis:I||self,T(I["soyio-widget"]={}))})(this,function(I){"use strict";var er=Object.defineProperty;var qt=Object.getOwnPropertySymbols,tr=Object.getPrototypeOf,nr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,or=Reflect.get;var _t=I=>{throw TypeError(I)};var ir=(I,T,R)=>T in I?er(I,T,{enumerable:!0,configurable:!0,writable:!0,value:R}):I[T]=R;var Bt=(I,T)=>{var R={};for(var _ in I)nr.call(I,_)&&T.indexOf(_)<0&&(R[_]=I[_]);if(I!=null&&qt)for(var _ of qt(I))T.indexOf(_)<0&&rr.call(I,_)&&(R[_]=I[_]);return R};var j=(I,T,R)=>ir(I,typeof T!="symbol"?T+"":T,R),ar=(I,T,R)=>T.has(I)||_t("Cannot "+R);var $t=(I,T,R)=>T.has(I)?_t("Cannot add the same private member more than once"):T instanceof WeakSet?T.add(I):T.set(I,R);var Gt=(I,T,R)=>(ar(I,T,"access private method"),R);var Vt=(I,T,R)=>or(tr(I),R,T);var G=(I,T,R)=>new Promise((_,re)=>{var je=te=>{try{fe(R.next(te))}catch(le){re(le)}},Me=te=>{try{fe(R.throw(te))}catch(le){re(le)}},fe=te=>te.done?_(te.value):Promise.resolve(te.value).then(je,Me);fe((R=R.apply(I,T)).next())});var Pe,Jt;function T(f,l){for(var g=0;g<l.length;g++){const d=l[g];if(typeof d!="string"&&!Array.isArray(d)){for(const v in d)if(v!=="default"&&!(v in f)){const y=Object.getOwnPropertyDescriptor(d,v);y&&Object.defineProperty(f,v,y.get?y:{enumerable:!0,get:()=>d[v]})}}}return Object.freeze(Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}))}const R=!!(typeof window!="undefined"&&window.document&&window.document.createElement),_=200;class re{constructor(){j(this,"tooltipElement",null);j(this,"tooltipContent",null);j(this,"tooltipClass","soyio-tooltip");j(this,"hideTimeout",null);R&&this.createTooltipElement()}createTooltipElement(){const l=document.querySelector(`.${this.tooltipClass}`);if(l){this.tooltipElement=l,this.tooltipContent=this.tooltipElement.querySelector(".soyio-tooltip-content");return}this.tooltipElement=document.createElement("div"),this.tooltipElement.className=this.tooltipClass,this.tooltipElement.style.cssText=`
1
+ (function(I,T){typeof exports=="object"&&typeof module!="undefined"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(I=typeof globalThis!="undefined"?globalThis:I||self,T(I["soyio-widget"]={}))})(this,function(I){"use strict";var er=Object.defineProperty;var qt=Object.getOwnPropertySymbols,tr=Object.getPrototypeOf,nr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,or=Reflect.get;var _t=I=>{throw TypeError(I)};var ir=(I,T,C)=>T in I?er(I,T,{enumerable:!0,configurable:!0,writable:!0,value:C}):I[T]=C;var Bt=(I,T)=>{var C={};for(var _ in I)nr.call(I,_)&&T.indexOf(_)<0&&(C[_]=I[_]);if(I!=null&&qt)for(var _ of qt(I))T.indexOf(_)<0&&rr.call(I,_)&&(C[_]=I[_]);return C};var j=(I,T,C)=>ir(I,typeof T!="symbol"?T+"":T,C),ar=(I,T,C)=>T.has(I)||_t("Cannot "+C);var $t=(I,T,C)=>T.has(I)?_t("Cannot add the same private member more than once"):T instanceof WeakSet?T.add(I):T.set(I,C);var Gt=(I,T,C)=>(ar(I,T,"access private method"),C);var Vt=(I,T,C)=>or(tr(I),C,T);var G=(I,T,C)=>new Promise((_,re)=>{var je=te=>{try{fe(C.next(te))}catch(le){re(le)}},Me=te=>{try{fe(C.throw(te))}catch(le){re(le)}},fe=te=>te.done?_(te.value):Promise.resolve(te.value).then(je,Me);fe((C=C.apply(I,T)).next())});var Pe,Jt;function T(f,l){for(var g=0;g<l.length;g++){const d=l[g];if(typeof d!="string"&&!Array.isArray(d)){for(const v in d)if(v!=="default"&&!(v in f)){const y=Object.getOwnPropertyDescriptor(d,v);y&&Object.defineProperty(f,v,y.get?y:{enumerable:!0,get:()=>d[v]})}}}return Object.freeze(Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}))}const C=!!(typeof window!="undefined"&&window.document&&window.document.createElement),_=200;class re{constructor(){j(this,"tooltipElement",null);j(this,"tooltipContent",null);j(this,"tooltipClass","soyio-tooltip");j(this,"hideTimeout",null);C&&this.createTooltipElement()}createTooltipElement(){const l=document.querySelector(`.${this.tooltipClass}`);if(l){this.tooltipElement=l,this.tooltipContent=this.tooltipElement.querySelector(".soyio-tooltip-content");return}this.tooltipElement=document.createElement("div"),this.tooltipElement.className=this.tooltipClass,this.tooltipElement.style.cssText=`
2
2
  position: fixed;
3
3
  z-index: 99999;
4
4
  background: rgba(30, 30, 30, 0.9);
@@ -16,7 +16,7 @@
16
16
  backdrop-filter: blur(5px);
17
17
  -webkit-backdrop-filter: blur(5px);
18
18
  transform: scale(0.95);
19
- `,this.tooltipContent=document.createElement("div"),this.tooltipContent.className="soyio-tooltip-content",this.tooltipElement.appendChild(this.tooltipContent),document.body.appendChild(this.tooltipElement)}show(l,g,d){if(!this.tooltipElement||!this.tooltipContent)return;this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.tooltipContent.textContent=l,this.tooltipElement.style.opacity="0",this.tooltipElement.style.transform="scale(0.95)";const v=this.calculateOptimalPlacement(g,d);this.applyPlacement(v),requestAnimationFrame(()=>{this.tooltipElement&&(this.tooltipElement.style.opacity="1",this.tooltipElement.style.transform="scale(1)")})}calculateOptimalPlacement(l,g){const d=this.tooltipElement.offsetWidth,v=this.tooltipElement.offsetHeight,{innerWidth:y,innerHeight:E}=window,W=4,U={top:{top:g-v-W,left:l-d/2,placement:"top"},bottom:{top:g+W,left:l-d/2,placement:"bottom"},right:{top:g-v/2,left:l+W,placement:"right"},left:{top:g-v/2,left:l-d-W,placement:"left"}};for(const[,q]of Object.entries(U))if(re.fitsInViewport(q,d,v,y,E))return q;const F=U.top;return F.left=Math.max(W,Math.min(F.left,y-d-W)),F.top=Math.max(W,Math.min(F.top,E-v-W)),F}static fitsInViewport(l,g,d,v,y){return l.top>=0&&l.left>=0&&l.top+d<=y&&l.left+g<=v}applyPlacement(l){this.tooltipElement&&(this.tooltipElement.style.left=`${l.left}px`,this.tooltipElement.style.top=`${l.top}px`)}hide(){this.tooltipElement&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.tooltipElement.style.opacity="0",this.tooltipElement.style.transform="scale(0.95)")}destroy(){var l;(l=this.tooltipElement)==null||l.remove(),this.tooltipElement=null,this.tooltipContent=null,this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}}function je(f,l,g){return G(this,null,function*(){if(!f.contentWindow)throw new Error("Invalid iframe: contentWindow is null");const d=yield Promise.resolve().then(()=>He);try{yield d.send(f.contentWindow,"SET_APPEARANCE",{appearance:l,identifier:g})}catch(v){console.error("Failed to send appearance config:",v)}})}const Me="IFRAME_READY",fe="IFRAME_HEIGHT_CHANGE",te="TOOLTIP_STATE_CHANGE",le="INFO_EVENT",Yt="CONSENT_STATE_CHANGE",H={onHeightChange:{},onIframeReady:{},onTooltipChange:{},onInfo:{},onStateChange:{}};let Qe,et,tt,nt,rt;function Zt(){return G(this,null,function*(){const f=yield Promise.resolve().then(()=>He);Qe||et||tt||nt||rt||(Qe=f.on(fe,l=>G(null,null,function*(){const g=l.data,d=H.onHeightChange[g.identifier];return d&&d(g.height),Promise.resolve()})),et=f.on(Me,l=>G(null,null,function*(){const g=l.data,d=H.onIframeReady[g.identifier];return d&&d(),Promise.resolve()})),tt=f.on(te,l=>G(null,null,function*(){const g=l.data,d=H.onTooltipChange[g.identifier];return d&&d(g),Promise.resolve()})),nt=f.on(Yt,l=>G(null,null,function*(){const g=l.data,d=H.onStateChange[g.identifier];return d&&d(g),Promise.resolve()})),rt=f.on(le,g=>G(null,[g],function*({data:l}){const E=l,{identifier:d}=E,v=Bt(E,["identifier"]),y=H.onInfo[d];return y&&y(v),Promise.resolve()})))})}function ot(f,l){const{onHeightChange:g,onIframeReady:d,onTooltipChange:v,onStateChange:y,onInfo:E}=l;g&&(H.onHeightChange[f]=g),d&&(H.onIframeReady[f]=d),v&&(H.onTooltipChange[f]=v),y&&(H.onStateChange[f]=y),E&&(H.onInfo[f]=E)}function Kt(f){delete H.onHeightChange[f],delete H.onIframeReady[f],delete H.onTooltipChange[f],delete H.onStateChange[f],delete H.onInfo[f]}function Xt(f){const l=document.getElementById(f);l&&(console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."),l.remove())}function Qt(f){const l=document.querySelector(f);if(!l)throw new Error(`Iframe div container with id '${f}' not found`);if(l.tagName.toLowerCase()!=="div")throw new Error(`Iframe container with id '${f}' must be a <div> element`);const g=l;return g.style.position="relative",g.style.cssText+=`
19
+ `,this.tooltipContent=document.createElement("div"),this.tooltipContent.className="soyio-tooltip-content",this.tooltipElement.appendChild(this.tooltipContent),document.body.appendChild(this.tooltipElement)}show(l,g,d){if(!this.tooltipElement||!this.tooltipContent)return;this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.tooltipContent.textContent=l,this.tooltipElement.style.opacity="0",this.tooltipElement.style.transform="scale(0.95)";const v=this.calculateOptimalPlacement(g,d);this.applyPlacement(v),requestAnimationFrame(()=>{this.tooltipElement&&(this.tooltipElement.style.opacity="1",this.tooltipElement.style.transform="scale(1)")})}calculateOptimalPlacement(l,g){const d=this.tooltipElement.offsetWidth,v=this.tooltipElement.offsetHeight,{innerWidth:y,innerHeight:E}=window,W=4,F={top:{top:g-v-W,left:l-d/2,placement:"top"},bottom:{top:g+W,left:l-d/2,placement:"bottom"},right:{top:g-v/2,left:l+W,placement:"right"},left:{top:g-v/2,left:l-d-W,placement:"left"}};for(const[,q]of Object.entries(F))if(re.fitsInViewport(q,d,v,y,E))return q;const M=F.top;return M.left=Math.max(W,Math.min(M.left,y-d-W)),M.top=Math.max(W,Math.min(M.top,E-v-W)),M}static fitsInViewport(l,g,d,v,y){return l.top>=0&&l.left>=0&&l.top+d<=y&&l.left+g<=v}applyPlacement(l){this.tooltipElement&&(this.tooltipElement.style.left=`${l.left}px`,this.tooltipElement.style.top=`${l.top}px`)}hide(){this.tooltipElement&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.tooltipElement.style.opacity="0",this.tooltipElement.style.transform="scale(0.95)")}destroy(){var l;(l=this.tooltipElement)==null||l.remove(),this.tooltipElement=null,this.tooltipContent=null,this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}}function je(f,l,g){return G(this,null,function*(){if(!f.contentWindow)throw new Error("Invalid iframe: contentWindow is null");const d=yield Promise.resolve().then(()=>He);try{yield d.send(f.contentWindow,"SET_APPEARANCE",{appearance:l,identifier:g})}catch(v){console.error("Failed to send appearance config:",v)}})}const Me="IFRAME_READY",fe="IFRAME_HEIGHT_CHANGE",te="TOOLTIP_STATE_CHANGE",le="INFO_EVENT",Yt="CONSENT_STATE_CHANGE",H={onHeightChange:{},onIframeReady:{},onTooltipChange:{},onInfo:{},onStateChange:{}};let Qe,et,tt,nt,rt;function Zt(){return G(this,null,function*(){const f=yield Promise.resolve().then(()=>He);Qe||et||tt||nt||rt||(Qe=f.on(fe,l=>G(null,null,function*(){const g=l.data,d=H.onHeightChange[g.identifier];return d&&d(g.height),Promise.resolve()})),et=f.on(Me,l=>G(null,null,function*(){const g=l.data,d=H.onIframeReady[g.identifier];return d&&d(),Promise.resolve()})),tt=f.on(te,l=>G(null,null,function*(){const g=l.data,d=H.onTooltipChange[g.identifier];return d&&d(g),Promise.resolve()})),nt=f.on(Yt,l=>G(null,null,function*(){const g=l.data,d=H.onStateChange[g.identifier];return d&&d(g),Promise.resolve()})),rt=f.on(le,g=>G(null,[g],function*({data:l}){const E=l,{identifier:d}=E,v=Bt(E,["identifier"]),y=H.onInfo[d];return y&&y(v),Promise.resolve()})))})}function ot(f,l){const{onHeightChange:g,onIframeReady:d,onTooltipChange:v,onStateChange:y,onInfo:E}=l;g&&(H.onHeightChange[f]=g),d&&(H.onIframeReady[f]=d),v&&(H.onTooltipChange[f]=v),y&&(H.onStateChange[f]=y),E&&(H.onInfo[f]=E)}function Kt(f){delete H.onHeightChange[f],delete H.onIframeReady[f],delete H.onTooltipChange[f],delete H.onStateChange[f],delete H.onInfo[f]}function Xt(f){const l=document.getElementById(f);l&&(console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."),l.remove())}function Qt(f){const l=document.querySelector(f);if(!l)throw new Error(`Iframe div container with id '${f}' not found`);if(l.tagName.toLowerCase()!=="div")throw new Error(`Iframe container with id '${f}' must be a <div> element`);const g=l;return g.style.position="relative",g.style.cssText+=`
20
20
  padding: 0 !important;
21
21
  margin: 0 !important;
22
22
  display: flex !important;
@@ -33,7 +33,7 @@
33
33
  opacity: 1;
34
34
  transition: height 0.35s,
35
35
  opacity 0.4s 0.1s;
36
- `,d}function tn(){return Math.random().toString(36).substring(2,10)}const it="https://app.soyio.id",at="https://sandbox.soyio.id",nn="https://privacy.soyio.id",rn="https://privacy-sandbox.soyio.id",on=["DISCLOSURE_REQUEST_SUCCESSFUL","IDENTITY_REGISTERED","IDENTITY_SIGNATURE","UNEXPECTED_ERROR","DENIED_CAMERA_PERMISSION","REJECTED_SIGNATURE","CLOSE_POPUP"],an="WIDGET_CLOSED",sn=420,un=720,cn=500,dn={minWidth:"375px"},fn={minWidth:"0px"},ln={minWidth:"375px"};class xe{constructor(l){j(this,"iframe",null);j(this,"skeleton",null);j(this,"options");j(this,"appearance");j(this,"tooltipManager");j(this,"defaultIframeCSSConfig",dn);j(this,"Skeleton",null);j(this,"defaultUniqueId");this.options=l,this.appearance=l.appearance||null,this.tooltipManager=new re,this.defaultUniqueId=xe.generateUniqueId()}static generateUniqueId(){return tn()}get uniqueIdentifier(){return this.defaultUniqueId}get iframeIdentifier(){return`${this.defaultIframePrefix}-${this.uniqueIdentifier}`}handleHeightChange(l){if(!this.iframe||(this.iframe.style.height=`${l}px`,l>0))return;const{parentElement:g}=this.iframe;g&&(g.style.display="none")}handleIframeReady(){return G(this,null,function*(){this.iframe&&(this.options.onReady&&this.options.onReady(),yield je(this.iframe,this.appearance,this.uniqueIdentifier),this.skeleton&&this.skeleton.hide())})}handleTooltipChange(l){if(!this.iframe)return;const g=this.iframe.getBoundingClientRect(),{text:d,coordinates:v,isVisible:y}=l,E=v.x+g.left,W=v.y+g.top;y?this.tooltipManager.show(d,E,W):this.tooltipManager.hide()}setupListeners(){return G(this,null,function*(){yield Zt();const l={onHeightChange:this.handleHeightChange.bind(this),onIframeReady:this.handleIframeReady.bind(this),onTooltipChange:this.handleTooltipChange.bind(this),onInfo:this.options.onEvent.bind(this)};ot(this.uniqueIdentifier,l)})}mount(l){return G(this,null,function*(){if(!R)return this;yield this.setupListeners(),Xt(this.iframeIdentifier);const g=Qt(l),d=this.iframeUrl();return this.iframe=en(d,this.iframeIdentifier,this.defaultIframeCSSConfig),this.Skeleton&&(this.skeleton=new this.Skeleton(this.uniqueIdentifier),this.skeleton.mount(g)),g.appendChild(this.iframe),this})}unmount(){R&&(Kt(this.uniqueIdentifier),this.skeleton&&(this.skeleton.hide(),this.skeleton=null),this.iframe&&(this.iframe.remove(),this.iframe=null))}}class hn{constructor(l){j(this,"element");j(this,"identifier");this.identifier=`skeleton-${l}`,this.element=document.createElement("div"),this.element.id=this.identifier,this.element.style.cssText=`
36
+ `,d}function tn(){return Math.random().toString(36).substring(2,10)}const it="https://app.soyio.id",at="https://sandbox.soyio.id",nn="https://privacy.soyio.id",rn="https://privacy-sandbox.soyio.id",on=["DISCLOSURE_REQUEST_SUCCESSFUL","IDENTITY_REGISTERED","IDENTITY_SIGNATURE","UNEXPECTED_ERROR","DENIED_CAMERA_PERMISSION","REJECTED_SIGNATURE","CLOSE_POPUP"],an="WIDGET_CLOSED",sn=420,un=720,cn=500,dn={minWidth:"375px"},fn={minWidth:"0px"},ln={minWidth:"375px"};class xe{constructor(l){j(this,"iframe",null);j(this,"skeleton",null);j(this,"options");j(this,"appearance");j(this,"tooltipManager");j(this,"defaultIframeCSSConfig",dn);j(this,"Skeleton",null);j(this,"defaultUniqueId");this.options=l,this.appearance=l.appearance||null,this.tooltipManager=new re,this.defaultUniqueId=xe.generateUniqueId()}static generateUniqueId(){return tn()}get uniqueIdentifier(){return this.defaultUniqueId}get iframeIdentifier(){return`${this.defaultIframePrefix}-${this.uniqueIdentifier}`}handleHeightChange(l){if(!this.iframe||(this.iframe.style.height=`${l}px`,l>0))return;const{parentElement:g}=this.iframe;g&&(g.style.display="none")}handleIframeReady(){return G(this,null,function*(){this.iframe&&(this.options.onReady&&this.options.onReady(),yield je(this.iframe,this.appearance,this.uniqueIdentifier),this.skeleton&&this.skeleton.hide())})}handleTooltipChange(l){if(!this.iframe)return;const g=this.iframe.getBoundingClientRect(),{text:d,coordinates:v,isVisible:y}=l,E=v.x+g.left,W=v.y+g.top;y?this.tooltipManager.show(d,E,W):this.tooltipManager.hide()}setupListeners(){return G(this,null,function*(){yield Zt();const l={onHeightChange:this.handleHeightChange.bind(this),onIframeReady:this.handleIframeReady.bind(this),onTooltipChange:this.handleTooltipChange.bind(this),onInfo:this.options.onEvent.bind(this)};ot(this.uniqueIdentifier,l)})}mount(l){return G(this,null,function*(){if(!C)return this;yield this.setupListeners(),Xt(this.iframeIdentifier);const g=Qt(l),d=this.iframeUrl();return this.iframe=en(d,this.iframeIdentifier,this.defaultIframeCSSConfig),this.Skeleton&&(this.skeleton=new this.Skeleton(this.uniqueIdentifier),this.skeleton.mount(g)),g.appendChild(this.iframe),this})}unmount(){C&&(Kt(this.uniqueIdentifier),this.skeleton&&(this.skeleton.hide(),this.skeleton=null),this.iframe&&(this.iframe.remove(),this.iframe=null))}}class hn{constructor(l){j(this,"element");j(this,"identifier");this.identifier=`skeleton-${l}`,this.element=document.createElement("div"),this.element.id=this.identifier,this.element.style.cssText=`
37
37
  position: absolute;
38
38
  left: 50%;
39
39
  top: 50%;
@@ -88,7 +88,7 @@
88
88
  display: flex;
89
89
  align-items: center;
90
90
  gap: 1rem;
91
- `;const U=document.createElement("div");U.style.cssText=`
91
+ `;const F=document.createElement("div");F.style.cssText=`
92
92
  width: 1rem;
93
93
  height: 1rem;
94
94
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
@@ -97,7 +97,7 @@
97
97
  border-radius: 0.25rem;
98
98
  flex-shrink: 0;
99
99
  margin-left: 10px;
100
- `;const F=document.createElement("div");F.style.cssText=`
100
+ `;const M=document.createElement("div");M.style.cssText=`
101
101
  flex-grow: 1;
102
102
  display: flex;
103
103
  flex-direction: column;
@@ -121,20 +121,20 @@
121
121
  0% { background-position: 200% 0; }
122
122
  100% { background-position: -200% 0; }
123
123
  }
124
- `,document.head.appendChild(X)}d.appendChild(v),d.appendChild(y),d.appendChild(E),F.appendChild(q),F.appendChild(oe),W.appendChild(U),W.appendChild(F),g.appendChild(d),g.appendChild(W),this.element.appendChild(g)}cleanupExistingSkeleton(){const l=document.getElementById(this.identifier);l&&l.remove()}mount(l){this.cleanupExistingSkeleton(),l.appendChild(this.element)}hide(){this.element.style.opacity="0",setTimeout(()=>this.element.remove(),300)}}const ze="2.17.0";function mn(f){var E;const l=["actionToken","entityId","context","optionalReconsentBehavior","mandatoryReconsentBehavior"],g=(E=f.isSandbox)!=null?E:!1,d=f.developmentUrl||(g?at:it),v=new URLSearchParams;v.set("sdkVersion",ze),l.forEach(W=>{f[W]&&v.set(W,f[W])});const y=v.toString();return`${d}/embed/consents/${f.consentTemplateId}${y?`?${y}`:""}`}class Le extends xe{constructor(g){super(g);j(this,"defaultIframePrefix","consent-box");j(this,"defaultIframeCSSConfig",fn);j(this,"state",{isSelected:!1,actionToken:null});this.Skeleton=hn}get uniqueIdentifier(){return this.options.consentTemplateId}iframeUrl(){return mn(this.options)}handleStateChange(g){const{isSelected:d,actionToken:v}=g;this.state={isSelected:d,actionToken:v},this.options.onEvent({eventName:"CONSENT_CHECKBOX_CHANGE",isSelected:d,actionToken:v})}setupListeners(){return G(this,null,function*(){yield Vt(Le.prototype,this,"setupListeners").call(this),ot(this.uniqueIdentifier,{onStateChange:this.handleStateChange.bind(this)})})}getState(){return this.state}}function pn(f){var y,E,W;const l=(y=f.isSandbox)!=null?y:!1,g=f.developmentUrl||(l?rn:nn),d=new URLSearchParams;if(d.set("sdkVersion",ze),f.sessionToken?d.set("sessionToken",f.sessionToken):f.companyId&&d.set("companyId",f.companyId),(E=f.enabledFeatures)!=null&&E.length&&d.set("enabledFeatures",f.enabledFeatures.join(",")),(W=f.dataSubjects)!=null&&W.length&&d.set("dataSubjects",f.dataSubjects.join(",")),f.requestReference&&d.set("requestReference",f.requestReference),f.fileRequisites){const U=JSON.stringify(f.fileRequisites);U!=="{}"&&d.set("fileRequisites",U)}const v=d.toString();return`${g}${v?`?${v}`:""}`}class vn extends xe{constructor(){super(...arguments);j(this,"defaultIframePrefix","privacy-center");j(this,"_uniqueIdentifier","privacy-center");j(this,"defaultIframeCSSConfig",ln)}get uniqueIdentifier(){return this._uniqueIdentifier}iframeUrl(){return pn(this.options)}}const wn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),gn="WIDGET_EVENT";function yn(f){let l="widget/";return"disclosureRequestId"in f.configProps?l+=["disclosures",f.configProps.disclosureRequestId].join("/"):l+=f.request,l}function En(f){var y;const l=(y=f.isSandbox)!=null?y:!1,g=f.developmentUrl||(l?at:it),d=Object.entries(f.configProps).filter(([E,W])=>W||E==="disclosureRequestId").map(([E,W])=>`${E}=${encodeURIComponent(W)}`).join("&"),v=yn(f);return`${g}/${v}?sdk=web&sdkVersion=${ze}&${d}`}let Q=null,ke=null;function Ue(f=null){Q&&!Q.closed&&Q.focus(),f==null||f.preventDefault()}function Ie(){document.body.style.filter="",document.body.removeEventListener("click",Ue)}function Sn(){ke=setInterval(()=>{(!Q||Q.closed)&&(ke&&clearInterval(ke),Ie())},cn)}function bn(f){const l=En(f),g=sn,d=un,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,W=window.innerHeight||document.documentElement.clientHeight||window.screen.height,U=E/window.screen.availWidth,F=(E-g)/2/U+v,q=(W-d)/2/U+y,oe=["scrollbars=yes",`width=${g}`,`height=${d}`,`top=${q}`,`left=${F}`].join(","),X=window.open("about:blank","Soyio",oe);X?(Q=X,Q.location.href=l,document.body.style.filter="blur(5px)",document.body.addEventListener("click",Ue),Ue(),Sn()):(Ie(),alert("Debes habilitar las ventanas emergentes para poder iniciar el flujo."))}function xn(){Q&&(Q.close(),Q=null),Ie()}let he=null;function In(){he&&(he.cancel(),he=null)}function Wn(f){return G(this,null,function*(){const{onEvent:l}=f,g=yield Promise.resolve().then(()=>He);he&&In(),he=g.on(gn,v=>G(null,[v],function*({data:d}){return l(d),on.includes(d.eventName)?xn():d.eventName===an&&Ie(),Promise.resolve()}))})}function Pn(f){Wn(f)}class st{constructor(l){$t(this,Pe);j(this,"onEvent");this.onEvent=l.onEvent,R&&(bn(l),Pn({onEvent:Gt(this,Pe,Jt).bind(this)}))}}Pe=new WeakSet,Jt=function(l){this.onEvent(l)};function Tn(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var Fe={exports:{}},We={exports:{}},Cn=We.exports,ut;function Rn(){return ut||(ut=1,function(f,l){(function(g,d){f.exports=d()})(typeof self!="undefined"?self:Cn,function(){return function(g){var d={};function v(y){if(d[y])return d[y].exports;var E=d[y]={i:y,l:!1,exports:{}};return g[y].call(E.exports,E,E.exports,v),E.l=!0,E.exports}return v.m=g,v.c=d,v.d=function(y,E,W){v.o(y,E)||Object.defineProperty(y,E,{enumerable:!0,get:W})},v.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},v.t=function(y,E){if(1&E&&(y=v(y)),8&E||4&E&&typeof y=="object"&&y&&y.__esModule)return y;var W=Object.create(null);if(v.r(W),Object.defineProperty(W,"default",{enumerable:!0,value:y}),2&E&&typeof y!="string")for(var U in y)v.d(W,U,function(F){return y[F]}.bind(null,U));return W},v.n=function(y){var E=y&&y.__esModule?function(){return y.default}:function(){return y};return v.d(E,"a",E),E},v.o=function(y,E){return{}.hasOwnProperty.call(y,E)},v.p="",v(v.s=0)}([function(g,d,v){v.r(d),v.d(d,"Promise",function(){return C}),v.d(d,"TYPES",function(){return Xn}),v.d(d,"ProxyWindow",function(){return Y}),v.d(d,"setup",function(){return Ht}),v.d(d,"destroy",function(){return Kn}),v.d(d,"serializeMessage",function(){return Vn}),v.d(d,"deserializeMessage",function(){return Jn}),v.d(d,"createProxyWindow",function(){return Yn}),v.d(d,"toProxyWindow",function(){return Zn}),v.d(d,"on",function(){return ce}),v.d(d,"once",function(){return Gn}),v.d(d,"send",function(){return ne}),v.d(d,"markWindowKnown",function(){return Rt}),v.d(d,"cleanUpWindow",function(){return Qn}),v.d(d,"bridge",function(){});function y(e){return{}.toString.call(e)==="[object RegExp]"}var E=`Call was rejected by callee.\r
125
- `;function W(e){return e===void 0&&(e=window),e.location.protocol}function U(e){if(e===void 0&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return W(e)}function F(e){return e===void 0&&(e=window),U(e)==="about:"}function q(e){if(e===void 0&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(n){}}function oe(e){if(e===void 0&&(e=window),e&&!q(e))try{return e.opener}catch(n){}}function X(e){try{return!0}catch(n){}return!1}function Te(e){e===void 0&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=W(e);if(!t)throw new Error("Can not read window protocol");if(t==="file:")return"file://";if(t==="about:"){var r=q(e);return r&&X()?Te(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function B(e){e===void 0&&(e=window);var n=Te(e);return n&&e.mockDomain&&e.mockDomain.indexOf("mock:")===0?e.mockDomain:n}function ie(e){if(!function(n){try{if(n===window)return!0}catch(r){}try{var t=Object.getOwnPropertyDescriptor(n,"location");if(t&&t.enumerable===!1)return!1}catch(r){}try{if(F(n)&&X())return!0}catch(r){}try{if(function(r){return r===void 0&&(r=window),U(r)==="mock:"}(n)&&X())return!0}catch(r){}try{if(Te(n)===Te(window))return!0}catch(r){}return!1}(e))return!1;try{if(e===window||F(e)&&X()||B(window)===B(e))return!0}catch(n){}return!1}function Ce(e){if(!ie(e))throw new Error("Expected window to be same domain");return e}function ft(e,n){if(!e||!n)return!1;var t=q(n);return t?t===e:function(r){var o=[];try{for(;r.parent!==r;)o.push(r.parent),r=r.parent}catch(i){}return o}(n).indexOf(e)!==-1}function lt(e){var n=[],t;try{t=e.frames}catch(u){t=e}var r;try{r=t.length}catch(u){}if(r===0)return n;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=t[o]}catch(u){continue}n.push(i)}return n}for(var a=0;a<100;a++){var c=void 0;try{c=t[a]}catch(u){return n}if(!c)return n;n.push(c)}return n}var An=[],Nn=[];function Z(e,n){n===void 0&&(n=!0);try{if(e===window)return!1}catch(o){return!0}try{if(!e)return!0}catch(o){return!0}try{if(e.closed)return!0}catch(o){return!o||o.message!==E}if(n&&ie(e))try{if(e.mockclosed)return!0}catch(o){}try{if(!e.parent||!e.top)return!0}catch(o){}var t=function(o,i){for(var a=0;a<o.length;a++)try{if(o[a]===i)return a}catch(c){}return-1}(An,e);if(t!==-1){var r=Nn[t];if(r&&function(o){if(!o.contentWindow||!o.parentNode)return!0;var i=o.ownerDocument;if(i&&i.documentElement&&!i.documentElement.contains(o)){for(var a=o;a.parentNode&&a.parentNode!==a;)a=a.parentNode;if(!a.host||!i.documentElement.contains(a.host))return!0}return!1}(r))return!0}return!1}function ht(e){return e===void 0&&(e=window),oe(e=e||window)||q(e)||void 0}function de(e,n){if(typeof e=="string"){if(typeof n=="string")return e==="*"||n===e;if(y(n)||Array.isArray(n))return!1}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){return de(t,n)}))}function Re(e){try{if(e===window)return!0}catch(n){if(n&&n.message===E)return!0}try{if({}.toString.call(e)==="[object Window]")return!0}catch(n){if(n&&n.message===E)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(n){if(n&&n.message===E)return!0}try{if(e&&e.self===e)return!0}catch(n){if(n&&n.message===E)return!0}try{if(e&&e.parent===e)return!0}catch(n){if(n&&n.message===E)return!0}try{if(e&&e.top===e)return!0}catch(n){if(n&&n.message===E)return!0}try{if(e&&e.__cross_domain_utils_window_check__==="__unlikely_value__")return!1}catch(n){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(n){}return!1}function mt(e){if(ie(e))return Ce(e).frameElement;for(var n=0,t=document.querySelectorAll("iframe");n<t.length;n++){var r=t[n];if(r&&r.contentWindow&&r.contentWindow===e)return r}}function Dn(e){if(function(t){return t===void 0&&(t=window),!!q(t)}(e)){var n=mt(e);if(n&&n.parentElement){n.parentElement.removeChild(n);return}}try{e.close()}catch(t){}}function ae(e){try{if(!e)return!1;if(typeof Promise!="undefined"&&e instanceof Promise)return!0;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;var n={}.toString;if(n){var t=n.call(e);if(t==="[object Window]"||t==="[object global]"||t==="[object DOMWindow]")return!1}if(typeof e.then=="function")return!0}catch(r){return!1}return!1}var pt=[],me=[],qe=0,pe;function vt(){if(!qe&&pe){var e=pe;pe=null,e.resolve()}}function _e(){qe+=1}function ve(){qe-=1,vt()}var C=function(){function e(t){var r=this;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){var o,i,a=!1,c=!1,u=!1;_e();try{t(function(s){u?r.resolve(s):(a=!0,o=s)},function(s){u?r.reject(s):(c=!0,i=s)})}catch(s){ve(),this.reject(s);return}ve(),u=!0,a?this.resolve(o):c&&this.reject(i)}}var n=e.prototype;return n.resolve=function(t){if(this.resolved||this.rejected)return this;if(ae(t))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=t,this.dispatch(),this},n.reject=function(t){var r=this;if(this.resolved||this.rejected)return this;if(ae(t))throw new Error("Can not reject promise with another promise");if(!t){var o=t&&typeof t.toString=="function"?t.toString():{}.toString.call(t);t=new Error("Expected reject to be called with Error, got "+o)}return this.rejected=!0,this.error=t,this.errorHandled||setTimeout(function(){r.errorHandled||function(i,a){if(pt.indexOf(i)===-1){pt.push(i),setTimeout(function(){throw i},1);for(var c=0;c<me.length;c++)me[c](i,a)}}(t,r)},1),this.dispatch(),this},n.asyncReject=function(t){return this.errorHandled=!0,this.reject(t),this},n.dispatch=function(){var t=this.resolved,r=this.rejected,o=this.handlers;if(!this.dispatching&&(t||r)){this.dispatching=!0,_e();for(var i=function(w,x){return w.then(function(S){x.resolve(S)},function(S){x.reject(S)})},a=0;a<o.length;a++){var c=o[a],u=c.onSuccess,s=c.onError,p=c.promise,h=void 0;if(t)try{h=u?u(this.value):this.value}catch(w){p.reject(w);continue}else if(r){if(!s){p.reject(this.error);continue}try{h=s(this.error)}catch(w){p.reject(w);continue}}if(h instanceof e&&(h.resolved||h.rejected)){var m=h;m.resolved?p.resolve(m.value):p.reject(m.error),m.errorHandled=!0}else ae(h)?h instanceof e&&(h.resolved||h.rejected)?h.resolved?p.resolve(h.value):p.reject(h.error):i(h,p):p.resolve(h)}o.length=0,this.dispatching=!1,ve()}},n.then=function(t,r){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.then expected a function for success handler");if(r&&typeof r!="function"&&!r.call)throw new Error("Promise.then expected a function for error handler");var o=new e;return this.handlers.push({promise:o,onSuccess:t,onError:r}),this.errorHandled=!0,this.dispatch(),o},n.catch=function(t){return this.then(void 0,t)},n.finally=function(t){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(r){return e.try(t).then(function(){return r})},function(r){return e.try(t).then(function(){throw r})})},n.timeout=function(t,r){var o=this;if(this.resolved||this.rejected)return this;var i=setTimeout(function(){o.resolved||o.rejected||o.reject(r||new Error("Promise timed out after "+t+"ms"))},t);return this.then(function(a){return clearTimeout(i),a})},n.toPromise=function(){if(typeof Promise=="undefined")throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(t){return t instanceof e?t:ae(t)?new e(function(r,o){return t.then(r,o)}):new e().resolve(t)},e.reject=function(t){return new e().reject(t)},e.asyncReject=function(t){return new e().asyncReject(t)},e.all=function(t){var r=new e,o=t.length,i=[].slice();if(!o)return r.resolve(i),r;for(var a=function(s,p,h){return p.then(function(m){i[s]=m,(o-=1)==0&&r.resolve(i)},function(m){h.reject(m)})},c=0;c<t.length;c++){var u=t[c];if(u instanceof e){if(u.resolved){i[c]=u.value,o-=1;continue}}else if(!ae(u)){i[c]=u,o-=1;continue}a(c,e.resolve(u),r)}return o===0&&r.resolve(i),r},e.hash=function(t){var r={},o=[],i=function(c){if(t.hasOwnProperty(c)){var u=t[c];ae(u)?o.push(u.then(function(s){r[c]=s})):r[c]=u}};for(var a in t)i(a);return e.all(o).then(function(){return r})},e.map=function(t,r){return e.all(t.map(r))},e.onPossiblyUnhandledException=function(t){return function(r){return me.push(r),{cancel:function(){me.splice(me.indexOf(r),1)}}}(t)},e.try=function(t,r,o){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.try expected a function");var i;_e();try{i=t.apply(r,o||[])}catch(a){return ve(),e.reject(a)}return ve(),e.resolve(i)},e.delay=function(t){return new e(function(r){setTimeout(r,t)})},e.isPromise=function(t){return!!(t&&t instanceof e)||ae(t)},e.flush=function(){return function(t){var r=pe=pe||new t;return vt(),r}(e)},e}();function Oe(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(r){}return-1}var Be=function(){function e(){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(){if(typeof WeakMap=="undefined"||Object.freeze===void 0)return!1;try{var t=new WeakMap,r={};return Object.freeze(r),t.set(r,"__testvalue__"),t.get(r)==="__testvalue__"}catch(o){return!1}}())try{this.weakmap=new WeakMap}catch(t){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var t=this.weakmap,r=this.keys,o=0;o<r.length;o++){var i=r[o];if(Re(i)&&Z(i)){if(t)try{t.delete(i)}catch(a){}r.splice(o,1),this.values.splice(o,1),o-=1}}},n.isSafeToReadWrite=function(t){return!Re(t)},n.set=function(t,r){if(!t)throw new Error("WeakMap expected key");var o=this.weakmap;if(o)try{o.set(t,r)}catch(p){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var i=this.name,a=t[i];a&&a[0]===t?a[1]=r:Object.defineProperty(t,i,{value:[t,r],writable:!0});return}catch(p){}this._cleanupClosedWindows();var c=this.keys,u=this.values,s=Oe(c,t);s===-1?(c.push(t),u.push(r)):u[s]=r},n.get=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(t))return r.get(t)}catch(a){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];return o&&o[0]===t?o[1]:void 0}catch(a){}this._cleanupClosedWindows();var i=Oe(this.keys,t);if(i!==-1)return this.values[i]},n.delete=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.delete(t)}catch(c){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];o&&o[0]===t&&(o[0]=o[1]=void 0)}catch(c){}this._cleanupClosedWindows();var i=this.keys,a=Oe(i,t);a!==-1&&(i.splice(a,1),this.values.splice(a,1))},n.has=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(t))return!0}catch(i){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];return!(!o||o[0]!==t)}catch(i){}return this._cleanupClosedWindows(),Oe(this.keys,t)!==-1},n.getOrSet=function(t,r){if(this.has(t))return this.get(t);var o=r();return this.set(t,o),o},e}();function wt(e){return e.name||e.__name__||e.displayName||"anonymous"}function gt(e,n){try{delete e.name,e.name=n}catch(t){}return e.__name__=e.displayName=n,e}function ee(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})+"_"+function(n){if(typeof btoa=="function")return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,function(t,r){return String.fromCharCode(parseInt(r,16))})).replace(/[=]/g,"");if(typeof Buffer!="undefined")return Buffer.from(n,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}(new Date().toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var Ae;function yt(e){try{return JSON.stringify([].slice.call(e),function(n,t){return typeof t=="function"?"memoize["+function(r){if(Ae=Ae||new Be,r==null||typeof r!="object"&&typeof r!="function")throw new Error("Invalid object");var o=Ae.get(r);return o||(o=typeof r+":"+ee(),Ae.set(r,o)),o}(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})}catch(n){throw new Error("Arguments not serializable -- can not be used to memoize")}}function jn(){return{}}var we=0,Et=0;function ge(e,n){n===void 0&&(n={});var t=n.thisNamespace,r=t!==void 0&&t,o=n.time,i,a,c=we;we+=1;var u=function(){for(var s=arguments.length,p=new Array(s),h=0;h<s;h++)p[h]=arguments[h];c<Et&&(i=null,a=null,c=we,we+=1);var m;m=r?(a=a||new Be).getOrSet(this,jn):i=i||{};var w;try{w=yt(p)}catch(O){return e.apply(this,arguments)}var x=m[w];if(x&&o&&Date.now()-x.time<o&&(delete m[w],x=null),x)return x.value;var S=Date.now(),b=e.apply(this,arguments);return m[w]={time:S,value:b},b};return u.reset=function(){i=null,a=null},gt(u,(n.name||wt(e))+"::memoized")}ge.clear=function(){Et=we};function Mn(e){var n={};function t(){for(var r=arguments,o=this,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];var u=yt(a);return n.hasOwnProperty(u)||(n[u]=C.try(function(){return e.apply(o,r)}).finally(function(){delete n[u]})),n[u]}return t.reset=function(){n={}},gt(t,wt(e)+"::promiseMemoized")}function se(){}function ye(e,n){if(n===void 0&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";if(typeof e=="string")return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return t.indexOf(r)!==-1?t:r+`
126
- `+t;if(t)return t;if(r)return r}return e&&e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}catch(o){return"Error while stringifying error: "+ye(o,n+1)}}function St(e){return typeof e=="string"?e:e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}ge(function(e){if(Object.values)return Object.values(e);var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n});function $e(e){return{}.toString.call(e)==="[object RegExp]"}function Ee(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function bt(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function xt(){return!!document.body&&document.readyState==="complete"}function It(){return!!document.body&&document.readyState==="interactive"}ge(function(){return new C(function(e){if(xt()||It())return e();var n=setInterval(function(){if(xt()||It())return clearInterval(n),e()},10)})});var Ne=typeof document!="undefined"?document.currentScript:null,zn=ge(function(){if(Ne||(Ne=function(){try{var e=function(){try{throw new Error("_")}catch(a){return a.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch(a){}}()))return Ne;throw new Error("Can not determine current script")}),Ln=ee();ge(function(){var e;try{e=zn()}catch(r){return Ln}var n=e.getAttribute("data-uid");if(n&&typeof n=="string"||(n=e.getAttribute("data-uid-auto"))&&typeof n=="string")return n;if(e.src){var t=function(r){for(var o="",i=0;i<r.length;i++){var a=r[i].charCodeAt(0)*i;r[i+1]&&(a+=r[i+1].charCodeAt(0)*(i-1)),o+=String.fromCharCode(97+Math.abs(a)%26)}return o}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+t.slice(t.length-30)}else n=ee();return e.setAttribute("data-uid-auto",n),n});function Se(e){e===void 0&&(e=window);var n="__post_robot_10_0_46__";return e!==window?e[n]:e[n]=e[n]||{}}var Wt=function(){return{}};function L(e,n){return e===void 0&&(e="store"),n===void 0&&(n=Wt),Ee(Se(),e,function(){var t=n();return{has:function(r){return t.hasOwnProperty(r)},get:function(r,o){return t.hasOwnProperty(r)?t[r]:o},set:function(r,o){return t[r]=o,o},del:function(r){delete t[r]},getOrSet:function(r,o){return Ee(t,r,o)},reset:function(){t=n()},keys:function(){return Object.keys(t)}}})}var kn=function(){};function De(){var e=Se();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new kn,e.WINDOW_WILDCARD}function $(e,n){return e===void 0&&(e="store"),n===void 0&&(n=Wt),L("windowStore").getOrSet(e,function(){var t=new Be,r=function(o){return t.getOrSet(o,n)};return{has:function(o){return r(o).hasOwnProperty(e)},get:function(o,i){var a=r(o);return a.hasOwnProperty(e)?a[e]:i},set:function(o,i){return r(o)[e]=i,i},del:function(o){delete r(o)[e]},getOrSet:function(o,i){return Ee(r(o),e,i)}}})}function Pt(){return L("instance").getOrSet("instanceID",ee)}function Tt(e,n){var t=n.domain,r=$("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=C.resolve({domain:t});return r.set(e,i),i}function Ge(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:Pt()},{domain:"*",timeout:-1}).then(function(t){var r=t.origin,o=t.data.instanceID;return Tt(e,{domain:r}),{win:e,domain:r,instanceID:o}})}function Ct(e,n){var t=n.send;return $("windowInstanceIDPromises").getOrSet(e,function(){return Ge(e,{send:t}).then(function(r){return r.instanceID})})}function Rt(e){$("knownWindows").set(e,!0)}function Ve(e){return typeof e=="object"&&e!==null&&typeof e.__type__=="string"}function Ot(e){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}function ue(e,n){return{__type__:e,__val__:n}}var V,Un=((V={}).function=function(){},V.error=function(e){return ue("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},V.promise=function(){},V.regex=function(e){return ue("regex",e.source)},V.date=function(e){return ue("date",e.toJSON())},V.array=function(e){return e},V.object=function(e){return e},V.string=function(e){return e},V.number=function(e){return e},V.boolean=function(e){return e},V.null=function(e){return e},V[void 0]=function(e){return ue("undefined",e)},V),Fn={},J,Hn=((J={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},J.error=function(e){var n=e.stack,t=e.code,r=e.data,o=new Error(e.message);return o.code=t,r&&(o.data=r),o.stack=n+`
124
+ `,document.head.appendChild(X)}d.appendChild(v),d.appendChild(y),d.appendChild(E),M.appendChild(q),M.appendChild(oe),W.appendChild(F),W.appendChild(M),g.appendChild(d),g.appendChild(W),this.element.appendChild(g)}cleanupExistingSkeleton(){const l=document.getElementById(this.identifier);l&&l.remove()}mount(l){this.cleanupExistingSkeleton(),l.appendChild(this.element)}hide(){this.element.style.opacity="0",setTimeout(()=>this.element.remove(),300)}}const ze="2.18.0";function mn(f){var E;const l=["actionToken","entityId","context","optionalReconsentBehavior","mandatoryReconsentBehavior"],g=(E=f.isSandbox)!=null?E:!1,d=f.developmentUrl||(g?at:it),v=new URLSearchParams;v.set("sdkVersion",ze),l.forEach(W=>{f[W]&&v.set(W,f[W])});const y=v.toString();return`${d}/embed/consents/${f.consentTemplateId}${y?`?${y}`:""}`}class Le extends xe{constructor(g){super(g);j(this,"defaultIframePrefix","consent-box");j(this,"defaultIframeCSSConfig",fn);j(this,"state",{isSelected:!1,actionToken:null});this.Skeleton=hn}get uniqueIdentifier(){return this.options.consentTemplateId}iframeUrl(){return mn(this.options)}handleStateChange(g){const{isSelected:d,actionToken:v}=g;this.state={isSelected:d,actionToken:v},this.options.onEvent({eventName:"CONSENT_CHECKBOX_CHANGE",isSelected:d,actionToken:v})}setupListeners(){return G(this,null,function*(){yield Vt(Le.prototype,this,"setupListeners").call(this),ot(this.uniqueIdentifier,{onStateChange:this.handleStateChange.bind(this)})})}getState(){return this.state}}function pn(f){var y,E,W,F;const l=(y=f.isSandbox)!=null?y:!1,g=f.developmentUrl||(l?rn:nn),d=new URLSearchParams;if(d.set("sdkVersion",ze),f.sessionToken?d.set("sessionToken",f.sessionToken):f.companyId&&d.set("companyId",f.companyId),(E=f.enabledFeatures)!=null&&E.length&&d.set("enabledFeatures",f.enabledFeatures.join(",")),(W=f.enabledRights)!=null&&W.length&&d.set("enabledRights",f.enabledRights.join(",")),(F=f.dataSubjects)!=null&&F.length&&d.set("dataSubjects",f.dataSubjects.join(",")),f.requestReference&&d.set("requestReference",f.requestReference),f.fileRequisites){const M=JSON.stringify(f.fileRequisites);M!=="{}"&&d.set("fileRequisites",M)}const v=d.toString();return`${g}${v?`?${v}`:""}`}class vn extends xe{constructor(){super(...arguments);j(this,"defaultIframePrefix","privacy-center");j(this,"_uniqueIdentifier","privacy-center");j(this,"defaultIframeCSSConfig",ln)}get uniqueIdentifier(){return this._uniqueIdentifier}iframeUrl(){return pn(this.options)}}const wn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),gn="WIDGET_EVENT";function yn(f){let l="widget/";return"disclosureRequestId"in f.configProps?l+=["disclosures",f.configProps.disclosureRequestId].join("/"):l+=f.request,l}function En(f){var y;const l=(y=f.isSandbox)!=null?y:!1,g=f.developmentUrl||(l?at:it),d=Object.entries(f.configProps).filter(([E,W])=>W||E==="disclosureRequestId").map(([E,W])=>`${E}=${encodeURIComponent(W)}`).join("&"),v=yn(f);return`${g}/${v}?sdk=web&sdkVersion=${ze}&${d}`}let Q=null,ke=null;function Ue(f=null){Q&&!Q.closed&&Q.focus(),f==null||f.preventDefault()}function Ie(){document.body.style.filter="",document.body.removeEventListener("click",Ue)}function Sn(){ke=setInterval(()=>{(!Q||Q.closed)&&(ke&&clearInterval(ke),Ie())},cn)}function bn(f){const l=En(f),g=sn,d=un,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,W=window.innerHeight||document.documentElement.clientHeight||window.screen.height,F=E/window.screen.availWidth,M=(E-g)/2/F+v,q=(W-d)/2/F+y,oe=["scrollbars=yes",`width=${g}`,`height=${d}`,`top=${q}`,`left=${M}`].join(","),X=window.open("about:blank","Soyio",oe);X?(Q=X,Q.location.href=l,document.body.style.filter="blur(5px)",document.body.addEventListener("click",Ue),Ue(),Sn()):(Ie(),alert("Debes habilitar las ventanas emergentes para poder iniciar el flujo."))}function xn(){Q&&(Q.close(),Q=null),Ie()}let he=null;function In(){he&&(he.cancel(),he=null)}function Wn(f){return G(this,null,function*(){const{onEvent:l}=f,g=yield Promise.resolve().then(()=>He);he&&In(),he=g.on(gn,v=>G(null,[v],function*({data:d}){return l(d),on.includes(d.eventName)?xn():d.eventName===an&&Ie(),Promise.resolve()}))})}function Pn(f){Wn(f)}class st{constructor(l){$t(this,Pe);j(this,"onEvent");this.onEvent=l.onEvent,C&&(bn(l),Pn({onEvent:Gt(this,Pe,Jt).bind(this)}))}}Pe=new WeakSet,Jt=function(l){this.onEvent(l)};function Tn(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var Fe={exports:{}},We={exports:{}},Rn=We.exports,ut;function Cn(){return ut||(ut=1,function(f,l){(function(g,d){f.exports=d()})(typeof self!="undefined"?self:Rn,function(){return function(g){var d={};function v(y){if(d[y])return d[y].exports;var E=d[y]={i:y,l:!1,exports:{}};return g[y].call(E.exports,E,E.exports,v),E.l=!0,E.exports}return v.m=g,v.c=d,v.d=function(y,E,W){v.o(y,E)||Object.defineProperty(y,E,{enumerable:!0,get:W})},v.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},v.t=function(y,E){if(1&E&&(y=v(y)),8&E||4&E&&typeof y=="object"&&y&&y.__esModule)return y;var W=Object.create(null);if(v.r(W),Object.defineProperty(W,"default",{enumerable:!0,value:y}),2&E&&typeof y!="string")for(var F in y)v.d(W,F,function(M){return y[M]}.bind(null,F));return W},v.n=function(y){var E=y&&y.__esModule?function(){return y.default}:function(){return y};return v.d(E,"a",E),E},v.o=function(y,E){return{}.hasOwnProperty.call(y,E)},v.p="",v(v.s=0)}([function(g,d,v){v.r(d),v.d(d,"Promise",function(){return R}),v.d(d,"TYPES",function(){return Xn}),v.d(d,"ProxyWindow",function(){return Y}),v.d(d,"setup",function(){return Ht}),v.d(d,"destroy",function(){return Kn}),v.d(d,"serializeMessage",function(){return Vn}),v.d(d,"deserializeMessage",function(){return Jn}),v.d(d,"createProxyWindow",function(){return Yn}),v.d(d,"toProxyWindow",function(){return Zn}),v.d(d,"on",function(){return ce}),v.d(d,"once",function(){return Gn}),v.d(d,"send",function(){return ne}),v.d(d,"markWindowKnown",function(){return Ct}),v.d(d,"cleanUpWindow",function(){return Qn}),v.d(d,"bridge",function(){});function y(e){return{}.toString.call(e)==="[object RegExp]"}var E=`Call was rejected by callee.\r
125
+ `;function W(e){return e===void 0&&(e=window),e.location.protocol}function F(e){if(e===void 0&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return W(e)}function M(e){return e===void 0&&(e=window),F(e)==="about:"}function q(e){if(e===void 0&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(n){}}function oe(e){if(e===void 0&&(e=window),e&&!q(e))try{return e.opener}catch(n){}}function X(e){try{return!0}catch(n){}return!1}function Te(e){e===void 0&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=W(e);if(!t)throw new Error("Can not read window protocol");if(t==="file:")return"file://";if(t==="about:"){var r=q(e);return r&&X()?Te(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function B(e){e===void 0&&(e=window);var n=Te(e);return n&&e.mockDomain&&e.mockDomain.indexOf("mock:")===0?e.mockDomain:n}function ie(e){if(!function(n){try{if(n===window)return!0}catch(r){}try{var t=Object.getOwnPropertyDescriptor(n,"location");if(t&&t.enumerable===!1)return!1}catch(r){}try{if(M(n)&&X())return!0}catch(r){}try{if(function(r){return r===void 0&&(r=window),F(r)==="mock:"}(n)&&X())return!0}catch(r){}try{if(Te(n)===Te(window))return!0}catch(r){}return!1}(e))return!1;try{if(e===window||M(e)&&X()||B(window)===B(e))return!0}catch(n){}return!1}function Re(e){if(!ie(e))throw new Error("Expected window to be same domain");return e}function ft(e,n){if(!e||!n)return!1;var t=q(n);return t?t===e:function(r){var o=[];try{for(;r.parent!==r;)o.push(r.parent),r=r.parent}catch(i){}return o}(n).indexOf(e)!==-1}function lt(e){var n=[],t;try{t=e.frames}catch(u){t=e}var r;try{r=t.length}catch(u){}if(r===0)return n;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=t[o]}catch(u){continue}n.push(i)}return n}for(var a=0;a<100;a++){var c=void 0;try{c=t[a]}catch(u){return n}if(!c)return n;n.push(c)}return n}var An=[],Nn=[];function Z(e,n){n===void 0&&(n=!0);try{if(e===window)return!1}catch(o){return!0}try{if(!e)return!0}catch(o){return!0}try{if(e.closed)return!0}catch(o){return!o||o.message!==E}if(n&&ie(e))try{if(e.mockclosed)return!0}catch(o){}try{if(!e.parent||!e.top)return!0}catch(o){}var t=function(o,i){for(var a=0;a<o.length;a++)try{if(o[a]===i)return a}catch(c){}return-1}(An,e);if(t!==-1){var r=Nn[t];if(r&&function(o){if(!o.contentWindow||!o.parentNode)return!0;var i=o.ownerDocument;if(i&&i.documentElement&&!i.documentElement.contains(o)){for(var a=o;a.parentNode&&a.parentNode!==a;)a=a.parentNode;if(!a.host||!i.documentElement.contains(a.host))return!0}return!1}(r))return!0}return!1}function ht(e){return e===void 0&&(e=window),oe(e=e||window)||q(e)||void 0}function de(e,n){if(typeof e=="string"){if(typeof n=="string")return e==="*"||n===e;if(y(n)||Array.isArray(n))return!1}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){return de(t,n)}))}function Ce(e){try{if(e===window)return!0}catch(n){if(n&&n.message===E)return!0}try{if({}.toString.call(e)==="[object Window]")return!0}catch(n){if(n&&n.message===E)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(n){if(n&&n.message===E)return!0}try{if(e&&e.self===e)return!0}catch(n){if(n&&n.message===E)return!0}try{if(e&&e.parent===e)return!0}catch(n){if(n&&n.message===E)return!0}try{if(e&&e.top===e)return!0}catch(n){if(n&&n.message===E)return!0}try{if(e&&e.__cross_domain_utils_window_check__==="__unlikely_value__")return!1}catch(n){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(n){}return!1}function mt(e){if(ie(e))return Re(e).frameElement;for(var n=0,t=document.querySelectorAll("iframe");n<t.length;n++){var r=t[n];if(r&&r.contentWindow&&r.contentWindow===e)return r}}function Dn(e){if(function(t){return t===void 0&&(t=window),!!q(t)}(e)){var n=mt(e);if(n&&n.parentElement){n.parentElement.removeChild(n);return}}try{e.close()}catch(t){}}function ae(e){try{if(!e)return!1;if(typeof Promise!="undefined"&&e instanceof Promise)return!0;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;var n={}.toString;if(n){var t=n.call(e);if(t==="[object Window]"||t==="[object global]"||t==="[object DOMWindow]")return!1}if(typeof e.then=="function")return!0}catch(r){return!1}return!1}var pt=[],me=[],qe=0,pe;function vt(){if(!qe&&pe){var e=pe;pe=null,e.resolve()}}function _e(){qe+=1}function ve(){qe-=1,vt()}var R=function(){function e(t){var r=this;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){var o,i,a=!1,c=!1,u=!1;_e();try{t(function(s){u?r.resolve(s):(a=!0,o=s)},function(s){u?r.reject(s):(c=!0,i=s)})}catch(s){ve(),this.reject(s);return}ve(),u=!0,a?this.resolve(o):c&&this.reject(i)}}var n=e.prototype;return n.resolve=function(t){if(this.resolved||this.rejected)return this;if(ae(t))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=t,this.dispatch(),this},n.reject=function(t){var r=this;if(this.resolved||this.rejected)return this;if(ae(t))throw new Error("Can not reject promise with another promise");if(!t){var o=t&&typeof t.toString=="function"?t.toString():{}.toString.call(t);t=new Error("Expected reject to be called with Error, got "+o)}return this.rejected=!0,this.error=t,this.errorHandled||setTimeout(function(){r.errorHandled||function(i,a){if(pt.indexOf(i)===-1){pt.push(i),setTimeout(function(){throw i},1);for(var c=0;c<me.length;c++)me[c](i,a)}}(t,r)},1),this.dispatch(),this},n.asyncReject=function(t){return this.errorHandled=!0,this.reject(t),this},n.dispatch=function(){var t=this.resolved,r=this.rejected,o=this.handlers;if(!this.dispatching&&(t||r)){this.dispatching=!0,_e();for(var i=function(w,x){return w.then(function(S){x.resolve(S)},function(S){x.reject(S)})},a=0;a<o.length;a++){var c=o[a],u=c.onSuccess,s=c.onError,p=c.promise,h=void 0;if(t)try{h=u?u(this.value):this.value}catch(w){p.reject(w);continue}else if(r){if(!s){p.reject(this.error);continue}try{h=s(this.error)}catch(w){p.reject(w);continue}}if(h instanceof e&&(h.resolved||h.rejected)){var m=h;m.resolved?p.resolve(m.value):p.reject(m.error),m.errorHandled=!0}else ae(h)?h instanceof e&&(h.resolved||h.rejected)?h.resolved?p.resolve(h.value):p.reject(h.error):i(h,p):p.resolve(h)}o.length=0,this.dispatching=!1,ve()}},n.then=function(t,r){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.then expected a function for success handler");if(r&&typeof r!="function"&&!r.call)throw new Error("Promise.then expected a function for error handler");var o=new e;return this.handlers.push({promise:o,onSuccess:t,onError:r}),this.errorHandled=!0,this.dispatch(),o},n.catch=function(t){return this.then(void 0,t)},n.finally=function(t){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(r){return e.try(t).then(function(){return r})},function(r){return e.try(t).then(function(){throw r})})},n.timeout=function(t,r){var o=this;if(this.resolved||this.rejected)return this;var i=setTimeout(function(){o.resolved||o.rejected||o.reject(r||new Error("Promise timed out after "+t+"ms"))},t);return this.then(function(a){return clearTimeout(i),a})},n.toPromise=function(){if(typeof Promise=="undefined")throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(t){return t instanceof e?t:ae(t)?new e(function(r,o){return t.then(r,o)}):new e().resolve(t)},e.reject=function(t){return new e().reject(t)},e.asyncReject=function(t){return new e().asyncReject(t)},e.all=function(t){var r=new e,o=t.length,i=[].slice();if(!o)return r.resolve(i),r;for(var a=function(s,p,h){return p.then(function(m){i[s]=m,(o-=1)==0&&r.resolve(i)},function(m){h.reject(m)})},c=0;c<t.length;c++){var u=t[c];if(u instanceof e){if(u.resolved){i[c]=u.value,o-=1;continue}}else if(!ae(u)){i[c]=u,o-=1;continue}a(c,e.resolve(u),r)}return o===0&&r.resolve(i),r},e.hash=function(t){var r={},o=[],i=function(c){if(t.hasOwnProperty(c)){var u=t[c];ae(u)?o.push(u.then(function(s){r[c]=s})):r[c]=u}};for(var a in t)i(a);return e.all(o).then(function(){return r})},e.map=function(t,r){return e.all(t.map(r))},e.onPossiblyUnhandledException=function(t){return function(r){return me.push(r),{cancel:function(){me.splice(me.indexOf(r),1)}}}(t)},e.try=function(t,r,o){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.try expected a function");var i;_e();try{i=t.apply(r,o||[])}catch(a){return ve(),e.reject(a)}return ve(),e.resolve(i)},e.delay=function(t){return new e(function(r){setTimeout(r,t)})},e.isPromise=function(t){return!!(t&&t instanceof e)||ae(t)},e.flush=function(){return function(t){var r=pe=pe||new t;return vt(),r}(e)},e}();function Oe(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(r){}return-1}var Be=function(){function e(){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(){if(typeof WeakMap=="undefined"||Object.freeze===void 0)return!1;try{var t=new WeakMap,r={};return Object.freeze(r),t.set(r,"__testvalue__"),t.get(r)==="__testvalue__"}catch(o){return!1}}())try{this.weakmap=new WeakMap}catch(t){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var t=this.weakmap,r=this.keys,o=0;o<r.length;o++){var i=r[o];if(Ce(i)&&Z(i)){if(t)try{t.delete(i)}catch(a){}r.splice(o,1),this.values.splice(o,1),o-=1}}},n.isSafeToReadWrite=function(t){return!Ce(t)},n.set=function(t,r){if(!t)throw new Error("WeakMap expected key");var o=this.weakmap;if(o)try{o.set(t,r)}catch(p){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var i=this.name,a=t[i];a&&a[0]===t?a[1]=r:Object.defineProperty(t,i,{value:[t,r],writable:!0});return}catch(p){}this._cleanupClosedWindows();var c=this.keys,u=this.values,s=Oe(c,t);s===-1?(c.push(t),u.push(r)):u[s]=r},n.get=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(t))return r.get(t)}catch(a){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];return o&&o[0]===t?o[1]:void 0}catch(a){}this._cleanupClosedWindows();var i=Oe(this.keys,t);if(i!==-1)return this.values[i]},n.delete=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.delete(t)}catch(c){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];o&&o[0]===t&&(o[0]=o[1]=void 0)}catch(c){}this._cleanupClosedWindows();var i=this.keys,a=Oe(i,t);a!==-1&&(i.splice(a,1),this.values.splice(a,1))},n.has=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(t))return!0}catch(i){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];return!(!o||o[0]!==t)}catch(i){}return this._cleanupClosedWindows(),Oe(this.keys,t)!==-1},n.getOrSet=function(t,r){if(this.has(t))return this.get(t);var o=r();return this.set(t,o),o},e}();function wt(e){return e.name||e.__name__||e.displayName||"anonymous"}function gt(e,n){try{delete e.name,e.name=n}catch(t){}return e.__name__=e.displayName=n,e}function ee(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})+"_"+function(n){if(typeof btoa=="function")return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,function(t,r){return String.fromCharCode(parseInt(r,16))})).replace(/[=]/g,"");if(typeof Buffer!="undefined")return Buffer.from(n,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}(new Date().toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var Ae;function yt(e){try{return JSON.stringify([].slice.call(e),function(n,t){return typeof t=="function"?"memoize["+function(r){if(Ae=Ae||new Be,r==null||typeof r!="object"&&typeof r!="function")throw new Error("Invalid object");var o=Ae.get(r);return o||(o=typeof r+":"+ee(),Ae.set(r,o)),o}(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})}catch(n){throw new Error("Arguments not serializable -- can not be used to memoize")}}function jn(){return{}}var we=0,Et=0;function ge(e,n){n===void 0&&(n={});var t=n.thisNamespace,r=t!==void 0&&t,o=n.time,i,a,c=we;we+=1;var u=function(){for(var s=arguments.length,p=new Array(s),h=0;h<s;h++)p[h]=arguments[h];c<Et&&(i=null,a=null,c=we,we+=1);var m;m=r?(a=a||new Be).getOrSet(this,jn):i=i||{};var w;try{w=yt(p)}catch(O){return e.apply(this,arguments)}var x=m[w];if(x&&o&&Date.now()-x.time<o&&(delete m[w],x=null),x)return x.value;var S=Date.now(),b=e.apply(this,arguments);return m[w]={time:S,value:b},b};return u.reset=function(){i=null,a=null},gt(u,(n.name||wt(e))+"::memoized")}ge.clear=function(){Et=we};function Mn(e){var n={};function t(){for(var r=arguments,o=this,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];var u=yt(a);return n.hasOwnProperty(u)||(n[u]=R.try(function(){return e.apply(o,r)}).finally(function(){delete n[u]})),n[u]}return t.reset=function(){n={}},gt(t,wt(e)+"::promiseMemoized")}function se(){}function ye(e,n){if(n===void 0&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";if(typeof e=="string")return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return t.indexOf(r)!==-1?t:r+`
126
+ `+t;if(t)return t;if(r)return r}return e&&e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}catch(o){return"Error while stringifying error: "+ye(o,n+1)}}function St(e){return typeof e=="string"?e:e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}ge(function(e){if(Object.values)return Object.values(e);var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n});function $e(e){return{}.toString.call(e)==="[object RegExp]"}function Ee(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function bt(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function xt(){return!!document.body&&document.readyState==="complete"}function It(){return!!document.body&&document.readyState==="interactive"}ge(function(){return new R(function(e){if(xt()||It())return e();var n=setInterval(function(){if(xt()||It())return clearInterval(n),e()},10)})});var Ne=typeof document!="undefined"?document.currentScript:null,zn=ge(function(){if(Ne||(Ne=function(){try{var e=function(){try{throw new Error("_")}catch(a){return a.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch(a){}}()))return Ne;throw new Error("Can not determine current script")}),Ln=ee();ge(function(){var e;try{e=zn()}catch(r){return Ln}var n=e.getAttribute("data-uid");if(n&&typeof n=="string"||(n=e.getAttribute("data-uid-auto"))&&typeof n=="string")return n;if(e.src){var t=function(r){for(var o="",i=0;i<r.length;i++){var a=r[i].charCodeAt(0)*i;r[i+1]&&(a+=r[i+1].charCodeAt(0)*(i-1)),o+=String.fromCharCode(97+Math.abs(a)%26)}return o}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+t.slice(t.length-30)}else n=ee();return e.setAttribute("data-uid-auto",n),n});function Se(e){e===void 0&&(e=window);var n="__post_robot_10_0_46__";return e!==window?e[n]:e[n]=e[n]||{}}var Wt=function(){return{}};function k(e,n){return e===void 0&&(e="store"),n===void 0&&(n=Wt),Ee(Se(),e,function(){var t=n();return{has:function(r){return t.hasOwnProperty(r)},get:function(r,o){return t.hasOwnProperty(r)?t[r]:o},set:function(r,o){return t[r]=o,o},del:function(r){delete t[r]},getOrSet:function(r,o){return Ee(t,r,o)},reset:function(){t=n()},keys:function(){return Object.keys(t)}}})}var kn=function(){};function De(){var e=Se();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new kn,e.WINDOW_WILDCARD}function $(e,n){return e===void 0&&(e="store"),n===void 0&&(n=Wt),k("windowStore").getOrSet(e,function(){var t=new Be,r=function(o){return t.getOrSet(o,n)};return{has:function(o){return r(o).hasOwnProperty(e)},get:function(o,i){var a=r(o);return a.hasOwnProperty(e)?a[e]:i},set:function(o,i){return r(o)[e]=i,i},del:function(o){delete r(o)[e]},getOrSet:function(o,i){return Ee(r(o),e,i)}}})}function Pt(){return k("instance").getOrSet("instanceID",ee)}function Tt(e,n){var t=n.domain,r=$("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=R.resolve({domain:t});return r.set(e,i),i}function Ge(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:Pt()},{domain:"*",timeout:-1}).then(function(t){var r=t.origin,o=t.data.instanceID;return Tt(e,{domain:r}),{win:e,domain:r,instanceID:o}})}function Rt(e,n){var t=n.send;return $("windowInstanceIDPromises").getOrSet(e,function(){return Ge(e,{send:t}).then(function(r){return r.instanceID})})}function Ct(e){$("knownWindows").set(e,!0)}function Ve(e){return typeof e=="object"&&e!==null&&typeof e.__type__=="string"}function Ot(e){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}function ue(e,n){return{__type__:e,__val__:n}}var V,Un=((V={}).function=function(){},V.error=function(e){return ue("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},V.promise=function(){},V.regex=function(e){return ue("regex",e.source)},V.date=function(e){return ue("date",e.toJSON())},V.array=function(e){return e},V.object=function(e){return e},V.string=function(e){return e},V.number=function(e){return e},V.boolean=function(e){return e},V.null=function(e){return e},V[void 0]=function(e){return ue("undefined",e)},V),Fn={},J,Hn=((J={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},J.error=function(e){var n=e.stack,t=e.code,r=e.data,o=new Error(e.message);return o.code=t,r&&(o.data=r),o.stack=n+`
127
127
 
128
- `+o.stack,o},J.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},J.regex=function(e){return new RegExp(e)},J.date=function(e){return new Date(e)},J.array=function(e){return e},J.object=function(e){return e},J.string=function(e){return e},J.number=function(e){return e},J.boolean=function(e){return e},J.null=function(e){return e},J[void 0]=function(){},J),qn={};new C(function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval(function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)},10)});function Je(){for(var e=L("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function At(e,n){var t=n.send,r=n.id,o=r===void 0?ee():r,i=e.then(function(u){if(ie(u))return Ce(u).name}),a=e.then(function(u){if(Z(u))throw new Error("Window is closed, can not determine type");return oe(u)?"popup":"iframe"});i.catch(se),a.catch(se);var c=function(){return e.then(function(u){if(!Z(u))return ie(u)?Ce(u).name:i})};return{id:o,getType:function(){return a},getInstanceID:Mn(function(){return e.then(function(u){return Ct(u,{send:t})})}),close:function(){return e.then(Dn)},getName:c,focus:function(){return e.then(function(u){u.focus()})},isClosed:function(){return e.then(function(u){return Z(u)})},setLocation:function(u,s){return s===void 0&&(s={}),e.then(function(p){var h=window.location.protocol+"//"+window.location.host,m=s.method,w=m===void 0?"get":m,x=s.body;if(u.indexOf("/")===0)u=""+h+u;else if(!u.match(/^https?:\/\//)&&u.indexOf(h)!==0)throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(u));if(w==="post")return c().then(function(S){if(!S)throw new Error("Can not post to window without target name");(function(b){var O=b.url,z=b.target,N=b.body,A=b.method,k=A===void 0?"post":A,P=document.createElement("form");if(P.setAttribute("target",z),P.setAttribute("method",k),P.setAttribute("action",O),P.style.display="none",N)for(var D=0,K=Object.keys(N);D<K.length;D++){var M,be=K[D],Xe=document.createElement("input");Xe.setAttribute("name",be),Xe.setAttribute("value",(M=N[be])==null?void 0:M.toString()),P.appendChild(Xe)}bt().appendChild(P),P.submit(),bt().removeChild(P)})({url:u,target:S,method:w,body:x})});if(w!=="get")throw new Error("Unsupported method: "+w);if(ie(p))try{if(p.location&&typeof p.location.replace=="function"){p.location.replace(u);return}}catch(S){}p.location=u})},setName:function(u){return e.then(function(s){var p=ie(s),h=mt(s);if(!p)throw new Error("Can not set name for cross-domain window: "+u);Ce(s).name=u,h&&h.setAttribute("name",u),i=C.resolve(u)})}}}var Y=function(){function e(t){var r=t.send,o=t.win,i=t.serializedWindow;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 C,this.serializedWindow=i||At(this.actualWindowPromise,{send:r}),L("idToProxyWindow").set(this.getID(),this),o&&this.setWindow(o,{send:r})}var n=e.prototype;return n.getID=function(){return this.serializedWindow.id},n.getType=function(){return this.serializedWindow.getType()},n.isPopup=function(){return this.getType().then(function(t){return t==="popup"})},n.setLocation=function(t,r){var o=this;return this.serializedWindow.setLocation(t,r).then(function(){return o})},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(t){var r=this;return this.serializedWindow.setName(t).then(function(){return r})},n.close=function(){var t=this;return this.serializedWindow.close().then(function(){return t})},n.focus=function(){var t=this,r=this.isPopup(),o=this.getName(),i=C.hash({isPopup:r,name:o}).then(function(c){var u=c.name;c.isPopup&&u&&window.open("",u,"noopener")}),a=this.serializedWindow.focus();return C.all([i,a]).then(function(){return t})},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(t,r){var o=r.send;this.actualWindow=t,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=At(this.actualWindowPromise,{send:o,id:this.getID()}),$("winToProxyWindow").set(t,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(t,r){var o=this,i=r.send;return C.try(function(){return o.actualWindow?t===o.actualWindow:C.hash({proxyInstanceID:o.getInstanceID(),knownWindowInstanceID:Ct(t,{send:i})}).then(function(a){var c=a.proxyInstanceID===a.knownWindowInstanceID;return c&&o.setWindow(t,{send:i}),c})})},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return!!(this.actualWindow&&Z(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(t){return e.isProxyWindow(t)?t.unwrap():t},e.serialize=function(t,r){var o=r.send;return Je(),e.toProxyWindow(t,{send:o}).serialize()},e.deserialize=function(t,r){var o=r.send;return Je(),L("idToProxyWindow").get(t.id)||new e({serializedWindow:t,send:o})},e.isProxyWindow=function(t){return!!(t&&!Re(t)&&t.isProxyWindow)},e.toProxyWindow=function(t,r){var o=r.send;if(Je(),e.isProxyWindow(t))return t;var i=t;return $("winToProxyWindow").get(i)||new e({win:i,send:o})},e}();function Ye(e,n,t,r,o){var i=$("methodStore"),a=L("proxyWindowMethods");Y.isProxyWindow(r)?a.set(e,{val:n,name:t,domain:o,source:r}):(a.del(e),i.getOrSet(r,function(){return{}})[e]={domain:o,name:t,val:n,source:r})}function Nt(e,n){var t=$("methodStore"),r=L("proxyWindowMethods");return t.getOrSet(e,function(){return{}})[n]||r.get(n)}function Dt(e,n,t,r,o){a=(i={on:o.on,send:o.send}).on,c=i.send,L("builtinListeners").getOrSet("functionCalls",function(){return a("postrobot_method",{domain:"*"},function(p){var h=p.source,m=p.origin,w=p.data,x=w.id,S=w.name,b=Nt(h,x);if(!b)throw new Error("Could not find method '"+S+"' with id: "+w.id+" in "+B(window));var O=b.source,z=b.domain,N=b.val;return C.try(function(){if(!de(z,m))throw new Error("Method '"+w.name+"' domain "+JSON.stringify($e(b.domain)?b.domain.source:b.domain)+" does not match origin "+m+" in "+B(window));if(Y.isProxyWindow(O))return O.matchWindow(h,{send:c}).then(function(A){if(!A)throw new Error("Method call '"+w.name+"' failed - proxy window does not match source in "+B(window))})}).then(function(){return N.apply({source:h,origin:m},w.args)},function(A){return C.try(function(){if(N.onError)return N.onError(A)}).then(function(){throw A.stack&&(A.stack="Remote call to "+S+"("+function(k){return k===void 0&&(k=[]),(P=k,[].slice.call(P)).map(function(D){return typeof D=="string"?"'"+D+"'":D===void 0?"undefined":D===null?"null":typeof D=="boolean"?D.toString():Array.isArray(D)?"[ ... ]":typeof D=="object"?"{ ... }":typeof D=="function"?"() => { ... }":"<"+typeof D+">"}).join(", ");var P}(w.args)+`) failed
128
+ `+o.stack,o},J.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},J.regex=function(e){return new RegExp(e)},J.date=function(e){return new Date(e)},J.array=function(e){return e},J.object=function(e){return e},J.string=function(e){return e},J.number=function(e){return e},J.boolean=function(e){return e},J.null=function(e){return e},J[void 0]=function(){},J),qn={};new R(function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval(function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)},10)});function Je(){for(var e=k("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function At(e,n){var t=n.send,r=n.id,o=r===void 0?ee():r,i=e.then(function(u){if(ie(u))return Re(u).name}),a=e.then(function(u){if(Z(u))throw new Error("Window is closed, can not determine type");return oe(u)?"popup":"iframe"});i.catch(se),a.catch(se);var c=function(){return e.then(function(u){if(!Z(u))return ie(u)?Re(u).name:i})};return{id:o,getType:function(){return a},getInstanceID:Mn(function(){return e.then(function(u){return Rt(u,{send:t})})}),close:function(){return e.then(Dn)},getName:c,focus:function(){return e.then(function(u){u.focus()})},isClosed:function(){return e.then(function(u){return Z(u)})},setLocation:function(u,s){return s===void 0&&(s={}),e.then(function(p){var h=window.location.protocol+"//"+window.location.host,m=s.method,w=m===void 0?"get":m,x=s.body;if(u.indexOf("/")===0)u=""+h+u;else if(!u.match(/^https?:\/\//)&&u.indexOf(h)!==0)throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(u));if(w==="post")return c().then(function(S){if(!S)throw new Error("Can not post to window without target name");(function(b){var O=b.url,L=b.target,N=b.body,A=b.method,U=A===void 0?"post":A,P=document.createElement("form");if(P.setAttribute("target",L),P.setAttribute("method",U),P.setAttribute("action",O),P.style.display="none",N)for(var D=0,K=Object.keys(N);D<K.length;D++){var z,be=K[D],Xe=document.createElement("input");Xe.setAttribute("name",be),Xe.setAttribute("value",(z=N[be])==null?void 0:z.toString()),P.appendChild(Xe)}bt().appendChild(P),P.submit(),bt().removeChild(P)})({url:u,target:S,method:w,body:x})});if(w!=="get")throw new Error("Unsupported method: "+w);if(ie(p))try{if(p.location&&typeof p.location.replace=="function"){p.location.replace(u);return}}catch(S){}p.location=u})},setName:function(u){return e.then(function(s){var p=ie(s),h=mt(s);if(!p)throw new Error("Can not set name for cross-domain window: "+u);Re(s).name=u,h&&h.setAttribute("name",u),i=R.resolve(u)})}}}var Y=function(){function e(t){var r=t.send,o=t.win,i=t.serializedWindow;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 R,this.serializedWindow=i||At(this.actualWindowPromise,{send:r}),k("idToProxyWindow").set(this.getID(),this),o&&this.setWindow(o,{send:r})}var n=e.prototype;return n.getID=function(){return this.serializedWindow.id},n.getType=function(){return this.serializedWindow.getType()},n.isPopup=function(){return this.getType().then(function(t){return t==="popup"})},n.setLocation=function(t,r){var o=this;return this.serializedWindow.setLocation(t,r).then(function(){return o})},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(t){var r=this;return this.serializedWindow.setName(t).then(function(){return r})},n.close=function(){var t=this;return this.serializedWindow.close().then(function(){return t})},n.focus=function(){var t=this,r=this.isPopup(),o=this.getName(),i=R.hash({isPopup:r,name:o}).then(function(c){var u=c.name;c.isPopup&&u&&window.open("",u,"noopener")}),a=this.serializedWindow.focus();return R.all([i,a]).then(function(){return t})},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(t,r){var o=r.send;this.actualWindow=t,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=At(this.actualWindowPromise,{send:o,id:this.getID()}),$("winToProxyWindow").set(t,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(t,r){var o=this,i=r.send;return R.try(function(){return o.actualWindow?t===o.actualWindow:R.hash({proxyInstanceID:o.getInstanceID(),knownWindowInstanceID:Rt(t,{send:i})}).then(function(a){var c=a.proxyInstanceID===a.knownWindowInstanceID;return c&&o.setWindow(t,{send:i}),c})})},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return!!(this.actualWindow&&Z(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(t){return e.isProxyWindow(t)?t.unwrap():t},e.serialize=function(t,r){var o=r.send;return Je(),e.toProxyWindow(t,{send:o}).serialize()},e.deserialize=function(t,r){var o=r.send;return Je(),k("idToProxyWindow").get(t.id)||new e({serializedWindow:t,send:o})},e.isProxyWindow=function(t){return!!(t&&!Ce(t)&&t.isProxyWindow)},e.toProxyWindow=function(t,r){var o=r.send;if(Je(),e.isProxyWindow(t))return t;var i=t;return $("winToProxyWindow").get(i)||new e({win:i,send:o})},e}();function Ye(e,n,t,r,o){var i=$("methodStore"),a=k("proxyWindowMethods");Y.isProxyWindow(r)?a.set(e,{val:n,name:t,domain:o,source:r}):(a.del(e),i.getOrSet(r,function(){return{}})[e]={domain:o,name:t,val:n,source:r})}function Nt(e,n){var t=$("methodStore"),r=k("proxyWindowMethods");return t.getOrSet(e,function(){return{}})[n]||r.get(n)}function Dt(e,n,t,r,o){a=(i={on:o.on,send:o.send}).on,c=i.send,k("builtinListeners").getOrSet("functionCalls",function(){return a("postrobot_method",{domain:"*"},function(p){var h=p.source,m=p.origin,w=p.data,x=w.id,S=w.name,b=Nt(h,x);if(!b)throw new Error("Could not find method '"+S+"' with id: "+w.id+" in "+B(window));var O=b.source,L=b.domain,N=b.val;return R.try(function(){if(!de(L,m))throw new Error("Method '"+w.name+"' domain "+JSON.stringify($e(b.domain)?b.domain.source:b.domain)+" does not match origin "+m+" in "+B(window));if(Y.isProxyWindow(O))return O.matchWindow(h,{send:c}).then(function(A){if(!A)throw new Error("Method call '"+w.name+"' failed - proxy window does not match source in "+B(window))})}).then(function(){return N.apply({source:h,origin:m},w.args)},function(A){return R.try(function(){if(N.onError)return N.onError(A)}).then(function(){throw A.stack&&(A.stack="Remote call to "+S+"("+function(U){return U===void 0&&(U=[]),(P=U,[].slice.call(P)).map(function(D){return typeof D=="string"?"'"+D+"'":D===void 0?"undefined":D===null?"null":typeof D=="boolean"?D.toString():Array.isArray(D)?"[ ... ]":typeof D=="object"?"{ ... }":typeof D=="function"?"() => { ... }":"<"+typeof D+">"}).join(", ");var P}(w.args)+`) failed
129
129
 
130
- `+A.stack),A})}).then(function(A){return{result:A,id:x,name:S}})})});var i,a,c,u=t.__id__||ee();e=Y.unwrap(e);var s=t.__name__||t.name||r;return typeof s=="string"&&typeof s.indexOf=="function"&&s.indexOf("anonymous::")===0&&(s=s.replace("anonymous::",r+"::")),Y.isProxyWindow(e)?(Ye(u,t,s,e,n),e.awaitWindow().then(function(p){Ye(u,t,s,p,n)})):Ye(u,t,s,e,n),ue("cross_domain_function",{id:u,name:s})}function jt(e,n,t,r){var o,i=r.on,a=r.send;return function(c,u){u===void 0&&(u=Fn);var s=JSON.stringify(c,function(p){var h=this[p];if(Ve(this))return h;var m=Ot(h);if(!m)return h;var w=u[m]||Un[m];return w?w(h,p):h});return s===void 0?"undefined":s}(t,((o={}).promise=function(c,u){return function(s,p,h,m,w){return ue("cross_domain_zalgo_promise",{then:Dt(s,p,function(x,S){return h.then(x,S)},m,{on:w.on,send:w.send})})}(e,n,c,u,{on:i,send:a})},o.function=function(c,u){return Dt(e,n,c,u,{on:i,send:a})},o.object=function(c){return Re(c)||Y.isProxyWindow(c)?ue("cross_domain_window",Y.serialize(c,{send:a})):c},o))}function Mt(e,n,t,r){var o,i=r.send;return function(a,c){if(c===void 0&&(c=qn),a!=="undefined")return JSON.parse(a,function(u,s){if(Ve(this))return s;var p,h;if(Ve(s)?(p=s.__type__,h=s.__val__):(p=Ot(s),h=s),!p)return h;var m=c[p]||Hn[p];return m?m(h,u):h})}(t,((o={}).cross_domain_zalgo_promise=function(a){return function(c,u,s){return new C(s.then)}(0,0,a)},o.cross_domain_function=function(a){return function(c,u,s,p){var h=s.id,m=s.name,w=p.send,x=function(b){b===void 0&&(b={});function O(){var z=arguments;return Y.toProxyWindow(c,{send:w}).awaitWindow().then(function(N){var A=Nt(N,h);if(A&&A.val!==O)return A.val.apply({source:window,origin:B()},z);var k=[].slice.call(z);return b.fireAndForget?w(N,"postrobot_method",{id:h,name:m,args:k},{domain:u,fireAndForget:!0}):w(N,"postrobot_method",{id:h,name:m,args:k},{domain:u,fireAndForget:!1}).then(function(P){return P.data.result})}).catch(function(N){throw N})}return O.__name__=m,O.__origin__=u,O.__source__=c,O.__id__=h,O.origin=u,O},S=x();return S.fireAndForget=x({fireAndForget:!0}),S}(e,n,a,{send:i})},o.cross_domain_window=function(a){return Y.deserialize(a,{send:i})},o))}var Ze={};Ze.postrobot_post_message=function(e,n,t){t.indexOf("file:")===0&&(t="*"),e.postMessage(n,t)};function Ke(e,n,t,r){var o=r.on,i=r.send;return C.try(function(){var a=$().getOrSet(e,function(){return{}});return a.buffer=a.buffer||[],a.buffer.push(t),a.flush=a.flush||C.flush().then(function(){if(Z(e))throw new Error("Window is closed");var c=jt(e,n,((u={}).__post_robot_10_0_46__=a.buffer||[],u),{on:o,send:i}),u;delete a.buffer;for(var s=Object.keys(Ze),p=[],h=0;h<s.length;h++){var m=s[h];try{Ze[m](e,c,n)}catch(w){p.push(w)}}if(p.length===s.length)throw new Error(`All post-robot messaging strategies failed:
130
+ `+A.stack),A})}).then(function(A){return{result:A,id:x,name:S}})})});var i,a,c,u=t.__id__||ee();e=Y.unwrap(e);var s=t.__name__||t.name||r;return typeof s=="string"&&typeof s.indexOf=="function"&&s.indexOf("anonymous::")===0&&(s=s.replace("anonymous::",r+"::")),Y.isProxyWindow(e)?(Ye(u,t,s,e,n),e.awaitWindow().then(function(p){Ye(u,t,s,p,n)})):Ye(u,t,s,e,n),ue("cross_domain_function",{id:u,name:s})}function jt(e,n,t,r){var o,i=r.on,a=r.send;return function(c,u){u===void 0&&(u=Fn);var s=JSON.stringify(c,function(p){var h=this[p];if(Ve(this))return h;var m=Ot(h);if(!m)return h;var w=u[m]||Un[m];return w?w(h,p):h});return s===void 0?"undefined":s}(t,((o={}).promise=function(c,u){return function(s,p,h,m,w){return ue("cross_domain_zalgo_promise",{then:Dt(s,p,function(x,S){return h.then(x,S)},m,{on:w.on,send:w.send})})}(e,n,c,u,{on:i,send:a})},o.function=function(c,u){return Dt(e,n,c,u,{on:i,send:a})},o.object=function(c){return Ce(c)||Y.isProxyWindow(c)?ue("cross_domain_window",Y.serialize(c,{send:a})):c},o))}function Mt(e,n,t,r){var o,i=r.send;return function(a,c){if(c===void 0&&(c=qn),a!=="undefined")return JSON.parse(a,function(u,s){if(Ve(this))return s;var p,h;if(Ve(s)?(p=s.__type__,h=s.__val__):(p=Ot(s),h=s),!p)return h;var m=c[p]||Hn[p];return m?m(h,u):h})}(t,((o={}).cross_domain_zalgo_promise=function(a){return function(c,u,s){return new R(s.then)}(0,0,a)},o.cross_domain_function=function(a){return function(c,u,s,p){var h=s.id,m=s.name,w=p.send,x=function(b){b===void 0&&(b={});function O(){var L=arguments;return Y.toProxyWindow(c,{send:w}).awaitWindow().then(function(N){var A=Nt(N,h);if(A&&A.val!==O)return A.val.apply({source:window,origin:B()},L);var U=[].slice.call(L);return b.fireAndForget?w(N,"postrobot_method",{id:h,name:m,args:U},{domain:u,fireAndForget:!0}):w(N,"postrobot_method",{id:h,name:m,args:U},{domain:u,fireAndForget:!1}).then(function(P){return P.data.result})}).catch(function(N){throw N})}return O.__name__=m,O.__origin__=u,O.__source__=c,O.__id__=h,O.origin=u,O},S=x();return S.fireAndForget=x({fireAndForget:!0}),S}(e,n,a,{send:i})},o.cross_domain_window=function(a){return Y.deserialize(a,{send:i})},o))}var Ze={};Ze.postrobot_post_message=function(e,n,t){t.indexOf("file:")===0&&(t="*"),e.postMessage(n,t)};function Ke(e,n,t,r){var o=r.on,i=r.send;return R.try(function(){var a=$().getOrSet(e,function(){return{}});return a.buffer=a.buffer||[],a.buffer.push(t),a.flush=a.flush||R.flush().then(function(){if(Z(e))throw new Error("Window is closed");var c=jt(e,n,((u={}).__post_robot_10_0_46__=a.buffer||[],u),{on:o,send:i}),u;delete a.buffer;for(var s=Object.keys(Ze),p=[],h=0;h<s.length;h++){var m=s[h];try{Ze[m](e,c,n)}catch(w){p.push(w)}}if(p.length===s.length)throw new Error(`All post-robot messaging strategies failed:
131
131
 
132
132
  `+p.map(function(w,x){return x+". "+ye(w)}).join(`
133
133
 
134
- `))}),a.flush.then(function(){delete a.flush})}).then(se)}function zt(e){return L("responseListeners").get(e)}function Lt(e){L("responseListeners").del(e)}function kt(e){return L("erroredResponseListeners").has(e)}function Ut(e){var n=e.name,t=e.win,r=e.domain,o=$("requestListeners");if(t==="*"&&(t=null),r==="*"&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,De()];i<a.length;i++){var c=a[i];if(c){var u=o.get(c);if(u){var s=u[n];if(s){if(r&&typeof r=="string"){if(s[r])return s[r];if(s.__domain_regex__)for(var p=0,h=s.__domain_regex__;p<h.length;p++){var m=h[p],w=m.listener;if(de(m.regex,r))return w}}if(s["*"])return s["*"]}}}}}function _n(e,n,t,r){var o=r.on,i=r.send,a=Ut({name:t.name,win:e,domain:n}),c=t.name==="postrobot_method"&&t.data&&typeof t.data.name=="string"?t.data.name+"()":t.name;function u(s,p,h){return C.flush().then(function(){if(!t.fireAndForget&&!Z(e))try{return Ke(e,n,{id:ee(),origin:B(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:s,data:p,error:h},{on:o,send:i})}catch(m){throw new Error("Send response message failed for "+c+" in "+B()+`
134
+ `))}),a.flush.then(function(){delete a.flush})}).then(se)}function zt(e){return k("responseListeners").get(e)}function Lt(e){k("responseListeners").del(e)}function kt(e){return k("erroredResponseListeners").has(e)}function Ut(e){var n=e.name,t=e.win,r=e.domain,o=$("requestListeners");if(t==="*"&&(t=null),r==="*"&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,De()];i<a.length;i++){var c=a[i];if(c){var u=o.get(c);if(u){var s=u[n];if(s){if(r&&typeof r=="string"){if(s[r])return s[r];if(s.__domain_regex__)for(var p=0,h=s.__domain_regex__;p<h.length;p++){var m=h[p],w=m.listener;if(de(m.regex,r))return w}}if(s["*"])return s["*"]}}}}}function _n(e,n,t,r){var o=r.on,i=r.send,a=Ut({name:t.name,win:e,domain:n}),c=t.name==="postrobot_method"&&t.data&&typeof t.data.name=="string"?t.data.name+"()":t.name;function u(s,p,h){return R.flush().then(function(){if(!t.fireAndForget&&!Z(e))try{return Ke(e,n,{id:ee(),origin:B(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:s,data:p,error:h},{on:o,send:i})}catch(m){throw new Error("Send response message failed for "+c+" in "+B()+`
135
135
 
136
- `+ye(m))}})}return C.all([C.flush().then(function(){if(!t.fireAndForget&&!Z(e))try{return Ke(e,n,{id:ee(),origin:B(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(s){throw new Error("Send ack message failed for "+c+" in "+B()+`
136
+ `+ye(m))}})}return R.all([R.flush().then(function(){if(!t.fireAndForget&&!Z(e))try{return Ke(e,n,{id:ee(),origin:B(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(s){throw new Error("Send ack message failed for "+c+" in "+B()+`
137
137
 
138
- `+ye(s))}}),C.try(function(){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);return a.handler({source:e,origin:n,data:t.data})}).then(function(s){return u("success",s)},function(s){return u("error",null,s)})]).then(se).catch(function(s){if(a&&a.handleError)return a.handleError(s);throw s})}function Bn(e,n,t){if(!kt(t.hash)){var r=zt(t.hash);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);try{if(!de(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(o){r.promise.reject(o)}r.ack=!0}}function $n(e,n,t){if(!kt(t.hash)){var r=zt(t.hash);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);if(!de(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()));var o;if(e!==r.win)throw new Error("Response source does not match registered window");Lt(t.hash),t.ack==="error"?r.promise.reject(t.error):t.ack==="success"&&r.promise.resolve({source:e,origin:n,data:t.data})}}function Ft(e,n){var t=n.on,r=n.send,o=L("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(p){return}var i=e.source,a=e.origin,c=function(p,h,m,w){var x=w.on,S=w.send,b;try{b=Mt(h,m,p,{on:x,send:S})}catch(z){return}if(b&&typeof b=="object"&&b!==null){var O=b.__post_robot_10_0_46__;if(Array.isArray(O))return O}}(e.data,i,a,{on:t,send:r});if(c){Rt(i);for(var u=0;u<c.length;u++){var s=c[u];if(o.has(s.id)||(o.set(s.id,!0),Z(i)&&!s.fireAndForget))return;s.origin.indexOf("file:")===0&&(a="file://");try{s.type==="postrobot_message_request"?_n(i,a,s,{on:t,send:r}):s.type==="postrobot_message_response"?$n(i,a,s):s.type==="postrobot_message_ack"&&Bn(i,a,s)}catch(p){setTimeout(function(){throw p},0)}}}}function ce(e,n,t){if(!e)throw new Error("Expected name");if(typeof(n=n||{})=="function"&&(t=n,n={}),!t)throw new Error("Expected handler");var r=function o(i,a){var c=i.name,u=i.win,s=i.domain,p=$("requestListeners");if(!c||typeof c!="string")throw new Error("Name required to add request listener");if(u&&u!=="*"&&Y.isProxyWindow(u)){var h=u.awaitWindow().then(function(M){return o({name:c,win:M,domain:s},a)});return{cancel:function(){h.then(function(M){return M.cancel()},se)}}}var m=u;if(Array.isArray(m)){for(var w=[],x=0,S=m;x<S.length;x++)w.push(o({name:c,domain:s,win:S[x]},a));return{cancel:function(){for(var M=0;M<w.length;M++)w[M].cancel()}}}if(Array.isArray(s)){for(var b=[],O=0,z=s;O<z.length;O++)b.push(o({name:c,win:m,domain:z[O]},a));return{cancel:function(){for(var M=0;M<b.length;M++)b[M].cancel()}}}var N=Ut({name:c,win:m,domain:s});m&&m!=="*"||(m=De());var A=(s=s||"*").toString();if(N)throw m&&s?new Error("Request listener already exists for "+c+" on domain "+s.toString()+" for "+(m===De()?"wildcard":"specified")+" window"):m?new Error("Request listener already exists for "+c+" for "+(m===De()?"wildcard":"specified")+" window"):s?new Error("Request listener already exists for "+c+" on domain "+s.toString()):new Error("Request listener already exists for "+c);var k=p.getOrSet(m,function(){return{}}),P=Ee(k,c,function(){return{}}),D,K;return $e(s)?(D=Ee(P,"__domain_regex__",function(){return[]})).push(K={regex:s,listener:a}):P[A]=a,{cancel:function(){delete P[A],K&&(D.splice(D.indexOf(K,1)),D.length||delete P.__domain_regex__),Object.keys(P).length||delete k[c],m&&!Object.keys(k).length&&p.del(m)}}}({name:e,win:n.window,domain:n.domain||"*"},{handler:t||n.handler,handleError:n.errorHandler||function(o){throw o}});return{cancel:function(){r.cancel()}}}function Gn(e,n,t){typeof(n=n||{})=="function"&&(t=n,n={});var r=new C,o;return n.errorHandler=function(i){o.cancel(),r.reject(i)},o=ce(e,n,function(i){if(o.cancel(),r.resolve(i),t)return t(i)}),r.cancel=o.cancel,r}var ne=function e(n,t,r,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,c=o.timeout||5e3,u=o.fireAndForget||!1;return Y.toProxyWindow(n,{send:e}).awaitWindow().then(function(s){return C.try(function(){if(function(p,h,m){if(!p)throw new Error("Expected name");if(typeof m!="string"&&!Array.isArray(m)&&!$e(m))throw new TypeError("Can not send "+p+". Expected domain "+JSON.stringify(m)+" to be a string, array, or regex");if(Z(h))throw new Error("Can not send "+p+". Target window is closed")}(t,s,i),function(p,h){var m=ht(h);if(m)return m===p;if(h===p||function(S){S===void 0&&(S=window);try{if(S.top)return S.top}catch(N){}if(q(S)===S)return S;try{if(ft(window,S)&&window.top)return window.top}catch(N){}try{if(ft(S,window)&&window.top)return window.top}catch(N){}for(var b=0,O=function N(A){for(var k=[],P=0,D=lt(A);P<D.length;P++){var K=D[P];k.push(K);for(var M=0,be=N(K);M<be.length;M++)k.push(be[M])}return k}(S);b<O.length;b++){var z=O[b];try{if(z.top)return z.top}catch(N){}if(q(z)===z)return z}}(h)===h)return!1;for(var w=0,x=lt(p);w<x.length;w++)if(x[w]===h)return!0;return!1}(window,s))return function(p,h,m){h===void 0&&(h=5e3),m===void 0&&(m="Window");var w=function(x){return $("helloPromises").getOrSet(x,function(){return new C})}(p);return h!==-1&&(w=w.timeout(h,new Error(m+" did not load after "+h+"ms"))),w}(s,c)}).then(function(p){return function(h,m,w,x){var S=x.send;return C.try(function(){return typeof m=="string"?m:C.try(function(){return w||Ge(h,{send:S}).then(function(b){return b.domain})}).then(function(b){if(!de(m,m))throw new Error("Domain "+St(m)+" does not match "+St(m));return b})})}(s,i,(p===void 0?{}:p).domain,{send:e})}).then(function(p){var h=p,m=t==="postrobot_method"&&r&&typeof r.name=="string"?r.name+"()":t,w=new C,x=t+"_"+ee();if(!u){var S={name:t,win:s,domain:h,promise:w};(function(P,D){L("responseListeners").set(P,D)})(x,S);var b=$("requestPromises").getOrSet(s,function(){return[]});b.push(w),w.catch(function(){(function(P){L("erroredResponseListeners").set(P,!0)})(x),Lt(x)});var O=function(P){return $("knownWindows").get(P,!1)}(s)?1e4:2e3,z=a,N=O,A=z,k=function(P,D){var K;return function M(){K=setTimeout(function(){(function(){if(Z(s))return w.reject(new Error("Window closed for "+t+" before "+(S.ack?"response":"ack")));if(S.cancelled)return w.reject(new Error("Response listener was cancelled for "+t));N=Math.max(N-500,0),A!==-1&&(A=Math.max(A-500,0)),S.ack||N!==0?A===0&&w.reject(new Error("No response for postMessage "+m+" in "+B()+" in "+z+"ms")):w.reject(new Error("No ack for postMessage "+m+" in "+B()+" in "+O+"ms"))})(),M()},500)}(),{cancel:function(){clearTimeout(K)}}}();w.finally(function(){k.cancel(),b.splice(b.indexOf(w,1))}).catch(se)}return Ke(s,h,{id:ee(),origin:B(window),type:"postrobot_message_request",hash:x,name:t,data:r,fireAndForget:u},{on:ce,send:e}).then(function(){return u?w.resolve():w},function(P){throw new Error("Send request message failed for "+m+" in "+B()+`
138
+ `+ye(s))}}),R.try(function(){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);return a.handler({source:e,origin:n,data:t.data})}).then(function(s){return u("success",s)},function(s){return u("error",null,s)})]).then(se).catch(function(s){if(a&&a.handleError)return a.handleError(s);throw s})}function Bn(e,n,t){if(!kt(t.hash)){var r=zt(t.hash);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);try{if(!de(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(o){r.promise.reject(o)}r.ack=!0}}function $n(e,n,t){if(!kt(t.hash)){var r=zt(t.hash);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);if(!de(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()));var o;if(e!==r.win)throw new Error("Response source does not match registered window");Lt(t.hash),t.ack==="error"?r.promise.reject(t.error):t.ack==="success"&&r.promise.resolve({source:e,origin:n,data:t.data})}}function Ft(e,n){var t=n.on,r=n.send,o=k("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(p){return}var i=e.source,a=e.origin,c=function(p,h,m,w){var x=w.on,S=w.send,b;try{b=Mt(h,m,p,{on:x,send:S})}catch(L){return}if(b&&typeof b=="object"&&b!==null){var O=b.__post_robot_10_0_46__;if(Array.isArray(O))return O}}(e.data,i,a,{on:t,send:r});if(c){Ct(i);for(var u=0;u<c.length;u++){var s=c[u];if(o.has(s.id)||(o.set(s.id,!0),Z(i)&&!s.fireAndForget))return;s.origin.indexOf("file:")===0&&(a="file://");try{s.type==="postrobot_message_request"?_n(i,a,s,{on:t,send:r}):s.type==="postrobot_message_response"?$n(i,a,s):s.type==="postrobot_message_ack"&&Bn(i,a,s)}catch(p){setTimeout(function(){throw p},0)}}}}function ce(e,n,t){if(!e)throw new Error("Expected name");if(typeof(n=n||{})=="function"&&(t=n,n={}),!t)throw new Error("Expected handler");var r=function o(i,a){var c=i.name,u=i.win,s=i.domain,p=$("requestListeners");if(!c||typeof c!="string")throw new Error("Name required to add request listener");if(u&&u!=="*"&&Y.isProxyWindow(u)){var h=u.awaitWindow().then(function(z){return o({name:c,win:z,domain:s},a)});return{cancel:function(){h.then(function(z){return z.cancel()},se)}}}var m=u;if(Array.isArray(m)){for(var w=[],x=0,S=m;x<S.length;x++)w.push(o({name:c,domain:s,win:S[x]},a));return{cancel:function(){for(var z=0;z<w.length;z++)w[z].cancel()}}}if(Array.isArray(s)){for(var b=[],O=0,L=s;O<L.length;O++)b.push(o({name:c,win:m,domain:L[O]},a));return{cancel:function(){for(var z=0;z<b.length;z++)b[z].cancel()}}}var N=Ut({name:c,win:m,domain:s});m&&m!=="*"||(m=De());var A=(s=s||"*").toString();if(N)throw m&&s?new Error("Request listener already exists for "+c+" on domain "+s.toString()+" for "+(m===De()?"wildcard":"specified")+" window"):m?new Error("Request listener already exists for "+c+" for "+(m===De()?"wildcard":"specified")+" window"):s?new Error("Request listener already exists for "+c+" on domain "+s.toString()):new Error("Request listener already exists for "+c);var U=p.getOrSet(m,function(){return{}}),P=Ee(U,c,function(){return{}}),D,K;return $e(s)?(D=Ee(P,"__domain_regex__",function(){return[]})).push(K={regex:s,listener:a}):P[A]=a,{cancel:function(){delete P[A],K&&(D.splice(D.indexOf(K,1)),D.length||delete P.__domain_regex__),Object.keys(P).length||delete U[c],m&&!Object.keys(U).length&&p.del(m)}}}({name:e,win:n.window,domain:n.domain||"*"},{handler:t||n.handler,handleError:n.errorHandler||function(o){throw o}});return{cancel:function(){r.cancel()}}}function Gn(e,n,t){typeof(n=n||{})=="function"&&(t=n,n={});var r=new R,o;return n.errorHandler=function(i){o.cancel(),r.reject(i)},o=ce(e,n,function(i){if(o.cancel(),r.resolve(i),t)return t(i)}),r.cancel=o.cancel,r}var ne=function e(n,t,r,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,c=o.timeout||5e3,u=o.fireAndForget||!1;return Y.toProxyWindow(n,{send:e}).awaitWindow().then(function(s){return R.try(function(){if(function(p,h,m){if(!p)throw new Error("Expected name");if(typeof m!="string"&&!Array.isArray(m)&&!$e(m))throw new TypeError("Can not send "+p+". Expected domain "+JSON.stringify(m)+" to be a string, array, or regex");if(Z(h))throw new Error("Can not send "+p+". Target window is closed")}(t,s,i),function(p,h){var m=ht(h);if(m)return m===p;if(h===p||function(S){S===void 0&&(S=window);try{if(S.top)return S.top}catch(N){}if(q(S)===S)return S;try{if(ft(window,S)&&window.top)return window.top}catch(N){}try{if(ft(S,window)&&window.top)return window.top}catch(N){}for(var b=0,O=function N(A){for(var U=[],P=0,D=lt(A);P<D.length;P++){var K=D[P];U.push(K);for(var z=0,be=N(K);z<be.length;z++)U.push(be[z])}return U}(S);b<O.length;b++){var L=O[b];try{if(L.top)return L.top}catch(N){}if(q(L)===L)return L}}(h)===h)return!1;for(var w=0,x=lt(p);w<x.length;w++)if(x[w]===h)return!0;return!1}(window,s))return function(p,h,m){h===void 0&&(h=5e3),m===void 0&&(m="Window");var w=function(x){return $("helloPromises").getOrSet(x,function(){return new R})}(p);return h!==-1&&(w=w.timeout(h,new Error(m+" did not load after "+h+"ms"))),w}(s,c)}).then(function(p){return function(h,m,w,x){var S=x.send;return R.try(function(){return typeof m=="string"?m:R.try(function(){return w||Ge(h,{send:S}).then(function(b){return b.domain})}).then(function(b){if(!de(m,m))throw new Error("Domain "+St(m)+" does not match "+St(m));return b})})}(s,i,(p===void 0?{}:p).domain,{send:e})}).then(function(p){var h=p,m=t==="postrobot_method"&&r&&typeof r.name=="string"?r.name+"()":t,w=new R,x=t+"_"+ee();if(!u){var S={name:t,win:s,domain:h,promise:w};(function(P,D){k("responseListeners").set(P,D)})(x,S);var b=$("requestPromises").getOrSet(s,function(){return[]});b.push(w),w.catch(function(){(function(P){k("erroredResponseListeners").set(P,!0)})(x),Lt(x)});var O=function(P){return $("knownWindows").get(P,!1)}(s)?1e4:2e3,L=a,N=O,A=L,U=function(P,D){var K;return function z(){K=setTimeout(function(){(function(){if(Z(s))return w.reject(new Error("Window closed for "+t+" before "+(S.ack?"response":"ack")));if(S.cancelled)return w.reject(new Error("Response listener was cancelled for "+t));N=Math.max(N-500,0),A!==-1&&(A=Math.max(A-500,0)),S.ack||N!==0?A===0&&w.reject(new Error("No response for postMessage "+m+" in "+B()+" in "+L+"ms")):w.reject(new Error("No ack for postMessage "+m+" in "+B()+" in "+O+"ms"))})(),z()},500)}(),{cancel:function(){clearTimeout(K)}}}();w.finally(function(){U.cancel(),b.splice(b.indexOf(w,1))}).catch(se)}return Ke(s,h,{id:ee(),origin:B(window),type:"postrobot_message_request",hash:x,name:t,data:r,fireAndForget:u},{on:ce,send:e}).then(function(){return u?w.resolve():w},function(P){throw new Error("Send request message failed for "+m+" in "+B()+`
139
139
 
140
- `+ye(P))})})})};function Vn(e,n,t){return jt(e,n,t,{on:ce,send:ne})}function Jn(e,n,t){return Mt(e,n,t,{send:ne})}function Yn(e){return new Y({send:ne,win:e})}function Zn(e){return Y.toProxyWindow(e,{send:ne})}function Ht(){Se().initialized||(Se().initialized=!0,n=(e={on:ce,send:ne}).on,t=e.send,(r=Se()).receiveMessage=r.receiveMessage||function(o){return Ft(o,{on:n,send:t})},function(o){var i=o.on,a=o.send;L().getOrSet("postMessageListener",function(){return function(c,u,s){return c.addEventListener("message",s),{cancel:function(){c.removeEventListener("message",s)}}}(window,0,function(c){(function(u,s){var p=s.on,h=s.send;C.try(function(){var m=u.source||u.sourceElement,w=u.origin||u.originalEvent&&u.originalEvent.origin,x=u.data;if(w==="null"&&(w="file://"),m){if(!w)throw new Error("Post message did not have origin domain");Ft({source:m,origin:w,data:x},{on:p,send:h})}})})(c,{on:i,send:a})})})}({on:ce,send:ne}),function(o){var i=o.on,a=o.send;L("builtinListeners").getOrSet("helloListener",function(){var c=i("postrobot_hello",{domain:"*"},function(s){return Tt(s.source,{domain:s.origin}),{instanceID:Pt()}}),u=ht();return u&&Ge(u,{send:a}).catch(function(s){}),c})}({on:ce,send:ne}));var e,n,t,r}function Kn(){(function(){for(var n=L("responseListeners"),t=0,r=n.keys();t<r.length;t++){var o=r[t],i=n.get(o);i&&(i.cancelled=!0),n.del(o)}})(),(e=L().get("postMessageListener"))&&e.cancel();var e;delete window.__post_robot_10_0_46__}var Xn=!0;function Qn(e){for(var n=0,t=$("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(Z(e)?"closed":"cleaned up")+" before response")).catch(se)}Ht()}])})}(We)),We.exports}var ct;function On(){return ct||(ct=1,function(f){f.exports=Rn(),f.exports.default=f.exports}(Fe)),Fe.exports}var dt=On();const He=T({__proto__:null,default:Tn(dt)},[dt]);I.ConsentBox=Le,I.PrivacyCenterBox=vn,I.SoyioTypes=wn,I.SoyioWidget=st,I._TooltipManager=re,I.default=st,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
140
+ `+ye(P))})})})};function Vn(e,n,t){return jt(e,n,t,{on:ce,send:ne})}function Jn(e,n,t){return Mt(e,n,t,{send:ne})}function Yn(e){return new Y({send:ne,win:e})}function Zn(e){return Y.toProxyWindow(e,{send:ne})}function Ht(){Se().initialized||(Se().initialized=!0,n=(e={on:ce,send:ne}).on,t=e.send,(r=Se()).receiveMessage=r.receiveMessage||function(o){return Ft(o,{on:n,send:t})},function(o){var i=o.on,a=o.send;k().getOrSet("postMessageListener",function(){return function(c,u,s){return c.addEventListener("message",s),{cancel:function(){c.removeEventListener("message",s)}}}(window,0,function(c){(function(u,s){var p=s.on,h=s.send;R.try(function(){var m=u.source||u.sourceElement,w=u.origin||u.originalEvent&&u.originalEvent.origin,x=u.data;if(w==="null"&&(w="file://"),m){if(!w)throw new Error("Post message did not have origin domain");Ft({source:m,origin:w,data:x},{on:p,send:h})}})})(c,{on:i,send:a})})})}({on:ce,send:ne}),function(o){var i=o.on,a=o.send;k("builtinListeners").getOrSet("helloListener",function(){var c=i("postrobot_hello",{domain:"*"},function(s){return Tt(s.source,{domain:s.origin}),{instanceID:Pt()}}),u=ht();return u&&Ge(u,{send:a}).catch(function(s){}),c})}({on:ce,send:ne}));var e,n,t,r}function Kn(){(function(){for(var n=k("responseListeners"),t=0,r=n.keys();t<r.length;t++){var o=r[t],i=n.get(o);i&&(i.cancelled=!0),n.del(o)}})(),(e=k().get("postMessageListener"))&&e.cancel();var e;delete window.__post_robot_10_0_46__}var Xn=!0;function Qn(e){for(var n=0,t=$("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(Z(e)?"closed":"cleaned up")+" before response")).catch(se)}Ht()}])})}(We)),We.exports}var ct;function On(){return ct||(ct=1,function(f){f.exports=Cn(),f.exports.default=f.exports}(Fe)),Fe.exports}var dt=On();const He=T({__proto__:null,default:Tn(dt)},[dt]);I.ConsentBox=Le,I.PrivacyCenterBox=vn,I.SoyioTypes=wn,I.SoyioWidget=st,I._TooltipManager=re,I.default=st,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soyio/soyio-widget",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",