@iframe-resizer/jquery 5.5.9 → 6.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- Iframe Resizer Version 5
1
+ Iframe Resizer Version 6
2
2
 
3
- This JavaScript library is Copyright © 2013-2025 David J. Bradshaw and is dual-licensed, either under GPL V3, or a commercial license that is available for purchase upon request.
3
+ This JavaScript library is Copyright © 2013-2026 David J. Bradshaw and is dual-licensed, either under GPL V3 for compliant sites (Fully published front and backend source code). Or alternatively it is available under a commercial license for sites that do not wish to use the GPL.
4
4
 
5
5
  For more information on commercial licensing see https://iframe-resizer.com/pricing/
6
6
 
package/README.md CHANGED
@@ -25,4 +25,4 @@ yarn add @iframe-resizer/jquery
25
25
 
26
26
  ---
27
27
 
28
- _iframe-resizer version 5.5.9 2026-02-06 - 10:22:50.790Z_
28
+ _iframe-resizer version 6.0.0-beta.0 2026-02-23 - 11:30:18.808Z_
package/index.cjs.js CHANGED
@@ -1,18 +1,18 @@
1
1
  /*!
2
2
  * @preserve
3
- *
4
- * @module iframe-resizer/jquery 5.5.9 (cjs) - 2026-02-06
5
3
  *
6
- * @license GPL-3.0 for non-commercial use only.
7
- * For commercial use, you must purchase a license from
4
+ * @module iframe-resizer/jquery 6.0.0-beta.0 (cjs) - 2026-02-23
5
+ *
6
+ * @license GPL-3.0 For use with GPL compliant sites (fully published front & backend source code)
7
+ * Alternatively for commercial use, you can purchase a license from
8
8
  * https://iframe-resizer.com/pricing
9
- *
10
- * @description Keep same and cross domain iFrames sized to their content
9
+ *
10
+ * @description Keep same and cross domain iFrames sized to their content
11
11
  *
12
12
  * @author David J. Bradshaw <info@iframe-resizer.com>
13
- *
13
+ *
14
14
  * @see {@link https://iframe-resizer.com}
15
- *
15
+ *
16
16
  * @copyright (c) 2013 - 2026, David J. Bradshaw. All rights reserved.
17
17
  */
18
18
 
@@ -25,92 +25,63 @@ const acg = require('auto-console-group');
25
25
  const LABEL = 'iframeResizer';
26
26
  const NEW_LINE = '\n';
27
27
  const PARENT = 'parent';
28
-
29
28
  const STRING = 'string';
30
29
 
31
- const deprecate = (advise) =>
32
- (type, change = 'renamed to') =>
33
- (old, replacement, info = '', iframeId = '') =>
34
- advise(
35
- iframeId,
36
- `<rb>Deprecated ${type}(${old.replace('()', '')})</>\n\nThe <b>${old}</> ${type.toLowerCase()} has been ${change} <b>${replacement}</>. ${info}Use of the old ${type.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`,
37
- );
30
+ const deprecate = (advise) => (type, change = 'renamed to') => (old, replacement, info = '', iframeId = '') => advise(iframeId, `<rb>Deprecated ${type}(${old.replace('()', '')})</>\n\nThe <b>${old}</> ${type.toLowerCase()} has been ${change} <b>${replacement}</>. ${info}Use of the old ${type.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`);
38
31
 
39
32
  const isString = (value) => typeof value === STRING;
40
-
41
33
  const id = (x) => x;
42
-
43
- const esModuleInterop = (mod) =>
44
- // eslint-disable-next-line no-underscore-dangle
45
- mod?.__esModule ? mod.default : mod;
34
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
+ const esModuleInterop = (mod) =>
36
+ // eslint-disable-next-line no-underscore-dangle
37
+ (mod === null || mod === void 0 ? void 0 : mod.__esModule) ? mod.default : mod;
46
38
 
47
39
  /* eslint-disable no-useless-escape */
48
40
  /* eslint-disable security/detect-non-literal-regexp */
49
-
50
-
51
41
  const TAGS = {
52
- br: '\n',
53
- rb: '\u001B[31;1m', // red bold
54
- bb: '\u001B[34;1m', // blue bold
55
- b: '\u001B[1m', // bold
56
- i: '\u001B[3m', // italic
57
- u: '\u001B[4m', // underline
58
- '/': '\u001B[m', // reset
42
+ br: '\n',
43
+ rb: '\u001B[31;1m', // red bold
44
+ bb: '\u001B[34;1m', // blue bold
45
+ b: '\u001B[1m', // bold
46
+ i: '\u001B[3m', // italic
47
+ u: '\u001B[4m', // underline
48
+ '/': '\u001B[m', // reset
59
49
  };
60
-
61
50
  const keys = Object.keys(TAGS);
62
51
  const tags = new RegExp(`<(${keys.join('|')})>`, 'gi');
63
- const lookup = (_, tag) => TAGS[tag] ?? '';
52
+ const lookup = (_, tag) => { var _a; return (_a = TAGS[tag]) !== null && _a !== void 0 ? _a : ''; };
64
53
  const encode = (s) => s.replace(tags, lookup);
65
-
66
- const filter = (s) =>
67
- s.replaceAll('<br>', NEW_LINE).replaceAll(/<\/?[^>]+>/gi, '');
68
-
69
- const createFormatAdvise = (formatLogMessage) => (message) =>
70
- formatLogMessage(
71
- isString(message)
72
- ? window.chrome
54
+ const filter = (s) => s.replaceAll('<br>', NEW_LINE).replaceAll(/<\/?[^>]+>/gi, '');
55
+ const createFormatAdvise = (formatLogMessage) => (message) => formatLogMessage(isString(message)
56
+ ? window.chrome
73
57
  ? encode(message)
74
58
  : filter(message)
75
- : message,
76
- );
77
-
59
+ : message);
78
60
  /* eslint-enable security/detect-non-literal-regexp */
79
61
  /* eslint-enable no-useless-escape */
80
62
 
63
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
81
64
  const settings = {};
82
65
 
83
66
  // Deal with UMD not converting default exports to named exports
84
67
  const createConsoleGroup = esModuleInterop(acg);
85
-
86
68
  const parent = createConsoleGroup({
87
- expand: false,
88
- label: PARENT,
69
+ expand: false,
70
+ label: PARENT,
89
71
  });
90
-
91
- const output =
92
- (type) =>
93
- (iframeId, ...args) =>
94
- settings[iframeId]
95
- ? settings[iframeId].console[type](...args)
96
- : parent[type](...args);
72
+ const output = (type) => (iframeId, ...args) => settings[iframeId]
73
+ ? settings[iframeId].console[type](...args)
74
+ : parent[type](...args);
97
75
  const warn = output('warn');
98
-
99
- const formatLogMsg =
100
- (iframeId) =>
101
- (...args) =>
102
- [`${LABEL}(${iframeId})`, ...args].join(' ');
103
-
76
+ const formatLogMsg = (iframeId) => (...args) => [`${LABEL}(${iframeId})`, ...args].join(' ');
104
77
  const formatAdvise = createFormatAdvise(id);
105
- const advise = (iframeId, ...args) =>
106
- settings[iframeId]
78
+ const advise = (iframeId, ...args) => settings[iframeId]
107
79
  ? settings[iframeId].console.warn(...args.map(formatAdvise))
108
80
  : queueMicrotask(() => {
109
81
  const localFormatAdvise = createFormatAdvise(formatLogMsg(iframeId));
110
82
  // eslint-disable-next-line no-console
111
- console?.warn(...args.map(localFormatAdvise));
112
- });
113
-
83
+ console === null || console === void 0 ? void 0 : console.warn(...args.map(localFormatAdvise));
84
+ });
114
85
  const deprecateAdvise = deprecate(advise);
115
86
  const deprecateMethod = deprecateAdvise('Method');
116
87
 
package/index.esm.js CHANGED
@@ -1,18 +1,18 @@
1
1
  /*!
2
2
  * @preserve
3
- *
4
- * @module iframe-resizer/jquery 5.5.9 (esm) - 2026-02-06
5
3
  *
6
- * @license GPL-3.0 for non-commercial use only.
7
- * For commercial use, you must purchase a license from
4
+ * @module iframe-resizer/jquery 6.0.0-beta.0 (esm) - 2026-02-23
5
+ *
6
+ * @license GPL-3.0 For use with GPL compliant sites (fully published front & backend source code)
7
+ * Alternatively for commercial use, you can purchase a license from
8
8
  * https://iframe-resizer.com/pricing
9
- *
10
- * @description Keep same and cross domain iFrames sized to their content
9
+ *
10
+ * @description Keep same and cross domain iFrames sized to their content
11
11
  *
12
12
  * @author David J. Bradshaw <info@iframe-resizer.com>
13
- *
13
+ *
14
14
  * @see {@link https://iframe-resizer.com}
15
- *
15
+ *
16
16
  * @copyright (c) 2013 - 2026, David J. Bradshaw. All rights reserved.
17
17
  */
18
18
 
@@ -23,92 +23,63 @@ import acg from 'auto-console-group';
23
23
  const LABEL = 'iframeResizer';
24
24
  const NEW_LINE = '\n';
25
25
  const PARENT = 'parent';
26
-
27
26
  const STRING = 'string';
28
27
 
29
- const deprecate = (advise) =>
30
- (type, change = 'renamed to') =>
31
- (old, replacement, info = '', iframeId = '') =>
32
- advise(
33
- iframeId,
34
- `<rb>Deprecated ${type}(${old.replace('()', '')})</>\n\nThe <b>${old}</> ${type.toLowerCase()} has been ${change} <b>${replacement}</>. ${info}Use of the old ${type.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`,
35
- );
28
+ const deprecate = (advise) => (type, change = 'renamed to') => (old, replacement, info = '', iframeId = '') => advise(iframeId, `<rb>Deprecated ${type}(${old.replace('()', '')})</>\n\nThe <b>${old}</> ${type.toLowerCase()} has been ${change} <b>${replacement}</>. ${info}Use of the old ${type.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`);
36
29
 
37
30
  const isString = (value) => typeof value === STRING;
38
-
39
31
  const id = (x) => x;
40
-
41
- const esModuleInterop = (mod) =>
42
- // eslint-disable-next-line no-underscore-dangle
43
- mod?.__esModule ? mod.default : mod;
32
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
+ const esModuleInterop = (mod) =>
34
+ // eslint-disable-next-line no-underscore-dangle
35
+ (mod === null || mod === void 0 ? void 0 : mod.__esModule) ? mod.default : mod;
44
36
 
45
37
  /* eslint-disable no-useless-escape */
46
38
  /* eslint-disable security/detect-non-literal-regexp */
47
-
48
-
49
39
  const TAGS = {
50
- br: '\n',
51
- rb: '\u001B[31;1m', // red bold
52
- bb: '\u001B[34;1m', // blue bold
53
- b: '\u001B[1m', // bold
54
- i: '\u001B[3m', // italic
55
- u: '\u001B[4m', // underline
56
- '/': '\u001B[m', // reset
40
+ br: '\n',
41
+ rb: '\u001B[31;1m', // red bold
42
+ bb: '\u001B[34;1m', // blue bold
43
+ b: '\u001B[1m', // bold
44
+ i: '\u001B[3m', // italic
45
+ u: '\u001B[4m', // underline
46
+ '/': '\u001B[m', // reset
57
47
  };
58
-
59
48
  const keys = Object.keys(TAGS);
60
49
  const tags = new RegExp(`<(${keys.join('|')})>`, 'gi');
61
- const lookup = (_, tag) => TAGS[tag] ?? '';
50
+ const lookup = (_, tag) => { var _a; return (_a = TAGS[tag]) !== null && _a !== void 0 ? _a : ''; };
62
51
  const encode = (s) => s.replace(tags, lookup);
63
-
64
- const filter = (s) =>
65
- s.replaceAll('<br>', NEW_LINE).replaceAll(/<\/?[^>]+>/gi, '');
66
-
67
- const createFormatAdvise = (formatLogMessage) => (message) =>
68
- formatLogMessage(
69
- isString(message)
70
- ? window.chrome
52
+ const filter = (s) => s.replaceAll('<br>', NEW_LINE).replaceAll(/<\/?[^>]+>/gi, '');
53
+ const createFormatAdvise = (formatLogMessage) => (message) => formatLogMessage(isString(message)
54
+ ? window.chrome
71
55
  ? encode(message)
72
56
  : filter(message)
73
- : message,
74
- );
75
-
57
+ : message);
76
58
  /* eslint-enable security/detect-non-literal-regexp */
77
59
  /* eslint-enable no-useless-escape */
78
60
 
61
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
79
62
  const settings = {};
80
63
 
81
64
  // Deal with UMD not converting default exports to named exports
82
65
  const createConsoleGroup = esModuleInterop(acg);
83
-
84
66
  const parent = createConsoleGroup({
85
- expand: false,
86
- label: PARENT,
67
+ expand: false,
68
+ label: PARENT,
87
69
  });
88
-
89
- const output =
90
- (type) =>
91
- (iframeId, ...args) =>
92
- settings[iframeId]
93
- ? settings[iframeId].console[type](...args)
94
- : parent[type](...args);
70
+ const output = (type) => (iframeId, ...args) => settings[iframeId]
71
+ ? settings[iframeId].console[type](...args)
72
+ : parent[type](...args);
95
73
  const warn = output('warn');
96
-
97
- const formatLogMsg =
98
- (iframeId) =>
99
- (...args) =>
100
- [`${LABEL}(${iframeId})`, ...args].join(' ');
101
-
74
+ const formatLogMsg = (iframeId) => (...args) => [`${LABEL}(${iframeId})`, ...args].join(' ');
102
75
  const formatAdvise = createFormatAdvise(id);
103
- const advise = (iframeId, ...args) =>
104
- settings[iframeId]
76
+ const advise = (iframeId, ...args) => settings[iframeId]
105
77
  ? settings[iframeId].console.warn(...args.map(formatAdvise))
106
78
  : queueMicrotask(() => {
107
79
  const localFormatAdvise = createFormatAdvise(formatLogMsg(iframeId));
108
80
  // eslint-disable-next-line no-console
109
- console?.warn(...args.map(localFormatAdvise));
110
- });
111
-
81
+ console === null || console === void 0 ? void 0 : console.warn(...args.map(localFormatAdvise));
82
+ });
112
83
  const deprecateAdvise = deprecate(advise);
113
84
  const deprecateMethod = deprecateAdvise('Method');
114
85
 
package/index.umd.js CHANGED
@@ -1,20 +1,21 @@
1
1
  /*!
2
2
  * @preserve
3
- *
4
- * @module iframe-resizer/jquery 5.5.9 (umd) - 2026-02-06
5
3
  *
6
- * @license GPL-3.0 for non-commercial use only.
7
- * For commercial use, you must purchase a license from
4
+ * @module iframe-resizer/jquery 6.0.0-beta.0 (umd) - 2026-02-23
5
+ *
6
+ * @license GPL-3.0 For use with GPL compliant sites (fully published front & backend source code)
7
+ * Alternatively for commercial use, you can purchase a license from
8
8
  * https://iframe-resizer.com/pricing
9
- *
10
- * @description Keep same and cross domain iFrames sized to their content
9
+ *
10
+ * @description Keep same and cross domain iFrames sized to their content
11
11
  *
12
12
  * @author David J. Bradshaw <info@iframe-resizer.com>
13
- *
13
+ *
14
14
  * @see {@link https://iframe-resizer.com}
15
- *
15
+ *
16
16
  * @copyright (c) 2013 - 2026, David J. Bradshaw. All rights reserved.
17
17
  */
18
18
 
19
19
 
