@iframe-resizer/core 6.0.0-beta.0 → 6.0.0-beta.1

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/index.esm.js CHANGED
@@ -1,43 +1,43 @@
1
- import Je, { NORMAL as Ye, HIGHLIGHT as l, FOREGROUND as v } from "auto-console-group";
2
- const C = "6.0.0-beta.0", pe = "iframeResizer", S = ":", Xe = "[iFrameResizerChild]Ready", de = "autoResize", Ke = "beforeUnload", Qe = "close", et = "inPageLink", $ = "init", he = "iframeReady", tt = "lazy", W = "load", R = "message", nt = "mouseenter", ot = "mouseleave", ge = "onload", me = "pageInfo", be = "parentInfo", it = "pageInfoStop", rt = "parentInfoStop", H = "reset", Z = "resize", st = "scrollBy", ct = "scrollTo", at = "scrollToOffset", lt = "title", Q = 1, ut = "height", ft = "width", pt = "offset", dt = "offsetSize", ee = "scroll", P = `
3
- `, ht = "hidden", gt = "child", D = "parent", J = "string", mt = "number", ye = "object", ve = "function", G = "auto", bt = "font-weight: bold;", we = "none", ze = "both", F = "vertical", Ee = "horizontal", yt = R.length, x = "[iFrameSizer]", U = x.length, vt = Object.freeze({
1
+ import tt, { NORMAL as nt, HIGHLIGHT as l, FOREGROUND as w } from "auto-console-group";
2
+ const _ = "6.0.0-beta.1", pe = "iframeResizer", L = ":", ot = "[iFrameResizerChild]Ready", ge = "autoResize", it = "beforeUnload", st = "close", rt = "inPageLink", j = "init", de = "iframeReady", ct = "lazy", G = "load", A = "message", at = "mouseenter", lt = "mouseleave", me = "onload", ye = "pageInfo", be = "parentInfo", ut = "pageInfoStop", ft = "parentInfoStop", U = "reset", Y = "resize", ht = "scrollBy", pt = "scrollTo", gt = "scrollToOffset", dt = "title", ee = 1, mt = "height", yt = "width", bt = "offset", vt = "offsetSize", te = "scroll", C = `
3
+ `, wt = "hidden", zt = "child", V = "parent", X = "string", Et = "number", ve = "object", we = "function", q = "auto", Ot = "font-weight: bold;", ze = "none", Ee = "both", D = "vertical", Oe = "horizontal", Tt = "omit", It = A.length, F = "[iFrameSizer]", Z = F.length, kt = Object.freeze({
4
4
  max: 1,
5
5
  scroll: 1,
6
6
  bodyScroll: 1,
7
7
  documentElementScroll: 1
8
- }), te = Object.freeze({
9
- [ge]: 1,
10
- [$]: 1,
11
- [he]: 1
12
- }), V = "expanded", Y = "collapsed", wt = Object.freeze({
13
- [V]: 1,
14
- [Y]: 1
15
- }), Oe = "Use of the old name will be removed in a future version of <i>iframe-resizer</>.", Te = (e) => typeof e === ye && e !== null, X = (e) => typeof e === J;
16
- function zt(e) {
17
- if (!Te(e)) return !1;
8
+ }), ne = Object.freeze({
9
+ [me]: 1,
10
+ [j]: 1,
11
+ [de]: 1
12
+ }), M = "expanded", S = "collapsed", Te = 0, Ie = 1, ke = 2, $t = Object.freeze({
13
+ [M]: 1,
14
+ [S]: 1
15
+ }), $e = "Use of the old name will be removed in a future version of <i>iframe-resizer</>.", Me = (e) => typeof e === ve && e !== null, K = (e) => typeof e === X;
16
+ function Mt(e) {
17
+ if (!Me(e)) return !1;
18
18
  try {
19
19
  return e.tagName === "IFRAME" || e instanceof HTMLIFrameElement;
20
20
  } catch {
21
21
  return !1;
22
22
  }
23
23
  }
24
- const Et = (e, ...t) => setTimeout(() => e(...t), 0), Ot = (e) => {
24
+ const St = (e, ...t) => setTimeout(() => e(...t), 0), jt = (e) => {
25
25
  let t = !1;
26
26
  return function(...n) {
27
27
  return t ? void 0 : (t = !0, e.apply(this, n));
28
28
  };
29
- }, Tt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), k = (e, t) => Object.hasOwn ? Object.hasOwn(e, t) : Tt(e, t), It = (e) => e, Mt = (e) => e.charAt(0).toUpperCase() + e.slice(1), $t = (e) => (
29
+ }, Rt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), P = (e, t) => Object.hasOwn ? Object.hasOwn(e, t) : Rt(e, t), Lt = (e) => e, At = (e) => e.charAt(0).toUpperCase() + e.slice(1), Pt = (e) => (
30
30
  // eslint-disable-next-line no-underscore-dangle
31
31
  e?.__esModule ? e.default : e
32
- ), St = (e, t, n) => {
32
+ ), Nt = (e, t, n) => {
33
33
  if (typeof e !== t)
34
- throw new TypeError(`${n} is not a ${Mt(t)}`);
35
- }, Rt = (e) => (t, n = "renamed to") => (o, r, s = "", c = "") => e(
36
- c,
34
+ throw new TypeError(`${n} is not a ${At(t)}`);
35
+ }, Ct = (e) => (t, n = "renamed to") => (o, s, c = "", r = "") => e(
36
+ r,
37
37
  `<rb>Deprecated ${t}(${o.replace("()", "")})</>
38
38
 
39
- The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${s}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`
40
- ), Ie = {
39
+ The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${s}</>. ${c}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`
40
+ ), Se = {
41
41
  br: `
42
42
  `,
43
43
  rb: "\x1B[31;1m",
@@ -52,50 +52,54 @@ The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${s}Use of the old $
52
52
  // underline
53
53
  "/": "\x1B[m"
54
54
  // reset
55
- }, kt = Object.keys(Ie), jt = new RegExp(`<(${kt.join("|")})>`, "gi"), Lt = (e, t) => Ie[t] ?? "", At = (e) => e.replace(jt, Lt), Pt = (e) => e.replaceAll("<br>", P).replaceAll(/<\/?[^>]+>/gi, ""), Me = (e) => (t) => e(
56
- X(t) ? window.chrome ? At(t) : Pt(t) : t
57
- ), i = {}, $e = $t(Je);
58
- let K = !0;
59
- const Nt = $e({
55
+ }, xt = Object.keys(Se), _t = new RegExp(`<(${xt.join("|")})>`, "gi"), Ft = (e, t) => Se[t] ?? "", Bt = (e) => e.replace(_t, Ft), Wt = (e) => e.replaceAll("<br>", C).replaceAll(/<\/?[^>]+>/gi, ""), je = (e) => (t) => e(
56
+ K(t) ? window.chrome ? Bt(t) : Wt(t) : t
57
+ ), i = {}, Re = Pt(tt);
58
+ let Q = !0;
59
+ const Dt = Re({
60
60
  expand: !1,
61
- label: D
62
- }), Ct = (e) => window.top === window.self ? `parent(${e})` : `nested parent(${e})`, xt = (e) => i[e] ? i[e].log : K;
63
- function _t({ enabled: e, expand: t, iframeId: n }) {
64
- const o = $e({
61
+ label: V
62
+ }), Ht = (e) => window.top === window.self ? `parent(${e})` : `nested parent(${e})`, Gt = (e) => i[e] ? i[e].log : Q;
63
+ function Ut({
64
+ enabled: e,
65
+ expand: t,
66
+ iframeId: n
67
+ }) {
68
+ const o = Re({
65
69
  expand: t,
66
- label: Ct(n)
70
+ label: Ht(n)
67
71
  });
68
- K = e, i[n] || (i[n] = {
72
+ Q = e, i[n] || (i[n] = {
69
73
  console: o
70
74
  });
71
75
  }
72
- const I = (e) => (t, ...n) => i[t] ? i[t].console[e](...n) : Nt[e](...n), Se = (e) => (t, ...n) => xt(t) === !0 ? I(e)(t, ...n) : null, u = Se("log"), m = u, Ft = Se("debug"), M = I("warn"), Bt = I("error"), y = I("event"), Wt = I("purge"), Ht = I("endAutoGroup"), Re = I("errorBoundary");
73
- function Dt(e, t) {
76
+ const k = (e) => (t, ...n) => i[t] ? i[t].console[e](...n) : Dt[e](...n), Le = (e) => (t, ...n) => Gt(t) === !0 ? k(e)(t, ...n) : null, u = Le("log"), y = u, Vt = Le("debug"), z = k("warn"), qt = k("error"), b = k("event"), Zt = k("purge"), Jt = k("endAutoGroup"), Ae = k("errorBoundary");
77
+ function Yt(e, t) {
74
78
  queueMicrotask(
75
79
  () => (
76
80
  // eslint-disable-next-line no-console
77
81
  console.info(
78
82
  `%ciframe-resizer ${e}`,
79
- K || t < 1 ? bt : Ye
83
+ Q || t < 1 ? Ot : nt
80
84
  )
81
85
  )
82
86
  );
83
87
  }
84
- const Gt = (e) => (...t) => [`${pe}(${e})`, ...t].join(" "), Ut = Me(It), b = (e, ...t) => i[e] ? i[e].console.warn(...t.map(Ut)) : queueMicrotask(() => {
85
- const n = Me(Gt(e));
88
+ const Xt = (e) => (...t) => [`${pe}(${e})`, ...t].join(" "), Kt = je(Lt), m = (e, ...t) => i[e] ? i[e].console.warn(...t.map(Kt)) : queueMicrotask(() => {
89
+ const n = je(Xt(e));
86
90
  console?.warn(...t.map(n));
87
- }), Vt = Rt(b), qt = Vt("Option"), Zt = (e) => {
88
- typeof i[e.id].onInit === ve && (qt("init()", "onReady()", "", e.id), i[e.id].onInit(e));
89
- }, _ = Object.freeze({
91
+ }), Qt = Ct(m), en = Qt("Option"), tn = (e) => {
92
+ typeof i[e.id].onInit === we && (en("init()", "onReady()", "", e.id), i[e.id].onInit(e));
93
+ }, B = Object.freeze({
90
94
  autoResize: !0,
91
95
  bodyBackground: null,
92
96
  bodyMargin: null,
93
97
  bodyPadding: null,
94
98
  checkOrigin: !0,
95
- direction: F,
99
+ direction: D,
96
100
  firstRun: !0,
97
101
  inPageLinks: !1,
98
- heightCalculationMethod: G,
102
+ heightCalculationMethod: q,
99
103
  id: "iFrameResizer",
100
104
  // TODO: v6 change to 'iframeResizer'
101
105
  log: !1,
@@ -113,7 +117,7 @@ const Gt = (e) => (...t) => [`${pe}(${e})`, ...t].join(" "), Ut = Me(It), b = (e
113
117
  tolerance: 0,
114
118
  waitForLoad: !1,
115
119
  warningTimeout: 5e3,
116
- widthCalculationMethod: G,
120
+ widthCalculationMethod: q,
117
121
  onBeforeClose: () => !0,
118
122
  onAfterClose() {
119
123
  },
@@ -123,116 +127,136 @@ const Gt = (e) => (...t) => [`${pe}(${e})`, ...t].join(" "), Ut = Me(It), b = (e
123
127
  },
124
128
  onMouseLeave() {
125
129
  },
126
- onReady: Zt,
130
+ onReady: tn,
127
131
  onResized() {
128
132
  },
129
133
  onScroll: () => !0
130
134
  });
131
- let ne = 0;
132
- function Jt(e) {
133
- const t = e?.id || _.id + ne++;
134
- return document.getElementById(t) === null ? t : `${t}${ne++}`;
135
+ let oe = 0;
136
+ function nn(e) {
137
+ const t = e?.id || B.id + oe++;
138
+ return document.getElementById(t) === null ? t : `${t}${oe++}`;
135
139
  }
136
- function Yt(e, t) {
140
+ function on(e, t) {
137
141
  let { id: n } = e;
138
- if (n && !X(n))
142
+ if (n && !K(n))
139
143
  throw new TypeError("Invalid id for iFrame. Expected String");
140
- return (!n || n === "") && (n = Jt(t), e.id = n, y(n, "assignId"), u(n, `Added missing iframe ID: ${n} (${e.src})`)), n;
144
+ return (!n || n === "") && (n = nn(t), e.id = n, b(n, "assignId"), u(n, `Added missing iframe ID: ${n} (${e.src})`)), n;
141
145
  }
142
- function Xt(e) {
146
+ function sn(e) {
143
147
  const { search: t } = window.location;
144
- t.includes("ifrlog") && (e.log = Y, e.logExpand = t.includes("ifrlog=expanded"));
148
+ if (t.includes("ifrlog"))
149
+ switch (new URLSearchParams(t).get("ifrlog")) {
150
+ case String(Te): {
151
+ e.log = !1;
152
+ break;
153
+ }
154
+ case M:
155
+ case String(ke): {
156
+ e.log = M;
157
+ break;
158
+ }
159
+ case S:
160
+ case String(Ie): {
161
+ e.log = S;
162
+ break;
163
+ }
164
+ default:
165
+ e.log = S;
166
+ }
145
167
  }
146
- const j = (e, t, n, o) => e.addEventListener(t, n, o || !1), oe = (e, t, n) => e.removeEventListener(t, n, !1), Kt = (e) => e.split(S).filter((t, n) => n !== 19).join(S);
147
- function Qt(e, t, n) {
168
+ const N = (e, t, n, o) => e.addEventListener(t, n, o || !1), ie = (e, t, n) => e.removeEventListener(t, n, !1), rn = (e) => e.split(L).filter((t, n) => n !== 19).join(L);
169
+ function cn(e, t, n) {
148
170
  function o(f) {
149
- const p = e in te ? Kt(t) : t;
150
- m(n, f, l, v, l), m(n, `Message data: %c${p}`, l);
171
+ const h = e in ne ? rn(t) : t;
172
+ y(n, f, l, w, l), y(n, `Message data: %c${h}`, l);
151
173
  }
152
- const { iframe: r, postMessageTarget: s, sameOrigin: c, targetOrigin: a } = i[n];
153
- if (c)
174
+ const { iframe: s, postMessageTarget: c, sameOrigin: r, targetOrigin: a } = i[n];
175
+ if (r)
154
176
  try {
155
- r.contentWindow.iframeChildListener(x + t), o(`Sending message to iframe %c${n}%c via same origin%c`);
177
+ s.contentWindow.iframeChildListener(F + t), o(`Sending message to iframe %c${n}%c via same origin%c`);
156
178
  return;
157
179
  } catch {
158
- e in te ? (i[n].sameOrigin = !1, u(n, "New iframe does not support same origin")) : M(n, "Same origin messaging failed, falling back to postMessage");
180
+ e in ne ? (i[n].sameOrigin = !1, u(n, "New iframe does not support same origin")) : z(n, "Same origin messaging failed, falling back to postMessage");
159
181
  }
160
182
  o(
161
- `Sending message to iframe: %c${n}%c targetOrigin: %c${a}`
162
- ), s.postMessage(x + t, a);
183
+ `Sending message to iframe: %c${n}%c targetOrigin: %c${a.join(", ")}`
184
+ );
185
+ for (const f of a)
186
+ c.postMessage(F + t, f);
163
187
  }
164
- function O(e, t, n) {
165
- if (y(n, e), !i[n]?.postMessageTarget) {
166
- M(n, "Iframe not found");
188
+ function T(e, t, n) {
189
+ if (b(n, e), !i[n]?.postMessageTarget) {
190
+ z(n, "Iframe not found");
167
191
  return;
168
192
  }
169
- Qt(e, t, n);
193
+ cn(e, t, n);
170
194
  }
171
- const en = (e, t) => Object.values(i).filter(({ autoResize: n, firstRun: o }) => n && !o).forEach(({ iframe: n }) => O(e, t, n.id));
172
- function tn() {
173
- document.hidden !== !0 && en("tabVisible", Z);
195
+ const an = (e, t) => Object.values(i).filter(({ autoResize: n, firstRun: o }) => n && !o).forEach(({ iframe: n }) => T(e, t, n.id));
196
+ function ln() {
197
+ document.hidden !== !0 && an("tabVisible", Y);
174
198
  }
175
- function nn(e) {
199
+ function un(e) {
176
200
  if (e.boxSizing !== "border-box") return 0;
177
201
  const t = e.paddingTop ? parseInt(e.paddingTop, 10) : 0, n = e.paddingBottom ? parseInt(e.paddingBottom, 10) : 0;
178
202
  return t + n;
179
203
  }
180
- function on(e) {
204
+ function fn(e) {
181
205
  if (e.boxSizing !== "border-box") return 0;
182
206
  const t = e.borderTopWidth ? parseInt(e.borderTopWidth, 10) : 0, n = e.borderBottomWidth ? parseInt(e.borderBottomWidth, 10) : 0;
183
207
  return t + n;
184
208
  }
185
- function rn(e) {
186
- const t = e.slice(U).split(":"), n = t[1] ? Number(t[1]) : 0, o = i[t[0]]?.iframe, r = getComputedStyle(o), s = {
209
+ function hn(e) {
210
+ const t = e.slice(Z).split(":"), n = t[1] ? Number(t[1]) : 0, o = i[t[0]]?.iframe, s = getComputedStyle(o), c = {
187
211
  iframe: o,
188
212
  id: t[0],
189
- height: n + nn(r) + on(r),
213
+ height: n + un(s) + fn(s),
190
214
  width: Number(t[2]),
191
215
  type: t[3],
192
216
  msg: t[4],
193
217
  message: t[4]
194
218
  };
195
- return t[5] && (s.mode = t[5]), s;
219
+ return t[5] && (c.mode = t[5]), c;
196
220
  }
197
- const sn = { true: 1, false: 1, undefined: 1 };
198
- function cn(e) {
199
- const { id: t, msg: n, iframe: o } = e, r = zt(o);
200
- return r || (u(t, `Received: %c${n}`, l), M(t, "The target iframe was not found.")), r;
221
+ const pn = { true: 1, false: 1, undefined: 1 };
222
+ function gn(e) {
223
+ const { id: t, msg: n, iframe: o } = e, s = Mt(o);
224
+ return s || (u(t, `Received: %c${n}`, l), z(t, "The target iframe was not found.")), s;
201
225
  }
202
- function an(e, t) {
203
- function n() {
226
+ function dn(e, t) {
227
+ const { id: n } = e, { data: o, origin: s } = t;
228
+ if ("sameOrigin" in t && t.sameOrigin) return !0;
229
+ const r = i[n]?.checkOrigin;
230
+ function a() {
204
231
  function f() {
205
232
  u(
206
- o,
207
- `Checking connection is from allowed list of origins: %c${a}`,
233
+ n,
234
+ `Checking connection is from allowed list of origins: %c${r}`,
208
235
  l
209
236
  );
210
- for (const g of a)
237
+ for (const g of r)
211
238
  if (g === s)
212
239
  return !0;
213
240
  return !1;
214
241
  }
215
- function p() {
216
- const g = i[o]?.remoteHost;
217
- return u(o, `Checking connection is from: %c${g}`, l), s === g;
242
+ function h() {
243
+ const g = i[n]?.remoteHost;
244
+ return u(n, `Checking connection is from: %c${g}`, l), s === g;
218
245
  }
219
- return a.constructor === Array ? f() : p();
246
+ return r.constructor === Array ? f() : h();
220
247
  }
221
- const { id: o } = e, { data: r, origin: s } = t;
222
- if ("sameOrigin" in t && t.sameOrigin) return !0;
223
- let a = i[o]?.checkOrigin;
224
- if (a && `${s}` != "null" && !n())
248
+ if (r && `${s}` != "null" && !a())
225
249
  throw new Error(
226
- `Unexpected message received from: ${s} for ${o}. Message was: ${r}. This error can be disabled by setting the checkOrigin: false option or by providing an array of trusted domains.`
250
+ `Unexpected message received from: ${s} for ${n}. Message was: ${o}. This error can be disabled by setting the checkOrigin: false option or by providing an array of trusted domains.`
227
251
  );
228
252
  return !0;
229
253
  }
230
- const ln = (e) => x === `${e}`.slice(0, U) && e.slice(U).split(":")[0] in i;
231
- function un(e) {
232
- const { id: t, type: n } = e, o = n in sn;
254
+ const mn = (e) => F === `${e}`.slice(0, Z) && e.slice(Z).split(":")[0] in i;
255
+ function yn(e) {
256
+ const { id: t, type: n } = e, o = n in pn;
233
257
  return o && u(t, "Ignoring init message from meta parent page"), o;
234
258
  }
235
- function fn(e) {
259
+ function bn(e) {
236
260
  try {
237
261
  i[e].sameOrigin = !!i[e]?.iframe?.contentWindow?.iframeChildListener;
238
262
  } catch {
@@ -240,10 +264,10 @@ function fn(e) {
240
264
  }
241
265
  u(e, `sameOrigin: %c${i[e].sameOrigin}`, l);
242
266
  }
243
- function pn(e, t) {
244
- if (t !== C) {
267
+ function vn(e, t) {
268
+ if (t !== _) {
245
269
  if (t === void 0) {
246
- b(
270
+ m(
247
271
  e,
248
272
  `<rb>Legacy version detected in iframe</>
249
273
 
@@ -256,118 +280,118 @@ See <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.
256
280
  }
