@iframe-resizer/child 6.0.0-beta.4 → 6.0.0-beta.5
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 +1 -1
- package/index.cjs.js +11 -11
- package/index.cjs.js.map +1 -1
- package/index.esm.js +144 -148
- package/index.esm.js.map +1 -1
- package/index.umd.js +11 -11
- package/index.umd.js.map +1 -1
- package/package.json +2 -2
package/index.esm.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { LABEL as Ne, BOLD as
|
|
2
|
-
import
|
|
3
|
-
import xn from "@iframe-resizer/common/format-advise";
|
|
4
|
-
import { esModuleInterop as Fn, id as ie, isDef as ne, isolateUserCode as he, once as Ut, round as C, lower as Hn, invoke as Vn, capitalizeFirstLetter as Gn, typeAssert as T, getElementName as Un } from "@iframe-resizer/common/utils";
|
|
5
|
-
import Wn, { NORMAL as q, HIGHLIGHT as c, FOREGROUND as w, BOLD as ot, ITALIC as qn } from "auto-console-group";
|
|
6
|
-
import rt, { getModeData as I, getModeLabel as Zn, checkMode as Be, getKey as st } from "@iframe-resizer/common/mode";
|
|
1
|
+
import { esModuleInterop as vn, LABEL as Ne, createFormatAdvise as En, id as se, deprecate as On, BOLD as yn, CHILD_READY_MESSAGE as Sn, MESSAGE_ID as Re, MESSAGE_ID_LENGTH as zt, SEPARATOR as fe, AUTO as ie, NONE as Le, IGNORE_ATTR as j, isDef as ne, setMode as et, getModeData as I, VERSION as Y, getModeLabel as Rn, isolateUserCode as ue, READY_STATE_CHANGE as $t, SIZE_ATTR as Ce, FALSE as Mn, once as It, checkMode as Pe, round as C, INIT as ge, MOUSE_ENTER as Tn, MOUSE_LEAVE as zn, lower as $n, PAGE_HIDE as At, invoke as In, BEFORE_UNLOAD as An, MIN_SIZE as W, HEIGHT as me, IGNORE_TAGS as kt, capitalizeFirstLetter as kn, HEIGHT_EDGE as _e, WIDTH as Nt, WIDTH_EDGE as Lt, NO_CHANGE as tt, VISIBILITY_OBSERVER as Ct, RESIZE_OBSERVER as Pt, MUTATION_OBSERVER as _t, OVERFLOW_OBSERVER as De, SET_OFFSET_SIZE as Dt, PARENT_RESIZE_REQUEST as Bt, MANUAL_RESIZE_REQUEST as xt, SIZE_CHANGE_DETECTED as nt, ENABLE as Me, IGNORE_DISABLE_RESIZE as we, HEIGHT_CALC_MODE_DEFAULT as Nn, typeAssert as T, BOOLEAN as Ln, AUTO_RESIZE as Cn, STRING as he, NUMBER as P, FUNCTION as Be, PARENT_INFO as Ft, PARENT_INFO_STOP as Pn, SCROLL_BY as _n, SCROLL_TO as Dn, SCROLL_TO_OFFSET as Ht, MESSAGE as Te, CLOSE as Bn, NEW_LINE as Vt, OVERFLOW_ATTR as Gt, getElementName as xn, TITLE as Fn, NULL as Hn, EVENT_CANCEL_TIMER as Ut, IN_PAGE_LINK as Vn, OBJECT as Gn, getKey as ot, OFFSET_SIZE as rt, PAGE_INFO as Un, UNDEFINED as Wn } from "@iframe-resizer/common";
|
|
2
|
+
import qn, { NORMAL as q, HIGHLIGHT as c, FOREGROUND as w, BOLD as st, ITALIC as Zn } from "auto-console-group";
|
|
7
3
|
let xe = !0, it = Ne;
|
|
8
|
-
const jn =
|
|
4
|
+
const jn = vn(qn), Z = jn({
|
|
9
5
|
label: `${Ne}(child)`,
|
|
10
6
|
expand: !1
|
|
11
7
|
});
|
|
@@ -14,21 +10,21 @@ function Yn(e) {
|
|
|
14
10
|
}
|
|
15
11
|
const Wt = (e) => (...t) => xe ? Z[e](...t) : !0, a = Wt("log"), l = a, ce = Wt("debug");
|
|
16
12
|
function Qn(e, t) {
|
|
17
|
-
console.info(`%ciframe-resizer ${e}`, xe || t < 1 ?
|
|
13
|
+
console.info(`%ciframe-resizer ${e}`, xe || t < 1 ? yn : q);
|
|
18
14
|
}
|
|
19
15
|
const {
|
|
20
16
|
assert: Jn,
|
|
21
17
|
endAutoGroup: _,
|
|
22
18
|
error: qt,
|
|
23
19
|
errorBoundary: Fe,
|
|
24
|
-
event:
|
|
25
|
-
label:
|
|
26
|
-
purge:
|
|
20
|
+
event: m,
|
|
21
|
+
label: Zs,
|
|
22
|
+
purge: js,
|
|
27
23
|
warn: x
|
|
28
|
-
} = Z, Zt =
|
|
24
|
+
} = Z, Zt = En(se), O = (...e) => Z.warn(...e.map(Zt)), Kn = (...e) => (
|
|
29
25
|
// eslint-disable-next-line no-console
|
|
30
26
|
console.warn(...e.map(Zt))
|
|
31
|
-
), He =
|
|
27
|
+
), He = On((e, t) => O(t));
|
|
32
28
|
He("Method");
|
|
33
29
|
He("Method", "replaced with");
|
|
34
30
|
He("Option");
|
|
@@ -67,12 +63,12 @@ let ct = !1;
|
|
|
67
63
|
function at(e) {
|
|
68
64
|
const t = window?.iframeResizer?.targetOrigin || "*", n = Array.isArray(t) ? t : [t];
|
|
69
65
|
for (const o of n)
|
|
70
|
-
e.postMessage(
|
|
66
|
+
e.postMessage(Sn, o);
|
|
71
67
|
}
|
|
72
68
|
function dt() {
|
|
73
69
|
if (document.readyState === "loading" || !s.firstRun || ct) return;
|
|
74
70
|
const { parent: e, top: t } = window;
|
|
75
|
-
|
|
71
|
+
m("ready"), a(
|
|
76
72
|
"Sending%c ready%c to parent from",
|
|
77
73
|
c,
|
|
78
74
|
w,
|
|
@@ -80,7 +76,7 @@ function dt() {
|
|
|
80
76
|
), at(e), e !== t && at(t), ct = !0;
|
|
81
77
|
}
|
|
82
78
|
const lt = "iframeResize", Xn = (e) => Re === `${e.data}`.slice(0, zt), eo = () => lt in window || // @ts-ignore
|
|
83
|
-
window.jQuery !== void 0 && lt in window.jQuery.prototype, to = (e) => e.data.split(fe)[2] in { true: 1, false: 1 }, no = () => [document.documentElement, document.body], oo = ["min-height", "min-width", "max-height", "max-width"], ft = /* @__PURE__ */ new Set(), ro = (e) => !!e && e !== "0px" && e !==
|
|
79
|
+
window.jQuery !== void 0 && lt in window.jQuery.prototype, to = (e) => e.data.split(fe)[2] in { true: 1, false: 1 }, no = () => [document.documentElement, document.body], oo = ["min-height", "min-width", "max-height", "max-width"], ft = /* @__PURE__ */ new Set(), ro = (e) => !!e && e !== "0px" && e !== ie && e !== Le, Qt = (e) => e.tagName ? e.tagName.toLowerCase() : "unknown", Jt = (e, t) => window.getComputedStyle(e).getPropertyValue(t), so = (e, t) => ro(Jt(e, t));
|
|
84
80
|
function io(e, t) {
|
|
85
81
|
const n = e.style.getPropertyValue(t);
|
|
86
82
|
return n ? { source: "an inline style attribute", value: n } : null;
|
|
@@ -126,7 +122,7 @@ function uo() {
|
|
|
126
122
|
for (const t of oo)
|
|
127
123
|
a(`Checking <${Qt(e)}> for blocking CSS: ${t}`), so(e, t) && fo(e, t);
|
|
128
124
|
}
|
|
129
|
-
const
|
|
125
|
+
const go = ({
|
|
130
126
|
calculateWidth: e,
|
|
131
127
|
calculateHeight: t
|
|
132
128
|
}) => e === t, i = {
|
|
@@ -138,7 +134,7 @@ const mo = ({
|
|
|
138
134
|
bodyPadding: "",
|
|
139
135
|
calculateHeight: !0,
|
|
140
136
|
calculateWidth: !1,
|
|
141
|
-
heightCalcMode:
|
|
137
|
+
heightCalcMode: ie,
|
|
142
138
|
ignoreSelector: "",
|
|
143
139
|
inPageLinks: !1,
|
|
144
140
|
logging: !1,
|
|
@@ -151,7 +147,7 @@ const mo = ({
|
|
|
151
147
|
sizeSelector: "",
|
|
152
148
|
targetOrigin: "*",
|
|
153
149
|
tolerance: 0,
|
|
154
|
-
widthCalcMode:
|
|
150
|
+
widthCalcMode: ie,
|
|
155
151
|
onBeforeResize: void 0,
|
|
156
152
|
onMessage: () => {
|
|
157
153
|
x("onMessage function not defined");
|
|
@@ -159,7 +155,7 @@ const mo = ({
|
|
|
159
155
|
onReady: () => {
|
|
160
156
|
}
|
|
161
157
|
};
|
|
162
|
-
function
|
|
158
|
+
function mo() {
|
|
163
159
|
try {
|
|
164
160
|
s.sameOrigin = i.mode === 1 || "iframeParentListener" in window.parent;
|
|
165
161
|
} catch {
|
|
@@ -171,9 +167,9 @@ function ho(e) {
|
|
|
171
167
|
const t = e.length === 1 ? "" : "s";
|
|
172
168
|
x(
|
|
173
169
|
`%c[${j}]%c found on %c${e.length}%c element${t}`,
|
|
174
|
-
|
|
170
|
+
st,
|
|
175
171
|
q,
|
|
176
|
-
|
|
172
|
+
st,
|
|
177
173
|
q
|
|
178
174
|
);
|
|
179
175
|
}
|
|
@@ -182,7 +178,7 @@ function po() {
|
|
|
182
178
|
return t && e.length !== ut && (ho(e), ut = e.length), t;
|
|
183
179
|
}
|
|
184
180
|
function bo(e, t, n) {
|
|
185
|
-
(!ne(n) || t > -1 && e > t) && (Qn(`v${Y} (${
|
|
181
|
+
(!ne(n) || t > -1 && e > t) && (Qn(`v${Y} (${Rn(e)})`, e), e === 0 && Kn(I(3)));
|
|
186
182
|
}
|
|
187
183
|
function wo({
|
|
188
184
|
key: e,
|
|
@@ -190,7 +186,7 @@ function wo({
|
|
|
190
186
|
mode: n,
|
|
191
187
|
version: o
|
|
192
188
|
}) {
|
|
193
|
-
const r = n, f = ne(e) ?
|
|
189
|
+
const r = n, f = ne(e) ? et({ key: e }) : -1, d = ne(t) ? et({ key: t }) : -1;
|
|
194
190
|
let u;
|
|
195
191
|
switch (n = Math.max(f, d), n) {
|
|
196
192
|
case -2:
|
|
@@ -223,13 +219,13 @@ function Oo() {
|
|
|
223
219
|
document.compatMode === vo && O(Eo);
|
|
224
220
|
}
|
|
225
221
|
const yo = "complete";
|
|
226
|
-
let
|
|
222
|
+
let gt = !1;
|
|
227
223
|
function Kt(e) {
|
|
228
|
-
document.readyState === yo ?
|
|
224
|
+
document.readyState === yo ? ue(e) : gt || N(
|
|
229
225
|
document,
|
|
230
226
|
$t,
|
|
231
227
|
() => Kt(e)
|
|
232
|
-
),
|
|
228
|
+
), gt = !0;
|
|
233
229
|
}
|
|
234
230
|
const So = () => {
|
|
235
231
|
l(`Set targetOrigin for parent: %c${i.targetOrigin}`, c), i.autoResize !== !0 && a("Auto Resize disabled");
|
|
@@ -249,12 +245,12 @@ The parent and child pages are running different versions of <i>iframe resizer</
|
|
|
249
245
|
Parent page: ${e} - Child page: ${Y}.
|
|
250
246
|
`;
|
|
251
247
|
function To({ version: e }) {
|
|
252
|
-
!e || e === "" || e ===
|
|
248
|
+
!e || e === "" || e === Mn ? O(Ro) : e !== Y && O(Mo(e));
|
|
253
249
|
}
|
|
254
|
-
const zo =
|
|
250
|
+
const zo = It(() => O(I(4)));
|
|
255
251
|
function $o(e) {
|
|
256
252
|
if (!s.timerActive) return;
|
|
257
|
-
const t = C(performance.now() - s.totalTime), n = e ===
|
|
253
|
+
const t = C(performance.now() - s.totalTime), n = e === ge ? `Initialised iframe in %c${t}ms` : `Size calculated in %c${t}ms`;
|
|
258
254
|
a(n, c);
|
|
259
255
|
}
|
|
260
256
|
function Io(e) {
|
|
@@ -266,7 +262,7 @@ function Ao(e, t) {
|
|
|
266
262
|
try {
|
|
267
263
|
window.parent.iframeParentListener(Re + e);
|
|
268
264
|
} catch (f) {
|
|
269
|
-
if (
|
|
265
|
+
if (Pe(n)) zo();
|
|
270
266
|
else throw new Error(f);
|
|
271
267
|
return !1;
|
|
272
268
|
}
|
|
@@ -282,28 +278,28 @@ function en(e, t, n, o, r) {
|
|
|
282
278
|
const { parentId: f } = i, { sameOrigin: d } = s, u = `${e}:${t}`, b = `${f}:${u}:${n}${o === void 0 ? "" : `:${o}`}`;
|
|
283
279
|
i.mode < -1 || !Ao(b, r) || ($o(n), l(
|
|
284
280
|
`Sending message to parent page via ${d ? "sameOrigin" : "postMessage"}: %c%c${b}`,
|
|
285
|
-
|
|
281
|
+
Zn,
|
|
286
282
|
c
|
|
287
283
|
));
|
|
288
284
|
}
|
|
289
285
|
const v = Fe(
|
|
290
286
|
(e, t, n, o, r) => {
|
|
291
|
-
|
|
287
|
+
m(n), en(e, t, n, o, r), _();
|
|
292
288
|
}
|
|
293
289
|
), ko = (e) => v(0, 0, e.type, `${e.screenY}:${e.screenX}`);
|
|
294
|
-
function
|
|
290
|
+
function mt(e, t) {
|
|
295
291
|
a(`Add event listener: %c${t}`, c), N(window.document, e, ko);
|
|
296
292
|
}
|
|
297
293
|
function No({
|
|
298
294
|
mouseEvents: e
|
|
299
295
|
}) {
|
|
300
|
-
e === !0 && (
|
|
296
|
+
e === !0 && (mt(Tn, "Mouse Enter"), mt(zn, "Mouse Leave"));
|
|
301
297
|
}
|
|
302
|
-
const Lo = () => v(0, 0,
|
|
298
|
+
const Lo = () => v(0, 0, An);
|
|
303
299
|
function Co({ persisted: e }) {
|
|
304
|
-
e || Lo(),
|
|
300
|
+
e || Lo(), m(At), l("Page persisted:", e), !e && Ve.forEach(In);
|
|
305
301
|
}
|
|
306
|
-
const Po = () => N(window,
|
|
302
|
+
const Po = () => N(window, $n(At), Co), ht = (e, t) => !(Math.abs(e - t) <= i.tolerance);
|
|
307
303
|
function _o(e, t) {
|
|
308
304
|
const { calculateHeight: n, calculateWidth: o } = i, { height: r, width: f } = s;
|
|
309
305
|
return n && ht(r, e) || o && ht(f, t);
|
|
@@ -324,11 +320,11 @@ function Do(e) {
|
|
|
324
320
|
}
|
|
325
321
|
const Bo = (e) => e.documentElementScroll() + Math.max(0, e.getOffset());
|
|
326
322
|
function tn(e) {
|
|
327
|
-
const { hasOverflow: t, hasTags: n, triggerLocked: o } = s, r = e.label, f = r === me, d = e.boundingClientRect(), u = Math.ceil(d), b = Math.floor(d),
|
|
323
|
+
const { hasOverflow: t, hasTags: n, triggerLocked: o } = s, r = e.label, f = r === me, d = e.boundingClientRect(), u = Math.ceil(d), b = Math.floor(d), g = Bo(e), E = `HTML: %c${d}px %cPage: %c${g}px`;
|
|
328
324
|
let h;
|
|
329
325
|
switch (!0) {
|
|
330
326
|
case !e.enabled():
|
|
331
|
-
return Math.max(
|
|
327
|
+
return Math.max(g, W);
|
|
332
328
|
case n:
|
|
333
329
|
l("Found element with data-iframe-size attribute"), h = e.taggedElement();
|
|
334
330
|
break;
|
|
@@ -336,23 +332,23 @@ function tn(e) {
|
|
|
336
332
|
l(`Initial page size values: ${E}`, ...A), h = D(
|
|
337
333
|
r,
|
|
338
334
|
d,
|
|
339
|
-
|
|
335
|
+
g
|
|
340
336
|
);
|
|
341
337
|
break;
|
|
342
|
-
case (o && d === B[r] &&
|
|
343
|
-
l(`Size unchanged: ${E}`, ...A), h = Math.max(d,
|
|
338
|
+
case (o && d === B[r] && g === oe[r]):
|
|
339
|
+
l(`Size unchanged: ${E}`, ...A), h = Math.max(d, g);
|
|
344
340
|
break;
|
|
345
|
-
case (d === 0 &&
|
|
346
|
-
l(`Page is hidden: ${E}`, ...A), h =
|
|
341
|
+
case (d === 0 && g !== 0):
|
|
342
|
+
l(`Page is hidden: ${E}`, ...A), h = g;
|
|
347
343
|
break;
|
|
348
|
-
case (!t && d !== B[r] &&
|
|
344
|
+
case (!t && d !== B[r] && g <= oe[r]):
|
|
349
345
|
l(`New <html> size: ${E} `, ...A), l(
|
|
350
346
|
`Previous <html> size: %c${B[r]}px`,
|
|
351
347
|
c
|
|
352
348
|
), h = D(
|
|
353
349
|
r,
|
|
354
350
|
d,
|
|
355
|
-
|
|
351
|
+
g
|
|
356
352
|
);
|
|
357
353
|
break;
|
|
358
354
|
case !f:
|
|
@@ -362,21 +358,21 @@ function tn(e) {
|
|
|
362
358
|
l(`<html> size decreased: ${E}`, ...A), h = D(
|
|
363
359
|
r,
|
|
364
360
|
d,
|
|
365
|
-
|
|
361
|
+
g
|
|
366
362
|
);
|
|
367
363
|
break;
|
|
368
|
-
case (
|
|
364
|
+
case (g === b || g === u):
|
|
369
365
|
l(`<html> size equals page size: ${E}`, ...A), h = D(
|
|
370
366
|
r,
|
|
371
367
|
d,
|
|
372
|
-
|
|
368
|
+
g
|
|
373
369
|
);
|
|
374
370
|
break;
|
|
375
|
-
case d >
|
|
371
|
+
case d > g:
|
|
376
372
|
l(`Page size < <html> size: ${E}`, ...A), h = D(
|
|
377
373
|
r,
|
|
378
374
|
d,
|
|
379
|
-
|
|
375
|
+
g
|
|
380
376
|
);
|
|
381
377
|
break;
|
|
382
378
|
case t:
|
|
@@ -386,7 +382,7 @@ function tn(e) {
|
|
|
386
382
|
l(`Using <html> size: ${E}`, ...A), h = D(
|
|
387
383
|
r,
|
|
388
384
|
d,
|
|
389
|
-
|
|
385
|
+
g
|
|
390
386
|
);
|
|
391
387
|
}
|
|
392
388
|
return l(`Content ${r}: %c${h}px`, c), h += Do(e), Math.max(h, W);
|
|
@@ -407,7 +403,7 @@ function Uo() {
|
|
|
407
403
|
p.reduce((n, o) => n + o, 0) / p.length,
|
|
408
404
|
p[Math.floor(p.length / 2)]
|
|
409
405
|
), t = C(e);
|
|
410
|
-
t > pt && (pt = t,
|
|
406
|
+
t > pt && (pt = t, m("performanceObserver"), a("Mean time:", C(p[Math.floor(p.length / 2)])), a(
|
|
411
407
|
"Median time:",
|
|
412
408
|
C(p.reduce((n, o) => n + o, 0) / p.length)
|
|
413
409
|
), a("Average time:", t), a("Max time:", C(Math.max(...p)))), on(), !(e <= Ho) && (clearInterval(ze), O(
|
|
@@ -442,7 +438,7 @@ function qo() {
|
|
|
442
438
|
}
|
|
443
439
|
};
|
|
444
440
|
}
|
|
445
|
-
const Zo = (e) => `:not(${e})`, jo = `* ${Array.from(
|
|
441
|
+
const Zo = (e) => `:not(${e})`, jo = `* ${Array.from(kt).map(Zo).join("")}`, Ue = (e) => e.querySelectorAll(jo);
|
|
446
442
|
function Yo() {
|
|
447
443
|
const { hasOverflow: e, hasTags: t, overflowedNodeSet: n, taggedElements: o } = s;
|
|
448
444
|
return t ? o : e ? Array.from(n) : Ue(document.documentElement);
|
|
@@ -456,7 +452,7 @@ function Qo(e, t) {
|
|
|
456
452
|
}
|
|
457
453
|
function rn(e) {
|
|
458
454
|
performance.mark(Ge);
|
|
459
|
-
const t =
|
|
455
|
+
const t = kn(e), { logging: n } = i, { hasTags: o } = s, r = Yo(), { maxEl: f, maxVal: d } = Qo(r, e);
|
|
460
456
|
return l(`${t} position calculated from:`, f), l(`Checked %c${r.length}%c elements`, c, w), performance.mark(ae, {
|
|
461
457
|
detail: {
|
|
462
458
|
hasTags: o,
|
|
@@ -476,9 +472,9 @@ const We = {
|
|
|
476
472
|
document.body.getBoundingClientRect().bottom
|
|
477
473
|
),
|
|
478
474
|
documentElementScroll: () => document.documentElement.scrollHeight,
|
|
479
|
-
taggedElement: () => rn(
|
|
475
|
+
taggedElement: () => rn(_e)
|
|
480
476
|
}, qe = {
|
|
481
|
-
label:
|
|
477
|
+
label: Nt,
|
|
482
478
|
enabled: () => i.calculateWidth,
|
|
483
479
|
getOffset: () => i.offsetWidth,
|
|
484
480
|
auto: () => tn(qe),
|
|
@@ -487,7 +483,7 @@ const We = {
|
|
|
487
483
|
document.body.getBoundingClientRect().right
|
|
488
484
|
),
|
|
489
485
|
documentElementScroll: () => document.documentElement.scrollWidth,
|
|
490
|
-
taggedElement: () => rn(
|
|
486
|
+
taggedElement: () => rn(Lt)
|
|
491
487
|
};
|
|
492
488
|
function Jo(e, t, n) {
|
|
493
489
|
const o = i.onBeforeResize(e, t, n);
|
|
@@ -508,41 +504,41 @@ function Jo(e, t, n) {
|
|
|
508
504
|
const sn = (e, t) => (n, o) => {
|
|
509
505
|
const r = e[n]();
|
|
510
506
|
return e.enabled() && i.onBeforeResize !== void 0 ? Jo(r, o, t) : r;
|
|
511
|
-
}, Ko = sn(We, me), Xo = sn(qe,
|
|
507
|
+
}, Ko = sn(We, me), Xo = sn(qe, Nt);
|
|
512
508
|
function er() {
|
|
513
509
|
(window.scrollY !== 0 || window.scrollX !== 0) && (l("Reset iframe scroll position to (0, 0)"), window.scrollTo(0, 0));
|
|
514
510
|
}
|
|
515
511
|
function tr(e, t, n, o) {
|
|
516
512
|
const { heightCalcMode: r, widthCalcMode: f } = i;
|
|
517
513
|
er();
|
|
518
|
-
const d = n ?? Ko(r, e), u = o ?? Xo(f, e), b = _o(d, u) ?
|
|
514
|
+
const d = n ?? Ko(r, e), u = o ?? Xo(f, e), b = _o(d, u) ? nt : e;
|
|
519
515
|
switch (a(`Resize event: %c${t}`, c), b) {
|
|
520
|
-
case
|
|
516
|
+
case ge:
|
|
521
517
|
case Me:
|
|
522
|
-
case
|
|
518
|
+
case nt:
|
|
519
|
+
case xt:
|
|
523
520
|
case Bt:
|
|
524
|
-
case Dt:
|
|
525
521
|
s.height = d, s.width = u;
|
|
526
522
|
// eslint-disable-next-line no-fallthrough
|
|
527
|
-
case
|
|
523
|
+
case Dt:
|
|
528
524
|
return s;
|
|
529
525
|
// the following case needs {} to prevent a compile error on Next.js
|
|
530
|
-
case
|
|
526
|
+
case De:
|
|
527
|
+
case _t:
|
|
531
528
|
case Pt:
|
|
532
|
-
case Ct:
|
|
533
|
-
|
|
534
|
-
a(et);
|
|
529
|
+
case Ct: {
|
|
530
|
+
a(tt);
|
|
535
531
|
break;
|
|
536
532
|
}
|
|
537
533
|
default:
|
|
538
|
-
l(
|
|
534
|
+
l(tt);
|
|
539
535
|
}
|
|
540
536
|
return null;
|
|
541
537
|
}
|
|
542
538
|
let X = !1, ve = !1, V = null;
|
|
543
539
|
function nr(e, t, n, o, r) {
|
|
544
540
|
const { autoResize: f } = i, { isHidden: d } = s;
|
|
545
|
-
switch (
|
|
541
|
+
switch (m(e), !0) {
|
|
546
542
|
// Allow manual and parent resize requests to bypass the hidden check
|
|
547
543
|
case (d === !0 && !(e in we)): {
|
|
548
544
|
if (ve === !0) break;
|
|
@@ -552,7 +548,7 @@ function nr(e, t, n, o, r) {
|
|
|
552
548
|
// Ignore overflowObserver here, as more efficient than using
|
|
553
549
|
// mutationObserver to detect OVERFLOW_ATTR changes
|
|
554
550
|
// Also allow manual and parent resize requests to bypass the pending check
|
|
555
|
-
case (X === !0 && e !==
|
|
551
|
+
case (X === !0 && e !== De && !(e in we)): {
|
|
556
552
|
a("Resize already pending - Ignored resize request");
|
|
557
553
|
break;
|
|
558
554
|
}
|
|
@@ -569,7 +565,7 @@ function nr(e, t, n, o, r) {
|
|
|
569
565
|
o
|
|
570
566
|
);
|
|
571
567
|
u && en(u.height, u.width, e, r), V || (V = requestAnimationFrame(() => {
|
|
572
|
-
X = !1, V = null,
|
|
568
|
+
X = !1, V = null, m("requestAnimationFrame"), ce(`Reset sendPending: %c${e}`, c);
|
|
573
569
|
})), s.timerActive = !1;
|
|
574
570
|
}
|
|
575
571
|
}
|
|
@@ -606,42 +602,42 @@ function cn(e) {
|
|
|
606
602
|
}
|
|
607
603
|
function sr(e) {
|
|
608
604
|
const t = i.heightCalcMode;
|
|
609
|
-
a(`Reset trigger event: %c${e}`, c), i.heightCalcMode =
|
|
605
|
+
a(`Reset trigger event: %c${e}`, c), i.heightCalcMode = Nn, rr(), cn("reset"), i.heightCalcMode = t;
|
|
610
606
|
}
|
|
611
607
|
const ir = `Auto Resize can not be changed when <b>direction</> is set to '${Le}'.`;
|
|
612
608
|
function cr(e) {
|
|
613
|
-
T(e,
|
|
609
|
+
T(e, Ln, "parentIframe.autoResize(enable) enable");
|
|
614
610
|
const {
|
|
615
611
|
autoResize: t,
|
|
616
612
|
calculateHeight: n,
|
|
617
613
|
calculateWidth: o
|
|
618
614
|
} = i;
|
|
619
|
-
return o === !1 && n === !1 ? (
|
|
615
|
+
return o === !1 && n === !1 ? (m(Me), O(ir), !1) : (e === !0 && t === !1 ? (i.autoResize = !0, queueMicrotask(() => z(Me, "Auto Resize enabled"))) : e === !1 && t === !0 && (i.autoResize = !1), v(0, 0, Cn, JSON.stringify(i.autoResize)), i.autoResize);
|
|
620
616
|
}
|
|
621
617
|
function ar(e) {
|
|
622
|
-
T(e,
|
|
618
|
+
T(e, he, "parentIframe.moveToAnchor(anchor) anchor"), s.inPageLinks.findTarget(e);
|
|
623
619
|
}
|
|
624
620
|
function dr(e) {
|
|
625
|
-
T(e, P, "parentIframe.setOffsetSize(offset) offset"), i.offsetHeight = e, i.offsetWidth = e, z(
|
|
621
|
+
T(e, P, "parentIframe.setOffsetSize(offset) offset"), i.offsetHeight = e, i.offsetWidth = e, z(Dt, `parentIframe.setOffsetSize(${e})`);
|
|
626
622
|
}
|
|
627
623
|
const lr = () => s.origin;
|
|
628
624
|
function fr(e) {
|
|
629
625
|
T(
|
|
630
626
|
e,
|
|
631
|
-
|
|
627
|
+
he,
|
|
632
628
|
"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"
|
|
633
629
|
), a(`Set targetOrigin: %c${e}`, c), i.targetOrigin = e;
|
|
634
630
|
}
|
|
635
631
|
function ur(e) {
|
|
636
632
|
return T(
|
|
637
633
|
e,
|
|
638
|
-
|
|
634
|
+
Be,
|
|
639
635
|
"parentIframe.getParentProps(callback) callback"
|
|
640
|
-
), s.onParentInfo = e, v(0, 0,
|
|
641
|
-
s.onParentInfo = null, v(0, 0,
|
|
636
|
+
), s.onParentInfo = e, v(0, 0, Ft), () => {
|
|
637
|
+
s.onParentInfo = null, v(0, 0, Pn);
|
|
642
638
|
};
|
|
643
639
|
}
|
|
644
|
-
function
|
|
640
|
+
function gr(e, t) {
|
|
645
641
|
e !== void 0 && T(
|
|
646
642
|
e,
|
|
647
643
|
P,
|
|
@@ -653,7 +649,7 @@ function mr(e, t) {
|
|
|
653
649
|
);
|
|
654
650
|
const n = e === void 0 ? "" : e, o = t === void 0 ? "" : `,${t}`, r = `${n}${o}`;
|
|
655
651
|
z(
|
|
656
|
-
|
|
652
|
+
xt,
|
|
657
653
|
`parentIframe.resize(${r})`,
|
|
658
654
|
e,
|
|
659
655
|
t
|
|
@@ -661,15 +657,15 @@ function mr(e, t) {
|
|
|
661
657
|
}
|
|
662
658
|
const Ze = (e) => (t, n) => {
|
|
663
659
|
T(t, P, `parentIframe.${e}(x, y) x`), T(n, P, `parentIframe.${e}(x, y) y`), v(n, t, e);
|
|
664
|
-
},
|
|
660
|
+
}, mr = Ze(_n), hr = Ze(Dn), pr = Ze(Ht);
|
|
665
661
|
function br(e, t) {
|
|
666
662
|
t && T(
|
|
667
663
|
t,
|
|
668
|
-
|
|
664
|
+
he,
|
|
669
665
|
"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"
|
|
670
666
|
), v(0, 0, Te, JSON.stringify(e), t);
|
|
671
667
|
}
|
|
672
|
-
const wr = () => v(0, 0,
|
|
668
|
+
const wr = () => v(0, 0, Bn), vr = () => i.parentId, Er = () => sr("parentIframe.reset");
|
|
673
669
|
function Or() {
|
|
674
670
|
const { win: e } = s;
|
|
675
671
|
i.mode !== 1 && (e.parentIframe = Object.freeze({
|
|
@@ -681,23 +677,23 @@ function Or() {
|
|
|
681
677
|
moveToAnchor: ar,
|
|
682
678
|
reset: Er,
|
|
683
679
|
setOffsetSize: dr,
|
|
684
|
-
scrollBy:
|
|
680
|
+
scrollBy: mr,
|
|
685
681
|
scrollTo: hr,
|
|
686
682
|
scrollToOffset: pr,
|
|
687
683
|
sendMessage: br,
|
|
688
684
|
setTargetOrigin: fr,
|
|
689
|
-
resize:
|
|
685
|
+
resize: gr
|
|
690
686
|
}));
|
|
691
687
|
}
|
|
692
688
|
const Q = (e = "") => (t) => (n) => {
|
|
693
689
|
n.size > 0 && ce(
|
|
694
690
|
`${t}Observer ${e}:`,
|
|
695
|
-
...Array.from(n).flatMap((o) => [
|
|
691
|
+
...Array.from(n).flatMap((o) => [Vt, o])
|
|
696
692
|
);
|
|
697
693
|
}, yr = (e = "") => (t) => (n) => {
|
|
698
694
|
n.size > 0 && qt(
|
|
699
695
|
`${t}Observer ${e}:`,
|
|
700
|
-
...Array.from(n).flatMap((o) => [
|
|
696
|
+
...Array.from(n).flatMap((o) => [Vt, o])
|
|
701
697
|
);
|
|
702
698
|
}, an = Q("attached to"), dn = yr("already attached"), Sr = Q("detached from"), pe = (e, t = !0) => (n) => {
|
|
703
699
|
n > 0 && l(
|
|
@@ -726,7 +722,7 @@ const Q = (e = "") => (t) => (n) => {
|
|
|
726
722
|
subtree: !0
|
|
727
723
|
};
|
|
728
724
|
let Ee = 1, Ye, Ie = !1, Ae = 0;
|
|
729
|
-
const Tr = Q("added")(je), zr = Q("removed (page)")(je), $r = Q("removed (added)")(je), fn = (e) => e.nodeType !== Node.ELEMENT_NODE ||
|
|
725
|
+
const Tr = Q("added")(je), zr = Q("removed (page)")(je), $r = Q("removed (added)")(je), fn = (e) => e.nodeType !== Node.ELEMENT_NODE || kt.has(e.tagName.toLowerCase());
|
|
730
726
|
function Ir(e) {
|
|
731
727
|
const t = e.addedNodes;
|
|
732
728
|
for (const n of t)
|
|
@@ -757,7 +753,7 @@ function Nr() {
|
|
|
757
753
|
const Lr = (e) => () => {
|
|
758
754
|
const t = performance.now(), n = t - Ae, o = wt * Ee++ + vt;
|
|
759
755
|
if (n > o && n < Rr) {
|
|
760
|
-
|
|
756
|
+
m("mutationThrottled"), l("Update delayed due to heavy workload on the callStack"), l(
|
|
761
757
|
`EventLoop busy time: %c${C(n)}ms %c> Max wait: %c${o - vt}ms`,
|
|
762
758
|
c,
|
|
763
759
|
w,
|
|
@@ -810,16 +806,16 @@ function xr(e) {
|
|
|
810
806
|
for (const o of e)
|
|
811
807
|
o.closest(`[${j}]`) ? n.add(o) : t.add(o);
|
|
812
808
|
return n.size > 0 && queueMicrotask(() => {
|
|
813
|
-
|
|
809
|
+
m("overflowIgnored"), l(`Ignoring elements with [data-iframe-ignore] > *:
|
|
814
810
|
`, n), _();
|
|
815
811
|
}), t;
|
|
816
812
|
}
|
|
817
813
|
function un() {
|
|
818
|
-
const e = document.querySelectorAll(`[${
|
|
814
|
+
const e = document.querySelectorAll(`[${Gt}]`), t = xr(e);
|
|
819
815
|
let n = !0;
|
|
820
|
-
return typeof Set.prototype.symmetricDifference ===
|
|
816
|
+
return typeof Set.prototype.symmetricDifference === Be && (n = t.symmetricDifference(Et).size > 0), Et = t, s.overflowedNodeSet = t, s.hasOverflow = t.size > 0, { hasOverflowUpdated: n, overflowedNodeSet: t };
|
|
821
817
|
}
|
|
822
|
-
const M = {},
|
|
818
|
+
const M = {}, gn = (e) => {
|
|
823
819
|
const t = /* @__PURE__ */ new Set();
|
|
824
820
|
for (const n of e)
|
|
825
821
|
if (n instanceof Element) {
|
|
@@ -830,31 +826,31 @@ const M = {}, mn = (e) => {
|
|
|
830
826
|
`, t), t;
|
|
831
827
|
}, Fr = (e) => {
|
|
832
828
|
if (e.size === 0) return;
|
|
833
|
-
|
|
834
|
-
const t =
|
|
829
|
+
m("addObservers");
|
|
830
|
+
const t = gn(e);
|
|
835
831
|
M.overflow.attachObservers(t), M.resize.attachObserverToNonStaticElements(t), _();
|
|
836
832
|
}, Hr = (e) => {
|
|
837
833
|
if (e.size === 0) return;
|
|
838
|
-
|
|
839
|
-
const t =
|
|
834
|
+
m("removeObservers");
|
|
835
|
+
const t = gn(e);
|
|
840
836
|
M.overflow.detachObservers(t), M.resize.detachObservers(t), _();
|
|
841
837
|
};
|
|
842
838
|
function Vr({
|
|
843
839
|
addedNodes: e,
|
|
844
840
|
removedNodes: t
|
|
845
841
|
}) {
|
|
846
|
-
|
|
842
|
+
m("contentMutated"), s.applySelectors(), Xt(), un(), _(), Hr(t), Fr(e);
|
|
847
843
|
}
|
|
848
844
|
function Gr(e) {
|
|
849
|
-
Vr(e), z(
|
|
845
|
+
Vr(e), z(_t, "Mutation Observed");
|
|
850
846
|
}
|
|
851
847
|
const J = "Overflow", Ur = pe(J), Wr = pe(J, !1), qr = an(J), Zr = dn(J), jr = (e) => e instanceof HTMLElement && (!!e.hidden || e.offsetParent === null || e.style.display === Le), Yr = (e, t) => {
|
|
852
|
-
const n = t.side ||
|
|
848
|
+
const n = t.side || _e, o = {
|
|
853
849
|
root: t.root,
|
|
854
850
|
rootMargin: "0px",
|
|
855
851
|
threshold: 1
|
|
856
|
-
}, r = window?.requestAnimationFrame ||
|
|
857
|
-
y.toggleAttribute(
|
|
852
|
+
}, r = window?.requestAnimationFrame || se, f = (y = !1) => e(y), d = (y, $) => y === 0 || y > $[n], u = (y, $) => {
|
|
853
|
+
y.toggleAttribute(Gt, $);
|
|
858
854
|
};
|
|
859
855
|
function b(y) {
|
|
860
856
|
for (const $ of y) {
|
|
@@ -865,7 +861,7 @@ const J = "Overflow", Ur = pe(J), Wr = pe(J, !1), qr = an(J), Zr = dn(J), jr = (
|
|
|
865
861
|
}
|
|
866
862
|
r(f);
|
|
867
863
|
}
|
|
868
|
-
const
|
|
864
|
+
const g = new IntersectionObserver(b, o), E = /* @__PURE__ */ new WeakSet();
|
|
869
865
|
function h(y) {
|
|
870
866
|
const $ = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ new Set();
|
|
871
867
|
let H = 0;
|
|
@@ -875,7 +871,7 @@ const J = "Overflow", Ur = pe(J), Wr = pe(J, !1), qr = an(J), Zr = dn(J), jr = (
|
|
|
875
871
|
$.add(S);
|
|
876
872
|
continue;
|
|
877
873
|
}
|
|
878
|
-
|
|
874
|
+
g.observe(S), E.add(S), F.add(S), H += 1;
|
|
879
875
|
}
|
|
880
876
|
Zr($), qr(F), Ur(H), F.clear(), $.clear();
|
|
881
877
|
}
|
|
@@ -883,12 +879,12 @@ const J = "Overflow", Ur = pe(J), Wr = pe(J, !1), qr = an(J), Zr = dn(J), jr = (
|
|
|
883
879
|
attachObservers: h,
|
|
884
880
|
detachObservers: ln(
|
|
885
881
|
J,
|
|
886
|
-
|
|
882
|
+
g,
|
|
887
883
|
E,
|
|
888
884
|
Wr
|
|
889
885
|
),
|
|
890
886
|
disconnect: () => {
|
|
891
|
-
|
|
887
|
+
g.disconnect(), l("Detached%c OverflowObserver", c);
|
|
892
888
|
}
|
|
893
889
|
};
|
|
894
890
|
};
|
|
@@ -905,12 +901,12 @@ function Qr() {
|
|
|
905
901
|
default:
|
|
906
902
|
l("No overflow detected");
|
|
907
903
|
}
|
|
908
|
-
z(
|
|
904
|
+
z(De, "Overflow updated");
|
|
909
905
|
}
|
|
910
906
|
function Jr(e) {
|
|
911
907
|
const t = {
|
|
912
908
|
root: document.documentElement,
|
|
913
|
-
side: i.calculateHeight ?
|
|
909
|
+
side: i.calculateHeight ? _e : Lt
|
|
914
910
|
};
|
|
915
911
|
return M.overflow = Yr(Qr, t), M.overflow.attachObservers(e), M.overflow;
|
|
916
912
|
}
|
|
@@ -946,7 +942,7 @@ const os = (e) => (U = new ResizeObserver(e), U.observe(document.body), le.add(d
|
|
|
946
942
|
function rs(e) {
|
|
947
943
|
if (!Array.isArray(e) || e.length === 0) return;
|
|
948
944
|
const t = e[0].target;
|
|
949
|
-
z(
|
|
945
|
+
z(Pt, `Element resized <${xn(t)}>`);
|
|
950
946
|
}
|
|
951
947
|
function ss(e) {
|
|
952
948
|
return M.resize = os(rs), M.resize.attachObserverToNonStaticElements(e), M.resize;
|
|
@@ -954,16 +950,16 @@ function ss(e) {
|
|
|
954
950
|
let Ot;
|
|
955
951
|
function is() {
|
|
956
952
|
const e = document.title;
|
|
957
|
-
e !== Ot && (Ot = e, a(`Title: %c${e}`, c), e && v(0, 0,
|
|
953
|
+
e !== Ot && (Ot = e, a(`Title: %c${e}`, c), e && v(0, 0, Fn, e));
|
|
958
954
|
}
|
|
959
955
|
function cs(e) {
|
|
960
|
-
a(`Visible: %c${e}`, c), s.isHidden = !e, z(
|
|
956
|
+
a(`Visible: %c${e}`, c), s.isHidden = !e, z(Ct, "Visibility changed");
|
|
961
957
|
}
|
|
962
958
|
function as(e) {
|
|
963
959
|
Ve.push(...e.map((t) => t.disconnect));
|
|
964
960
|
}
|
|
965
961
|
function ds() {
|
|
966
|
-
|
|
962
|
+
m("attachObservers");
|
|
967
963
|
const e = Ue(document.documentElement), t = [
|
|
968
964
|
Pr(Gr),
|
|
969
965
|
Jr(e),
|
|
@@ -997,20 +993,20 @@ function us(e, t) {
|
|
|
997
993
|
return t.includes("-") && (x(`Negative CSS value ignored for ${e}`), t = ""), t;
|
|
998
994
|
}
|
|
999
995
|
function ke(e, t) {
|
|
1000
|
-
t === void 0 || t === "" || t ===
|
|
996
|
+
t === void 0 || t === "" || t === Hn || (document.body.style.setProperty(e, t), l(`Set body ${e}: %c${t}`, c));
|
|
1001
997
|
}
|
|
1002
|
-
function
|
|
998
|
+
function gs({
|
|
1003
999
|
bodyMarginStr: e,
|
|
1004
1000
|
bodyMargin: t
|
|
1005
1001
|
}) {
|
|
1006
1002
|
e === void 0 && (e = `${t}px`), ke("margin", us("margin", e));
|
|
1007
1003
|
}
|
|
1008
|
-
const
|
|
1004
|
+
const ms = () => ({
|
|
1009
1005
|
x: document.documentElement.scrollLeft,
|
|
1010
1006
|
y: document.documentElement.scrollTop
|
|
1011
1007
|
});
|
|
1012
1008
|
function hs(e) {
|
|
1013
|
-
const t = e.getBoundingClientRect(), n =
|
|
1009
|
+
const t = e.getBoundingClientRect(), n = ms();
|
|
1014
1010
|
return {
|
|
1015
1011
|
x: Math.round(t.left + n.x),
|
|
1016
1012
|
y: Math.round(t.top + n.y)
|
|
@@ -1025,7 +1021,7 @@ function ps(e, t) {
|
|
|
1025
1021
|
c,
|
|
1026
1022
|
w,
|
|
1027
1023
|
c
|
|
1028
|
-
), v(n.y, n.x,
|
|
1024
|
+
), v(n.y, n.x, Ht);
|
|
1029
1025
|
}
|
|
1030
1026
|
function Qe(e) {
|
|
1031
1027
|
const t = e.split("#")[1] || e, n = decodeURIComponent(t), o = document.getElementById(n) || document.getElementsByName(n)[0];
|
|
@@ -1033,9 +1029,9 @@ function Qe(e) {
|
|
|
1033
1029
|
ps(t, o);
|
|
1034
1030
|
return;
|
|
1035
1031
|
}
|
|
1036
|
-
a(`In page link (#${t}) not found in iframe, so sending to parent`), v(0, 0,
|
|
1032
|
+
a(`In page link (#${t}) not found in iframe, so sending to parent`), v(0, 0, Vn, `#${t}`);
|
|
1037
1033
|
}
|
|
1038
|
-
function
|
|
1034
|
+
function mn() {
|
|
1039
1035
|
const { hash: e, href: t } = window.location;
|
|
1040
1036
|
e !== "" && e !== "#" && Qe(t);
|
|
1041
1037
|
}
|
|
@@ -1046,10 +1042,10 @@ function bs() {
|
|
|
1046
1042
|
});
|
|
1047
1043
|
}
|
|
1048
1044
|
function ws() {
|
|
1049
|
-
N(window, "hashchange",
|
|
1045
|
+
N(window, "hashchange", mn);
|
|
1050
1046
|
}
|
|
1051
1047
|
function vs() {
|
|
1052
|
-
setTimeout(
|
|
1048
|
+
setTimeout(mn, Ut);
|
|
1053
1049
|
}
|
|
1054
1050
|
function Es() {
|
|
1055
1051
|
a("Setting up location.hash handlers"), bs(), ws(), vs(), s.inPageLinks = {
|
|
@@ -1058,11 +1054,11 @@ function Es() {
|
|
|
1058
1054
|
}
|
|
1059
1055
|
function Os(e) {
|
|
1060
1056
|
const { mode: t } = i;
|
|
1061
|
-
e ?
|
|
1057
|
+
e ? Pe(t) ? O(I(5)) : Es() : a("In page linking not enabled");
|
|
1062
1058
|
}
|
|
1063
1059
|
const ys = "important";
|
|
1064
1060
|
function Ss() {
|
|
1065
|
-
const e = (t) => t.style.setProperty(me,
|
|
1061
|
+
const e = (t) => t.style.setProperty(me, ie, ys);
|
|
1066
1062
|
e(document.documentElement), e(document.body), a("Set HTML & body height: %cauto !important", c);
|
|
1067
1063
|
}
|
|
1068
1064
|
const Je = (e) => (t, n) => {
|
|
@@ -1070,11 +1066,11 @@ const Je = (e) => (t, n) => {
|
|
|
1070
1066
|
if (typeof t[n] === e) return t[n];
|
|
1071
1067
|
throw new TypeError(`${n} is not a ${e}.`);
|
|
1072
1068
|
}
|
|
1073
|
-
}, Se = Je(
|
|
1069
|
+
}, Se = Je(Be), St = Je(P), ee = Je(he), Rs = (e) => e !== null && typeof e === Gn && !Array.isArray(e);
|
|
1074
1070
|
function Ms(e) {
|
|
1075
1071
|
const { calculateHeight: t, calculateWidth: n } = i;
|
|
1076
1072
|
let o, r;
|
|
1077
|
-
return typeof e?.offsetSize === P && (t && (o = St(e,
|
|
1073
|
+
return typeof e?.offsetSize === P && (t && (o = St(e, rt)), n && (r = St(e, rt))), { offsetHeight: o, offsetWidth: r };
|
|
1078
1074
|
}
|
|
1079
1075
|
function Ts(e) {
|
|
1080
1076
|
a("Reading data from page:", Object.keys(e));
|
|
@@ -1083,7 +1079,7 @@ function Ts(e) {
|
|
|
1083
1079
|
offsetHeight: t,
|
|
1084
1080
|
offsetWidth: n,
|
|
1085
1081
|
ignoreSelector: ee(e, "ignoreSelector"),
|
|
1086
|
-
[
|
|
1082
|
+
[ot(3)]: ee(e, ot(0)),
|
|
1087
1083
|
sizeSelector: ee(e, "sizeSelector"),
|
|
1088
1084
|
targetOrigin: ee(e, "targetOrigin"),
|
|
1089
1085
|
onBeforeResize: Se(e, "onBeforeResize"),
|
|
@@ -1093,7 +1089,7 @@ function Ts(e) {
|
|
|
1093
1089
|
}
|
|
1094
1090
|
function zs() {
|
|
1095
1091
|
const { mode: e } = i;
|
|
1096
|
-
if (
|
|
1092
|
+
if (Pe(e)) return {};
|
|
1097
1093
|
const t = window.iframeResizer || window.iFrameResizer;
|
|
1098
1094
|
return Rs(t) ? Ts(t) : {};
|
|
1099
1095
|
}
|
|
@@ -1147,10 +1143,10 @@ function ks({
|
|
|
1147
1143
|
logging: t,
|
|
1148
1144
|
parentId: n = ""
|
|
1149
1145
|
}) {
|
|
1150
|
-
Yn({ id: n, enabled: t, expand: e }),
|
|
1146
|
+
Yn({ id: n, enabled: t, expand: e }), m("initReceived"), a(`Initialising iframe v${Y} ${window.location.href}`);
|
|
1151
1147
|
}
|
|
1152
1148
|
function Ns(e) {
|
|
1153
|
-
|
|
1149
|
+
m("ready"), Kt(It(e)), a("Initialization complete", (({ key: t, key2: n, ...o }) => o)(i));
|
|
1154
1150
|
}
|
|
1155
1151
|
function Ls({
|
|
1156
1152
|
bodyBackground: e,
|
|
@@ -1158,17 +1154,17 @@ function Ls({
|
|
|
1158
1154
|
inPageLinks: n,
|
|
1159
1155
|
onReady: o
|
|
1160
1156
|
}) {
|
|
1161
|
-
const r =
|
|
1157
|
+
const r = go(i), f = [
|
|
1162
1158
|
po,
|
|
1163
|
-
|
|
1159
|
+
mo,
|
|
1164
1160
|
Oo,
|
|
1165
1161
|
Xt,
|
|
1166
1162
|
So,
|
|
1167
|
-
r ?
|
|
1168
|
-
() =>
|
|
1163
|
+
r ? se : uo,
|
|
1164
|
+
() => gs(i),
|
|
1169
1165
|
() => ke("background", e),
|
|
1170
1166
|
() => ke("padding", t),
|
|
1171
|
-
r ?
|
|
1167
|
+
r ? se : Ss,
|
|
1172
1168
|
fs,
|
|
1173
1169
|
s.applySelectors,
|
|
1174
1170
|
() => Os(n),
|
|
@@ -1177,7 +1173,7 @@ function Ls({
|
|
|
1177
1173
|
Po,
|
|
1178
1174
|
() => Or(),
|
|
1179
1175
|
() => z(
|
|
1180
|
-
|
|
1176
|
+
ge,
|
|
1181
1177
|
"Init message from host page",
|
|
1182
1178
|
void 0,
|
|
1183
1179
|
void 0,
|
|
@@ -1199,20 +1195,20 @@ function Ps(e) {
|
|
|
1199
1195
|
const t = e.data.slice(zt).split(fe);
|
|
1200
1196
|
s.target = e.source, s.origin = e.origin, Cs(t), s.firstRun = !1, setTimeout(() => {
|
|
1201
1197
|
s.initLock = !1;
|
|
1202
|
-
},
|
|
1198
|
+
}, Ut);
|
|
1203
1199
|
}
|
|
1204
|
-
const { freeze: _s } = Object, { parse: Ke } = JSON, Xe = (e) => _s(Ke(e)), pn = (e) => v(0, 0, `${e}Stop`), be = (e) => e.data.slice(e.data.indexOf(fe) + 1), Ds = (e) => to(e) ?
|
|
1200
|
+
const { freeze: _s } = Object, { parse: Ke } = JSON, Xe = (e) => _s(Ke(e)), pn = (e) => v(0, 0, `${e}Stop`), be = (e) => e.data.slice(e.data.indexOf(fe) + 1), Ds = (e) => to(e) ? ge : e.data.split("]")[1].split(fe)[0];
|
|
1205
1201
|
function Bs(e) {
|
|
1206
1202
|
const t = be(e);
|
|
1207
|
-
a("onMessage called from parent:%c", c, Xe(t)),
|
|
1203
|
+
a("onMessage called from parent:%c", c, Xe(t)), ue(i.onMessage, Ke(t));
|
|
1208
1204
|
}
|
|
1209
1205
|
function xs(e) {
|
|
1210
1206
|
const { onPageInfo: t } = s, n = be(e);
|
|
1211
|
-
a("PageInfo received from parent:", Xe(n)), t ?
|
|
1207
|
+
a("PageInfo received from parent:", Xe(n)), t ? ue(t, Ke(n)) : pn(Un);
|
|
1212
1208
|
}
|
|
1213
1209
|
function Fs(e) {
|
|
1214
1210
|
const { onParentInfo: t } = s, n = Xe(be(e));
|
|
1215
|
-
a("ParentInfo received from parent:", n), t ?
|
|
1211
|
+
a("ParentInfo received from parent:", n), t ? ue(t, n) : pn(Ft);
|
|
1216
1212
|
}
|
|
1217
1213
|
function Hs() {
|
|
1218
1214
|
if (s.initLock) {
|
|
@@ -1222,7 +1218,7 @@ function Hs() {
|
|
|
1222
1218
|
a("Page size reset by host page"), cn("resetPage");
|
|
1223
1219
|
}
|
|
1224
1220
|
function Vs() {
|
|
1225
|
-
a("Resize requested by host page"), z(
|
|
1221
|
+
a("Resize requested by host page"), z(Bt, "Parent window requested size check");
|
|
1226
1222
|
}
|
|
1227
1223
|
const Mt = (e) => s.inPageLinks.findTarget(be(e)), Tt = {
|
|
1228
1224
|
init: Ps,
|
|
@@ -1237,7 +1233,7 @@ const Mt = (e) => s.inPageLinks.findTarget(be(e)), Tt = {
|
|
|
1237
1233
|
};
|
|
1238
1234
|
function Gs(e) {
|
|
1239
1235
|
const { firstRun: t } = s, n = Ds(e);
|
|
1240
|
-
switch (
|
|
1236
|
+
switch (m(n), !0) {
|
|
1241
1237
|
case n in Tt:
|
|
1242
1238
|
Tt[n](e);
|
|
1243
1239
|
break;
|
|
@@ -1262,7 +1258,7 @@ function Us() {
|
|
|
1262
1258
|
}
|
|
1263
1259
|
window.iframeChildListener = ((t) => {
|
|
1264
1260
|
setTimeout(() => te({ data: t, sameOrigin: !0 }));
|
|
1265
|
-
}),
|
|
1261
|
+
}), m("listen"), N(window, Te, te), N(document, $t, dt), dt();
|
|
1266
1262
|
function e(t) {
|
|
1267
1263
|
return te(t), s.win;
|
|
1268
1264
|
}
|
|
@@ -1271,5 +1267,5 @@ function Us() {
|
|
|
1271
1267
|
} catch {
|
|
1272
1268
|
}
|
|
1273
1269
|
}
|
|
1274
|
-
typeof window !==
|
|
1270
|
+
typeof window !== Wn && Us();
|
|
1275
1271
|
//# sourceMappingURL=index.esm.js.map
|