20
- !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";const e="font-weight: normal;",t=e+"font-style: italic;",n="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),o={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},r={profile:0,profileEnd:0,timeStamp:0,trace:0},a=Object.assign(console);const{fromEntries:s,keys:l}=Object,c=e=>[e,a[e]],u=e=>t=>[t,function(n){e[t]=n}],d=(e,t)=>s(l(e).map(t));const f=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,p=f?"color: #A9C7FB;":"color: #135CD2;",h=f?"color: #E3E3E3;":"color: #1F1F1F;",m="5.5.9",g="iframeResizer",y=":",b="autoResize",w="init",v="iframeReady",z="load",$="message",j="onload",k="pageInfo",T="parentInfo",x="reset",M="resize",R="scroll",S="\n",O="child",E="parent",I="string",C="object",W="function",L="auto",A="none",N="both",F="vertical",B="horizontal",P="[iFrameSizer]",H=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),q=Object.freeze({[j]:1,[w]:1,[v]:1}),D="expanded",U="collapsed",Q=Object.freeze({[D]:1,[U]:1}),J="Use of the old name will be removed in a future version of <i>iframe-resizer</>.",Z=(e,t,n,i)=>e.addEventListener(t,n,i||!1),V=(e,t,n)=>e.removeEventListener(t,n,!1),G=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let i,o=0;o<e.length;o++)i=e.codePointAt(o),t=Math.imul(t^i,2246822519),n=Math.imul(n^i,3266489917);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)},X=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),Y=["spjluzl","rlf","clyzpvu"],_=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","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</>","<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</>.","<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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],K=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],ee=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5","2b5sdlfhbev","zo4ui3arjo","oclbb4thgl"].map((e,t)=>[e,Math.max(0,t-1)])),te=e=>X(_[e]),ne=e=>{const t=e[X(Y[0])]||e[X(Y[1])]||e[X(Y[2])];if(!t)return-1;const n=t.split("-");let i=function(e=""){let t=-2;const n=G(X(e));return n in ee&&(t=ee[n]),t>4?t-4:t}(n[0]);return 0===i||(e=>e[2]===G(e[0]+e[1]))(n)||(i=-2),i},ie=Object.hasOwn||((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),oe={br:"\n",rb:"",bb:"",b:"",i:"",u:"","/":""},re=Object.keys(oe),ae=new RegExp(`<(${re.join("|")})>`,"gi"),se=(e,t)=>oe[t]??"",le=e=>t=>e(typeof t===I?window.chrome?t.replace(ae,se):(e=>e.replaceAll("<br>",S).replaceAll(/<\/?[^>]+>/gi,""))(t):t),ce={},ue=(de=function(s={}){const l={},f={},p=[],h={...o,expand:!s.collapsed||o.expanded,...s};let m="";function g(){p.length=0,m=""}function y(){delete h.event,g()}const b=()=>!!p.some(([e])=>e in i)||!!h.expand;function w(){if(0!==p.length){a[b()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?m:""}`,e,"font-weight: bold;",t);for(const[e,...t]of p)a.assert(e in a,`Unknown console method: ${e}`),e in a&&a[e](...t);a.groupEnd(),y()}else y()}function v(){""===m&&(m=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}(),queueMicrotask(()=>queueMicrotask(w)))}function z(e,...t){0===p.length&&v(),p.push([e,...t])}function $(e=n,...t){l[e]?z("log",`${e}: ${performance.now()-l[e]} ms`,...t):z("timeLog",e,...t)}return{...d(h,u(h)),...d(console,e=>[e,(...t)=>z(e,...t)]),...d(r,c),assert:function(e,...t){!0!==e&&z("assert",e,...t)},count:function(e=n){f[e]?f[e]+=1:f[e]=1,z("log",`${e}: ${f[e]}`)},countReset:function(e=n){delete f[e]},endAutoGroup:w,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;z("error",e),w()}return n},event:function(e){v(),h.event=e},purge:g,time:function(e=n){v(),l[e]=performance.now()},timeEnd:function(e=n){$(e),delete l[e]},timeLog:$,touch:v}},de?.__esModule?de.default:de);var de;let fe=!0;const pe=ue({expand:!1,label:E}),he=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const me=e=>(t,...n)=>ce[t]?ce[t].console[e](...n):pe[e](...n);var ge;const ye=(ge="log",(e,...t)=>!0===(e=>ce[e]?ce[e].log:fe)(e)?me(ge)(e,...t):null),be=me("warn"),we=me("error"),ve=me("event"),ze=me("purge"),$e=me("endAutoGroup"),je=me("errorBoundary");const ke=le(e=>e),Te=(e,...t)=>ce[e]?ce[e].console.warn(...t.map(ke)):queueMicrotask(()=>{const n=le((e=>(...t)=>[`${g}(${e})`,...t].join(" "))(e));console?.warn(...t.map(n))}),xe=(e=>(t,n="renamed to")=>(i,o,r="",a="")=>e(a,`<rb>Deprecated ${t}(${i.replace("()","")})</>\n\nThe <b>${i}</> ${t.toLowerCase()} has been ${n} <b>${o}</>. ${r}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(Te),Me=xe("Method"),Re=xe("Option");function Se(e){const{checkOrigin:t,iframe:{id:n,src:i,sandbox:o},initialisedFirstPage:r,waitForLoad:a,warningTimeout:s}=e,l=(e=>{try{return new URL(e).origin}catch(e){return null}})(i);ve(n,"noResponse"),Te(n,`<rb>No response from iframe</>\n\nThe iframe (<i>${n}</>) has not responded within ${s/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${t&&l?`\nThe <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${l}</>, 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.\n`:""}${a&&!r?"\nThe <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</>.\n":""}${(e=>typeof e===C&&e.length>0&&!(e.contains("allow-scripts")&&e.contains("allow-same-origin")))(o)?"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.\n":""}\nThis 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.\n`)}const Oe={};const Ee=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:F,firstRun:!0,inPageLinks:!1,heightCalculationMethod:L,id:"iFrameResizer",log:!1,logExpand:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,waitForLoad:!1,warningTimeout:5e3,widthCalculationMethod:L,onBeforeClose:()=>!0,onAfterClose(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{typeof ce[e.id].onInit===W&&(Re("init()","onReady()","",e.id),ce[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),Ie={position:null,version:m};function Ce(e){function t(){He(F),Be(q),C("onResized",F)}function n(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function i(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}const o=e=>A.slice(A.indexOf(y)+7+e);const r=(e,t)=>(n,i)=>{const o={};var r,a;r=function(){De(`${n} (${e})`,`${e}:${t()}`,i)},o[a=i]||(r(),o[a]=requestAnimationFrame(()=>{o[a]=null}))},a=(e,t)=>()=>{let n=!1;const i=t=>()=>{ce[l]?n&&n!==t||(e(t,l),n=t,requestAnimationFrame(()=>{n=!1})):s()},o=i(R),r=i("resize window");function a(e,t){t(window,R,o),t(window,M,r)}function s(){ve(l,`stop${t}`),a(0,V),c.disconnect(),u.disconnect(),V(ce[l].iframe,z,s)}const l=q,c=new ResizeObserver(i("pageObserver")),u=new ResizeObserver(i("iframeObserver"));ce[l]&&(ce[l][`stop${t}`]=s,Z(ce[l].iframe,z,s),a(0,Z),c.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),u.observe(ce[l].iframe,{attributes:!0,childList:!1,subtree:!1}))},s=e=>()=>{e in ce[q]&&(ce[q][e](),delete ce[q][e])},l=r(k,function(){const e=document.body.getBoundingClientRect(),t=F.iframe.getBoundingClientRect(),{scrollY:n,scrollX:i,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:n,scrollLeft:i,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})}),c=r(T,function(){const{iframe:e}=F,{scrollWidth:t,scrollHeight:n}=document.documentElement,{width:i,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:n},viewport:{width:i,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})}),u=a(l,"PageInfo"),d=a(c,"ParentInfo"),f=s("stopPageInfo"),g=s("stopParentInfo");function v(e){const t=e.getBoundingClientRect();return Ne(),{x:Number(t.left)+Number(Ie.position.x),y:Number(t.top)+Number(Ie.position.y)}}function j(e){const t=e?v(F.iframe):{x:0,y:0};ye(q,`Reposition requested (offset x:%c${t.x}%c y:%c${t.y})`,p,h,p);const n=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(F,t),i=window.parentIframe||window.parentIFrame;i?function(t,n){setTimeout(()=>t["scrollTo"+(e?"Offset":"")](n.x,n.y))}(i,n):function(e){Ie.position=e,S(q)}(n)}function S(e){const{x:t,y:n}=Ie.position,i=ce[e]?.iframe;!1!==C("onScroll",{iframe:i,top:n,left:t,x:t,y:n})?Be(e):Fe()}function O(e){let t={};if(0===F.width&&0===F.height){const e=o(9).split(y);t={x:e[1],y:e[0]}}else t={x:F.width,y:F.height};C(e,{iframe:F.iframe,screenX:Number(t.x),screenY:Number(t.y),type:F.type})}const C=(e,t)=>We(q,e,t);function W(){const{height:e,iframe:n,msg:i,type:r,width:a}=F;switch(ce[q]?.firstRun&&function(){if(!ce[q])return;Ze(q,F.mode),ce[q].firstRun=!1}(),r){case"close":Ae(n);break;case $:l=o(6),C("onMessage",{iframe:F.iframe,message:JSON.parse(l)});break;case"mouseenter":O("onMouseEnter");break;case"mouseleave":O("onMouseLeave");break;case"beforeUnload":ye(q,"Ready state reset"),ce[q].initialised=!1;break;case b:ce[q].autoResize=JSON.parse(o(9));break;case"scrollBy":!function(){const e=F.width,t=F.height,n=window.parentIframe||window.parentIFrame||window;ye(q,`scrollBy: x: %c${e}%c y: %c${t}`,p,h,p),n.scrollBy(e,t)}();break;case"scrollTo":j(!1);break;case"scrollToOffset":j(!0);break;case k:u();break;case T:d();break;case"pageInfoStop":f();break;case"parentInfoStop":g();break;case"inPageLink":!function(e){const t=e.split("#")[1]||"",n=decodeURIComponent(t);let i=document.getElementById(n)||document.getElementsByName(n)[0];i?function(){const e=v(i);ye(q,`Moving to in page link: %c#${t}`,p),Ie.position={x:e.x,y:e.y},S(q),window.location.hash=t}():window.top!==window.self&&function(){const e=window.parentIframe||window.parentIFrame;e&&e.moveToAnchor(t)}()}(o(9));break;case"title":!function(e,t){ce[t]?.syncTitle&&(ce[t].iframe.title=e,ye(t,`Set iframe title attribute: %c${e}`,p))}(i,q);break;case x:Pe(F);break;case w:t(),function(e){try{ce[e].sameOrigin=!!ce[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){ce[e].sameOrigin=!1}}(q),(s=i)!==m&&(void 0!==s||Te(q,"<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n")),ce[q].initialised=!0,C("onReady",n);break;default:if(0===a&&0===e)return void be(q,`Unsupported message received (${r}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===a||0===e)return;if(document.hidden)return;t()}var s,l}function L(e){if(!ce[e])throw new Error(`${F.type} No settings for ${e}. Message was: ${A}`)}let A=e.data;if("[iFrameResizerChild]Ready"===A)return N=e.source,void Object.values(ce).forEach((e=>({initChild:t,postMessageTarget:n})=>{e===n&&t()})(N));var N;if(!(e=>P===`${e}`.slice(0,13)&&e.slice(13).split(y)[0]in ce)(A)){if(typeof A!==I)return;return void ve(E,"ignoredMessage")}const F=function(e){const t=e.slice(13).split(y),o=t[1]?Number(t[1]):0,r=ce[t[0]]?.iframe,a=getComputedStyle(r),s={iframe:r,id:t[0],height:o+n(a)+i(a),width:Number(t[2]),type:t[3],msg:t[4]};return t[5]&&(s.mode=t[5]),s}(A),{id:B,type:H}=F,q=B;q?(ve(q,H),je(q,function(t){L(q),F.type in{true:1,false:1,undefined:1}||(null!==F.iframe||(be(q,`The iframe (${F.id}) was not found.`),0))&&function(){const{origin:t,sameOrigin:n}=e;if(n)return!0;let i=ce[q]?.checkOrigin;if(i&&"null"!=`${t}`&&!(i.constructor===Array?function(){let e=0,n=!1;for(;e<i.length;e++)if(i[e]===t){n=!0;break}return n}():function(){const e=ce[q]?.remoteHost;return t===e}()))throw new Error(`Unexpected message received from: ${t} for ${F.iframe.id}. Message was: ${e.data}. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.`);return!0}()&&W()})(A)):be("","iframeResizer received messageData without id, message was: ",A)}function We(e,t,n){let i=null,o=null;if(ce[e]){if(i=ce[e][t],typeof i!==W)throw new TypeError(`${t} on iFrame[${e}] is not a function`);if("onBeforeClose"===t||"onScroll"===t)try{o=i(n)}catch(n){console.error(n),be(e,`Error in ${t} callback`)}else((e,...t)=>{setTimeout(()=>e(...t),0)})(i,n)}return o}function Le(e){const{id:t}=e;delete ce[t],delete e.iframeResizer}function Ae(e){const{id:t}=e;if(!1!==We(t,"onBeforeClose",t)){try{e.parentNode&&e.remove()}catch(e){be(t,e)}We(t,"onAfterClose",t),Le(e)}}function Ne(e){null===Ie.position&&(Ie.position={x:window.scrollX,y:window.scrollY})}function Fe(){Ie.position=null}function Be(e){null!==Ie.position&&(window.scrollTo(Ie.position.x,Ie.position.y),ye(e,`Set page position: %c${Ie.position.x}%c, %c${Ie.position.y}`,p,h,p),Fe())}function Pe(e){Ne(e.id),He(e),De(x,x,e.id)}function He(e){function t(t){const i=`${e[t]}px`;e.iframe.style[t]=i,ye(n,`Set ${t}: %c${i}`,p)}const{id:n}=e,{sizeHeight:i,sizeWidth:o}=ce[n];i&&t("height"),o&&t("width")}const qe=e=>e.split(y).filter((e,t)=>19!==t).join(y);function De(e,t,n){function i(i){const o=e in q?qe(t):t;ye(n,i,p,h,p),ye(n,`Message data: %c${o}`,p)}ve(n,e),ce[n]&&(ce[n]?.postMessageTarget?function(){const{iframe:o,postMessageTarget:r,sameOrigin:a,targetOrigin:s}=ce[n];if(a)try{return o.contentWindow.iframeChildListener(P+t),void i(`Sending message to iframe %c${n}%c via same origin%c`)}catch(t){e in q?ce[n].sameOrigin=!1:be(n,"Same origin messaging failed, falling back to postMessage")}i(`Sending message to iframe: %c${n}%c targetOrigin: %c${s}`),r.postMessage(P+t,s)}():be(n,`Iframe(${n}) not found`))}let Ue=0,Qe=!1,Je=!1;function Ze(t,n=-3){if(Qe)return;const i=Math.max(ce[t].mode,n);if(i>ce[t].mode&&(ce[t].mode=i),i<0)throw ze(t),ce[t].vAdvised||Te(t||"Parent",`${te(i+2)}${te(2)}`),ce[t].vAdvised=!0,te(i+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");i>0&&Je||function(t,n){queueMicrotask(()=>console.info(`%ciframe-resizer ${t}`,fe||n<1?"font-weight: bold;":e))}(`v${m} (${(e=>X(K[e]))(i)})`,i),i<1&&Te("Parent",te(3)),Qe=!0}const Ve=e=>t=>{function n(){ce[d]?.heightCalculationMethod in H&&Pe({iframe:t,height:1,width:1,type:w})}function i(){if(ce[d]){const{iframe:e}=ce[d],t={close:Ae.bind(null,e),disconnect:Le.bind(null,e),removeListeners(){Te(d,`<rb>Deprecated Method Name</>\n\nThe <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${J}\n`),this.disconnect()},resize(){Te(d,"<rb>Deprecated Method</>\n\nUse of the <b>resize()</> method from the parent page is deprecated and will be removed in a future version of <i>iframe-resizer</>. As their 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."),De.bind(null,"Window resize",M,d)},moveToAnchor(e){((e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${i=t,i.charAt(0).toUpperCase()+i.slice(1)}`);var i})(e,I,"moveToAnchor(anchor) anchor"),De("Move to anchor",`moveToAnchor:${e}`,d)},sendMessage(e){e=JSON.stringify(e),De($,`${$}:${e}`,d)}};e.iframeResizer=t,e.iFrameResizer=t}}function o(e,t){const i=i=>()=>{if(!ce[e])return;const{firstRun:o,iframe:r}=ce[e];De(i,t,e),(e=>e===w)(i)&&(e=>"lazy"===e.loading)(r)||function(e,t){const n=t[e],{msgTimeout:i,warningTimeout:o}=n;o&&(i&&clearTimeout(i),n.msgTimeout=setTimeout(function(){const n=t[e];void 0!==n&&((e=>{e.msgTimeout=void 0})(n),function(e){const{initialised:t}=e;return t&&(e.initialisedFirstPage=!0),t}(n)||Se(n))},o))}(e,ce),o||n()},{iframe:o}=ce[e];ce[e].initChild=i(v),function(e,t){Z(e,z,()=>setTimeout(t,1))}(o,i(j)),function(e,t){const{iframe:n,waitForLoad:i}=ce[e];!0!==i&&((e=>{const{src:t,srcdoc:n}=e;return!n&&(null==t||""===t||"about:blank"===t)})(n)?setTimeout(()=>{ve(e,"noContent"),ye(e,"No content detected in the iframe, delaying initialisation")}):setTimeout(t))}(e,i(w))}function r(e){return e?(("sizeWidth"in e||"sizeHeight"in e||b in e)&&Te(d,`<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${F}</>, <bb>${B}</>, <bb>${N}</> or <bb>${A}</>.\n`),e):{}}function a(e){const t=ce[e]?.iframe?.title;return""===t||void 0===t}function s(e,t){ie(ce[d],e)&&(Te(d,`<rb>Deprecated option</>\n\nThe <b>${e}</> option has been renamed to <b>${t}</>. ${J}`),ce[d][t]=ce[d][e],delete ce[d][e])}const l=e=>ie(e,"onMouseEnter")||ie(e,"onMouseLeave");function c(e){var n,i;ce[d]={...ce[d],iframe:t,remoteHost:t?.src.split("/").slice(0,3).join("/"),...Ee,...r(e),mouseEvents:l(e),mode:ne(e),syncTitle:a(d)},s("offset","offsetSize"),s("onClose","onBeforeClose"),s("onClosed","onAfterClose"),ve(d,"setup"),function(){const{direction:e}=ce[d];switch(e){case F:break;case B:ce[d].sizeHeight=!1;case N:ce[d].sizeWidth=!0;break;case A:ce[d].sizeWidth=!1,ce[d].sizeHeight=!1,ce[d].autoResize=!1;break;default:throw new TypeError(d,`Direction value of "${e}" is not valid`)}}(),(n=e?.offsetSize||e?.offset)&&(ce[d].direction===F?ce[d].offsetHeight=n:ce[d].offsetWidth=n),ce[d].warningTimeout||ye(d,"warningTimeout:%c disabled",p),null===ce[d].postMessageTarget&&(ce[d].postMessageTarget=t.contentWindow),ce[d].targetOrigin=!0===ce[d].checkOrigin?""===(i=ce[d].remoteHost)||null!==i.match(/^(about:blank|javascript:|file:\/\/)/)?"*":i:"*"}const u=()=>g in t,d=function(n){if(n&&typeof n!==I)throw new TypeError("Invalid id for iFrame. Expected String");return""!==n&&n||(n=function(){let t=e?.id||Ee.id+Ue++;return null!==document.getElementById(t)&&(t+=Ue++),t}(),t.id=n,ve(n,"assignId")),n}(t.id);if(typeof e!==C)throw new TypeError("Options is not an object");return function(e){const{search:t}=window.location;t.includes("ifrlog")&&(e.log=U,e.logExpand=t.includes("ifrlog=expanded"))}(e),function(e,t){const n=ie(t,"log"),i=typeof t.log===I,o=n?!!i||t.log:Ee.log;ie(t,"logExpand")||(t.logExpand=n&&i?t.log===D:Ee.logExpand),function(e){-1===e?.log&&(e.log=!1,Je=!0)}(t),function({enabled:e,expand:t,iframeId:n}){const i=ue({expand:t,label:he(n)});fe=e,ce[n]||(ce[n]={console:i})}({enabled:o,expand:t.logExpand,iframeId:e}),i&&!(t.log in Q)&&we(e,'Invalid value for options.log: Accepted values are "expanded" and "collapsed"'),t.log=o}(d,e),je(d,function(e){u()?be(d,`Ignored iframe (${d}), already setup.`):(c(e),function(e){if(!0===Oe[e])return!1;const t=document.querySelectorAll(`iframe#${CSS.escape(e)}`);if(t.length<=1)return!0;Oe[e]=!0;const n=Array.from(t).flatMap(e=>[S,e,S]);Te(e,`<rb>Duplicate ID attributes detected</>\n\nThe <b>${e}</> ID is not unique. Having multiple iframes on the same page with the same ID causes problems with communication between the iframe and parent page. Please ensure that the ID of each iframe has a unique value.\n\nFound <bb>${t.length}</> iframes with the <b>${e}</> ID:`,...n,S)}(d),function(){if(Qe)return;const{mode:e}=ce[d];-1!==e&&Ze(d,e)}(),Xe(),function(){switch(t.style.overflow=!1===ce[d]?.scrolling?"hidden":L,ce[d]?.scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=ce[d]?ce[d].scrolling:"no"}}(),function(){const{bodyMargin:e}=ce[d];"number"!=typeof e&&"0"!==e||(ce[d].bodyMargin=`${e}px`)}(),o(d,function(e){const{autoResize:t,bodyBackground:n,bodyMargin:i,bodyPadding:o,heightCalculationMethod:r,inPageLinks:a,license:s,log:l,logExpand:c,mouseEvents:u,offsetHeight:d,offsetWidth:f,mode:p,sizeHeight:h,sizeWidth:m,tolerance:g,widthCalculationMethod:b}=ce[e];return[e,"8",m,l,"32",!0,t,i,r,n,o,g,a,O,b,u,d,f,h,s,Ie.version,p,"",c].join(y)}(d)),i(),$e(d))})(e),t?.iframeResizer};function Ge(){!0!==document.hidden&&((e,t)=>{Object.values(ce).filter(({autoResize:e,firstRun:t})=>e&&!t).forEach(({iframe:n})=>De(e,t,n.id))})("tabVisible",M)}const Xe=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})(()=>{Z(window,$,Ce),Z(document,"visibilitychange",Ge),window.iframeParentListener=e=>setTimeout(()=>Ce({data:e,sameOrigin:!0}))});switch(!0){case void 0===window.jQuery:be("","Unable to bind to jQuery, it is not available.");break;case!window.jQuery.fn:be("","Unable to bind to jQuery, it is not fully loaded.");break;case window.jQuery.fn.iframeResize:be("","iframeResize is already assigned to jQuery.fn.");break;default:window.jQuery.fn.iframeResize=function(e){const t=Ve(e);return this.filter("iframe").each((e,n)=>t(n)).end()},window.jQuery.fn.iFrameResize=function(e){return Me("iFrameResize()","iframeResize()","","jQuery"),this.iframeResize(e)}}});
20
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";const e="6.0.0-beta.0",n="iframeResizer",t=":",i="autoResize",o="init",r="iframeReady",s="load",a="message",l="onload",c="pageInfo",u="parentInfo",d="reset",f="resize",p="scroll",m="\n",h="parent",g="string",y="object",v="function",b="auto",w="none",z="both",$="vertical",j="horizontal",k="[iFrameSizer]",M=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),T=Object.freeze({[l]:1,[o]:1,[r]:1}),x="expanded",O="collapsed",R=Object.freeze({[x]:1,[O]:1}),S="Use of the old name will be removed in a future version of <i>iframe-resizer</>.",I=e=>typeof e===y&&null!==e,E=e=>typeof e===g;const C=(e,n)=>Object.hasOwn?Object.hasOwn(e,n):((e,n)=>Object.prototype.hasOwnProperty.call(e,n))(e,n),W="font-weight: normal;",A=W+"font-style: italic;",L="default",N=Object.freeze({assert:!0,error:!0,warn:!0}),F={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},P={profile:0,profileEnd:0,timeStamp:0,trace:0},B=Object.assign(console);const{fromEntries:H,keys:q}=Object,D=e=>[e,B[e]],U=e=>n=>[n,function(t){e[n]=t}],Q=(e,n)=>H(q(e).map(n));const J=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,V=J?"color: #A9C7FB;":"color: #135CD2;",Z=J?"color: #E3E3E3;":"color: #1F1F1F;",G={br:"\n",rb:"",bb:"",b:"",i:"",u:"","/":""},X=Object.keys(G),Y=new RegExp(`<(${X.join("|")})>`,"gi"),_=(e,n)=>{var t;return null!==(t=G[n])&&void 0!==t?t:""},K=e=>n=>e(E(n)?window.chrome?n.replace(Y,_):(e=>e.replaceAll("<br>",m).replaceAll(/<\/?[^>]+>/gi,""))(n):n),ee={},ne=(te=function(e={}){const n={},t={},i=[],o={...F,expand:!e.collapsed||F.expanded,...e};let r="";function s(){i.length=0,r=""}function a(){delete o.event,s()}const l=()=>!!i.some(([e])=>e in N)||!!o.expand;function c(){if(0!==i.length){B[l()?"group":"groupCollapsed"](`%c${o.label}%c ${(e=>{const n=e.event||e.defaultEvent;return n?`${n}`:""})(o)} %c${o.showTime?r:""}`,W,"font-weight: bold;",A);for(const[e,...n]of i)B.assert(e in B,`Unknown console method: ${e}`),e in B&&B[e](...n);B.groupEnd(),a()}else a()}function u(){""===r&&(r=function(){const e=new Date,n=(n,t)=>e[n]().toString().padStart(t,"0");return`@ ${n("getHours",2)}:${n("getMinutes",2)}:${n("getSeconds",2)}.${n("getMilliseconds",3)}`}(),queueMicrotask(()=>queueMicrotask(c)))}function d(e,...n){0===i.length&&u(),i.push([e,...n])}function f(e=L,...t){n[e]?d("log",`${e}: ${performance.now()-n[e]} ms`,...t):d("timeLog",e,...t)}return{...Q(o,U(o)),...Q(console,e=>[e,(...n)=>d(e,...n)]),...Q(P,D),assert:function(e,...n){!0!==e&&d("assert",e,...n)},count:function(e=L){t[e]?t[e]+=1:t[e]=1,d("log",`${e}: ${t[e]}`)},countReset:function(e=L){delete t[e]},endAutoGroup:c,errorBoundary:e=>(...n)=>{let t;try{t=e(...n)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;d("error",e),c()}return t},event:function(e){u(),o.event=e},purge:s,time:function(e=L){u(),n[e]=performance.now()},timeEnd:function(e=L){f(e),delete n[e]},timeLog:f,touch:u}},(null==te?void 0:te.__esModule)?te.default:te);var te;let ie=!0;const oe=ne({expand:!1,label:h}),re=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const se=e=>(n,...t)=>ee[n]?ee[n].console[e](...t):oe[e](...t),ae=e=>(n,...t)=>!0===(e=>ee[e]?ee[e].log:ie)(n)?se(e)(n,...t):null,le=ae("log"),ce=le,ue=ae("debug"),de=se("warn"),fe=se("error"),pe=se("event"),me=se("purge"),he=se("endAutoGroup"),ge=se("errorBoundary");const ye=K(e=>e),ve=(e,...t)=>ee[e]?ee[e].console.warn(...t.map(ye)):queueMicrotask(()=>{const i=K((e=>(...t)=>[`${n}(${e})`,...t].join(" "))(e));null===console||void 0===console||console.warn(...t.map(i))}),be=(e=>(n,t="renamed to")=>(i,o,r="",s="")=>e(s,`<rb>Deprecated ${n}(${i.replace("()","")})</>\n\nThe <b>${i}</> ${n.toLowerCase()} has been ${t} <b>${o}</>. ${r}Use of the old ${n.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(ve),we=be("Method"),ze=be("Option"),$e=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:$,firstRun:!0,inPageLinks:!1,heightCalculationMethod:b,id:"iFrameResizer",log:!1,logExpand:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,waitForLoad:!1,warningTimeout:5e3,widthCalculationMethod:b,onBeforeClose:()=>!0,onAfterClose(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{typeof ee[e.id].onInit===v&&(ze("init()","onReady()","",e.id),ee[e.id].onInit(e))},onResized(){},onScroll:()=>!0});let je=0;function ke(e,n){let{id:t}=e;if(t&&!E(t))throw new TypeError("Invalid id for iFrame. Expected String");return t&&""!==t||(t=function(e){const n=(null==e?void 0:e.id)||$e.id+je++;return null===document.getElementById(n)?n:`${n}${je++}`}(n),e.id=t,pe(t,"assignId"),le(t,`Added missing iframe ID: ${t} (${e.src})`)),t}const Me=(e,n,t,i)=>e.addEventListener(n,t,i||!1),Te=(e,n,t)=>e.removeEventListener(n,t,!1);function xe(e,n,i){function o(o){const r=e in T?(e=>e.split(t).filter((e,n)=>19!==n).join(t))(n):n;ce(i,o,V,Z,V),ce(i,`Message data: %c${r}`,V)}const{iframe:r,postMessageTarget:s,sameOrigin:a,targetOrigin:l}=ee[i];if(a)try{return r.contentWindow.iframeChildListener(k+n),void o(`Sending message to iframe %c${i}%c via same origin%c`)}catch(n){e in T?(ee[i].sameOrigin=!1,le(i,"New iframe does not support same origin")):de(i,"Same origin messaging failed, falling back to postMessage")}o(`Sending message to iframe: %c${i}%c targetOrigin: %c${l}`),s.postMessage(k+n,l)}function Oe(e,n,t){var i;pe(t,e),(null===(i=ee[t])||void 0===i?void 0:i.postMessageTarget)?xe(e,n,t):de(t,"Iframe not found")}function Re(){!0!==document.hidden&&((e,n)=>{Object.values(ee).filter(({autoResize:e,firstRun:n})=>e&&!n).forEach(({iframe:t})=>Oe(e,n,t.id))})("tabVisible",f)}function Se(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function Ie(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}const Ee={true:1,false:1,undefined:1};function Ce(e){const{id:n,msg:t,iframe:i}=e,o=function(e){if(!I(e))return!1;try{return"IFRAME"===e.tagName||e instanceof HTMLIFrameElement}catch(e){return!1}}(i);return o||(le(n,`Received: %c${t}`,V),de(n,"The target iframe was not found.")),o}function We(e,n,t){if(!ee[e])return null;const i=ee[e][n];if(typeof i!==v)throw new TypeError(`${n} on iframe[${e}] is not a function`);if("onBeforeClose"!==n&&"onScroll"!==n)return((e,...n)=>setTimeout(()=>e(...n),0))(i,t);try{return i(t)}catch(t){return console.error(t),de(e,`Error in ${n} callback`),null}}function Ae(e,n){const{lastMessage:i}=ee[e];return i.slice(i.indexOf(t)+7+n)}function Le(e,n){const{id:i,iframe:o,height:r,type:s,width:a}=n;let l={x:0,y:0};if(0===a&&0===r){const e=Ae(i,9).split(t);l={x:e[1],y:e[0]}}else l={x:a,y:r};We(i,e,{iframe:o,screenX:Number(l.x),screenY:Number(l.y),type:s})}const Ne={position:null,version:e};function Fe(){Ne.position=null}function Pe(e){return null===Ne.position&&(Ne.position={x:window.scrollX,y:window.scrollY}),le(e,`Get page position: %c${Ne.position.x}%c, %c${Ne.position.y}`,V,Z,V),Ne.position}function Be(e){null!==Ne.position&&(window.scrollTo(Ne.position.x,Ne.position.y),ce(e,`Set page position: %c${Ne.position.x}%c, %c${Ne.position.y}`,V,Z,V),Fe())}function He(e,n){const{id:t}=n,i=`${n[e]}px`;ee[t].iframe.style[e]=i,ce(t,`Set ${e}: %c${i}`,V)}function qe(e){const{id:n}=e,{sizeHeight:t,sizeWidth:i}=ee[n];t&&He("height",e),i&&He("width",e)}function De(e){const{id:n}=e;qe(e),Be(n),We(n,"onResized",e)}function Ue(e){const{id:n}=e;le(n,"Disconnected from iframe"),delete ee[n],delete e.iframeResizer}function Qe(e){const{id:n}=e;if(!1!==We(n,"onBeforeClose",n)){le(n,`Removing iFrame: %c${n}`,V);try{e.parentNode&&e.remove()}catch(e){de(n,e)}We(n,"onAfterClose",n),Ue(e)}else le(n,"Close iframe cancelled by onBeforeClose")}function Je(e){const{id:n,type:t}=e;le(n,"Size reset requested by "+(t===o?"parent page":"child page")),Pe(n),qe(e),Oe(d,d,n)}const Ve=(e,n)=>{const t={};return(i,o)=>{const{iframe:r}=ee[o];var s,a;s=function(){Oe(`${i} (${e})`,`${e}:${n(r)}`,o)},t[a=o]||(s(),t[a]=requestAnimationFrame(()=>{t[a]=null}))}},Ze=e=>n=>{e in ee[n]&&(ee[n][e](),delete ee[n][e])},Ge=(e,n)=>t=>{let i=!1;const o=n=>()=>{ee[t]?i&&i!==n||(e(n,t),i=n,requestAnimationFrame(()=>{i=!1})):c()},r=o(p),a=o("resize window");function l(e,i){le(t,`${e}listeners for send${n}`),i(window,p,r),i(window,f,a)}function c(){pe(t,`stop${n}`),l("Remove ",Te),u.disconnect(),d.disconnect(),ee[t]&&Te(ee[t].iframe,s,c)}const u=new ResizeObserver(o("pageObserver")),d=new ResizeObserver(o("iframeObserver"));ee[t]&&(ee[t][`stop${n}`]=c,Me(ee[t].iframe,s,c),l("Add ",Me),u.observe(document.body),d.observe(ee[t].iframe))};const Xe=Ge(Ve(c,function(e){const n=document.body.getBoundingClientRect(),t=e.getBoundingClientRect(),{scrollY:i,scrollX:o,innerHeight:r,innerWidth:s}=window,{clientHeight:a,clientWidth:l}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,r||0),clientWidth:Math.max(l,s||0),offsetTop:Math.trunc(t.top-n.top),offsetLeft:Math.trunc(t.left-n.left),scrollTop:i,scrollLeft:o,documentHeight:a,documentWidth:l,windowHeight:r,windowWidth:s})}),"PageInfo"),Ye=Ze("stopPageInfo");const _e=Ge(Ve(u,function(e){const{scrollWidth:n,scrollHeight:t}=document.documentElement,{width:i,height:o,offsetLeft:r,offsetTop:s,pageLeft:a,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:n,scrollHeight:t},viewport:{width:i,height:o,offsetLeft:r,offsetTop:s,pageLeft:a,pageTop:l,scale:c}})}),"ParentInfo"),Ke=Ze("stopParentInfo");function en(e){const n=e.getBoundingClientRect(),t=Pe(e.id);return{x:Number(n.left)+Number(t.x),y:Number(n.top)+Number(t.y)}}function nn(e){var n;const{x:t,y:i}=Ne.position;!1!==We(e,"onScroll",{iframe:null===(n=ee[e])||void 0===n?void 0:n.iframe,top:i,left:t,x:t,y:i})?Be(e):Fe()}const tn=e=>n=>{const{id:t,iframe:i,height:o,width:r}=n,s=e?en(i):{x:0,y:0},a=(e=>({x:r+e.x,y:o+e.y}))(s),l=window.parentIframe||window.parentIFrame;ce(t,`Reposition requested (offset x:%c${s.x}%c y:%c${s.y})`,V,Z,V),l?function(n,t){n["scrollTo"+(e?"Offset":"")](t.x,t.y)}(l,a):function(e){var n;n=e,Ne.position=n,nn(t)}(a)},on=tn(!1),rn=tn(!0);function sn(e,n){const t=n.split("#")[1]||"",i=decodeURIComponent(t),o=document.getElementById(i)||document.getElementsByName(i)[0];o?function(e,n,t){const{x:i,y:o}=en(t);ce(e,`Moving to in page link: %c#${n}`,V),Ne.position={x:i,y:o},nn(e),window.location.hash=n}(e,t,o):window.top!==window.self?function(e,n){const t=window.parentIframe||window.parentIFrame;t?t.moveToAnchor(n):le(e,`In page link #${n} not found`)}(e,t):le(e,`In page link #${t} not found`)}function an(e){var n,t;const i=null===(t=null===(n=ee[e])||void 0===n?void 0:n.iframe)||void 0===t?void 0:t.title;return""===i||void 0===i}const ln=e=>{if(!e)return"";let n=-559038744,t=1103547984;for(let i,o=0;o<e.length;o++)i=e.codePointAt(o),n=Math.imul(n^i,2246822519),t=Math.imul(t^i,3266489917);return n^=Math.imul(n^t>>>15,1935289751),t^=Math.imul(t^n>>>15,3405138345),n^=t>>>16,t^=n>>>16,(2097152*(t>>>0)+(n>>>11)).toString(36)},cn=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),un=["spjluzl","rlf","clyzpvu","rlf2"],dn=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","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</>","<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</>.","<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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],fn=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],pn=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5","2b5sdlfhbev","zo4ui3arjo","oclbb4thgl"].map((e,n)=>[e,Math.max(0,n-1)])),mn=e=>cn(dn[e]),hn=e=>{const n=e[cn(un[0])]||e[cn(un[1])]||e[cn(un[2])]||e[cn(un[3])];if(!n)return-1;const t=n.split("-");let i=function(e=""){let n=-2;const t=ln(cn(e));return t in pn&&(n=pn[t]),n>4?n-4:n}(t[0]);return 0===i||(e=>e[2]===ln(e[0]+e[1]))(t)||(i=-2),i};let gn=!1,yn=!1;function vn(n,t=-3){if(gn)return;const i=Math.max(ee[n].mode,t);if(i>ee[n].mode&&(ee[n].mode=i),i<0)throw me(n),ee[n].vAdvised||ve(n||"Parent",`${mn(i+2)}${mn(2)}`),ee[n].vAdvised=!0,mn(i+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");i>0&&yn||function(e,n){queueMicrotask(()=>console.info(`%ciframe-resizer ${e}`,ie||n<1?"font-weight: bold;":W))}(`v${e} (${(e=>cn(fn[e]))(i)})`,i),i<1&&ve("Parent",mn(3)),gn=!0}function bn(n){var t;const{height:r,id:s,iframe:l,mode:f,message:p,type:m,width:h}=n,{lastMessage:g}=ee[s];switch((null===(t=ee[s])||void 0===t?void 0:t.firstRun)&&function(e,n){ee[e]&&(le(e,`First run for ${e}`),vn(e,void 0!==n?Number(n):void 0),ee[e].firstRun=!1)}(s,f),le(s,`Received: %c${g}`,V),m){case i:ee[s].autoResize=JSON.parse(Ae(s,9));break;case"beforeUnload":ce(s,"Ready state reset"),ee[s].initialised=!1;break;case"close":Qe(l);break;case"inPageLink":sn(s,Ae(s,9));break;case o:De(n),function(e){var n,t,i;try{ee[e].sameOrigin=!!(null===(i=null===(t=null===(n=ee[e])||void 0===n?void 0:n.iframe)||void 0===t?void 0:t.contentWindow)||void 0===i?void 0:i.iframeChildListener)}catch(n){ee[e].sameOrigin=!1}le(e,`sameOrigin: %c${ee[e].sameOrigin}`,V)}(s),function(n,t){t!==e&&(void 0!==t?le(n,`Version mismatch (Child: %c${t}%c !== Parent: %c${e})`,V,Z,V):ve(n,"<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n"))}(s,p),ee[s].initialised=!0,We(s,"onReady",l);break;case a:!function(e,n){const{id:t,iframe:i}=e;le(t,`onMessage passed: {iframe: %c${t}%c, message: %c${n}%c}`,V,Z,V,Z),We(t,"onMessage",{iframe:i,message:JSON.parse(n)})}(n,Ae(s,6));break;case"mouseenter":Le("onMouseEnter",n);break;case"mouseleave":Le("onMouseLeave",n);break;case c:Xe(s);break;case u:_e(s);break;case"pageInfoStop":Ye(s);break;case"parentInfoStop":Ke(s);break;case d:Je(n);break;case"scrollBy":!function(e){const{id:n,height:t,width:i}=e,o=window.parentIframe||window.parentIFrame||window;ce(n,`scrollBy: x: %c${i}%c y: %c${t}`,V,Z,V),o.scrollBy(i,t)}(n);break;case"scrollTo":on(n);break;case"scrollToOffset":rn(n);break;case"title":!function(e,n){var t;(null===(t=ee[e])||void 0===t?void 0:t.syncTitle)&&(ee[e].iframe.title=n,ce(e,`Set iframe title attribute: %c${n}`,V))}(s,p);break;default:if(0===h&&0===r)return void de(s,`Unsupported message received (${m}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===h||0===r)return void le(s,"Ignoring message with 0 height or width");if(document.hidden)return void le(s,"Page hidden - ignored resize request");De(n)}}function wn(e){const n=e.data;if("[iFrameResizerChild]Ready"===n)return t=e.source,void Object.values(ee).forEach((e=>({initChild:n,postMessageTarget:t})=>{e===t&&n()})(t));var t,i;if(k!==`${i=n}`.slice(0,13)||!(i.slice(13).split(":")[0]in ee)){if(typeof n!==g)return;return pe(h,"ignoredMessage"),void ue(h,n)}const o=function(e){var n;const t=e.slice(13).split(":"),i=t[1]?Number(t[1]):0,o=null===(n=ee[t[0]])||void 0===n?void 0:n.iframe,r=getComputedStyle(o),s={iframe:o,id:t[0],height:i+Se(r)+Ie(r),width:Number(t[2]),type:t[3],msg:t[4],message:t[4]};return t[5]&&(s.mode=t[5]),s}(n),{id:r,type:s}=o;switch(pe(r,s),!0){case!ee[r]:throw new Error(`${s} No settings for ${r}. Message was: ${n}`);case!Ce(o):case function(e){const{id:n,type:t}=e,i=t in Ee;return i&&le(n,"Ignoring init message from meta parent page"),i}(o):case!function(e,n){var t;const{id:i}=e,{data:o,origin:r}=n;if("sameOrigin"in n&&n.sameOrigin)return!0;let s=null===(t=ee[i])||void 0===t?void 0:t.checkOrigin;if(s&&"null"!=`${r}`&&!(s.constructor===Array?function(){le(i,`Checking connection is from allowed list of origins: %c${s}`,V);for(const e of s)if(e===r)return!0;return!1}():function(){var e;const n=null===(e=ee[i])||void 0===e?void 0:e.remoteHost;return le(i,`Checking connection is from: %c${n}`,V),r===n}()))throw new Error(`Unexpected message received from: ${r} for ${i}. Message was: ${o}. This error can be disabled by setting the checkOrigin: false option or by providing an array of trusted domains.`);return!0}(o,e):return;default:ee[r].lastMessage=e.data,ge(r,bn)(o)}}const zn=(e=>{let n=!1;return function(...t){return n?void 0:(n=!0,e.apply(this,t))}})(()=>{Me(window,a,wn),Me(document,"visibilitychange",Re),window.iframeParentListener=e=>setTimeout(()=>wn({data:e,sameOrigin:!0}))}),$n={};const jn=`<rb>Deprecated Method Name</>\n\nThe <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${S}`;function kn(e){if(ee[e]){const{iframe:n}=ee[e],t={close:Qe.bind(null,n),disconnect:Ue.bind(null,n),moveToAnchor(n){((e,n,t)=>{if(typeof e!==n)throw new TypeError(`${t} is not a ${i=n,i.charAt(0).toUpperCase()+i.slice(1)}`);var i})(n,g,"moveToAnchor(anchor) anchor"),Oe("Move to anchor",`moveToAnchor:${n}`,e)},removeListeners(){ve(e,jn),this.disconnect()},resize(){ve(e,"<rb>Deprecated Method</>\n\nUse 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."),Oe("Window resize",f,e)},sendMessage(n){n=JSON.stringify(n),Oe(a,`${a}:${n}`,e)}};n.iframeResizer=t,n.iFrameResizer=t}}const Mn="8",Tn="32",xn="child",On=!0;function Rn(e,n){const{checkOrigin:t,iframe:{src:i,sandbox:o},initialisedFirstPage:r,waitForLoad:s}=n[e],a=(e=>{try{return new URL(e).origin}catch(e){return null}})(i);pe(e,"noResponse"),ve(e,`<rb>No response from iframe</>\n\nThe iframe (<i>${e}</>) has not responded within ${n[e].warningTimeout/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${t&&a?`\nThe <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.\n`:""}${s&&!r?"\nThe <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</>.\n":""}${(e=>typeof e===y&&e.length>0&&!(e.contains("allow-scripts")&&e.contains("allow-same-origin")))(o)?"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.\n":""}\nThis 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.\n`)}function Sn(e,n){const t=t=>()=>{if(!ee[e])return;const{firstRun:i,iframe:r}=ee[e];Oe(t,n,e),(e=>e===o)(t)&&(e=>"lazy"===e.loading)(r)||function(e,n){const{msgTimeout:t,warningTimeout:i}=n[e];i&&(t&&clearTimeout(t),n[e].msgTimeout=setTimeout(function(){if(void 0===n[e])return;const{initialised:t,loadErrorShown:i}=n[e];n[e].msgTimeout=void 0,t?n[e].initialisedFirstPage=!0:i||(n[e].loadErrorShown=!0,Rn(e,n))},i))}(e,ee),i||function(e){var n;(null===(n=ee[e])||void 0===n?void 0:n.heightCalculationMethod)in M&&Je({id:e,iframe:ee[e].iframe,height:1,width:1,type:o})}(e)},{iframe:i}=ee[e];ee[e].initChild=t(r),function(e,n){Me(e,s,()=>setTimeout(n,1))}(i,t(l)),function(e,n){const{iframe:t,waitForLoad:i}=ee[e];!0!==i&&((e=>{const{src:n,srcdoc:t}=e;return!t&&(null==n||""===n||"about:blank"===n)})(t)?setTimeout(()=>{pe(e,"noContent"),ce(e,"No content detected in the iframe, delaying initialisation")}):setTimeout(n))}(e,t(o))}function In(e,n,t){C(ee[e],n)&&(ve(e,`<rb>Deprecated option</>\n\nThe <b>${n}</> option has been renamed to <b>${t}</>. ${S}`),ee[e][t]=ee[e][n],delete ee[e][n])}const En=e=>C(e,"onMouseEnter")||C(e,"onMouseLeave");function Cn(e,n){const{id:t}=e;ee[t]=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ee[t]),{iframe:e,remoteHost:null==e?void 0:e.src.split("/").slice(0,3).join("/")}),$e),function(e,n){return n?(("sizeWidth"in n||"sizeHeight"in n||i in n)&&ve(e,`<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${$}</>, <bb>${j}</>, <bb>${z}</> or <bb>${w}</>.\n`),n):{}}(t,n)),{mouseEvents:En(n),mode:hn(n),syncTitle:an(t)}),function(e){In(e,"offset","offsetSize"),In(e,"onClose","onBeforeClose"),In(e,"onClosed","onAfterClose")}(t),function(e){const{direction:n}=ee[e];switch(n){case $:break;case j:ee[e].sizeHeight=!1;case z:ee[e].sizeWidth=!0;break;case w:ee[e].sizeWidth=!1,ee[e].sizeHeight=!1,ee[e].autoResize=!1;break;default:throw new TypeError(`Direction value of "${n}" is not valid`)}le(e,`direction: %c${n}`,V)}(t),function(e,{offset:n,offsetSize:t}){const i=t||n;i&&(ee[e].direction===$?(ee[e].offsetHeight=i,le(e,`Offset height: %c${i}`,V)):(ee[e].offsetWidth=i,le(e,`Offset width: %c${i}`,V)))}(t,n),function(e){ee[e].warningTimeout||ce(e,"warningTimeout:%c disabled",V)}(t),function(e){const{id:n}=e;null===ee[n].postMessageTarget&&(ee[n].postMessageTarget=e.contentWindow)}(e),function(e){var n;ee[e].targetOrigin=!0===ee[e].checkOrigin?""===(n=ee[e].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*"}(t)}function Wn(e,n,i){Cn(n,i),le(e,`src: %c${n.srcdoc||n.src}`,V),function(e){if(gn)return;const{mode:n}=ee[e];-1!==n&&vn(e,n)}(e),function(e){var n,t,i,o;const{id:r}=e;switch(le(r,`Iframe scrolling ${(null===(n=ee[r])||void 0===n?void 0:n.scrolling)?"enabled":"disabled"} for ${r}`),e.style.overflow=!1===(null===(t=ee[r])||void 0===t?void 0:t.scrolling)?"hidden":b,null===(i=ee[r])||void 0===i?void 0:i.scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=(null===(o=ee[r])||void 0===o?void 0:o.scrolling)||"no"}}(n),function(e){const{bodyMargin:n}=ee[e];"number"!=typeof n&&"0"!==n||(ee[e].bodyMargin=`${n}px`)}(e),Sn(e,function(e){const{autoResize:n,bodyBackground:i,bodyMargin:o,bodyPadding:r,heightCalculationMethod:s,inPageLinks:a,license:l,log:c,logExpand:u,mouseEvents:d,offsetHeight:f,offsetWidth:p,mode:m,sizeHeight:h,sizeWidth:g,tolerance:y,widthCalculationMethod:v}=ee[e];return[e,Mn,g,c,Tn,On,n,o,s,i,r,y,a,xn,v,d,f,p,h,l,Ne.version,m,"",u].join(t)}(e)),kn(e),le(e,"Setup complete")}function An(e,n){const{id:t}=e;pe(t,"setup"),function(e){if(!0===$n[e])return!1;const n=document.querySelectorAll(`iframe#${CSS.escape(e)}`);if(n.length<=1)return!0;$n[e]=!0;const t=Array.from(n).flatMap(e=>[m,e,m]);return ve(e,`<rb>Duplicate ID attributes detected</>\n\nThe <b>${e}</> ID is not unique. Having multiple iframes on the same page with the same ID causes problems with communication between the iframe and parent page. Please ensure that the ID of each iframe has a unique value.\n\nFound <bb>${n.length}</> iframes with the <b>${e}</> ID:`,...t,m),!1}(t)&&Wn(t,e,n),he(t)}function Ln(e,n){const t=C(n,"log"),i=E(n.log),o=t?!!i||n.log:$e.log;C(n,"logExpand")||(n.logExpand=t&&i?n.log===x:$e.logExpand),function(e){-1===(null==e?void 0:e.log)&&(e.log=!1,yn=!0)}(n),function({enabled:e,expand:n,iframeId:t}){const i=ne({expand:n,label:re(t)});ie=e,ee[t]||(ee[t]={console:i})}({enabled:o,expand:n.logExpand,iframeId:e}),i&&!(n.log in R)&&fe(e,`Invalid value for options.log: Accepted values are "${x}" and "${O}"`),n.log=o}function Nn(e){if(!I(e))throw new TypeError("Options is not an object");return zn(),function(e){const{search:n}=window.location;n.includes("ifrlog")&&(e.log=O,e.logExpand=n.includes("ifrlog=expanded"))}(e),t=>{const i=ke(t,e);return n in t?(pe(i,"alreadySetup"),de(i,`Ignored iframe (${i}), already setup.`)):(Ln(i,e),ge(i,An)(t,e)),null==t?void 0:t.iframeResizer}}switch(!0){case void 0===window.jQuery:de("","Unable to bind to jQuery, it is not available.");break;case!window.jQuery.fn:de("","Unable to bind to jQuery, it is not fully loaded.");break;case window.jQuery.fn.iframeResize:de("","iframeResize is already assigned to jQuery.fn.");break;default:window.jQuery.fn.iframeResize=function(e){const n=Nn(e);return this.filter("iframe").each((e,t)=>n(t)).end()},window.jQuery.fn.iFrameResize=function(e){return we("iFrameResize()","iframeResize()","","jQuery"),this.iframeResize(e)}}});
21
+ //# sourceMappingURL=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.js","sources":["../../packages/common/consts.ts","../../packages/common/utils.ts","../../node_modules/auto-console-group/dist/index.js","../../packages/common/format-advise.ts","../../packages/core/values/settings.ts","../../packages/core/console.ts","../../packages/common/deprecate.ts","../../packages/core/values/defaults.ts","../../packages/core/checks/id.ts","../../packages/common/listeners.ts","../../packages/core/send/trigger.ts","../../packages/core/events/visible.ts","../../packages/core/received/decode.ts","../../packages/core/received/preflight.ts","../../packages/core/events/wrapper.ts","../../packages/core/received/message.ts","../../packages/core/events/mouse.ts","../../packages/core/values/page.ts","../../packages/core/page/position.ts","../../packages/core/events/size.ts","../../packages/core/events/resize.ts","../../packages/core/methods/disconnect.ts","../../packages/core/methods/close.ts","../../packages/core/methods/reset.ts","../../packages/core/monitor/common.ts","../../packages/core/monitor/page-info.ts","../../packages/core/monitor/props.ts","../../packages/core/page/scroll.ts","../../packages/core/page/in-page-link.ts","../../packages/core/page/title.ts","../../packages/common/mode.ts","../../packages/core/checks/mode.ts","../../packages/core/router.ts","../../packages/core/setup/first-run.ts","../../packages/core/checks/origin.ts","../../packages/core/checks/version.ts","../../packages/core/events/message.ts","../../packages/core/listeners.ts","../../packages/core/send/ready.ts","../../packages/core/checks/unique.ts","../../packages/core/methods/attach.ts","../../packages/core/send/outgoing.ts","../../packages/core/send/timeout.ts","../../packages/core/setup/init.ts","../../packages/core/setup/update-option-names.ts","../../packages/core/setup/process-options.ts","../../packages/core/checks/options.ts","../../packages/core/setup/direction.ts","../../packages/core/send/offset.ts","../../packages/core/checks/warning-timeout.ts","../../packages/core/setup/target-origin.ts","../../packages/core/setup/index.ts","../../packages/core/setup/scrolling.ts","../../packages/core/setup/body-margin.ts","../../packages/core/setup/logging.ts","../../packages/core/index.ts","../../packages/core/checks/manual-logging.ts","../../packages/jquery/plugin.js"],"sourcesContent":["export const VERSION = '[VI]{version}[/VI]'\nexport const LABEL = 'iframeResizer'\nexport const SEPARATOR = ':'\nexport const CHILD_READY_MESSAGE = '[iFrameResizerChild]Ready'\n\nexport const AUTO_RESIZE = 'autoResize'\nexport const BEFORE_UNLOAD = 'beforeUnload'\nexport const CLOSE = 'close'\nexport const IN_PAGE_LINK = 'inPageLink'\nexport const INIT = 'init'\nexport const INIT_FROM_IFRAME = 'iframeReady'\nexport const LAZY = 'lazy'\nexport const LOAD = 'load'\nexport const MESSAGE = 'message'\nexport const MOUSE_ENTER = 'mouseenter'\nexport const MOUSE_LEAVE = 'mouseleave'\nexport const ONLOAD = 'onload'\nexport const PAGE_HIDE = 'pageHide'\nexport const PAGE_INFO = 'pageInfo'\nexport const PARENT_INFO = 'parentInfo'\nexport const PAGE_INFO_STOP = 'pageInfoStop'\nexport const PARENT_INFO_STOP = 'parentInfoStop'\nexport const RESET = 'reset'\nexport const RESIZE = 'resize'\nexport const SCROLL_BY = 'scrollBy'\nexport const SCROLL_TO = 'scrollTo'\nexport const SCROLL_TO_OFFSET = 'scrollToOffset'\nexport const TITLE = 'title'\n\nexport const BASE = 10\nexport const SINGLE = 1\nexport const MIN_SIZE = 1\n\nexport const SIZE_ATTR = 'data-iframe-size'\nexport const OVERFLOW_ATTR = 'data-iframe-overflowed'\nexport const IGNORE_ATTR = 'data-iframe-ignore'\n\nexport const HEIGHT = 'height'\nexport const WIDTH = 'width'\nexport const OFFSET = 'offset'\nexport const OFFSET_HEIGHT = 'offsetHeight'\nexport const OFFSET_SIZE = 'offsetSize'\nexport const SCROLL = 'scroll'\nexport const NEW_LINE = '\\n'\n\nexport const HIDDEN = 'hidden'\nexport const VISIBLE = 'visible'\n\nexport const CHILD = 'child'\nexport const PARENT = 'parent'\n\nexport const STRING = 'string'\nexport const NUMBER = 'number'\nexport const BOOLEAN = 'boolean'\nexport const OBJECT = 'object'\nexport const FUNCTION = 'function'\nexport const SYMBOL = 'symbol'\nexport const UNDEFINED = 'undefined'\n\nexport const TRUE = 'true'\nexport const FALSE = 'false'\n\nexport const NULL = 'null'\nexport const AUTO = 'auto'\n\nexport const READY_STATE_CHANGE = 'readystatechange'\n\nexport const HEIGHT_EDGE = 'bottom'\nexport const WIDTH_EDGE = 'right'\n\nexport const ENABLE = 'autoResizeEnabled'\nexport const SIZE_CHANGE_DETECTED = Symbol('sizeChanged')\nexport const MANUAL_RESIZE_REQUEST = 'manualResize'\nexport const PARENT_RESIZE_REQUEST = 'parentResize'\nexport const IGNORE_DISABLE_RESIZE = {\n [MANUAL_RESIZE_REQUEST]: 1,\n [PARENT_RESIZE_REQUEST]: 1,\n}\n\nexport const SET_OFFSET_SIZE = 'setOffsetSize'\n\nexport const RESIZE_OBSERVER = 'resizeObserver'\nexport const OVERFLOW_OBSERVER = 'overflowObserver'\nexport const MUTATION_OBSERVER = 'mutationObserver'\nexport const VISIBILITY_OBSERVER = 'visibilityObserver'\n\nexport const BOLD = 'font-weight: bold;'\nexport const NORMAL = 'font-weight: normal;'\nexport const ITALIC = 'font-style: italic;'\nexport const BLUE = 'color: #135CD2;'\nexport const BLUE_LIGHT = 'color: #A9C7FB;'\nexport const BLACK = 'color: black;'\nexport const WHITE = 'color: #E3E3E3;'\n\nexport const NONE = 'none'\nexport const BOTH = 'both'\nexport const VERTICAL = 'vertical'\nexport const HORIZONTAL = 'horizontal'\n\nexport const NO_CHANGE = 'No change in content size detected'\n\nexport const MESSAGE_HEADER_LENGTH = MESSAGE.length\nexport const MESSAGE_ID = '[iFrameSizer]' // Must match iframe msg ID\nexport const MESSAGE_ID_LENGTH = MESSAGE_ID.length\nexport const RESET_REQUIRED_METHODS = Object.freeze({\n max: 1,\n scroll: 1,\n bodyScroll: 1,\n documentElementScroll: 1,\n})\n\nexport const INIT_EVENTS = Object.freeze({\n [ONLOAD]: 1,\n [INIT]: 1,\n [INIT_FROM_IFRAME]: 1,\n})\n\nexport const EXPAND = 'expanded'\nexport const COLLAPSE = 'collapsed'\n\nexport const HEIGHT_CALC_MODE_DEFAULT = AUTO\nexport const WIDTH_CALC_MODE_DEFAULT = SCROLL\n\nexport const EVENT_CANCEL_TIMER = 128\n\nexport const LOG_OPTIONS = Object.freeze({\n [EXPAND]: 1,\n [COLLAPSE]: 1,\n})\n\nexport const IGNORE_TAGS = new Set([\n 'head',\n 'body',\n 'meta',\n 'base',\n 'title',\n 'script',\n 'link',\n 'style',\n 'map',\n 'area',\n 'option',\n 'optgroup',\n 'template',\n 'track',\n 'wbr',\n 'nobr',\n])\n\nexport const REMOVED_NEXT_VERSION =\n 'Use of the old name will be removed in a future version of <i>iframe-resizer</>.'\n","import { OBJECT, STRING } from './consts'\n\nexport const isElement = (node: Node): boolean => node.nodeType === Node.ELEMENT_NODE\nexport const isNumber = (value: unknown): value is number =>\n typeof value === 'number' && !Number.isNaN(value)\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === OBJECT && value !== null\nexport const isString = (value: unknown): value is string => typeof value === STRING\n\nexport const isSafari: boolean = /^((?!chrome|android).)*safari/i.test(\n navigator.userAgent,\n)\n\nexport function isIframe(element: unknown): element is HTMLIFrameElement {\n if (!isObject(element)) return false\n\n try {\n return (element as unknown as HTMLElement).tagName === 'IFRAME' || element instanceof HTMLIFrameElement\n } catch (error) {\n return false\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyFunction = (...args: any[]) => any\n\nexport const isolateUserCode = (func: AnyFunction, ...val: unknown[]): ReturnType<typeof setTimeout> =>\n setTimeout(() => func(...val), 0)\n\nexport const once = <T extends AnyFunction>(fn: T): T => {\n let done = false\n\n return function (this: unknown, ...args: unknown[]) {\n return done\n ? undefined\n : ((done = true), fn.apply(this, args))\n } as unknown as T\n}\n\nconst hasOwnFallback = (o: object, k: PropertyKey): boolean =>\n Object.prototype.hasOwnProperty.call(o, k)\n\nexport const hasOwn = (o: object, k: PropertyKey): boolean =>\n Object.hasOwn ? Object.hasOwn(o, k) : hasOwnFallback(o, k)\n\nexport const isDarkModeEnabled = (): boolean =>\n window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches\n\nexport const id = <T>(x: T): T => x\n\nconst ROUNDING = 1000\n\nexport const round = (value: number): number => Math.round(value * ROUNDING) / ROUNDING\n\nexport const capitalizeFirstLetter = (string: string): string =>\n string.charAt(0).toUpperCase() + string.slice(1)\n\nexport const isDef = (value: unknown): boolean => `${value}` !== '' && value !== undefined\n\nexport const invoke = <T>(fn: () => T): T => fn()\n\nexport const lower = (str: string): string => str.toLowerCase()\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getElementName(el: any): string {\n switch (true) {\n case !isDef(el):\n return ''\n\n case isDef(el.id):\n return `${el.nodeName}#${el.id}`\n\n case isDef(el.name):\n return `${el.nodeName} (${el.name}`\n\n case isDef(el.className):\n return `${el.nodeName}.${el.className}`\n\n default:\n return el.nodeName\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const esModuleInterop = <T = any>(mod: any): T =>\n // eslint-disable-next-line no-underscore-dangle\n mod?.__esModule ? mod.default : mod\n\nexport const typeAssert = (value: unknown, type: string, error: string): void => {\n // eslint-disable-next-line valid-typeof\n if (typeof value !== type) {\n throw new TypeError(`${error} is not a ${capitalizeFirstLetter(type)}`)\n }\n}\n","/*!\n * @module auto-console-group v1.3.0\n *\n * @description Automagically group console logs in the browser console.\n *\n * @author David J. Bradshaw <info@iframe-resizer.com>\n * @see {@link https://github.com/davidjbradshaw/auto-console-group#readme}\n * @license MIT\n *\n * @copyright (c) 2025, David J. Bradshaw. All rights reserved.\n */\n\nconst $ = \"font-weight: normal;\", F = \"font-weight: bold;\", H = \"font-style: italic;\", U = $ + H, N = \"color: #135CD2;\", S = \"color: #A9C7FB;\", k = \"color: #1F1F1F;\", j = \"color: #E3E3E3;\", f = \"default\", Q = \"error\", C = \"log\", _ = Object.freeze({\n assert: !0,\n error: !0,\n warn: !0\n}), L = {\n expand: !1,\n defaultEvent: void 0,\n event: void 0,\n label: \"AutoConsoleGroup\",\n showTime: !0\n}, q = {\n profile: 0,\n profileEnd: 0,\n timeStamp: 0,\n trace: 0\n}, P = (o) => {\n const t = o.event || o.defaultEvent;\n return t ? `${t}` : \"\";\n}, u = Object.assign(console);\nfunction V() {\n const o = /* @__PURE__ */ new Date(), t = (l, d) => o[l]().toString().padStart(d, \"0\"), s = t(\"getHours\", 2), c = t(\"getMinutes\", 2), r = t(\"getSeconds\", 2), i = t(\"getMilliseconds\", 3);\n return `@ ${s}:${c}:${r}.${i}`;\n}\nconst { fromEntries: W, keys: b } = Object, z = (o) => [\n o,\n u[o]\n], K = (o) => (t) => [\n t,\n function(s) {\n o[t] = s;\n }\n], h = (o, t) => W(b(o).map(t));\nfunction X(o = {}) {\n const t = {}, s = {}, c = [], r = {\n ...L,\n // @ts-expect-error: backwards compatibility\n expand: !o.collapsed || L.expanded,\n ...o\n };\n let i = \"\";\n function l() {\n c.length = 0, i = \"\";\n }\n function d() {\n delete r.event, l();\n }\n const v = () => c.some(([e]) => e in _), O = () => v() ? !0 : !!r.expand, A = () => r.showTime ? i : \"\";\n function g() {\n if (c.length === 0) {\n d();\n return;\n }\n u[O() ? \"group\" : \"groupCollapsed\"](\n `%c${r.label}%c ${P(r)} %c${A()}`,\n $,\n F,\n U\n );\n for (const [e, ...n] of c)\n u.assert(\n e in u,\n `Unknown console method: ${e}`\n ), e in u && u[e](...n);\n u.groupEnd(), d();\n }\n function p() {\n i === \"\" && (i = V(), queueMicrotask(() => queueMicrotask(g)));\n }\n function G(e) {\n p(), r.event = e;\n }\n function a(e, ...n) {\n c.length === 0 && p(), c.push([e, ...n]);\n }\n const D = (e) => (...n) => {\n let m;\n try {\n m = e(...n);\n } catch (E) {\n if (!Error.prototype.isPrototypeOf(E)) throw E;\n a(Q, E), g();\n }\n return m;\n };\n function M(e, ...n) {\n e !== !0 && a(\"assert\", e, ...n);\n }\n function I(e = f) {\n s[e] ? s[e] += 1 : s[e] = 1, a(C, `${e}: ${s[e]}`);\n }\n function R(e = f) {\n delete s[e];\n }\n function x(e = f) {\n p(), t[e] = performance.now();\n }\n function w(e = f, ...n) {\n if (!t[e]) {\n a(\"timeLog\", e, ...n);\n return;\n }\n const m = performance.now() - t[e];\n a(C, `${e}: ${m} ms`, ...n);\n }\n function y(e = f) {\n w(e), delete t[e];\n }\n const B = (e) => [\n e,\n (...n) => a(e, ...n)\n ];\n return {\n ...h(r, K(r)),\n ...h(console, B),\n ...h(q, z),\n assert: M,\n count: I,\n countReset: R,\n endAutoGroup: g,\n errorBoundary: D,\n event: G,\n purge: l,\n time: x,\n timeEnd: y,\n timeLog: w,\n touch: p\n };\n}\nconst T = typeof window > \"u\" || typeof window.matchMedia != \"function\" ? !1 : window.matchMedia(\"(prefers-color-scheme: dark)\").matches, J = T ? S : N, Y = T ? j : k;\nexport {\n F as BOLD,\n Y as FOREGROUND,\n J as HIGHLIGHT,\n H as ITALIC,\n $ as NORMAL,\n X as default\n};\n","/* eslint-disable no-useless-escape */\n/* eslint-disable security/detect-non-literal-regexp */\n\nimport { NEW_LINE } from './consts'\nimport { isString } from './utils'\n\nconst TAGS = {\n br: '\\n',\n rb: '\\u001B[31;1m', // red bold\n bb: '\\u001B[34;1m', // blue bold\n b: '\\u001B[1m', // bold\n i: '\\u001B[3m', // italic\n u: '\\u001B[4m', // underline\n '/': '\\u001B[m', // reset\n}\n\nconst keys = Object.keys(TAGS)\nconst tags = new RegExp(`<(${keys.join('|')})>`, 'gi')\nconst lookup = (_: string, tag: string): string => TAGS[tag as keyof typeof TAGS] ?? ''\nconst encode = (s: string): string => s.replace(tags, lookup)\n\nconst filter = (s: string): string =>\n s.replaceAll('<br>', NEW_LINE).replaceAll(/<\\/?[^>]+>/gi, '')\n\ntype FormatLogMessageFn = (message: unknown) => void\n\nexport default (formatLogMessage: FormatLogMessageFn) => (message: unknown): void =>\n formatLogMessage(\n isString(message)\n ? window.chrome\n ? encode(message)\n : filter(message)\n : message,\n )\n\n/* eslint-enable security/detect-non-literal-regexp */\n/* eslint-enable no-useless-escape */\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst settings: Record<string, any> = {}\n\nexport default settings\n","import acg, { NORMAL } from 'auto-console-group'\n\nimport { BOLD, LABEL, PARENT } from '../common/consts'\nimport deprecate from '../common/deprecate'\nimport createFormatAdvise from '../common/format-advise'\nimport { esModuleInterop, id as identity } from '../common/utils'\nimport settings from './values/settings'\n\n// Deal with UMD not converting default exports to named exports\nconst createConsoleGroup = esModuleInterop(acg)\n\nlet consoleEnabled = true\n\nconst parent = createConsoleGroup({\n expand: false,\n label: PARENT,\n})\n\nconst getMyId = (iframeId: string): string =>\n window.top === window.self\n ? `parent(${iframeId})`\n : `nested parent(${iframeId})`\n\nconst isLogEnabled = (iframeId: string): boolean =>\n settings[iframeId] ? settings[iframeId].log : consoleEnabled\n\nexport function setupConsole({ enabled, expand, iframeId }: { enabled: boolean, expand: boolean, iframeId: string }): void {\n const consoleGroup = createConsoleGroup({\n expand,\n label: getMyId(iframeId),\n })\n\n consoleEnabled = enabled\n\n if (!settings[iframeId])\n settings[iframeId] = {\n console: consoleGroup,\n }\n}\n\nconst output =\n (type: string) =>\n (iframeId: string, ...args: any[]): any =>\n settings[iframeId]\n ? settings[iframeId].console[type](...args)\n : parent[type](...args)\n\nexport const outputSwitched =\n (type: string) =>\n (iframeId: string, ...args: any[]): any =>\n isLogEnabled(iframeId) === true ? output(type)(iframeId, ...args) : null\n\nexport const log = outputSwitched('log')\nexport const info = log // outputSwitched('info')\nexport const debug = outputSwitched('debug')\nexport const assert = output('assert')\nexport const warn = output('warn')\nexport const error = output('error')\nexport const event = output('event')\nexport const purge = output('purge')\nexport const endAutoGroup = output('endAutoGroup')\nexport const errorBoundary = output('errorBoundary')\n\nexport function vInfo(ver: string, mode: number): void {\n queueMicrotask(() =>\n // eslint-disable-next-line no-console\n console.info(\n `%ciframe-resizer ${ver}`,\n consoleEnabled || mode < 1 ? BOLD : NORMAL,\n ),\n )\n}\n\nconst formatLogMsg =\n (iframeId: string) =>\n (...args: any[]): string =>\n [`${LABEL}(${iframeId})`, ...args].join(' ')\n\nconst formatAdvise = createFormatAdvise(identity)\nexport const advise = (iframeId: string, ...args: any[]): void =>\n settings[iframeId]\n ? settings[iframeId].console.warn(...args.map(formatAdvise))\n : queueMicrotask(() => {\n const localFormatAdvise = createFormatAdvise(formatLogMsg(iframeId))\n // eslint-disable-next-line no-console\n console?.warn(...args.map(localFormatAdvise))\n })\n\nconst deprecateAdvise = deprecate(advise)\nexport const deprecateFunction = deprecateAdvise('Function')\nexport const deprecateMethod = deprecateAdvise('Method')\nexport const deprecateOption = deprecateAdvise('Option')\n","type AdviseFn = (iframeId: string, message: string) => void\n\nexport default (advise: AdviseFn) =>\n (type: string, change = 'renamed to') =>\n (old: string, replacement: string, info = '', iframeId = ''): void =>\n advise(\n iframeId,\n `<rb>Deprecated ${type}(${old.replace('()', '')})</>\\n\\nThe <b>${old}</> ${type.toLowerCase()} has been ${change} <b>${replacement}</>. ${info}Use of the old ${type.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`,\n )\n","import { AUTO, FUNCTION, VERTICAL } from '../../common/consts'\nimport { deprecateOption } from '../console'\nimport settings from './settings'\n\nconst onReadyDeprecated = (messageData: { id: string, iframe: HTMLIFrameElement }): void => {\n if (typeof settings[messageData.id].onInit === FUNCTION) {\n deprecateOption('init()', 'onReady()', '', messageData.id)\n settings[messageData.id].onInit(messageData)\n }\n}\n\nexport default Object.freeze({\n autoResize: true,\n bodyBackground: null,\n bodyMargin: null,\n bodyPadding: null,\n checkOrigin: true,\n direction: VERTICAL,\n firstRun: true,\n inPageLinks: false,\n heightCalculationMethod: AUTO,\n id: 'iFrameResizer', // TODO: v6 change to 'iframeResizer'\n log: false,\n logExpand: false,\n license: undefined,\n mouseEvents: true,\n offsetHeight: null,\n offsetWidth: null,\n postMessageTarget: null,\n sameDomain: false,\n scrolling: false,\n sizeHeight: true,\n // sizeSelector: '',\n sizeWidth: false,\n tolerance: 0,\n waitForLoad: false,\n warningTimeout: 5000,\n widthCalculationMethod: AUTO,\n\n onBeforeClose: () => true,\n onAfterClose() {},\n onInit: false,\n onMessage: null,\n onMouseEnter() {},\n onMouseLeave() {},\n onReady: onReadyDeprecated,\n onResized() {},\n onScroll: () => true,\n})\n","import { isString } from '../../common/utils'\nimport { event as consoleEvent, log } from '../console'\nimport defaults from '../values/defaults'\n\nlet count = 0\n\nfunction newId(options: Record<string, any>): string {\n const id = options?.id || defaults.id + count++\n return document.getElementById(id) === null ? id : `${id}${count++}`\n}\n\nexport default function ensureHasId(iframe: HTMLIFrameElement, options: Record<string, any>): string {\n let { id } = iframe\n\n if (id && !isString(id)) {\n throw new TypeError('Invalid id for iFrame. Expected String')\n }\n\n if (!id || id === '') {\n id = newId(options)\n iframe.id = id\n consoleEvent(id, 'assignId')\n log(id, `Added missing iframe ID: ${id} (${iframe.src})`)\n }\n\n return id\n}\n","export const addEventListener = (\n el: EventTarget,\n evt: string,\n func: EventListenerOrEventListenerObject,\n options?: AddEventListenerOptions | boolean,\n): void => el.addEventListener(evt, func, options || false)\n\nexport const removeEventListener = (\n el: EventTarget,\n evt: string,\n func: EventListenerOrEventListenerObject,\n): void => el.removeEventListener(evt, func, false)\n","import { FOREGROUND, HIGHLIGHT } from 'auto-console-group'\n\nimport { INIT_EVENTS, MESSAGE_ID, SEPARATOR } from '../../common/consts'\nimport { event as consoleEvent, info, log, warn } from '../console'\nimport settings from '../values/settings'\n\nconst filterMsg = (msg: string): string =>\n msg\n .split(SEPARATOR)\n .filter((_, index) => index !== 19)\n .join(SEPARATOR)\n\nfunction dispatch(calleeMsg: string, msg: string, id: string): void {\n function logSent(route: string): void {\n const displayMsg = calleeMsg in INIT_EVENTS ? filterMsg(msg) : msg\n info(id, route, HIGHLIGHT, FOREGROUND, HIGHLIGHT)\n info(id, `Message data: %c${displayMsg}`, HIGHLIGHT)\n }\n\n const { iframe, postMessageTarget, sameOrigin, targetOrigin } = settings[id]\n\n if (sameOrigin) {\n try {\n iframe.contentWindow.iframeChildListener(MESSAGE_ID + msg)\n logSent(`Sending message to iframe %c${id}%c via same origin%c`)\n return\n } catch (error) {\n if (calleeMsg in INIT_EVENTS) {\n settings[id].sameOrigin = false\n log(id, 'New iframe does not support same origin')\n } else {\n warn(id, 'Same origin messaging failed, falling back to postMessage')\n }\n }\n }\n\n logSent(\n `Sending message to iframe: %c${id}%c targetOrigin: %c${targetOrigin}`,\n )\n\n postMessageTarget.postMessage(MESSAGE_ID + msg, targetOrigin)\n}\n\nfunction trigger(calleeMsg: string, msg: string, id: string): void {\n consoleEvent(id, calleeMsg)\n\n if (!settings[id]?.postMessageTarget) {\n warn(id, `Iframe not found`)\n return\n }\n\n dispatch(calleeMsg, msg, id)\n}\n\nexport default trigger\n","import { RESIZE } from '../../common/consts'\nimport trigger from '../send/trigger'\nimport settings from '../values/settings'\n\nconst sendTriggerMsg = (eventName: string, event: string): void =>\n Object.values(settings)\n .filter(({ autoResize, firstRun }) => autoResize && !firstRun)\n .forEach(({ iframe }) => trigger(eventName, event, iframe.id))\n\nexport default function tabVisible(): void {\n if (document.hidden === true) return\n sendTriggerMsg('tabVisible', RESIZE)\n}\n","import { MESSAGE_ID_LENGTH } from '../../common/consts'\nimport type { MessageData } from '../types'\nimport settings from '../values/settings'\n\nexport function getPaddingEnds(compStyle: CSSStyleDeclaration): number {\n if (compStyle.boxSizing !== 'border-box') return 0\n\n const top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0\n const bot = compStyle.paddingBottom\n ? parseInt(compStyle.paddingBottom, 10)\n : 0\n\n return top + bot\n}\n\nexport function getBorderEnds(compStyle: CSSStyleDeclaration): number {\n if (compStyle.boxSizing !== 'border-box') return 0\n\n const top = compStyle.borderTopWidth\n ? parseInt(compStyle.borderTopWidth, 10)\n : 0\n\n const bot = compStyle.borderBottomWidth\n ? parseInt(compStyle.borderBottomWidth, 10)\n : 0\n\n return top + bot\n}\n\nexport default function decodeMessage(msg: string): MessageData {\n const data = msg.slice(MESSAGE_ID_LENGTH).split(':')\n const height = data[1] ? Number(data[1]) : 0\n const iframe = settings[data[0]]?.iframe\n const compStyle = getComputedStyle(iframe)\n\n const messageData: MessageData = {\n iframe,\n id: data[0],\n height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),\n width: Number(data[2]),\n type: data[3],\n msg: data[4],\n message: data[4],\n }\n\n // eslint-disable-next-line prefer-destructuring\n if (data[5]) messageData.mode = data[5]\n\n return messageData\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { MESSAGE_ID, MESSAGE_ID_LENGTH } from '../../common/consts'\nimport { isIframe } from '../../common/utils'\nimport { log, warn } from '../console'\nimport type { MessageData } from '../types'\nimport settings from '../values/settings'\n\nconst ABOVE_TYPES: Record<string, number> = { true: 1, false: 1, undefined: 1 }\n\nexport function checkIframeExists(messageData: MessageData): boolean {\n const { id, msg, iframe } = messageData\n const detectedIframe = isIframe(iframe)\n\n if (!detectedIframe) {\n log(id, `Received: %c${msg}`, HIGHLIGHT)\n warn(id, `The target iframe was not found.`)\n }\n\n return detectedIframe\n}\n\nexport function isMessageFromIframe(messageData: MessageData, event: MessageEvent | { data: any, origin?: string, sameOrigin?: boolean }): boolean {\n function checkAllowedOrigin(): boolean {\n function checkList(): boolean {\n log(\n id,\n `Checking connection is from allowed list of origins: %c${checkOrigin}`,\n HIGHLIGHT,\n )\n\n for (const element of checkOrigin) {\n if (element === origin) {\n return true\n }\n }\n\n return false\n }\n\n function checkSingle(): boolean {\n const remoteHost = settings[id]?.remoteHost\n log(id, `Checking connection is from: %c${remoteHost}`, HIGHLIGHT)\n return origin === remoteHost\n }\n\n return checkOrigin.constructor === Array ? checkList() : checkSingle()\n }\n\n const { id } = messageData\n const { data, origin } = event\n const sameOrigin = 'sameOrigin' in event && event.sameOrigin\n\n if (sameOrigin) return true\n\n let checkOrigin = settings[id]?.checkOrigin\n\n if (checkOrigin && `${origin}` !== 'null' && !checkAllowedOrigin()) {\n throw new Error(\n `Unexpected message received from: ${origin} for ${id}. Message was: ${data}. This error can be disabled by setting the checkOrigin: false option or by providing an array of trusted domains.`,\n )\n }\n\n return true\n}\n\nexport const isMessageForUs = (message: any): boolean =>\n MESSAGE_ID === `${message}`.slice(0, MESSAGE_ID_LENGTH) &&\n message.slice(MESSAGE_ID_LENGTH).split(':')[0] in settings\n\nexport function isMessageFromMetaParent(messageData: MessageData): boolean {\n const { id, type } = messageData\n\n // Test if this message is from a parent above us. This is an ugly test,\n // however, updating the message format would break backwards compatibility.\n const isMetaParent = type in ABOVE_TYPES\n\n if (isMetaParent) {\n log(id, 'Ignoring init message from meta parent page')\n }\n\n return isMetaParent\n}\n","import { FUNCTION } from '../../common/consts'\nimport { isolateUserCode } from '../../common/utils'\nimport { warn } from '../console'\nimport settings from '../values/settings'\n\nfunction on(iframeId: string, funcName: string, val: any): any {\n if (!settings[iframeId]) return null\n\n const func = settings[iframeId][funcName]\n\n if (typeof func !== FUNCTION)\n throw new TypeError(`${funcName} on iframe[${iframeId}] is not a function`)\n\n if (funcName !== 'onBeforeClose' && funcName !== 'onScroll')\n return isolateUserCode(func, val)\n\n try {\n return func(val)\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error)\n warn(iframeId, `Error in ${funcName} callback`)\n return null\n }\n}\n\nexport default on\n","import { MESSAGE_HEADER_LENGTH, SEPARATOR } from '../../common/consts'\nimport settings from '../values/settings'\n\nexport default function getMessageBody(id: string, offset: number): string {\n const { lastMessage } = settings[id]\n return lastMessage.slice(\n lastMessage.indexOf(SEPARATOR) + MESSAGE_HEADER_LENGTH + offset,\n )\n}\n","import { SEPARATOR } from '../../common/consts'\nimport type { MessageData } from '../types'\nimport getMessageBody from '../received/message'\nimport on from './wrapper'\n\nexport default function onMouse(event: string, messageData: MessageData): void {\n const { id, iframe, height, type, width } = messageData\n let mousePos: { x: string | number; y: string | number } = { x: 0, y: 0 }\n\n if (width === 0 && height === 0) {\n const coords = getMessageBody(id, 9).split(SEPARATOR)\n mousePos = {\n x: coords[1],\n y: coords[0],\n }\n } else {\n mousePos = {\n x: width,\n y: height,\n }\n }\n\n on(id, event, {\n iframe,\n screenX: Number(mousePos.x),\n screenY: Number(mousePos.y),\n type,\n })\n}\n","import { VERSION } from '../../common/consts'\n\ninterface PageState {\n position: { x: number, y: number } | null\n version: string\n}\n\nconst page: PageState = {\n position: null,\n version: VERSION,\n}\n\nexport default page\n","import { FOREGROUND, HIGHLIGHT } from 'auto-console-group'\n\nimport { info, log } from '../console'\nimport page from '../values/page'\n\ninterface Position {\n x: number\n y: number\n}\n\nexport function unsetPagePosition(): void {\n page.position = null\n}\n\nexport const getStoredPagePosition = (): Position | null => page.position\n\nexport function setStoredPagePosition(position: Position): void {\n page.position = position\n}\n\nexport function getPagePosition(id: string): Position {\n if (page.position === null)\n page.position = {\n x: window.scrollX,\n y: window.scrollY,\n }\n\n log(\n id,\n `Get page position: %c${page.position.x}%c, %c${page.position.y}`,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n )\n\n return page.position\n}\n\nexport function setPagePosition(id: string): void {\n if (page.position === null) return\n\n window.scrollTo(page.position.x, page.position.y)\n\n info(\n id,\n `Set page position: %c${page.position.x}%c, %c${page.position.y}`,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n )\n\n unsetPagePosition()\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { HEIGHT, WIDTH } from '../../common/consts'\nimport type { MessageData } from '../types'\nimport { info } from '../console'\nimport settings from '../values/settings'\n\nfunction setDimension(dimension: string, messageData: MessageData): void {\n const { id } = messageData\n const size = `${messageData[dimension]}px`\n settings[id].iframe.style[dimension] = size\n info(id, `Set ${dimension}: %c${size}`, HIGHLIGHT)\n}\n\nexport default function setSize(messageData: MessageData): void {\n const { id } = messageData\n const { sizeHeight, sizeWidth } = settings[id]\n\n if (sizeHeight) setDimension(HEIGHT, messageData)\n if (sizeWidth) setDimension(WIDTH, messageData)\n}\n","import type { MessageData } from '../types'\nimport { setPagePosition } from '../page/position'\nimport setSize from './size'\nimport on from './wrapper'\n\nexport default function resizeIframe(messageData: MessageData): void {\n const { id } = messageData\n setSize(messageData)\n setPagePosition(id)\n on(id, 'onResized', messageData)\n}\n","import { log } from '../console'\nimport settings from '../values/settings'\n\nexport default function disconnect(iframe: HTMLIFrameElement): void {\n const { id } = iframe\n log(id, 'Disconnected from iframe')\n delete settings[id]\n delete iframe.iframeResizer\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { log, warn } from '../console'\nimport on from '../events/wrapper'\nimport disconnect from './disconnect'\n\nexport default function closeIframe(iframe: HTMLIFrameElement): void {\n const { id } = iframe\n\n if (on(id, 'onBeforeClose', id) === false) {\n log(id, 'Close iframe cancelled by onBeforeClose')\n return\n }\n\n log(id, `Removing iFrame: %c${id}`, HIGHLIGHT)\n\n try {\n // Catch race condition error with React\n if (iframe.parentNode) {\n iframe.remove()\n }\n } catch (error) {\n warn(id, error)\n }\n\n on(id, 'onAfterClose', id)\n disconnect(iframe)\n}\n","import { INIT, RESET } from '../../common/consts'\nimport type { MessageData } from '../types'\nimport { log } from '../console'\nimport setSize from '../events/size'\nimport { getPagePosition } from '../page/position'\nimport trigger from '../send/trigger'\n\nexport default function resetIframe(messageData: MessageData): void {\n const { id, type } = messageData\n\n log(\n id,\n `Size reset requested by ${type === INIT ? 'parent page' : 'child page'}`,\n )\n\n getPagePosition(id)\n setSize(messageData)\n trigger(RESET, RESET, id)\n}\n","import { LOAD, RESIZE, SCROLL } from '../../common/consts'\nimport { addEventListener, removeEventListener } from '../../common/listeners'\nimport { event, log } from '../console'\nimport trigger from '../send/trigger'\nimport settings from '../values/settings'\n\nexport const sendInfoToIframe = (type: string, infoFunction: (iframe: HTMLIFrameElement) => string) => {\n const gate: Record<string, number | null> = {}\n\n return (requestType: string, id: string): void => {\n const { iframe } = settings[id]\n\n function throttle(func: () => void, frameId: string): void {\n if (!gate[frameId]) {\n func()\n gate[frameId] = requestAnimationFrame(() => {\n gate[frameId] = null\n })\n }\n }\n\n function gatedTrigger(): void {\n trigger(`${requestType} (${type})`, `${type}:${infoFunction(iframe)}`, id)\n }\n\n throttle(gatedTrigger, id)\n }\n}\n\nexport const stopInfoMonitor = (stopFunction: string) => (id: string): void => {\n if (stopFunction in settings[id]) {\n settings[id][stopFunction]()\n delete settings[id][stopFunction]\n }\n}\n\nexport const startInfoMonitor = (sendInfoToIframe: (requestType: string, id: string) => void, type: string) => (id: string): void => {\n let pending: string | false = false\n\n const sendInfo = (requestType: string) => (): void => {\n if (settings[id]) {\n if (!pending || pending === requestType) {\n sendInfoToIframe(requestType, id)\n\n pending = requestType\n requestAnimationFrame(() => {\n pending = false\n })\n }\n } else {\n stop()\n }\n }\n\n const sendScroll = sendInfo(SCROLL)\n const sendResize = sendInfo('resize window')\n\n function setListener(requestType: string, listener: (target: EventTarget, event: string, handler: EventListener) => void): void {\n log(id, `${requestType}listeners for send${type}`)\n listener(window, SCROLL, sendScroll)\n listener(window, RESIZE, sendResize)\n }\n\n function stop(): void {\n event(id, `stop${type}`)\n setListener('Remove ', removeEventListener)\n pageObserver.disconnect()\n iframeObserver.disconnect()\n if (settings[id]) {\n removeEventListener(settings[id].iframe, LOAD, stop)\n }\n }\n\n function start(): void {\n setListener('Add ', addEventListener)\n\n pageObserver.observe(document.body)\n iframeObserver.observe(settings[id].iframe)\n }\n\n const pageObserver = new ResizeObserver(sendInfo('pageObserver'))\n const iframeObserver = new ResizeObserver(sendInfo('iframeObserver'))\n\n if (!settings[id]) return\n\n settings[id][`stop${type}`] = stop\n addEventListener(settings[id].iframe, LOAD, stop)\n start()\n}\n","import { PAGE_INFO } from '../../common/consts'\nimport { sendInfoToIframe, startInfoMonitor, stopInfoMonitor } from './common'\n\nexport function getPageInfo(iframe: HTMLIFrameElement): string {\n const bodyPosition = document.body.getBoundingClientRect()\n const iFramePosition = iframe.getBoundingClientRect()\n const { scrollY, scrollX, innerHeight, innerWidth } = window\n const { clientHeight, clientWidth } = document.documentElement\n\n return JSON.stringify({\n iframeHeight: iFramePosition.height,\n iframeWidth: iFramePosition.width,\n clientHeight: Math.max(clientHeight, innerHeight || 0),\n clientWidth: Math.max(clientWidth, innerWidth || 0),\n offsetTop: Math.trunc(iFramePosition.top - bodyPosition.top),\n offsetLeft: Math.trunc(iFramePosition.left - bodyPosition.left),\n scrollTop: scrollY,\n scrollLeft: scrollX,\n documentHeight: clientHeight,\n documentWidth: clientWidth,\n windowHeight: innerHeight,\n windowWidth: innerWidth,\n })\n}\n\nconst sendPageInfoToIframe = sendInfoToIframe(PAGE_INFO, getPageInfo)\n\nexport const startPageInfoMonitor = startInfoMonitor(\n sendPageInfoToIframe,\n 'PageInfo',\n)\n\nexport const stopPageInfoMonitor = stopInfoMonitor('stopPageInfo')\n","import { PARENT_INFO } from '../../common/consts'\nimport { sendInfoToIframe, startInfoMonitor, stopInfoMonitor } from './common'\n\nexport function getParentProps(iframe: HTMLIFrameElement): string {\n const { scrollWidth, scrollHeight } = document.documentElement\n const { width, height, offsetLeft, offsetTop, pageLeft, pageTop, scale } =\n window.visualViewport\n\n return JSON.stringify({\n iframe: iframe.getBoundingClientRect(),\n document: {\n scrollWidth,\n scrollHeight,\n },\n viewport: {\n width,\n height,\n offsetLeft,\n offsetTop,\n pageLeft,\n pageTop,\n scale,\n },\n })\n}\n\nconst sendParentInfoToIframe = sendInfoToIframe(PARENT_INFO, getParentProps)\n\nexport const startParentInfoMonitor = startInfoMonitor(\n sendParentInfoToIframe,\n 'ParentInfo',\n)\n\nexport const stopParentInfoMonitor = stopInfoMonitor('stopParentInfo')\n","import { FOREGROUND, HIGHLIGHT } from 'auto-console-group'\n\nimport type { MessageData } from '../types'\nimport { info } from '../console'\nimport on from '../events/wrapper'\nimport settings from '../values/settings'\nimport {\n getPagePosition,\n getStoredPagePosition,\n setPagePosition,\n setStoredPagePosition,\n unsetPagePosition,\n} from './position'\n\ninterface Position {\n x: number\n y: number\n}\n\nexport function getElementPosition(target: HTMLIFrameElement): Position {\n const iframePosition = target.getBoundingClientRect()\n const pagePosition = getPagePosition(target.id)\n\n return {\n x: Number(iframePosition.left) + Number(pagePosition.x),\n y: Number(iframePosition.top) + Number(pagePosition.y),\n }\n}\n\nexport function scrollToLink(id: string): void {\n const { x, y } = getStoredPagePosition()\n const iframe = settings[id]?.iframe\n\n if (on(id, 'onScroll', { iframe, top: y, left: x, x, y }) === false) {\n unsetPagePosition()\n return\n }\n\n setPagePosition(id)\n}\n\nexport function scrollBy(messageData: MessageData): void {\n const { id, height, width } = messageData\n\n // Check for V4 as well\n const target = window.parentIframe || window.parentIFrame || window\n\n info(\n id,\n `scrollBy: x: %c${width}%c y: %c${height}`,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n )\n\n target.scrollBy(width, height)\n}\n\nconst scrollRequestFromChild = (addOffset: boolean) => (messageData: MessageData): void => {\n /* istanbul ignore next */ // Not testable in Karma\n function reposition(newPosition: Position): void {\n setStoredPagePosition(newPosition)\n scrollToLink(id)\n }\n\n function scrollParent(target: any, newPosition: Position): void {\n target[`scrollTo${addOffset ? 'Offset' : ''}`](newPosition.x, newPosition.y)\n }\n\n const calcOffset = (offset: Position): Position => ({\n x: width + offset.x,\n y: height + offset.y,\n })\n\n const { id, iframe, height, width } = messageData\n const offset = addOffset ? getElementPosition(iframe) : { x: 0, y: 0 }\n const newPosition = calcOffset(offset)\n const target = window.parentIframe || window.parentIFrame // Check for V4 as well\n\n info(\n id,\n `Reposition requested (offset x:%c${offset.x}%c y:%c${offset.y})`,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n )\n\n if (target) scrollParent(target, newPosition)\n else reposition(newPosition)\n}\n\nexport const scrollTo = scrollRequestFromChild(false)\nexport const scrollToOffset = scrollRequestFromChild(true)\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { info, log } from '../console'\nimport page from '../values/page'\nimport { getElementPosition, scrollToLink } from './scroll'\n\nfunction jumpToTarget(id: string, hash: string, target: HTMLElement): void {\n const { x, y } = getElementPosition(target as unknown as HTMLIFrameElement)\n\n info(id, `Moving to in page link: %c#${hash}`, HIGHLIGHT)\n\n page.position = { x, y }\n\n scrollToLink(id)\n window.location.hash = hash\n}\n\nfunction jumpToParent(id: string, hash: string): void {\n // Check for V4 as well\n const target = window.parentIframe || window.parentIFrame\n\n if (!target) {\n log(id, `In page link #${hash} not found`)\n return\n }\n\n target.moveToAnchor(hash)\n}\n\nexport default function inPageLink(id: string, location: string): void {\n const hash = location.split('#')[1] || ''\n const hashData = decodeURIComponent(hash)\n\n const target =\n document.getElementById(hashData) || document.getElementsByName(hashData)[0]\n\n if (target) {\n jumpToTarget(id, hash, target)\n return\n }\n\n if (window.top === window.self) {\n log(id, `In page link #${hash} not found`)\n return\n }\n\n jumpToParent(id, hash)\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { info } from '../console'\nimport settings from '../values/settings'\n\nexport function checkTitle(id: string): boolean {\n const title = settings[id]?.iframe?.title\n return title === '' || title === undefined\n}\n\nexport function setTitle(id: string, title: string | undefined): void {\n if (!settings[id]?.syncTitle) return\n settings[id].iframe.title = title\n info(id, `Set iframe title attribute: %c${title}`, HIGHLIGHT)\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nconst l = (l: string): string => {\n if (!l) return ''\n let p = -559038744,\n y = 1103547984\n for (let z: any, t = 0; t < l.length; t++)\n ((z = l.codePointAt(t)),\n (p = Math.imul(p ^ z, 2246822519)),\n (y = Math.imul(y ^ z, 3266489917)))\n return (\n (p ^= Math.imul(p ^ (y >>> 15), 1935289751)),\n (y ^= Math.imul(y ^ (p >>> 15), 3405138345)),\n (p ^= y >>> 16),\n (y ^= p >>> 16),\n (2097152 * (y >>> 0) + (p >>> 11)).toString(36)\n )\n },\n p = (l: string): string =>\n l.replace(/[A-Za-z]/g, (l: any) =>\n String.fromCodePoint(\n (l <= 'Z' ? 90 : 122) >= (l = l.codePointAt(0) + 19) ? l : l - 26,\n ),\n ),\n x = ['spjluzl', 'rlf', 'clyzpvu', 'rlf2'],\n y = [\n '<yi>Puchspk Spjluzl Rlf</><iy><iy>',\n '<yi>Tpzzpun Spjluzl Rlf</><iy><iy>',\n '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</>',\n '<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</>.',\n '<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.',\n 'Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.',\n ],\n z = ['NWSc3', 'zvsv', 'wyv', 'ibzpulzz', 'vlt'],\n t = Object.fromEntries(\n [\n '2cgs7fdf4xb',\n '1c9ctcccr4z',\n '1q2pc4eebgb',\n 'ueokt0969w',\n 'w2zxchhgqz',\n '1umuxblj2e5',\n '2b5sdlfhbev',\n 'zo4ui3arjo',\n 'oclbb4thgl',\n ].map((l, p) => [l, Math.max(0, p - 1)]),\n )\nexport const getModeData = (l: number): string => p(y[l])\nexport const getModeLabel = (l: number): string => p(z[l])\nexport const getKey = (l: number): string => p(x[l])\nexport default (y: any): number => {\n const z = y[p(x[0])] || y[p(x[1])] || y[p(x[2])] || y[p(x[3])]\n if (!z) return -1\n const u = z.split('-')\n let v = (function (y = '') {\n let z = -2\n const u = l(p(y))\n return u in t && (z = t[u]), z>4?z-4:z\n })(u[0])\n return 0 === v || ((p: any) => p[2] === l(p[0] + p[1]))(u) || (v = -2), v\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n","import { VERSION } from '../../common/consts'\nimport { getModeData, getModeLabel } from '../../common/mode'\nimport { advise, purge as consoleClear, vInfo } from '../console'\nimport settings from '../values/settings'\n\nlet vAdvised = false\nlet vInfoDisable = false\n\nexport default function checkMode(id: string, childMode: number = -3): void {\n if (vAdvised) return\n const mode = Math.max(settings[id].mode, childMode)\n if (mode > settings[id].mode) settings[id].mode = mode\n if (mode < 0) {\n consoleClear(id)\n if (!settings[id].vAdvised)\n advise(id || 'Parent', `${getModeData(mode + 2)}${getModeData(2)}`)\n settings[id].vAdvised = true\n throw getModeData(mode + 2).replace(/<\\/?[a-z][^>]*>|<\\/>/gi, '')\n }\n if (!(mode > 0 && vInfoDisable)) {\n vInfo(`v${VERSION} (${getModeLabel(mode)})`, mode)\n }\n if (mode < 1) advise('Parent', getModeData(3))\n vAdvised = true\n}\n\nexport function preModeCheck(id: string): void {\n if (vAdvised) return\n const { mode } = settings[id]\n if (mode !== -1) checkMode(id, mode)\n}\n\nexport function enableVInfo(options: Record<string, any>): void {\n if (options?.log === -1) {\n options.log = false\n vInfoDisable = true\n }\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport {\n AUTO_RESIZE,\n BEFORE_UNLOAD,\n CLOSE,\n IN_PAGE_LINK,\n INIT,\n MESSAGE,\n MOUSE_ENTER,\n MOUSE_LEAVE,\n PAGE_INFO,\n PAGE_INFO_STOP,\n PARENT_INFO,\n PARENT_INFO_STOP,\n RESET,\n SCROLL_BY,\n SCROLL_TO,\n SCROLL_TO_OFFSET,\n TITLE,\n} from '../common/consts'\nimport type { MessageData } from './types'\nimport checkSameDomain from './checks/origin'\nimport checkVersion from './checks/version'\nimport { info, log, warn } from './console'\nimport { onMessage } from './events/message'\nimport onMouse from './events/mouse'\nimport resizeIframe from './events/resize'\nimport on from './events/wrapper'\nimport closeIframe from './methods/close'\nimport resetIframe from './methods/reset'\nimport { startPageInfoMonitor, stopPageInfoMonitor } from './monitor/page-info'\nimport { startParentInfoMonitor, stopParentInfoMonitor } from './monitor/props'\nimport inPageLink from './page/in-page-link'\nimport { scrollBy, scrollTo, scrollToOffset } from './page/scroll'\nimport { setTitle } from './page/title'\nimport getMessageBody from './received/message'\nimport firstRun from './setup/first-run'\nimport settings from './values/settings'\n\nexport default function routeMessage(messageData: MessageData): void {\n const { height, id, iframe, mode, message, type, width } = messageData\n const { lastMessage } = settings[id]\n\n if (settings[id]?.firstRun) firstRun(id, mode)\n log(id, `Received: %c${lastMessage}`, HIGHLIGHT)\n\n switch (type) {\n case AUTO_RESIZE:\n settings[id].autoResize = JSON.parse(getMessageBody(id, 9))\n break\n\n case BEFORE_UNLOAD:\n info(id, 'Ready state reset')\n settings[id].initialised = false\n break\n\n case CLOSE:\n closeIframe(iframe)\n break\n\n case IN_PAGE_LINK:\n inPageLink(id, getMessageBody(id, 9))\n break\n\n case INIT:\n resizeIframe(messageData)\n checkSameDomain(id)\n checkVersion(id, message)\n settings[id].initialised = true\n on(id, 'onReady', iframe)\n break\n\n case MESSAGE:\n onMessage(messageData, getMessageBody(id, 6))\n break\n\n case MOUSE_ENTER:\n onMouse('onMouseEnter', messageData)\n break\n\n case MOUSE_LEAVE:\n onMouse('onMouseLeave', messageData)\n break\n\n case PAGE_INFO:\n startPageInfoMonitor(id)\n break\n\n case PARENT_INFO:\n startParentInfoMonitor(id)\n break\n\n case PAGE_INFO_STOP:\n stopPageInfoMonitor(id)\n break\n\n case PARENT_INFO_STOP:\n stopParentInfoMonitor(id)\n break\n\n case RESET:\n resetIframe(messageData)\n break\n\n case SCROLL_BY:\n scrollBy(messageData)\n break\n\n case SCROLL_TO:\n scrollTo(messageData)\n break\n\n case SCROLL_TO_OFFSET:\n scrollToOffset(messageData)\n break\n\n case TITLE:\n setTitle(id, message)\n break\n\n default:\n if (width === 0 && height === 0) {\n warn(\n id,\n `Unsupported message received (${type}), this is likely due to the iframe containing a later ` +\n `version of iframe-resizer than the parent page`,\n )\n return\n }\n\n if (width === 0 || height === 0) {\n log(id, 'Ignoring message with 0 height or width')\n return\n }\n\n // Recheck document.hidden here, as only Firefox\n // correctly supports this in the iframe\n if (document.hidden) {\n log(id, 'Page hidden - ignored resize request')\n return\n }\n\n resizeIframe(messageData)\n }\n}\n","import checkMode from '../checks/mode'\nimport { log } from '../console'\nimport settings from '../values/settings'\n\nexport default function firstRun(id: string, mode: string | undefined): void {\n if (!settings[id]) return\n\n log(id, `First run for ${id}`)\n checkMode(id, mode !== undefined ? Number(mode) : undefined)\n settings[id].firstRun = false\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { log } from '../console'\nimport settings from '../values/settings'\n\nexport default function checkSameDomain(id: string): void {\n try {\n settings[id].sameOrigin =\n !!settings[id]?.iframe?.contentWindow?.iframeChildListener\n } catch (error) {\n settings[id].sameOrigin = false\n }\n\n log(id, `sameOrigin: %c${settings[id].sameOrigin}`, HIGHLIGHT)\n}\n","import { FOREGROUND, HIGHLIGHT } from 'auto-console-group'\n\nimport { VERSION } from '../../common/consts'\nimport { advise, log } from '../console'\n\nexport default function checkVersion(id: string, version: string | undefined): void {\n if (version === VERSION) return\n if (version === undefined) {\n advise(\n id,\n `<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n`,\n )\n return\n }\n log(\n id,\n `Version mismatch (Child: %c${version}%c !== Parent: %c${VERSION})`,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n )\n}\n","import { FOREGROUND, HIGHLIGHT } from 'auto-console-group'\n\nimport type { MessageData } from '../types'\nimport { log } from '../console'\nimport on from './wrapper'\n\n// eslint-disable-next-line import/prefer-default-export\nexport function onMessage(messageData: MessageData, messageBody: string): void {\n const { id, iframe } = messageData\n\n log(\n id,\n `onMessage passed: {iframe: %c${id}%c, message: %c${messageBody}%c}`,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n FOREGROUND,\n )\n\n on(id, 'onMessage', {\n iframe,\n message: JSON.parse(messageBody),\n })\n}\n","import { CHILD_READY_MESSAGE, MESSAGE, PARENT, STRING } from '../common/consts'\nimport { addEventListener } from '../common/listeners'\nimport { once } from '../common/utils'\nimport { debug, errorBoundary, event as consoleEvent } from './console'\nimport tabVisible from './events/visible'\nimport decodeMessage from './received/decode'\nimport {\n checkIframeExists,\n isMessageForUs,\n isMessageFromIframe,\n isMessageFromMetaParent,\n} from './received/preflight'\nimport routeMessage from './router'\nimport iframeReady from './send/ready'\nimport settings from './values/settings'\n\nfunction iframeListener(event: MessageEvent | { data: any, sameOrigin?: boolean }): void {\n const msg = event.data\n\n if (msg === CHILD_READY_MESSAGE) {\n iframeReady((event as MessageEvent).source)\n return\n }\n\n if (!isMessageForUs(msg)) {\n if (typeof msg !== STRING) return\n consoleEvent(PARENT, 'ignoredMessage')\n debug(PARENT, msg)\n return\n }\n\n const messageData = decodeMessage(msg)\n const { id, type } = messageData\n\n consoleEvent(id, type)\n\n switch (true) {\n case !settings[id]:\n throw new Error(`${type} No settings for ${id}. Message was: ${msg}`)\n\n case !checkIframeExists(messageData):\n case isMessageFromMetaParent(messageData):\n case !isMessageFromIframe(messageData, event):\n return\n\n default:\n settings[id].lastMessage = event.data\n errorBoundary(id, routeMessage)(messageData)\n }\n}\n\nexport default once(() => {\n addEventListener(window, MESSAGE, iframeListener as EventListener)\n addEventListener(document, 'visibilitychange', tabVisible)\n window.iframeParentListener = (data: any) =>\n setTimeout(() => iframeListener({ data, sameOrigin: true }))\n})\n","import settings from '../values/settings'\n\nexport const sendIframeReady =\n (source: MessageEventSource | null) =>\n ({ initChild, postMessageTarget }: { initChild: () => void, postMessageTarget: MessageEventSource | null }): void => {\n if (source === postMessageTarget) initChild()\n }\n\nexport default (source: MessageEventSource | null): void =>\n Object.values(settings).forEach(sendIframeReady(source))\n","import { NEW_LINE } from '../../common/consts'\nimport { advise } from '../console'\n\nconst shownDuplicateIdWarning: Record<string, boolean> = {}\n\nexport default function checkUniqueId(id: string): boolean {\n if (shownDuplicateIdWarning[id] === true) return false\n\n const elements = document.querySelectorAll(`iframe#${CSS.escape(id)}`)\n if (elements.length <= 1) return true\n\n shownDuplicateIdWarning[id] = true\n\n const elementList = Array.from(elements).flatMap((element) => [\n NEW_LINE,\n element,\n NEW_LINE,\n ])\n\n advise(\n id,\n `<rb>Duplicate ID attributes detected</>\n\nThe <b>${id}</> ID is not unique. Having multiple iframes on the same page with the same ID causes problems with communication between the iframe and parent page. Please ensure that the ID of each iframe has a unique value.\n\nFound <bb>${elements.length}</> iframes with the <b>${id}</> ID:`,\n ...elementList,\n NEW_LINE,\n )\n\n return false\n}\n","import {\n MESSAGE,\n REMOVED_NEXT_VERSION,\n RESIZE,\n STRING,\n} from '../../common/consts'\nimport { typeAssert } from '../../common/utils'\nimport { advise } from '../console'\nimport trigger from '../send/trigger'\nimport settings from '../values/settings'\nimport closeIframe from './close'\nimport disconnect from './disconnect'\n\nconst DEPRECATED_REMOVE_LISTENERS = `<rb>Deprecated Method Name</>\n\nThe <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${REMOVED_NEXT_VERSION}`\n\nconst DEPRECATED_RESIZE = `<rb>Deprecated Method</>\n\nUse 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.`\n\nexport default function attachMethods(id: string): void {\n if (settings[id]) {\n const { iframe } = settings[id]\n const resizer = {\n close: closeIframe.bind(null, iframe),\n\n disconnect: disconnect.bind(null, iframe),\n\n moveToAnchor(anchor: string) {\n typeAssert(anchor, STRING, 'moveToAnchor(anchor) anchor')\n trigger('Move to anchor', `moveToAnchor:${anchor}`, id)\n },\n\n removeListeners() {\n advise(id, DEPRECATED_REMOVE_LISTENERS)\n this.disconnect()\n },\n\n resize() {\n advise(id, DEPRECATED_RESIZE)\n trigger('Window resize', RESIZE, id)\n },\n\n sendMessage(message: any) {\n message = JSON.stringify(message)\n trigger(MESSAGE, `${MESSAGE}:${message}`, id)\n },\n }\n\n iframe.iframeResizer = resizer\n iframe.iFrameResizer = resizer\n }\n}\n","import { CHILD, SEPARATOR } from '../../common/consts'\nimport page from '../values/page'\nimport settings from '../values/settings'\n\n// Backwards compatibility consts\nconst V1_PADDING = '8'\nconst INTERVAL = '32'\nconst RESIZE_FROM = CHILD\nconst PUBLIC_METHODS = true\n\nexport default function createOutgoingMessage(id: string): string {\n const {\n autoResize,\n bodyBackground,\n bodyMargin,\n bodyPadding,\n heightCalculationMethod,\n inPageLinks,\n license,\n log,\n logExpand,\n mouseEvents,\n offsetHeight,\n offsetWidth,\n mode,\n sizeHeight,\n // sizeSelector,\n sizeWidth,\n tolerance,\n widthCalculationMethod,\n } = settings[id]\n\n return [\n id,\n V1_PADDING,\n sizeWidth,\n log,\n INTERVAL,\n PUBLIC_METHODS,\n autoResize,\n bodyMargin,\n heightCalculationMethod,\n bodyBackground,\n bodyPadding,\n tolerance,\n inPageLinks,\n RESIZE_FROM,\n widthCalculationMethod,\n mouseEvents,\n offsetHeight,\n offsetWidth,\n sizeHeight,\n license,\n page.version,\n mode,\n '', // sizeSelector,\n logExpand,\n ].join(SEPARATOR)\n}\n","import { OBJECT } from '../../common/consts'\nimport { advise, event } from '../console'\n\nconst getOrigin = (url: string): string | null => {\n try {\n return new URL(url).origin\n } catch (error) {\n return null\n }\n}\n\nconst allowsScriptsAndOrigin = (sandbox: any): boolean =>\n typeof sandbox === OBJECT &&\n sandbox.length > 0 &&\n !(sandbox.contains('allow-scripts') && sandbox.contains('allow-same-origin'))\n\nfunction showWarning(id: string, settings: Record<string, any>): void {\n const {\n checkOrigin,\n iframe: { src, sandbox },\n initialisedFirstPage,\n waitForLoad,\n } = settings[id]\n const targetOrigin = getOrigin(src)\n\n event(id, 'noResponse')\n advise(\n id,\n `<rb>No response from iframe</>\n\nThe iframe (<i>${id}</>) has not responded within ${settings[id].warningTimeout / 1000} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${\n checkOrigin && targetOrigin\n ? `\nThe <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${targetOrigin}</>, 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.\n`\n : ''\n}${\n waitForLoad && !initialisedFirstPage\n ? `\nThe <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</>.\n`\n : ''\n }${\n allowsScriptsAndOrigin(sandbox)\n ? `\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.\n`\n : ''\n }\nThis 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.\n`,\n )\n}\n\nexport default function warnOnNoResponse(id: string, settings: Record<string, any>): void {\n function warning(): void {\n if (settings[id] === undefined) return // iframe has been closed while we were waiting\n\n const { initialised, loadErrorShown } = settings[id]\n\n settings[id].msgTimeout = undefined\n\n if (initialised) {\n settings[id].initialisedFirstPage = true\n return\n }\n\n if (loadErrorShown) return\n\n settings[id].loadErrorShown = true\n showWarning(id, settings)\n }\n\n const { msgTimeout, warningTimeout } = settings[id]\n\n if (!warningTimeout) return\n if (msgTimeout) clearTimeout(msgTimeout)\n\n settings[id].msgTimeout = setTimeout(warning, warningTimeout)\n}\n","import {\n INIT,\n INIT_FROM_IFRAME,\n LAZY,\n LOAD,\n MIN_SIZE,\n ONLOAD,\n RESET_REQUIRED_METHODS,\n} from '../../common/consts'\nimport { addEventListener } from '../../common/listeners'\nimport { event as consoleEvent, info } from '../console'\nimport resetIframe from '../methods/reset'\nimport warnOnNoResponse from '../send/timeout'\nimport trigger from '../send/trigger'\nimport settings from '../values/settings'\n\nconst AFTER_EVENT_STACK = 1\nconst isLazy = (iframe: HTMLIFrameElement): boolean => iframe.loading === LAZY\nconst isInit = (eventType: string): boolean => eventType === INIT\n\nfunction checkReset(id: string): void {\n if (!(settings[id]?.heightCalculationMethod in RESET_REQUIRED_METHODS)) return\n\n resetIframe({\n id,\n iframe: settings[id].iframe,\n height: MIN_SIZE,\n width: MIN_SIZE,\n type: INIT,\n })\n}\n\nfunction addLoadListener(iframe: HTMLIFrameElement, initChild: () => void): void {\n // allow other concurrent events to go first\n const onload = () => setTimeout(initChild, AFTER_EVENT_STACK)\n addEventListener(iframe, LOAD, onload)\n}\n\nconst noContent = (iframe: HTMLIFrameElement): boolean => {\n const { src, srcdoc } = iframe\n return !srcdoc && (src == null || src === '' || src === 'about:blank')\n}\n\nfunction sendInit(id: string, initChild: () => void): void {\n const { iframe, waitForLoad } = settings[id]\n\n if (waitForLoad === true) return\n if (noContent(iframe)) {\n setTimeout(() => {\n consoleEvent(id, 'noContent')\n info(id, 'No content detected in the iframe, delaying initialisation')\n })\n return\n }\n\n setTimeout(initChild)\n}\n\n// We have to call trigger twice, as we can not be sure if all\n// iframes have completed loading when this code runs. The\n// event listener also catches the page changing in the iFrame.\nexport default function init(id: string, message: string): void {\n const createInitChild = (eventType: string) => (): void => {\n if (!settings[id]) return // iframe removed before load event\n\n const { firstRun, iframe } = settings[id]\n\n trigger(eventType, message, id)\n if (!(isInit(eventType) && isLazy(iframe))) warnOnNoResponse(id, settings)\n\n if (!firstRun) checkReset(id)\n }\n\n const { iframe } = settings[id]\n\n settings[id].initChild = createInitChild(INIT_FROM_IFRAME)\n addLoadListener(iframe, createInitChild(ONLOAD))\n sendInit(id, createInitChild(INIT))\n}\n","import { OFFSET, OFFSET_SIZE, REMOVED_NEXT_VERSION } from '../../common/consts'\nimport { hasOwn } from '../../common/utils'\nimport { advise } from '../console'\nimport settings from '../values/settings'\n\nfunction updateOptionName(id: string, oldName: string, newName: string): void {\n if (hasOwn(settings[id], oldName)) {\n advise(\n id,\n `<rb>Deprecated option</>\\n\\nThe <b>${oldName}</> option has been renamed to <b>${newName}</>. ${REMOVED_NEXT_VERSION}`,\n )\n settings[id][newName] = settings[id][oldName]\n delete settings[id][oldName]\n }\n}\n\nexport default function updateOptionNames(id: string): void {\n updateOptionName(id, OFFSET, OFFSET_SIZE)\n updateOptionName(id, 'onClose', 'onBeforeClose')\n updateOptionName(id, 'onClosed', 'onAfterClose')\n}\n","import setMode from '../../common/mode'\nimport { hasOwn } from '../../common/utils'\nimport checkOptions from '../checks/options'\nimport checkWarningTimeout from '../checks/warning-timeout'\nimport { checkTitle } from '../page/title'\nimport setOffsetSize from '../send/offset'\nimport defaults from '../values/defaults'\nimport settings from '../values/settings'\nimport setDirection from './direction'\nimport { getPostMessageTarget, setTargetOrigin } from './target-origin'\nimport updateOptionNames from './update-option-names'\n\nconst hasMouseEvents = (options: Record<string, any>): boolean =>\n hasOwn(options, 'onMouseEnter') || hasOwn(options, 'onMouseLeave')\n\nexport default function processOptions(iframe: HTMLIFrameElement, options: Record<string, any>): void {\n const { id } = iframe\n settings[id] = {\n ...settings[id],\n iframe,\n remoteHost: iframe?.src.split('/').slice(0, 3).join('/'),\n ...defaults,\n ...checkOptions(id, options),\n mouseEvents: hasMouseEvents(options),\n mode: setMode(options),\n syncTitle: checkTitle(id),\n }\n\n updateOptionNames(id)\n setDirection(id)\n setOffsetSize(id, options)\n checkWarningTimeout(id)\n getPostMessageTarget(iframe)\n setTargetOrigin(id)\n}\n","import {\n AUTO_RESIZE,\n BOTH,\n HORIZONTAL,\n NONE,\n VERTICAL,\n} from '../../common/consts'\nimport { advise } from '../console'\n\nexport default function checkOptions(id: string, options: Record<string, any> | undefined): Record<string, any> {\n if (!options) return {}\n\n if (\n 'sizeWidth' in options ||\n 'sizeHeight' in options ||\n AUTO_RESIZE in options\n ) {\n advise(\n id,\n `<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${VERTICAL}</>, <bb>${HORIZONTAL}</>, <bb>${BOTH}</> or <bb>${NONE}</>.\n`,\n )\n }\n\n return options\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { BOTH, HORIZONTAL, NONE, VERTICAL } from '../../common/consts'\nimport { log } from '../console'\nimport settings from '../values/settings'\n\nexport default function setDirection(id: string): void {\n const { direction } = settings[id]\n\n switch (direction) {\n case VERTICAL:\n break\n\n case HORIZONTAL:\n settings[id].sizeHeight = false\n // eslint-disable-next-line no-fallthrough\n case BOTH:\n settings[id].sizeWidth = true\n break\n\n case NONE:\n settings[id].sizeWidth = false\n settings[id].sizeHeight = false\n settings[id].autoResize = false\n break\n\n default:\n throw new TypeError(`Direction value of \"${direction}\" is not valid`)\n }\n\n log(id, `direction: %c${direction}`, HIGHLIGHT)\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { VERTICAL } from '../../common/consts'\nimport { log } from '../console'\nimport settings from '../values/settings'\n\nexport default function setOffsetSize(id: string, { offset, offsetSize }: { offset?: number, offsetSize?: number }): void {\n const newOffset = offsetSize || offset\n\n if (!newOffset) return // No offset set or offset is zero\n\n if (settings[id].direction === VERTICAL) {\n settings[id].offsetHeight = newOffset\n log(id, `Offset height: %c${newOffset}`, HIGHLIGHT)\n } else {\n settings[id].offsetWidth = newOffset\n log(id, `Offset width: %c${newOffset}`, HIGHLIGHT)\n }\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { info } from '../console'\nimport settings from '../values/settings'\n\nexport default function checkWarningTimeout(id: string): void {\n if (!settings[id].warningTimeout) {\n info(id, 'warningTimeout:%c disabled', HIGHLIGHT)\n }\n}\n","import settings from '../values/settings'\n\nexport const getTargetOrigin = (remoteHost: string): string =>\n remoteHost === '' ||\n remoteHost.match(/^(about:blank|javascript:|file:\\/\\/)/) !== null\n ? '*'\n : remoteHost\n\nexport function setTargetOrigin(id: string): void {\n settings[id].targetOrigin =\n settings[id].checkOrigin === true\n ? getTargetOrigin(settings[id].remoteHost)\n : '*'\n}\n\nexport function getPostMessageTarget(iframe: HTMLIFrameElement): void {\n const { id } = iframe\n if (settings[id].postMessageTarget === null)\n settings[id].postMessageTarget = iframe.contentWindow\n}\n","import { HIGHLIGHT } from 'auto-console-group'\n\nimport { preModeCheck } from '../checks/mode'\nimport checkUniqueId from '../checks/unique'\nimport { endAutoGroup, event as consoleEvent, log } from '../console'\nimport attachMethods from '../methods/attach'\nimport createOutgoingMessage from '../send/outgoing'\nimport setupBodyMargin from './body-margin'\nimport init from './init'\nimport processOptions from './process-options'\nimport setScrolling from './scrolling'\n\nfunction setup(id: string, iframe: HTMLIFrameElement, options: Record<string, any>): void {\n processOptions(iframe, options)\n log(id, `src: %c${iframe.srcdoc || iframe.src}`, HIGHLIGHT)\n preModeCheck(id)\n setScrolling(iframe)\n setupBodyMargin(id)\n init(id, createOutgoingMessage(id))\n attachMethods(id)\n log(id, 'Setup complete')\n}\n\nexport default function (iframe: HTMLIFrameElement, options: Record<string, any>): void {\n const { id } = iframe\n consoleEvent(id, 'setup')\n if (checkUniqueId(id)) setup(id, iframe, options)\n endAutoGroup(id)\n}\n","import { AUTO, HIDDEN } from '../../common/consts'\nimport { log } from '../console'\nimport settings from '../values/settings'\n\nconst YES = 'yes'\nconst NO = 'no'\nconst OMIT = 'omit'\n\nexport default function setScrolling(iframe: HTMLIFrameElement): void {\n const { id } = iframe\n\n log(\n id,\n `Iframe scrolling ${\n settings[id]?.scrolling ? 'enabled' : 'disabled'\n } for ${id}`,\n )\n\n iframe.style.overflow = settings[id]?.scrolling === false ? HIDDEN : AUTO\n\n switch (settings[id]?.scrolling) {\n case OMIT:\n break\n\n case true:\n iframe.scrolling = YES\n break\n\n case false:\n iframe.scrolling = NO\n break\n\n default:\n iframe.scrolling = settings[id]?.scrolling || NO\n }\n}\n","import { NUMBER } from '../../common/consts'\nimport settings from '../values/settings'\n\nconst ZERO = '0'\n\nexport default function setupBodyMargin(id: string): void {\n const { bodyMargin } = settings[id]\n\n if (typeof bodyMargin === NUMBER || bodyMargin === ZERO) {\n settings[id].bodyMargin = `${bodyMargin}px`\n }\n}\n","import { COLLAPSE, EXPAND, LOG_OPTIONS } from '../../common/consts'\nimport { hasOwn, isString } from '../../common/utils'\nimport { enableVInfo } from '../checks/mode'\nimport { error, setupConsole } from '../console'\nimport defaults from '../values/defaults'\n\nexport default function startLogging(id: string, options: Record<string, any>): void {\n const isLogEnabled = hasOwn(options, 'log')\n const isLogString = isString(options.log)\n const enabled = isLogEnabled\n ? isLogString\n ? true\n : options.log\n : defaults.log\n\n if (!hasOwn(options, 'logExpand')) {\n options.logExpand =\n isLogEnabled && isLogString ? options.log === EXPAND : defaults.logExpand\n }\n\n enableVInfo(options)\n setupConsole({\n enabled,\n expand: options.logExpand,\n iframeId: id,\n })\n\n if (isLogString && !(options.log in LOG_OPTIONS))\n error(\n id,\n `Invalid value for options.log: Accepted values are \"${EXPAND}\" and \"${COLLAPSE}\"`,\n )\n\n options.log = enabled\n}\n","export type {\n IFrameObject,\n IFrameComponent,\n IFrameMouseData,\n IFrameResizedData,\n IFrameMessageData,\n IFrameScrollData,\n IFrameOptions,\n MessageData,\n} from './types'\n\nimport { LABEL } from '../common/consts'\nimport { isObject } from '../common/utils'\nimport ensureHasId from './checks/id'\nimport checkManualLogging from './checks/manual-logging'\nimport { errorBoundary, event as consoleEvent, warn } from './console'\nimport setupEventListenersOnce from './listeners'\nimport setupIframe from './setup'\nimport setupLogging from './setup/logging'\n\nexport default function connectResizer(options: Record<string, any>): (iframe: HTMLIFrameElement) => any {\n if (!isObject(options)) throw new TypeError('Options is not an object')\n\n setupEventListenersOnce()\n checkManualLogging(options)\n\n return (iframe: HTMLIFrameElement) => {\n const id = ensureHasId(iframe, options)\n\n if (LABEL in iframe) {\n consoleEvent(id, 'alreadySetup')\n warn(id, `Ignored iframe (${id}), already setup.`)\n } else {\n setupLogging(id, options)\n errorBoundary(id, setupIframe)(iframe, options)\n }\n\n return iframe?.iframeResizer\n }\n}\n","import { COLLAPSE } from '../../common/consts'\n\nexport default function (options: Record<string, any>): void {\n const { search } = window.location\n\n if (search.includes('ifrlog')) {\n options.log = COLLAPSE\n options.logExpand = search.includes('ifrlog=expanded')\n }\n}\n","import connectResizer from '@iframe-resizer/core'\n\n// eslint-disable-next-line import/extensions\nimport { deprecateMethod, warn } from '../core/console'\n\nswitch (true) {\n case window.jQuery === undefined:\n warn('', 'Unable to bind to jQuery, it is not available.')\n break\n\n case !window.jQuery.fn:\n warn('', 'Unable to bind to jQuery, it is not fully loaded.')\n break\n\n case window.jQuery.fn.iframeResize:\n warn('', 'iframeResize is already assigned to jQuery.fn.')\n break\n\n default:\n window.jQuery.fn.iframeResize = function (options) {\n const connectWithOptions = connectResizer(options)\n const init = (i, el) => connectWithOptions(el)\n\n return this.filter('iframe').each(init).end()\n }\n\n window.jQuery.fn.iFrameResize = function (options) {\n deprecateMethod('iFrameResize()', 'iframeResize()', '', 'jQuery')\n\n return this.iframeResize(options)\n }\n}\n"],"names":["VERSION","LABEL","SEPARATOR","AUTO_RESIZE","INIT","INIT_FROM_IFRAME","LOAD","MESSAGE","ONLOAD","PAGE_INFO","PARENT_INFO","RESET","RESIZE","SCROLL","NEW_LINE","PARENT","STRING","OBJECT","FUNCTION","AUTO","NONE","BOTH","VERTICAL","HORIZONTAL","MESSAGE_ID","RESET_REQUIRED_METHODS","Object","freeze","max","scroll","bodyScroll","documentElementScroll","INIT_EVENTS","EXPAND","COLLAPSE","LOG_OPTIONS","REMOVED_NEXT_VERSION","isObject","value","isString","hasOwn","o","k","prototype","hasOwnProperty","call","hasOwnFallback","$","U","f","_","assert","error","warn","L","expand","defaultEvent","event","label","showTime","q","profile","profileEnd","timeStamp","trace","u","assign","console","fromEntries","W","keys","b","z","K","t","s","h","map","T","window","matchMedia","matches","J","Y","TAGS","br","rb","bb","i","tags","RegExp","join","lookup","tag","_a","createFormatAdvise","formatLogMessage","message","chrome","replace","replaceAll","filter","settings","createConsoleGroup","mod","c","r","collapsed","expanded","l","length","d","O","some","e","g","P","n","groupEnd","p","Date","toString","padStart","V","queueMicrotask","a","push","w","performance","now","count","countReset","endAutoGroup","errorBoundary","m","E","Error","isPrototypeOf","purge","time","timeEnd","timeLog","touch","__esModule","default","consoleEnabled","parent","getMyId","iframeId","top","self","output","type","args","outputSwitched","log","isLogEnabled","info","debug","formatAdvise","x","advise","localFormatAdvise","formatLogMsg","deprecateAdvise","change","old","replacement","toLowerCase","deprecate","deprecateMethod","deprecateOption","defaults","autoResize","bodyBackground","bodyMargin","bodyPadding","checkOrigin","direction","firstRun","inPageLinks","heightCalculationMethod","id","logExpand","license","undefined","mouseEvents","offsetHeight","offsetWidth","postMessageTarget","sameDomain","scrolling","sizeHeight","sizeWidth","tolerance","waitForLoad","warningTimeout","widthCalculationMethod","onBeforeClose","onAfterClose","onInit","onMessage","onMouseEnter","onMouseLeave","onReady","messageData","onResized","onScroll","ensureHasId","iframe","options","TypeError","document","getElementById","newId","consoleEvent","src","addEventListener","el","evt","func","removeEventListener","dispatch","calleeMsg","msg","logSent","route","displayMsg","split","index","filterMsg","HIGHLIGHT","FOREGROUND","sameOrigin","targetOrigin","contentWindow","iframeChildListener","postMessage","trigger","tabVisible","hidden","eventName","values","forEach","sendTriggerMsg","getPaddingEnds","compStyle","boxSizing","paddingTop","parseInt","paddingBottom","getBorderEnds","borderTopWidth","borderBottomWidth","ABOVE_TYPES","true","false","checkIframeExists","detectedIframe","element","tagName","HTMLIFrameElement","isIframe","on","funcName","val","setTimeout","isolateUserCode","getMessageBody","offset","lastMessage","slice","indexOf","onMouse","height","width","mousePos","y","coords","screenX","Number","screenY","page","position","version","unsetPagePosition","getPagePosition","scrollX","scrollY","setPagePosition","scrollTo","setDimension","dimension","size","style","setSize","resizeIframe","disconnect","iframeResizer","closeIframe","parentNode","remove","resetIframe","sendInfoToIframe","infoFunction","gate","requestType","frameId","requestAnimationFrame","stopInfoMonitor","stopFunction","startInfoMonitor","pending","sendInfo","stop","sendScroll","sendResize","setListener","listener","pageObserver","iframeObserver","ResizeObserver","observe","body","startPageInfoMonitor","bodyPosition","getBoundingClientRect","iFramePosition","innerHeight","innerWidth","clientHeight","clientWidth","documentElement","JSON","stringify","iframeHeight","iframeWidth","Math","offsetTop","trunc","offsetLeft","left","scrollTop","scrollLeft","documentHeight","documentWidth","windowHeight","windowWidth","stopPageInfoMonitor","startParentInfoMonitor","scrollWidth","scrollHeight","pageLeft","pageTop","scale","visualViewport","viewport","stopParentInfoMonitor","getElementPosition","target","iframePosition","pagePosition","scrollToLink","scrollRequestFromChild","addOffset","newPosition","calcOffset","parentIframe","parentIFrame","scrollParent","reposition","scrollToOffset","inPageLink","location","hash","hashData","decodeURIComponent","getElementsByName","jumpToTarget","moveToAnchor","jumpToParent","checkTitle","title","_b","codePointAt","imul","String","fromCodePoint","getModeData","setMode","v","vAdvised","vInfoDisable","checkMode","childMode","mode","consoleClear","ver","NORMAL","vInfo","getModeLabel","routeMessage","parse","initialised","_c","checkSameDomain","checkVersion","messageBody","scrollBy","syncTitle","setTitle","iframeListener","data","source","initChild","sendIframeReady","getComputedStyle","decodeMessage","isMetaParent","isMessageFromMetaParent","origin","constructor","Array","checkList","remoteHost","checkSingle","isMessageFromIframe","setupEventListenersOnce","fn","done","apply","this","once","iframeParentListener","shownDuplicateIdWarning","DEPRECATED_REMOVE_LISTENERS","attachMethods","resizer","close","bind","anchor","string","charAt","toUpperCase","typeAssert","removeListeners","resize","sendMessage","iFrameResizer","V1_PADDING","INTERVAL","RESIZE_FROM","PUBLIC_METHODS","showWarning","sandbox","initialisedFirstPage","url","URL","getOrigin","contains","allowsScriptsAndOrigin","init","createInitChild","eventType","isInit","loading","isLazy","msgTimeout","clearTimeout","loadErrorShown","warnOnNoResponse","checkReset","addLoadListener","srcdoc","noContent","sendInit","updateOptionName","oldName","newName","hasMouseEvents","processOptions","checkOptions","updateOptionNames","setDirection","offsetSize","newOffset","setOffsetSize","checkWarningTimeout","getPostMessageTarget","match","setTargetOrigin","setup","preModeCheck","overflow","_d","setScrolling","setupBodyMargin","createOutgoingMessage","setupIframe","elements","querySelectorAll","CSS","escape","elementList","from","flatMap","checkUniqueId","startLogging","isLogString","enabled","enableVInfo","consoleGroup","setupConsole","connectResizer","search","includes","checkManualLogging","setupLogging","jQuery","iframeResize","connectWithOptions","each","end","iFrameResize"],"mappings":";;;;;;;;;;;;;;;;;;;0FAAO,MAAMA,EAAU,eACVC,EAAQ,gBACRC,EAAY,IAGZC,EAAc,aAIdC,EAAO,OACPC,EAAmB,cAEnBC,EAAO,OACPC,EAAU,UAGVC,EAAS,SAETC,EAAY,WACZC,EAAc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GAAe/S,GACrC,IAAK7K,EAAS6K,GAAU,MAAM,IAAIC,UAAU,4BAK5C,OAHAwN,KCrBY,SAAWzN,GACvB,MAAMgT,OAAEA,GAAWnb,OAAOsS,SAEtB6I,EAAOC,SAAS,YAClBjT,EAAQvD,IAAMzH,EACdgL,EAAQ3B,UAAY2U,EAAOC,SAAS,mBAExC,CDeEC,CAAmBlT,GAEXD,IACN,MAAM3B,EAAK0B,GAAYC,EAAQC,GAU/B,OARIjN,KAASgN,GACXM,GAAajC,EAAI,gBACjBjI,GAAKiI,EAAI,mBAAmBA,wBAE5B+U,GAAa/U,EAAI4B,GACjB7E,GAAciD,EAAI4T,GAAlB7W,CAA+B4E,EAAQC,IAGlCD,eAAAA,EAAQyF,cAEnB,CElCA,QAAQ,GACN,UAAuBjH,IAAlB1G,OAAOub,OACVjd,GAAK,GAAI,kDACT,MAEF,KAAM0B,OAAOub,OAAO1F,GAClBvX,GAAK,GAAI,qDACT,MAEF,KAAK0B,OAAOub,OAAO1F,GAAG2F,aACpBld,GAAK,GAAI,kDACT,MAEF,QACE0B,OAAOub,OAAO1F,GAAG2F,aAAe,SAAUrT,GACxC,MAAMsT,EAAqBP,GAAe/S,GAG1C,OAAO6N,KAAK1U,OAAO,UAAUoa,KAFhB,CAACjb,EAAGkI,IAAO8S,EAAmB9S,IAEHgT,KAC1C,EAEA3b,OAAOub,OAAO1F,GAAG+F,aAAe,SAAUzT,GAGxC,OAFAxC,GAAgB,iBAAkB,iBAAkB,GAAI,UAEjDqQ,KAAKwF,aAAarT,EAC3B","x_google_ignoreList":[2]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iframe-resizer/jquery",
3
- "version": "5.5.9",
3
+ "version": "6.0.0-beta.0",
4
4
  "license": "GPL-3.0",
5
5
  "homepage": "https://iframe-resizer.com",
6
6
  "author": {
@@ -34,6 +34,6 @@
34
34
  "jquery"
35
35
  ],
36
36
  "dependencies": {
37
- "@iframe-resizer/core": "5.5.9"
37
+ "@iframe-resizer/core": "6.0.0-beta.0"
38
38
  }
39
39
  }