257
281
  u(
258
282
  e,
259
- `Version mismatch (Child: %c${t}%c !== Parent: %c${C})`,
283
+ `Version mismatch (Child: %c${t}%c !== Parent: %c${_})`,
260
284
  l,
261
- v,
285
+ w,
262
286
  l
263
287
  );
264
288
  }
265
289
  }
266
- function T(e, t, n) {
290
+ function I(e, t, n) {
267
291
  if (!i[e]) return null;
268
292
  const o = i[e][t];
269
- if (typeof o !== ve)
293
+ if (typeof o !== we)
270
294
  throw new TypeError(`${t} on iframe[${e}] is not a function`);
271
295
  if (t !== "onBeforeClose" && t !== "onScroll")
272
- return Et(o, n);
296
+ return St(o, n);
273
297
  try {
274
298
  return o(n);
275
- } catch (r) {
276
- return console.error(r), M(e, `Error in ${t} callback`), null;
299
+ } catch (s) {
300
+ return console.error(s), z(e, `Error in ${t} callback`), null;
277
301
  }
278
302
  }
279
- function dn(e, t) {
303
+ function wn(e, t) {
280
304
  const { id: n, iframe: o } = e;
281
305
  u(
282
306
  n,
283
307
  `onMessage passed: {iframe: %c${n}%c, message: %c${t}%c}`,
284
308
  l,
285
- v,
309
+ w,
286
310
  l,
287
- v
288
- ), T(n, "onMessage", {
311
+ w
312
+ ), I(n, "onMessage", {
289
313
  iframe: o,
290
314
  message: JSON.parse(t)
291
315
  });
292
316
  }
293
- function N(e, t) {
317
+ function x(e, t) {
294
318
  const { lastMessage: n } = i[e];
295
319
  return n.slice(
296
- n.indexOf(S) + yt + t
320
+ n.indexOf(L) + It + t
297
321
  );
298
322
  }
299
- function ie(e, t) {
300
- const { id: n, iframe: o, height: r, type: s, width: c } = t;
323
+ function se(e, t) {
324
+ const { id: n, iframe: o, height: s, type: c, width: r } = t;
301
325
  let a = { x: 0, y: 0 };
302
- if (c === 0 && r === 0) {
303
- const f = N(n, 9).split(S);
326
+ if (r === 0 && s === 0) {
327
+ const f = x(n, 9).split(L);
304
328
  a = {
305
329
  x: f[1],
306
330
  y: f[0]
307
331
  };
308
332
  } else
309
333
  a = {
310
- x: c,
311
- y: r
334
+ x: r,
335
+ y: s
312
336
  };
313
- T(n, e, {
337
+ I(n, e, {
314
338
  iframe: o,
315
339
  screenX: Number(a.x),
316
340
  screenY: Number(a.y),
317
- type: s
341
+ type: c
318
342
  });
319
343
  }
320
- const d = {
344
+ const p = {
321
345
  position: null,
322
- version: C
346
+ version: _
323
347
  };
324
- function ke() {
325
- d.position = null;
348
+ function Pe() {
349
+ p.position = null;
326
350
  }
327
- const hn = () => d.position;
328
- function gn(e) {
329
- d.position = e;
351
+ const zn = () => p.position;
352
+ function En(e) {
353
+ p.position = e;
330
354
  }
331
- function je(e) {
332
- return d.position === null && (d.position = {
355
+ function Ne(e) {
356
+ return p.position === null && (p.position = {
333
357
  x: window.scrollX,
334
358
  y: window.scrollY
335
359
  }), u(
336
360
  e,
337
- `Get page position: %c${d.position.x}%c, %c${d.position.y}`,
361
+ `Get page position: %c${p.position.x}%c, %c${p.position.y}`,
338
362
  l,
339
- v,
363
+ w,
340
364
  l
341
- ), d.position;
365
+ ), p.position;
342
366
  }
343
- function Le(e) {
344
- d.position !== null && (window.scrollTo(d.position.x, d.position.y), m(
367
+ function Ce(e) {
368
+ p.position !== null && (window.scrollTo(p.position.x, p.position.y), y(
345
369
  e,
346
- `Set page position: %c${d.position.x}%c, %c${d.position.y}`,
370
+ `Set page position: %c${p.position.x}%c, %c${p.position.y}`,
347
371
  l,
348
- v,
372
+ w,
349
373
  l
350
- ), ke());
374
+ ), Pe());
351
375
  }
352
376
  function re(e, t) {
353
377
  const { id: n } = t, o = `${t[e]}px`;
354
- i[n].iframe.style[e] = o, m(n, `Set ${e}: %c${o}`, l);
378
+ i[n].iframe.style[e] = o, y(n, `Set ${e}: %c${o}`, l);
355
379
  }
356
- function Ae(e) {
380
+ function xe(e) {
357
381
  const { id: t } = e, { sizeHeight: n, sizeWidth: o } = i[t];
358
- n && re(ut, e), o && re(ft, e);
382
+ n && re(mt, e), o && re(yt, e);
359
383
  }
360
- function se(e) {
384
+ function ce(e) {
361
385
  const { id: t } = e;
362
- Ae(e), Le(t), T(t, "onResized", e);
386
+ xe(e), Ce(t), I(t, "onResized", e);
363
387
  }
364
- function Pe(e) {
388
+ function _e(e) {
365
389
  const { id: t } = e;
366
390
  u(t, "Disconnected from iframe"), delete i[t], delete e.iframeResizer;
367
391
  }
368
- function Ne(e) {
392
+ function Fe(e) {
369
393
  const { id: t } = e;
370
- if (T(t, "onBeforeClose", t) === !1) {
394
+ if (I(t, "onBeforeClose", t) === !1) {
371
395
  u(t, "Close iframe cancelled by onBeforeClose");
372
396
  return;
373
397
  }
@@ -375,75 +399,77 @@ function Ne(e) {
375
399
  try {
376
400
  e.parentNode && e.remove();
377
401
  } catch (n) {
378
- M(t, n);
402
+ z(t, n);
379
403
  }
380
- T(t, "onAfterClose", t), Pe(e);
404
+ I(t, "onAfterClose", t), _e(e);
381
405
  }
382
- function Ce(e) {
406
+ function Be(e) {
383
407
  const { id: t, type: n } = e;
384
408
  u(
385
409
  t,
386
- `Size reset requested by ${n === $ ? "parent page" : "child page"}`
387
- ), je(t), Ae(e), O(H, H, t);
410
+ `Size reset requested by ${n === j ? "parent page" : "child page"}`
411
+ ), Ne(t), xe(e), T(U, U, t);
388
412
  }
389
- const xe = (e, t) => {
413
+ const We = (e, t) => {
390
414
  const n = {};
391
- return (o, r) => {
392
- const { iframe: s } = i[r];
393
- function c(f, p) {
394
- n[p] || (f(), n[p] = requestAnimationFrame(() => {
395
- n[p] = null;
415
+ return (o, s) => {
416
+ const { iframe: c } = i[s];
417
+ function r(f, h) {
418
+ n[h] || (f(), n[h] = requestAnimationFrame(() => {
419
+ n[h] = null;
396
420
  }));
397
421
  }
398
422
  function a() {
399
- O(`${o} (${e})`, `${e}:${t(s)}`, r);
423
+ T(`${o} (${e})`, `${e}:${t(c)}`, s);
400
424
  }
401
- c(a, r);
425
+ r(a, s);
402
426
  };
403
- }, _e = (e) => (t) => {
427
+ }, De = (e) => (t) => {
404
428
  e in i[t] && (i[t][e](), delete i[t][e]);
405
- }, Fe = (e, t) => (n) => {
406
- let o = !1;
407
- const r = (h) => () => {
408
- i[n] ? (!o || o === h) && (e(h, n), o = h, requestAnimationFrame(() => {
409
- o = !1;
410
- })) : f();
411
- }, s = r(ee), c = r("resize window");
412
- function a(h, z) {
413
- u(n, `${h}listeners for send${t}`), z(window, ee, s), z(window, Z, c);
414
- }
415
- function f() {
416
- y(n, `stop${t}`), a("Remove ", oe), g.disconnect(), w.disconnect(), i[n] && oe(i[n].iframe, W, f);
417
- }
418
- function p() {
419
- a("Add ", j), g.observe(document.body), w.observe(i[n].iframe);
420
- }
421
- const g = new ResizeObserver(r("pageObserver")), w = new ResizeObserver(r("iframeObserver"));
422
- i[n] && (i[n][`stop${t}`] = f, j(i[n].iframe, W, f), p());
423
- };
424
- function mn(e) {
425
- const t = document.body.getBoundingClientRect(), n = e.getBoundingClientRect(), { scrollY: o, scrollX: r, innerHeight: s, innerWidth: c } = window, { clientHeight: a, clientWidth: f } = document.documentElement;
429
+ }, He = (
430
+ // eslint-disable-next-line @typescript-eslint/no-shadow
431
+ ((e, t) => (n) => {
432
+ let o = !1;
433
+ const s = (d) => () => {
434
+ i[n] ? (!o || o === d) && (e(d, n), o = d, requestAnimationFrame(() => {
435
+ o = !1;
436
+ })) : g();
437
+ }, c = s(te), r = s("resize window"), a = new ResizeObserver(s("pageObserver")), f = new ResizeObserver(s("iframeObserver"));
438
+ function h(d, E) {
439
+ u(n, `${d}listeners for send${t}`), E(window, te, c), E(window, Y, r);
440
+ }
441
+ function g() {
442
+ b(n, `stop${t}`), h("Remove ", ie), a.disconnect(), f.disconnect(), i[n] && ie(i[n].iframe, G, g);
443
+ }
444
+ function $() {
445
+ h("Add ", N), a.observe(document.body), f.observe(i[n].iframe);
446
+ }
447
+ i[n] && (i[n][`stop${t}`] = g, N(i[n].iframe, G, g), $());
448
+ })
449
+ );
450
+ function On(e) {
451
+ const t = document.body.getBoundingClientRect(), n = e.getBoundingClientRect(), { scrollY: o, scrollX: s, innerHeight: c, innerWidth: r } = window, { clientHeight: a, clientWidth: f } = document.documentElement;
426
452
  return JSON.stringify({
427
453
  iframeHeight: n.height,
428
454
  iframeWidth: n.width,
429
- clientHeight: Math.max(a, s || 0),
430
- clientWidth: Math.max(f, c || 0),
455
+ clientHeight: Math.max(a, c || 0),
456
+ clientWidth: Math.max(f, r || 0),
431
457
  offsetTop: Math.trunc(n.top - t.top),
432
458
  offsetLeft: Math.trunc(n.left - t.left),
433
459
  scrollTop: o,
434
- scrollLeft: r,
460
+ scrollLeft: s,
435
461
  documentHeight: a,
436
462
  documentWidth: f,
437
- windowHeight: s,
438
- windowWidth: c
463
+ windowHeight: c,
464
+ windowWidth: r
439
465
  });
440
466
  }
441
- const bn = xe(me, mn), yn = Fe(
442
- bn,
467
+ const Tn = We(ye, On), In = He(
468
+ Tn,
443
469
  "PageInfo"
444
- ), vn = _e("stopPageInfo");
445
- function wn(e) {
446
- const { scrollWidth: t, scrollHeight: n } = document.documentElement, { width: o, height: r, offsetLeft: s, offsetTop: c, pageLeft: a, pageTop: f, scale: p } = window.visualViewport;
470
+ ), kn = De("stopPageInfo");
471
+ function $n(e) {
472
+ const { scrollWidth: t, scrollHeight: n } = document.documentElement, { width: o, height: s, offsetLeft: c, offsetTop: r, pageLeft: a, pageTop: f, scale: h } = window.visualViewport;
447
473
  return JSON.stringify({
448
474
  iframe: e.getBoundingClientRect(),
449
475
  document: {
@@ -452,68 +478,72 @@ function wn(e) {
452
478
  },
453
479
  viewport: {
454
480
  width: o,
455
- height: r,
456
- offsetLeft: s,
457
- offsetTop: c,
481
+ height: s,
482
+ offsetLeft: c,
483
+ offsetTop: r,
458
484
  pageLeft: a,
459
485
  pageTop: f,
460
- scale: p
486
+ scale: h
461
487
  }
462
488
  });
463
489
  }
464
- const zn = xe(be, wn), En = Fe(
465
- zn,
490
+ const Mn = We(be, $n), Sn = He(
491
+ Mn,
466
492
  "ParentInfo"
467
- ), On = _e("stopParentInfo");
468
- function Be(e) {
469
- const t = e.getBoundingClientRect(), n = je(e.id);
493
+ ), jn = De("stopParentInfo");
494
+ function Ge(e) {
495
+ const t = e.getBoundingClientRect(), n = Ne(e.id);
470
496
  return {
471
497
  x: Number(t.left) + Number(n.x),
472
498
  y: Number(t.top) + Number(n.y)
473
499
  };
474
500
  }
475
- function We(e) {
476
- const { x: t, y: n } = hn(), o = i[e]?.iframe;
477
- if (T(e, "onScroll", { iframe: o, top: n, left: t, x: t, y: n }) === !1) {
478
- ke();
501
+ function Ue(e) {
502
+ const { x: t, y: n } = zn(), o = i[e]?.iframe;
503
+ if (I(e, "onScroll", { iframe: o, top: n, left: t, x: t, y: n }) === !1) {
504
+ Pe();
479
505
  return;
480
506
  }
481
- Le(e);
507
+ Ce(e);
482
508
  }
483
- function Tn(e) {
484
- const { id: t, height: n, width: o } = e, r = window.parentIframe || window.parentIFrame || window;
485
- m(
509
+ function Rn(e) {
510
+ const { id: t, height: n, width: o } = e, s = window.parentIframe || window.parentIFrame || window;
511
+ y(
486
512
  t,
487
513
  `scrollBy: x: %c${o}%c y: %c${n}`,
488
514
  l,
489
- v,
515
+ w,
490
516
  l
491
- ), r.scrollBy(o, n);
517
+ ), s.scrollBy(o, n);
492
518
  }
493
- const He = (e) => (t) => {
494
- function n(h) {
495
- gn(h), We(s);
519
+ const Ve = (e) => (t) => {
520
+ const { id: n, iframe: o, height: s, width: c } = t;
521
+ function r(d) {
522
+ En(d), Ue(n);
496
523
  }
497
- function o(h, z) {
498
- h[`scrollTo${e ? "Offset" : ""}`](z.x, z.y);
524
+ function a(d, E) {
525
+ d[`scrollTo${e ? "Offset" : ""}`](
526
+ E.x,
527
+ E.y
528
+ );
499
529
  }
500
- const r = (h) => ({
501
- x: f + h.x,
502
- y: a + h.y
503
- }), { id: s, iframe: c, height: a, width: f } = t, p = e ? Be(c) : { x: 0, y: 0 }, g = r(p), w = window.parentIframe || window.parentIFrame;
504
- m(
505
- s,
506
- `Reposition requested (offset x:%c${p.x}%c y:%c${p.y})`,
530
+ const f = (d) => ({
531
+ x: c + d.x,
532
+ y: s + d.y
533
+ }), h = e ? Ge(o) : { x: 0, y: 0 }, g = f(h), $ = window.parentIframe || window.parentIFrame;
534
+ y(
535
+ n,
536
+ `Reposition requested (offset x:%c${h.x}%c y:%c${h.y})`,
507
537
  l,
508
- v,
538
+ w,
509
539
  l
510
- ), w ? o(w, g) : n(g);
511
- }, In = He(!1), Mn = He(!0);
512
- function $n(e, t, n) {
513
- const { x: o, y: r } = Be(n);
514
- m(e, `Moving to in page link: %c#${t}`, l), d.position = { x: o, y: r }, We(e), window.location.hash = t;
540
+ ), $ ? a($, g) : r(g);
541
+ }, Ln = Ve(!1), An = Ve(!0);
542
+ function Pn(e, t, n) {
543
+ const { x: o, y: s } = Ge(n);
544
+ y(e, `Moving to in page link: %c#${t}`, l), p.position = { x: o, y: s }, Ue(e), window.location.hash = t;
515
545
  }
516
- function Sn(e, t) {
546
+ function Nn(e, t) {
517
547
  const n = window.parentIframe || window.parentIFrame;
518
548
  if (!n) {
519
549
  u(e, `In page link #${t} not found`);
@@ -521,44 +551,55 @@ function Sn(e, t) {
521
551
  }
522
552
  n.moveToAnchor(t);
523
553
  }
524
- function Rn(e, t) {
525
- const n = t.split("#")[1] || "", o = decodeURIComponent(n), r = document.getElementById(o) || document.getElementsByName(o)[0];
526
- if (r) {
527
- $n(e, n, r);
554
+ function Cn(e, t) {
555
+ const n = t.split("#")[1] || "", o = decodeURIComponent(n), s = document.getElementById(o) || document.getElementsByName(o)[0];
556
+ if (s) {
557
+ Pn(e, n, s);
528
558
  return;
529
559
  }
530
560
  if (window.top === window.self) {
531
561
  u(e, `In page link #${n} not found`);
532
562
  return;
533
563
  }
534
- Sn(e, n);
564
+ Nn(e, n);
535
565
  }
536
- function kn(e) {
566
+ function xn(e) {
537
567
  const t = i[e]?.iframe?.title;
538
568
  return t === "" || t === void 0;
539
569
  }
540
- function jn(e, t) {
541
- i[e]?.syncTitle && (i[e].iframe.title = t, m(e, `Set iframe title attribute: %c${t}`, l));
570
+ function _n(e, t) {
571
+ i[e]?.syncTitle && (i[e].iframe.title = t, y(e, `Set iframe title attribute: %c${t}`, l));
542
572
  }
543
- const ce = (e) => {
573
+ const W = (e) => {
544
574
  if (!e) return "";
545
575
  let t = -559038744, n = 1103547984;
546
- for (let o, r = 0; r < e.length; r++)
547
- o = e.codePointAt(r), t = Math.imul(t ^ o, 2246822519), n = Math.imul(n ^ o, 3266489917);
576
+ for (let o, s = 0; s < e.length; s++)
577
+ o = e.codePointAt(s), t = Math.imul(t ^ o, 2246822519), n = Math.imul(n ^ o, 3266489917);
548
578
  return t ^= Math.imul(t ^ n >>> 15, 1935289751), n ^= Math.imul(n ^ t >>> 15, 3405138345), t ^= n >>> 16, n ^= t >>> 16, (2097152 * (n >>> 0) + (t >>> 11)).toString(36);
549
- }, E = (e) => e.replace(
579
+ }, v = (e) => e.replace(
550
580
  /[A-Za-z]/g,
551
581
  (t) => String.fromCodePoint(
552
582
  (t <= "Z" ? 90 : 122) >= (t = t.codePointAt(0) + 19) ? t : t - 26
553
583
  )
554
- ), L = ["spjluzl", "rlf", "clyzpvu", "rlf2"], Ln = [
584
+ ), Fn = /* @__PURE__ */ new Date(), qe = (e) => new Set(Array.from({ length: 9 }, e)), Bn = (e) => [
585
+ e[0],
586
+ ...e.slice(1).map((t) => `${t} - lewpylk`),
587
+ `${e[4]} - lewpylk`,
588
+ ...e.slice(1)
589
+ ], R = ["spjluzl", "rlf", "clyzpvu", "rlf2", "nlaMbssFlhy"], Wn = [
555
590
  "<yi>Puchspk Spjluzl Rlf</><iy><iy>",
556
591
  "<yi>Tpzzpun Spjluzl Rlf</><iy><iy>",
557
592
  "Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>",
558
593
  "<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.",
559
594
  "<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt.",
560
- "Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."
561
- ], An = ["NWSc3", "zvsv", "wyv", "ibzpulzz", "vlt"], ae = Object.fromEntries(
595
+ "Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.",
596
+ "<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> vm <p>pmyhtl-ylzpgly</> fvb jhu bzl aol mpyza 11 johyhjalyz vm fvb spjlujl rlf av nla h 60% kpzjvbua ha <ii>oaaw://pmyhtl-ylzpgly.jvt</>.",
597
+ // Upgrade
598
+ "<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Av bwnyhkl av clyzpvu 6 vm<p>pmyhtl-ylzpgly</> wslhzl kvdusvhk aol shalza rlf myvt sltvu-zxbllgf.jvt.",
599
+ // Upgrade OEM
600
+ "<yi>VLT rlf lewpylk</><iy><iy>Wslhzl kvdusvhk aol shalza rlf myvt sltvu-zxbllgf.jvt."
601
+ // key expired
602
+ ], Dn = Bn(["NWSc3", "zvsv", "wyv", "ibzpulzz", "VLT"]), ae = Object.fromEntries(
562
603
  [
563
604
  "2cgs7fdf4xb",
564
605
  "1c9ctcccr4z",
@@ -566,99 +607,116 @@ const ce = (e) => {
566
607
  "ueokt0969w",
567
608
  "w2zxchhgqz",
568
609
  "1umuxblj2e5",
610
+ "1foobarqaz",
569
611
  "2b5sdlfhbev",
570
612
  "zo4ui3arjo",
571
- "oclbb4thgl"
613
+ "oclbb4thgl",
614
+ "igb1wzrjqr"
572
615
  ].map((e, t) => [e, Math.max(0, t - 1)])
573
- ), A = (e) => E(Ln[e]), Pn = (e) => E(An[e]), Nn = (e) => {
574
- const t = e[E(L[0])] || e[E(L[1])] || e[E(L[2])] || e[E(L[3])];
616
+ ), Ze = Fn[v(R[4])](), Hn = qe((e, t) => W(`${Ze + t}`)), Gn = qe((e, t) => W(`${Ze - ++t}`)), Un = (e) => Hn.has(e) ? 9 : Gn.has(e) ? 5 : -2, O = (e) => v(Wn[e]), Vn = (e) => v(Dn[e]), qn = (e) => {
617
+ const t = e[v(R[0])] || e[v(R[1])] || e[v(R[2])] || e[v(R[3])];
575
618
  if (!t) return -1;
576
619
  const n = t.split("-");
577
- let o = (function(r = "") {
578
- let s = -2;
579
- const c = ce(E(r));
580
- return c in ae && (s = ae[c]), s > 4 ? s - 4 : s;
581
- })(n[0]);
582
- return o === 0 || ((r) => r[2] === ce(r[0] + r[1]))(n) || (o = -2), o;
620
+ let o = (function(s = "", c = "") {
621
+ let r = -2;
622
+ const a = W(v(s));
623
+ return a in ae && (r = ae[a]), r === 9 ? Un(c) : r;
624
+ })(...n);
625
+ return o === 0 || ((s) => s[2] === W(s[0] + s[1]))(n) || (o = -2), o;
583
626
  };
584
- let q = !1, De = !1;
585
- function Ge(e, t = -3) {
586
- if (q) return;
627
+ let J = !1, Je = !1;
628
+ function Ye(e, t = -3) {
629
+ if (J) return;
587
630
  const n = Math.max(i[e].mode, t);
588
631
  if (n > i[e].mode && (i[e].mode = n), n < 0)
589
- throw Wt(e), i[e].vAdvised || b(e || "Parent", `${A(n + 2)}${A(2)}`), i[e].vAdvised = !0, A(n + 2).replace(/<\/?[a-z][^>]*>|<\/>/gi, "");
590
- n > 0 && De || Dt(`v${C} (${Pn(n)})`, n), n < 1 && b("Parent", A(3)), q = !0;
632
+ throw Zt(e), i[e].vAdvised || m(e || "Parent", `${O(n + 2)}${O(2)}`), i[e].vAdvised = !0, O(n + 2).replace(/<\/?[a-z][^>]*>|<\/>/gi, "");
633
+ switch (n > 5 && Je || Yt(`v${_} (${Vn(n)})`, n), n) {
634
+ case 1:
635
+ case 2:
636
+ case 3:
637
+ m(e, O(6));
638
+ break;
639
+ case 4:
640
+ m(e, O(7));
641
+ break;
642
+ case 5:
643
+ m(e, O(8));
644
+ break;
645
+ default:
646
+ n < 1 && m("Parent", O(3));
647
+ }
648
+ J = !0;
591
649
  }
592
- function Cn(e) {
593
- if (q) return;
650
+ function Zn(e) {
651
+ if (J) return;
594
652
  const { mode: t } = i[e];
595
- t !== -1 && Ge(e, t);
653
+ t > 5 && Ye(e, t);
596
654
  }
597
- function xn(e) {
598
- e?.log === -1 && (e.log = !1, De = !0);
655
+ function Jn(e) {
656
+ e?.log === -1 && (e.log = !1, Je = !0);
599
657
  }
600
- function _n(e, t) {
601
- i[e] && (u(e, `First run for ${e}`), Ge(e, t !== void 0 ? Number(t) : void 0), i[e].firstRun = !1);
658
+ function Yn(e, t) {
659
+ i[e] && (u(e, `First run for ${e}`), Ye(e, t === void 0 ? void 0 : Number(t)), i[e].firstRun = !1);
602
660
  }
603
- function Fn(e) {
604
- const { height: t, id: n, iframe: o, mode: r, message: s, type: c, width: a } = e, { lastMessage: f } = i[n];
605
- switch (i[n]?.firstRun && _n(n, r), u(n, `Received: %c${f}`, l), c) {
606
- case de:
607
- i[n].autoResize = JSON.parse(N(n, 9));
661
+ function Xn(e) {
662
+ const { height: t, id: n, iframe: o, mode: s, message: c, type: r, width: a } = e, { lastMessage: f } = i[n];
663
+ switch (i[n]?.firstRun && Yn(n, s), u(n, `Received: %c${f}`, l), r) {
664
+ case ge:
665
+ i[n].autoResize = JSON.parse(x(n, 9));
608
666
  break;
609
- case Ke:
610
- m(n, "Ready state reset"), i[n].initialised = !1;
667
+ case it:
668
+ y(n, "Ready state reset"), i[n].initialised = !1;
611
669
  break;
612
- case Qe:
613
- Ne(o);
670
+ case st:
671
+ Fe(o);
614
672
  break;
615
- case et:
616
- Rn(n, N(n, 9));
673
+ case rt:
674
+ Cn(n, x(n, 9));
617
675
  break;
618
- case $:
619
- se(e), fn(n), pn(n, s), i[n].initialised = !0, T(n, "onReady", o);
676
+ case j:
677
+ ce(e), bn(n), vn(n, c), i[n].initialised = !0, I(n, "onReady", o);
620
678
  break;
621
- case R:
622
- dn(e, N(n, 6));
679
+ case A:
680
+ wn(e, x(n, 6));
623
681
  break;
624
- case nt:
625
- ie("onMouseEnter", e);
682
+ case at:
683
+ se("onMouseEnter", e);
626
684
  break;
627
- case ot:
628
- ie("onMouseLeave", e);
685
+ case lt:
686
+ se("onMouseLeave", e);
629
687
  break;
630
- case me:
631
- yn(n);
688
+ case ye:
689
+ In(n);
632
690
  break;
633
691
  case be:
634
- En(n);
692
+ Sn(n);
635
693
  break;
636
- case it:
637
- vn(n);
694
+ case ut:
695
+ kn(n);
638
696
  break;
639
- case rt:
640
- On(n);
697
+ case ft:
698
+ jn(n);
641
699
  break;
642
- case H:
643
- Ce(e);
700
+ case U:
701
+ Be(e);
644
702
  break;
645
- case st:
646
- Tn(e);
703
+ case ht:
704
+ Rn(e);
647
705
  break;
648
- case ct:
649
- In(e);
706
+ case pt:
707
+ Ln(e);
650
708
  break;
651
- case at:
652
- Mn(e);
709
+ case gt:
710
+ An(e);
653
711
  break;
654
- case lt:
655
- jn(n, s);
712
+ case dt:
713
+ _n(n, c);
656
714
  break;
657
715
  default:
658
716
  if (a === 0 && t === 0) {
659
- M(
717
+ z(
660
718
  n,
661
- `Unsupported message received (${c}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`
719
+ `Unsupported message received (${r}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`
662
720
  );
663
721
  return;
664
722
  }
@@ -670,49 +728,52 @@ function Fn(e) {
670
728
  u(n, "Page hidden - ignored resize request");
671
729
  return;
672
730
  }
673
- se(e);
731
+ ce(e);
674
732
  }
675
733
  }
676
- const Bn = (e) => ({ initChild: t, postMessageTarget: n }) => {
734
+ const Kn = (e) => ({
735
+ initChild: t,
736
+ postMessageTarget: n
737
+ }) => {
677
738
  e === n && t();
678
- }, Wn = (e) => Object.values(i).forEach(Bn(e));
739
+ }, Qn = (e) => Object.values(i).forEach(Kn(e));
679
740
  function le(e) {
680
741
  const t = e.data;
681
- if (t === Xe) {
682
- Wn(e.source);
742
+ if (t === ot) {
743
+ Qn(e.source);
683
744
  return;
684
745
  }
685
- if (!ln(t)) {
686
- if (typeof t !== J) return;
687
- y(D, "ignoredMessage"), Ft(D, t);
746
+ if (!mn(t)) {
747
+ if (typeof t !== X) return;
748
+ b(V, "ignoredMessage"), Vt(V, t);
688
749
  return;
689
750
  }
690
- const n = rn(t), { id: o, type: r } = n;
691
- switch (y(o, r), !0) {
751
+ const n = hn(t), { id: o, type: s } = n;
752
+ switch (b(o, s), !0) {
692
753
  case !i[o]:
693
- throw new Error(`${r} No settings for ${o}. Message was: ${t}`);
694
- case !cn(n):
695
- case un(n):
696
- case !an(n, e):
754
+ throw new Error(`${s} No settings for ${o}. Message was: ${t}`);
755
+ case !gn(n):
756
+ case yn(n):
757
+ case !dn(n, e):
697
758
  return;
698
759
  default:
699
- i[o].lastMessage = e.data, Re(o, Fn)(n);
760
+ i[o].lastMessage = e.data, Ae(o, Xn)(n);
700
761
  }
701
762
  }
702
- const Hn = Ot(() => {
703
- j(window, R, le), j(document, "visibilitychange", tn), window.iframeParentListener = (e) => setTimeout(() => le({ data: e, sameOrigin: !0 }));
763
+ const eo = jt(() => {
764
+ N(window, A, le), N(document, "visibilitychange", ln), window.iframeParentListener = (e) => setTimeout(() => le({ data: e, sameOrigin: !0 }));
704
765
  }), ue = {};
705
- function Dn(e) {
766
+ function to(e) {
706
767
  if (ue[e] === !0) return !1;
707
768
  const t = document.querySelectorAll(`iframe#${CSS.escape(e)}`);
708
769
  if (t.length <= 1) return !0;
709
770
  ue[e] = !0;
710
771
  const n = Array.from(t).flatMap((o) => [
711
- P,
772
+ C,
712
773
  o,
713
- P
774
+ C
714
775
  ]);
715
- return b(
776
+ return m(
716
777
  e,
717
778
  `<rb>Duplicate ID attributes detected</>
718
779
 
@@ -720,198 +781,198 @@ The <b>${e}</> ID is not unique. Having multiple iframes on the same page with t
720
781
 
721
782
  Found <bb>${t.length}</> iframes with the <b>${e}</> ID:`,
722
783
  ...n,
723
- P
784
+ C
724
785
  ), !1;
725
786
  }
726
- const Gn = `<rb>Deprecated Method Name</>
787
+ const no = `<rb>Deprecated Method Name</>
727
788
 
728
- The <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${Oe}`, Un = `<rb>Deprecated Method</>
789
+ The <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${$e}`, oo = `<rb>Deprecated Method</>
729
790
 
730
791
  Use of the <b>resize()</> method from the parent page is deprecated and will be removed in a future version of <i>iframe-resizer</>. As there are no longer any edge cases that require triggering a resize from the parent page, it is recommended to remove this method from your code.`;
731
- function Vn(e) {
792
+ function io(e) {
732
793
  if (i[e]) {
733
794
  const { iframe: t } = i[e], n = {
734
- close: Ne.bind(null, t),
735
- disconnect: Pe.bind(null, t),
795
+ close: Fe.bind(null, t),
796
+ disconnect: _e.bind(null, t),
736
797
  moveToAnchor(o) {
737
- St(o, J, "moveToAnchor(anchor) anchor"), O("Move to anchor", `moveToAnchor:${o}`, e);
798
+ Nt(o, X, "moveToAnchor(anchor) anchor"), T("Move to anchor", `moveToAnchor:${o}`, e);
738
799
  },
739
800
  removeListeners() {
740
- b(e, Gn), this.disconnect();
801
+ m(e, no), this.disconnect();
741
802
  },
742
803
  resize() {
743
- b(e, Un), O("Window resize", Z, e);
804
+ m(e, oo), T("Window resize", Y, e);
744
805
  },
745
806
  sendMessage(o) {
746
- o = JSON.stringify(o), O(R, `${R}:${o}`, e);
807
+ o = JSON.stringify(o), T(A, `${A}:${o}`, e);
747
808
  }
748
809
  };
749
810
  t.iframeResizer = n, t.iFrameResizer = n;
750
811
  }
751
812
  }
752
- const qn = "8", Zn = "32", Jn = gt, Yn = !0;
753
- function Xn(e) {
813
+ const so = "8", ro = "32", co = zt, ao = !0;
814
+ function lo(e) {
754
815
  const {
755
816
  autoResize: t,
756
817
  bodyBackground: n,
757
818
  bodyMargin: o,
758
- bodyPadding: r,
759
- heightCalculationMethod: s,
760
- inPageLinks: c,
819
+ bodyPadding: s,
820
+ heightCalculationMethod: c,
821
+ inPageLinks: r,
761
822
  license: a,
762
823
  log: f,
763
- logExpand: p,
824
+ logExpand: h,
764
825
  mouseEvents: g,
765
- offsetHeight: w,
766
- offsetWidth: h,
767
- mode: z,
768
- sizeHeight: Ue,
826
+ offsetHeight: $,
827
+ offsetWidth: d,
828
+ mode: E,
829
+ sizeHeight: Xe,
769
830
  // sizeSelector,
770
- sizeWidth: Ve,
771
- tolerance: qe,
772
- widthCalculationMethod: Ze
831
+ sizeWidth: Ke,
832
+ tolerance: Qe,
833
+ widthCalculationMethod: et
773
834
  } = i[e];
774
835
  return [
775
836
  e,
776
- qn,
777
- Ve,
837
+ so,
838
+ Ke,
778
839
  f,
779
- Zn,
780
- Yn,
840
+ ro,
841
+ ao,
781
842
  t,
782
843
  o,
783
- s,
844
+ c,
784
845
  n,
846
+ s,
847
+ Qe,
785
848
  r,
786
- qe,
787
- c,
788
- Jn,
789
- Ze,
849
+ co,
850
+ et,
790
851
  g,
791
- w,
792
- h,
793
- Ue,
852
+ $,
853
+ d,
854
+ Xe,
794
855
  a,
795
- d.version,
796
- z,
856
+ p.version,
857
+ E,
797
858
  "",
798
859
  // sizeSelector,
799
- p
800
- ].join(S);
860
+ h
861
+ ].join(L);
801
862
  }
802
- const Kn = "0";
803
- function Qn(e) {
863
+ const uo = "0";
864
+ function fo(e) {
804
865
  const { bodyMargin: t } = i[e];
805
- (typeof t === mt || t === Kn) && (i[e].bodyMargin = `${t}px`);
866
+ (typeof t === Et || t === uo) && (i[e].bodyMargin = `${t}px`);
806
867
  }
807
- const eo = (e) => {
868
+ const ho = (e) => {
808
869
  try {
809
870
  return new URL(e).origin;
810
871
  } catch {
811
872
  return null;
812
873
  }
813
- }, to = (e) => typeof e === ye && e.length > 0 && !(e.contains("allow-scripts") && e.contains("allow-same-origin"));
814
- function no(e, t) {
874
+ }, po = (e) => typeof e === ve && e.length > 0 && !(e.contains("allow-scripts") && e.contains("allow-same-origin"));
875
+ function go(e, t) {
815
876
  const {
816
877
  checkOrigin: n,
817
- iframe: { src: o, sandbox: r },
818
- initialisedFirstPage: s,
819
- waitForLoad: c
820
- } = t[e], a = eo(o);
821
- y(e, "noResponse"), b(
878
+ iframe: { src: o, sandbox: s },
879
+ initialisedFirstPage: c,
880
+ waitForLoad: r
881
+ } = t[e], a = ho(o);
882
+ b(e, "noResponse"), m(
822
883
  e,
823
884
  `<rb>No response from iframe</>
824
885
 
825
886
  The iframe (<i>${e}</>) has not responded within ${t[e].warningTimeout / 1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.
826
887
  ${n && a ? `
827
888
  The <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${a}</>, then the connection to the iframe may be blocked by the browser. To disable this option, set <b>checkOrigin</> to <bb>false</> or an array of allowed origins. See <u>https://iframe-resizer.com/checkorigin</> for more information.
828
- ` : ""}${c && !s ? `
889
+ ` : ""}${r && !c ? `
829
890
  The <b>waitForLoad</> option is currently set to <bb>true</>. If the iframe loads before <i>iframe-resizer</> runs, this option will prevent <i>iframe-resizer</> initialising. To disable this option, set <b>waitForLoad</> to <bb>false</>.
830
- ` : ""}${to(r) ? `
891
+ ` : ""}${po(s) ? `
831
892
  The iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.
832
893
  ` : ""}
833
894
  This message can be ignored if everything is working, or you can set the <b>warningTimeout</> option to a higher value or zero to suppress this warning.
834
895
  `
835
896
  );
836
897
  }
837
- function oo(e, t) {
898
+ function mo(e, t) {
838
899
  function n() {
839
900
  if (t[e] === void 0) return;
840
- const { initialised: s, loadErrorShown: c } = t[e];
841
- if (t[e].msgTimeout = void 0, s) {
901
+ const { initialised: c, loadErrorShown: r } = t[e];
902
+ if (t[e].msgTimeout = void 0, c) {
842
903
  t[e].initialisedFirstPage = !0;
843
904
  return;
844
905
  }
845
- c || (t[e].loadErrorShown = !0, no(e, t));
906
+ r || (t[e].loadErrorShown = !0, go(e, t));
846
907
  }
847
- const { msgTimeout: o, warningTimeout: r } = t[e];
848
- r && (o && clearTimeout(o), t[e].msgTimeout = setTimeout(n, r));
908
+ const { msgTimeout: o, warningTimeout: s } = t[e];
909
+ s && (o && clearTimeout(o), t[e].msgTimeout = setTimeout(n, s));
849
910
  }
850
- const io = 1, ro = (e) => e.loading === tt, so = (e) => e === $;
851
- function co(e) {
852
- i[e]?.heightCalculationMethod in vt && Ce({
911
+ const yo = 1, bo = (e) => e.loading === ct, vo = (e) => e === j;
912
+ function wo(e) {
913
+ i[e]?.heightCalculationMethod in kt && Be({
853
914
  id: e,
854
915
  iframe: i[e].iframe,
855
- height: Q,
856
- width: Q,
857
- type: $
916
+ height: ee,
917
+ width: ee,
918
+ type: j
858
919
  });
859
920
  }
860
- function ao(e, t) {
861
- j(e, W, () => setTimeout(t, io));
921
+ function zo(e, t) {
922
+ N(e, G, () => setTimeout(t, yo));
862
923
  }
863
- const lo = (e) => {
924
+ const Eo = (e) => {
864
925
  const { src: t, srcdoc: n } = e;
865
926
  return !n && (t == null || t === "" || t === "about:blank");
866
927
  };
867
- function uo(e, t) {
928
+ function Oo(e, t) {
868
929
  const { iframe: n, waitForLoad: o } = i[e];
869
930
  if (o !== !0) {
870
- if (lo(n)) {
931
+ if (Eo(n)) {
871
932
  setTimeout(() => {
872
- y(e, "noContent"), m(e, "No content detected in the iframe, delaying initialisation");
933
+ b(e, "noContent"), y(e, "No content detected in the iframe, delaying initialisation");
873
934
  });
874
935
  return;
875
936
  }
876
937
  setTimeout(t);
877
938
  }
878
939
  }
879
- function fo(e, t) {
880
- const n = (r) => () => {
940
+ function To(e, t) {
941
+ const n = (s) => () => {
881
942
  if (!i[e]) return;
882
- const { firstRun: s, iframe: c } = i[e];
883
- O(r, t, e), so(r) && ro(c) || oo(e, i), s || co(e);
943
+ const { firstRun: c, iframe: r } = i[e];
944
+ T(s, t, e), vo(s) && bo(r) || mo(e, i), c || wo(e);
884
945
  }, { iframe: o } = i[e];
885
- i[e].initChild = n(he), ao(o, n(ge)), uo(e, n($));
946
+ i[e].initChild = n(de), zo(o, n(me)), Oo(e, n(j));
886
947
  }
887
- function po(e, t) {
888
- return t ? (("sizeWidth" in t || "sizeHeight" in t || de in t) && b(
948
+ function Io(e, t) {
949
+ return t ? (("sizeWidth" in t || "sizeHeight" in t || ge in t) && m(
889
950
  e,
890
951
  `<rb>Deprecated Option</>
891
952
 
892
- The <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${F}</>, <bb>${Ee}</>, <bb>${ze}</> or <bb>${we}</>.
953
+ The <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${D}</>, <bb>${Oe}</>, <bb>${Ee}</> or <bb>${ze}</>.
893
954
  `
894
955
  ), t) : {};
895
956
  }
896
- function ho(e) {
897
- i[e].warningTimeout || m(e, "warningTimeout:%c disabled", l);
957
+ function ko(e) {
958
+ i[e].warningTimeout || y(e, "warningTimeout:%c disabled", l);
898
959
  }
899
- function go(e, { offset: t, offsetSize: n }) {
960
+ function $o(e, { offset: t, offsetSize: n }) {
900
961
  const o = n || t;
901
- o && (i[e].direction === F ? (i[e].offsetHeight = o, u(e, `Offset height: %c${o}`, l)) : (i[e].offsetWidth = o, u(e, `Offset width: %c${o}`, l)));
962
+ o && (i[e].direction === D ? (i[e].offsetHeight = o, u(e, `Offset height: %c${o}`, l)) : (i[e].offsetWidth = o, u(e, `Offset width: %c${o}`, l)));
902
963
  }
903
- function mo(e) {
964
+ function Mo(e) {
904
965
  const { direction: t } = i[e];
905
966
  switch (t) {
906
- case F:
967
+ case D:
907
968
  break;
908
- case Ee:
969
+ case Oe:
909
970
  i[e].sizeHeight = !1;
910
971
  // eslint-disable-next-line no-fallthrough
911
- case ze:
972
+ case Ee:
912
973
  i[e].sizeWidth = !0;
913
974
  break;
914
- case we:
975
+ case ze:
915
976
  i[e].sizeWidth = !1, i[e].sizeHeight = !1, i[e].autoResize = !1;
916
977
  break;
917
978
  default:
@@ -919,84 +980,92 @@ function mo(e) {
919
980
  }
920
981
  u(e, `direction: %c${t}`, l);
921
982
  }
922
- const bo = (e) => e === "" || e.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : e;
923
- function yo(e) {
924
- i[e].targetOrigin = i[e].checkOrigin === !0 ? bo(i[e].remoteHost) : "*";
983
+ const fe = (e) => e === "" || e.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : e;
984
+ function So(e) {
985
+ const { checkOrigin: t, remoteHost: n } = i[e];
986
+ Array.isArray(t) && t.length === 0 && z(
987
+ e,
988
+ "checkOrigin is an empty array — no messages will be sent to the iframe"
989
+ ), i[e].targetOrigin = Array.isArray(t) ? t.map(fe) : [t === !1 ? "*" : fe(n)];
925
990
  }
926
- function vo(e) {
991
+ function jo(e) {
927
992
  const { id: t } = e;
928
993
  i[t].postMessageTarget === null && (i[t].postMessageTarget = e.contentWindow);
929
994
  }
930
- function B(e, t, n) {
931
- k(i[e], t) && (b(
995
+ function H(e, t, n) {
996
+ P(i[e], t) && (m(
932
997
  e,
933
998
  `<rb>Deprecated option</>
934
999
 
935
- The <b>${t}</> option has been renamed to <b>${n}</>. ${Oe}`
1000
+ The <b>${t}</> option has been renamed to <b>${n}</>. ${$e}`
936
1001
  ), i[e][n] = i[e][t], delete i[e][t]);
937
1002
  }
938
- function wo(e) {
939
- B(e, pt, dt), B(e, "onClose", "onBeforeClose"), B(e, "onClosed", "onAfterClose");
1003
+ function Ro(e) {
1004
+ H(e, bt, vt), H(e, "onClose", "onBeforeClose"), H(e, "onClosed", "onAfterClose");
940
1005
  }
941
- const zo = (e) => k(e, "onMouseEnter") || k(e, "onMouseLeave");
942
- function Eo(e, t) {
1006
+ const Lo = (e) => P(e, "onMouseEnter") || P(e, "onMouseLeave");
1007
+ function Ao(e, t) {
943
1008
  const { id: n } = e;
944
1009
  i[n] = {
945
1010
  ...i[n],
946
1011
  iframe: e,
947
1012
  remoteHost: e?.src.split("/").slice(0, 3).join("/"),
948
- ..._,
949
- ...po(n, t),
950
- mouseEvents: zo(t),
951
- mode: Nn(t),
952
- syncTitle: kn(n)
953
- }, wo(n), mo(n), go(n, t), ho(n), vo(e), yo(n);
954
- }
955
- const Oo = "yes", fe = "no", To = "omit";
956
- function Io(e) {
1013
+ ...B,
1014
+ ...Io(n, t),
1015
+ mouseEvents: Lo(t),
1016
+ mode: qn(t),
1017
+ syncTitle: xn(n)
1018
+ }, Ro(n), Mo(n), $o(n, t), ko(n), jo(e), So(n);
1019
+ }
1020
+ const Po = "yes", he = "no";
1021
+ function No(e) {
957
1022
  const { id: t } = e;
958
1023
  switch (u(
959
1024
  t,
960
1025
  `Iframe scrolling ${i[t]?.scrolling ? "enabled" : "disabled"} for ${t}`
961
- ), e.style.overflow = i[t]?.scrolling === !1 ? ht : G, i[t]?.scrolling) {
962
- case To:
1026
+ ), e.style.overflow = i[t]?.scrolling === !1 ? wt : q, i[t]?.scrolling) {
1027
+ case Tt:
963
1028
  break;
964
1029
  case !0:
965
- e.scrolling = Oo;
1030
+ e.scrolling = Po;
966
1031
  break;
967
1032
  case !1:
968
- e.scrolling = fe;
1033
+ e.scrolling = he;
969
1034
  break;
970
1035
  default:
971
- e.scrolling = i[t]?.scrolling || fe;
1036
+ e.scrolling = i[t]?.scrolling || he;
972
1037
  }
973
1038
  }
974
- function Mo(e, t, n) {
975
- Eo(t, n), u(e, `src: %c${t.srcdoc || t.src}`, l), Cn(e), Io(t), Qn(e), fo(e, Xn(e)), Vn(e), u(e, "Setup complete");
1039
+ function Co(e, t, n) {
1040
+ Ao(t, n), u(e, `src: %c${t.srcdoc || t.src}`, l), Zn(e), No(t), fo(e), To(e, lo(e)), io(e), u(e, "Setup complete");
976
1041
  }
977
- function $o(e, t) {
1042
+ function xo(e, t) {
978
1043
  const { id: n } = e;
979
- y(n, "setup"), Dn(n) && Mo(n, e, t), Ht(n);
1044
+ b(n, "setup"), to(n) && Co(n, e, t), Jt(n);
980
1045
  }
981
- function So(e, t) {
982
- const n = k(t, "log"), o = X(t.log), r = n ? o ? !0 : t.log : _.log;
983
- k(t, "logExpand") || (t.logExpand = n && o ? t.log === V : _.logExpand), xn(t), _t({
984
- enabled: r,
1046
+ function _o(e, t) {
1047
+ t.log === Te ? t.log = !1 : t.log === Ie ? t.log = S : t.log === ke && (t.log = M);
1048
+ const n = P(t, "log"), o = K(t.log), s = n ? o ? !0 : t.log : B.log;
1049
+ P(t, "logExpand") || (t.logExpand = n && o ? t.log === M : B.logExpand), Jn(t), Ut({
1050
+ enabled: s,
985
1051
  expand: t.logExpand,
986
1052
  iframeId: e
987
- }), o && !(t.log in wt) && Bt(
1053
+ }), o && !(t.log in $t) && qt(
988
1054
  e,
989
- `Invalid value for options.log: Accepted values are "${V}" and "${Y}"`
990
- ), t.log = r;
991
- }
992
- function ko(e) {
993
- if (!Te(e)) throw new TypeError("Options is not an object");
994
- return Hn(), Xt(e), (t) => {
995
- const n = Yt(t, e);
996
- return pe in t ? (y(n, "alreadySetup"), M(n, `Ignored iframe (${n}), already setup.`)) : (So(n, e), Re(n, $o)(t, e)), t?.iframeResizer;
1055
+ `Invalid value for options.log: Accepted values are "${M}" and "${S}"`
1056
+ ), t.log = s;
1057
+ }
1058
+ function Bo(e) {
1059
+ if (!Me(e)) throw new TypeError("Options is not an object");
1060
+ return eo(), sn(e), (t) => {
1061
+ const n = on(t, e);
1062
+ return pe in t ? (b(n, "alreadySetup"), z(n, `Ignored iframe (${n}), already setup.`)) : (_o(n, e), Ae(n, xo)(t, e)), t?.iframeResizer;
997
1063
  };
998
1064
  }
999
1065
  export {
1000
- ko as default
1066
+ Ie as LOG_COLLAPSED,
1067
+ Te as LOG_DISABLED,
1068
+ ke as LOG_EXPANDED,
1069
+ Bo as default
1001
1070
  };
1002
1071
  //# sourceMappingURL=index.esm.js.map