iframe-resizer 5.5.5-beta.1 → 5.5.6-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy 5.5.5-beta.1 (cjs) - 2025-09-01
4
+ * @module iframe-resizer/legacy 5.5.6-beta.1 (cjs) - 2025-09-04
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy 5.5.5-beta.1 (esm) - 2025-09-01
4
+ * @module iframe-resizer/legacy 5.5.6-beta.1 (esm) - 2025-09-04
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy (child) 5.5.5-beta.1 (iife)
4
+ * @module iframe-resizer/legacy (child) 5.5.6-beta.1 (iife)
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,5 +17,5 @@
17
17
  */
18
18
 
19
19
 
20
- !function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},c=Object.assign(console);const{fromEntries:l,keys:d}=Object,u=e=>[e,c[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>l(d(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.5.5-beta.1",b="iframeResizer",v="beforeUnload",z="init",w="message",$="pageInfo",S="parentInfo",O="scrollToOffset",M="title",E=10,k="data-iframe-size",T="data-iframe-overflowed",I="data-iframe-ignore",j="height",x="width",A="readystatechange",C="bottom",P="right",N="autoResizeEnabled",R=Symbol("sizeChanged"),q="manualResize",L="parentResize",B={[q]:1,[L]:1},D="setOffsetSize",F="resizeObserver",W="overflowObserver",V="mutationObserver",H="visibilityObserver",U="No change in content size detected",Z="[iFrameSizer]",J=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),_=(e,t,n,o)=>e.addEventListener(t,n,o||!1),Q=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,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)},G=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"],X=["<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."],K=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],ee=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),te=e=>G(X[e]);var ne=e=>{const t=e[G(Y[0])]||e[G(Y[1])]||e[G(Y[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=Q(G(e));return n in ee&&(t=ee[n]),t}(n[0]);return 0===o||(e=>e[2]===Q(e[0]+e[1]))(n)||(o=-2),o};const oe=(e,...t)=>setTimeout(()=>e(...t),0),re=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},ie=e=>e,ae=e=>Math.round(1e3*e)/1e3,se=e=>e.charAt(0).toUpperCase()+e.slice(1),ce=e=>""!=`${e}`&&void 0!==e;const le=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${se(t)}`)};let de=!0,ue=b;const fe=(me=function(n={}){const l={},d={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some(([e])=>e in i)||!!h.expand;function z(){if(0!==p.length){c[v()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)c.assert(e in c,`Unknown console method: ${e}`),e in c&&c[e](...t);c.groupEnd(),b()}else b()}function w(){""===g&&(g=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)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask(()=>queueMicrotask(z))),p.push([e,...t])}function S(e=r,...t){l[e]?$("log",`${e}: ${performance.now()-l[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,u),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e),z()}return n},event:function(e){w(),h.event=e},purge:y,time:function(e=r){w(),l[e]=performance.now()},timeEnd:function(e=r){S(e),delete l[e]},timeLog:S,touch:w}},me?.__esModule?me.default:me);var me;const pe=fe({label:`${b}(child)`,expand:!1});const he=e=>(...t)=>!de||pe[e](...t),ge=he("log"),ye=ge,be=he("debug");const{assert:ve,endAutoGroup:ze,error:we,errorBoundary:$e,event:Se,label:Oe,purge:Me,warn:Ee}=pe,ke=e=>{return pe.warn((t=ie,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},Te=ke,Ie=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))((e,t)=>ke(t)),je=Ie("Method"),xe=Ie("Method","replaced with"),Ae=Ie("Option"),Ce=["min-height","min-width","max-height","max-width"],Pe=new Set,Ne=e=>e.tagName?e.tagName.toLowerCase():"unknown",Re=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),qe=(e,t)=>{return(n=Re(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function Le({href:e}){Pe.has(e)||(ge("Unable to access stylesheet:",e),Pe.add(e))}const Be=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){Le(n)}return{source:"cross-origin stylesheet",value:Re(e,t)}}(e,t),De=(e,t)=>{const{source:n,value:o}=Be(e,t),r=Ne(e);ke(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function Fe(){for(const e of[document.documentElement,document.body])for(const t of Ce)ge(`Checking <${Ne(e)}> for blocking CSS: ${t}`),qe(e,t)&&De(e,t)}const We=e=>t=>void 0===t?void 0:e(t),Ve=We(e=>"true"===e),He=We(Number),Ue=(e="")=>t=>n=>{n.size>0&&be(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))},Ze=Ue("attached to"),Je=((e="")=>t=>n=>{n.size>0&&we(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),_e=Ue("detached from"),Qe=(t,n=!0)=>o=>{o>0&&ye(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e)},Ge=(e,t,n,o)=>{const r=_e(e);return e=>{const i=new Set;let a=0;for(const o of e)n.has(o)&&(t.unobserve(o),n.delete(o),i.add(o),a+=1);r(i),o(a),i.clear()}},Ye="Mutation",Xe=new Set,Ke=new Set,et=new Set,tt=[],nt={attributes:!0,attributeFilter:[I,k],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let ot,rt=1,it=!1,at=0;const st=Ue("added")(Ye),ct=Ue("removed (page)")(Ye),lt=Ue("removed (added)")(Ye),dt=e=>e.nodeType!==Node.ELEMENT_NODE||J.has(e.tagName.toLowerCase());function ut(e){const t=e.addedNodes;for(const e of t)dt(e)||Xe.add(e)}function ft(e){const t=e.removedNodes;for(const e of t)dt(e)||(Xe.has(e)?(Xe.delete(e),et.add(e)):Ke.add(e))}const mt=e=>{ye("Mutations:",e);for(const t of e)ut(t),ft(t);st(Xe),ct(Ke),lt(et),et.clear()};const pt=e=>()=>{const t=performance.now(),n=t-at,o=16*rt+++2;if(n>o&&n<200)return Se("mutationThrottled"),ye("Update delayed due to heavy workload on the callStack"),ye(`EventLoop busy time: %c${ae(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(ot,16*rt),void(at=t);rt=1,tt.forEach(mt),tt.length=0,it=!1,Ke.size>0&&ge(`Detected %c${Ke.size} %cremoved element${Ke.size>1?"s":""}`,h,g),Xe.size>0&&ge(`Found %c${Xe.size} %cnew element${Xe.size>1?"s":""}`,h,g),e({addedNodes:Xe,removedNodes:Ke}),Xe.clear(),Ke.clear()};function ht(e){tt.push(e),it||(at=performance.now(),it=!0,requestAnimationFrame(ot))}function gt(e){const t=new window.MutationObserver(ht),n=document.body||document.documentElement;return ot=pt(e),t.observe(n,nt),ye("Attached MutationObserver to body"),{...t,disconnect:()=>{Xe.clear(),Ke.clear(),tt.length=0,t.disconnect(),ye("Detached MutationObserver")}}}const yt="Overflow",bt=Qe(yt),vt=Qe(yt,!1),zt=Ze(yt),wt=Je(yt),$t=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,St=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||ie,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(T,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t;if(!o)continue;const i=e[n],c=a(i,o)&&!$t(r);s(r,c)}r(i)},o),l=new WeakSet;return{attachObservers:function(e){const t=new Set,n=new Set;let o=0;for(const r of e)r.nodeType===Node.ELEMENT_NODE&&(l.has(r)?t.add(r):(c.observe(r),l.add(r),n.add(r),o+=1));wt(t),zt(n),bt(o),n.clear(),t.clear()},detachObservers:Ge(yt,c,l,vt),disconnect:()=>{c.disconnect(),ye("Detached OverflowObserver")}}},Ot="--ifr-start",Mt="--ifr-end",Et="--ifr-measure",kt=[];let Tt,It={},jt=0;function xt(){try{performance.clearMarks(Ot),performance.clearMarks(Mt),performance.clearMeasures(Et)}catch{}}function At(e){e.getEntries().forEach(e=>{if(e.name===Mt)try{const{duration:t}=performance.measure(Et,Ot,Mt);It=e.detail,kt.push(t),kt.length>100&&kt.shift()}catch{}})}function Ct(){ye("Attached PerformanceObserver to page");const e=new PerformanceObserver(At);return e.observe({entryTypes:["mark"]}),Tt=setInterval(()=>{if(kt.length<10)return;if(It.hasTags&&It.len<25)return;kt.sort();const e=Math.min(kt.reduce((e,t)=>e+t,0)/kt.length,kt[Math.floor(kt.length/2)]),t=ae(e);t>jt&&(jt=t,Se("performanceObserver"),ge("Mean time:",ae(kt[Math.floor(kt.length/2)])),ge("Median time:",ae(kt.reduce((e,t)=>e+t,0)/kt.length)),ge("Average time:",t),ge("Max time:",ae(Math.max(...kt)))),xt(),e<=4||(clearInterval(Tt),ke(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${ae(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${It.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{xt(),clearInterval(Tt),e.disconnect(),ye("Detached PerformanceObserver")}}}const Pt="Resize",Nt=Qe(Pt),Rt=Qe(Pt,!1),qt=Ze(Pt),Lt=Je(Pt),Bt=new WeakSet,Dt=new Set,Ft=new Set;let Wt;function Vt(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(Bt.has(n)?Dt.add(n):(Wt.observe(n),Bt.add(n),Ft.add(n),t+=1))}Lt(Dt),qt(Ft),Nt(t),Ft.clear(),Dt.clear()}function Ht(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),ye("Attached VisibilityObserver to page"),{disconnect:()=>{t.disconnect(),ye("Detached VisibilityObserver")}}}const Ut=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Zt=Ut("function"),Jt=Ut("number"),_t=Ut("string");"undefined"!=typeof window&&function(){const o={height:()=>(Ee("Custom height calculation function not defined"),Tn.auto()),width:()=>(Ee("Custom width calculation function not defined"),In.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s=[],c="scroll";let l,d,u,f,m,p,Q,X,ee,fe=!0,me="",he=0,Me="",Ie="",Ce=!1,Pe=!0,Ne=!1,Re=!0,qe=!1,Le=!1,Be=!0,De=!1,We=1,Ue=a,Ze="",Je=!0,_e={},Qe=!1,Ye=!1,Xe=!1,Ke=0,et=!1,tt=0,nt=0,ot=new Set,rt="",it="child",at=!1,st="",ct=[],lt=window.parent,dt="*",ut=0,ft=!1,mt=1,pt=c,ht=window,yt=()=>{Ee("onMessage function not defined")},bt=()=>{},vt=null,zt=null;function wt(e){var t;!function(e){rt=e[0]??rt,he=He(e[1])??he,Ne=Ve(e[2])??Ne,Xe=Ve(e[3])??Xe,fe=Ve(e[6])??fe,Me=e[7]??Me,Ue=e[8]??Ue,me=e[9]??me,Ie=e[10]??Ie,ut=He(e[11])??ut,_e.enable=Ve(e[12])??!1,it=e[13]??it,pt=e[14]??pt,et=Ve(e[15])??et,tt=He(e[16])??tt,nt=He(e[17])??nt,Pe=Ve(e[18])??Pe,l=e[19]??l,X=e[20]??X,Ke=He(e[21])??Ke,Ye=Ve(e[23])??Ye}(e),ue=(t={id:rt,enabled:Xe,expand:Ye}).id||b,pe.label(`${ue}`),pe.expand(t.expand),de=t.enabled,ge(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){ge("Reading data from page:",Object.keys(e)),ee=Zt(e,"onBeforeResize")??ee,yt=Zt(e,"onMessage")??yt,bt=Zt(e,"onReady")??bt,"number"==typeof e?.offset&&(Ae("offset","offsetSize"),Pe&&(tt=Jt(e,"offset")??tt),Ne&&(nt=Jt(e,"offset")??nt)),"number"==typeof e?.offsetSize&&(Pe&&(tt=Jt(e,"offsetSize")??tt),Ne&&(nt=Jt(e,"offsetSize")??nt)),d=_t(e,G(Y[0]))??d,Ze=_t(e,"ignoreSelector")??Ze,st=_t(e,"sizeSelector")??st,dt=_t(e,"targetOrigin")??dt,Ue=e?.heightCalculationMethod||Ue,pt=e?.widthCalculationMethod||pt}function t(e,t){return"function"==typeof e&&(ke(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Ke)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Ue=t(Ue,j),pt=t(pt,x),ye(`Set targetOrigin for parent: %c${dt}`,h))}(),[xt,Nt,tn,It,At,Kt,en,Yt,jt,kt,Ce?ie:Fe,Dt,sn,an,rn,Ft,()=>qt("background",me),()=>qt("padding",Ie),Ce?ie:Ut,on,nn,vn,$t].forEach(e=>{try{e()}catch(e){if(Ke<0)throw e;ke("<rb>Error in setup function</>\n<i>iframe-resizer</> detected an error during setup.\n\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>"),we(e)}}),Et(re(bt)),ge("Initialization complete"),Rn(z,"Init message from host page",void 0,void 0,`${y}:${Ke}`),document.title&&""!==document.title&&Bn(0,0,M,document.title)}function $t(){_(window,v.toLowerCase(),()=>{s.forEach(e=>e()),Bn(0,0,v)})}function Et(e){"complete"===document.readyState?oe(e):_(document,A,()=>Et(e))}function kt(){ct=document.querySelectorAll(`[${k}]`),De=ct.length>0,ge(`Tagged elements found: %c${De}`,h)}let Tt=0;function It(){const n=document.querySelectorAll(`*[${I}]`);return qe=n.length>0,qe&&n.length!==Tt&&(function(n){const o=1===n.length?"":"s";Ee(`%c[${I}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),Tt=n.length),qe}function jt(){"BackCompat"===document.compatMode&&ke("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n")}function xt(){X&&""!==X&&"false"!==X?X!==y&&ke(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${X} - Child page: ${y}.\n`):ke("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n")}function At(){try{at=1===Ke||"iframeParentListener"in window.parent}catch(e){ge("Cross domain iframe detected")}}function Nt(){Ne===Pe&&(Ce=!0)}function qt(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),ye(`Set body ${e}: %c${t}`,h))}function Lt(e,t,n){if(""!==n){ge(`${e}: %c${n}`,h);for(const e of document.querySelectorAll(n))ge(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Dt(){Lt("sizeSelector",k,st),Lt("ignoreSelector",I,Ze)}function Ft(){var e,t;void 0===Me&&(Me=`${he}px`),qt("margin",(e="margin",(t=Me).includes("-")&&(Ee(`Negative CSS value ignored for ${e}`),t=""),t))}function Ut(){const e=e=>e.style.setProperty(j,"auto","important");e(document.documentElement),e(document.body),ge("Set HTML & body height: %cauto !important",h)}function Qt(e){({add(t){function n(){Rn(e.eventName,e.eventType)}i[t]=n,_(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),ge(`${se(e.method)} event listener: %c${e.eventType}`,h)}function Gt(e){Qt({method:e,eventType:"After Print",eventName:"afterprint"}),Qt({method:e,eventType:"Before Print",eventName:"beforeprint"}),Qt({method:e,eventType:"Ready State Change",eventName:A})}function Yt(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(k,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&ke("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}function Xt(e,t,n){const{label:o}=n;return t!==e&&(e in n||(Ee(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&ke(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${X?"remove this option.":`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n \nwindow.iframeResizer = {\n license: 'xxxx',\n ${o}CalculationMethod: 'auto',\n}\n`}\n`),ge(`Set ${o} calculation method: %c${e}`,h),e}function Kt(){Ue=Xt(Ue,a,Tn)}function en(){pt=Xt(pt,c,In)}function tn(){const t=Ke,n=ne({key:l}),o=ne({key:d});if(Ke=Math.max(n,o),Ke<0){if(Ke=Math.min(n,o),ke(`${te(Ke+2)}${te(2)}`),ce(X))throw te(Ke+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!ce(X)||t>-1&&Ke>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${ue} %ciframe-resizer ${t}`,de||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>G(K[e]))(Ke)})`,Ke),Ke<2&&Te(te(3)),sessionStorage.setItem("ifr",y))}function nn(){!0!==fe&&ge("Auto Resize disabled"),Gt("add"),s.push(()=>Gt("remove"))}function on(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function rn(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,E)+parseInt(n.x,E),y:parseInt(t.top,E)+parseInt(n.y,E)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?(ge(`In page link (#${n}) not found in iframe, so sending to parent`),Bn(0,0,"inPageLink",`#${n}`)):function(t){const o=e(t);ge(`Moving to in page link (%c#${n}%c) at x: %c${o.x}%c y: %c${o.y}`,h,g,h,g,h),Bn(o.y,o.x,O)}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}_e.enable?1===Ke?ke("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):(ge("Setting up location.hash handlers"),function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&_(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),_(window,"hashchange",n),setTimeout(n,128)):ge("In page linking not enabled"),_e={findTarget:t}}function an(){function e(e){Bn(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){ge(`Add event listener: %c${n}`,h),_(window.document,t,e)}!0===et&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}function sn(){1!==Ke&&(ht.parentIframe=Object.freeze({autoResize:e=>(le(e,"boolean","parentIframe.autoResize(enable) enable"),!1===Ne&&!1===Pe?(Se(N),ke("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===fe?(fe=!0,queueMicrotask(()=>Rn(N,"Auto Resize enabled"))):!1===e&&!0===fe&&(fe=!1),Bn(0,0,"autoResize",JSON.stringify(fe)),fe)),close(){Bn(0,0,"close")},getId:()=>rt,getOrigin:()=>(Se("getOrigin"),je("getOrigin()","getParentOrigin()"),u),getParentOrigin:()=>u,getPageInfo(e){if("function"==typeof e)return vt=e,Bn(0,0,$),void xe("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");vt=null,Bn(0,0,"pageInfoStop")},getParentProps:e=>(le(e,"function","parentIframe.getParentProps(callback) callback"),zt=e,Bn(0,0,S),()=>{zt=null,Bn(0,0,"parentInfoStop")}),getParentProperties(e){je("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){le(e,"string","parentIframe.moveToAnchor(anchor) anchor"),_e.findTarget(e)},reset(){!function(){const e=Ue;Ue=a,ge(`Reset trigger event: %c${"parentIframe.reset"}`,h),ft?ge("TriggerLock blocked calculation"):(ft=!0,be("Trigger event lock on"),requestAnimationFrame(()=>{ft=!1,be("Trigger event lock off")})),qn("reset"),Ue=e}()},setOffsetSize(e){le(e,"number","parentIframe.setOffsetSize(offset) offset"),tt=e,nt=e,Rn(D,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){le(e,"number","parentIframe.scrollBy(x, y) x"),le(t,"number","parentIframe.scrollBy(x, y) y"),Bn(t,e,"scrollBy")},scrollTo(e,t){le(e,"number","parentIframe.scrollTo(x, y) x"),le(t,"number","parentIframe.scrollTo(x, y) y"),Bn(t,e,"scrollTo")},scrollToOffset(e,t){le(e,"number","parentIframe.scrollToOffset(x, y) x"),le(t,"number","parentIframe.scrollToOffset(x, y) y"),Bn(t,e,O)},sendMessage(e,t){t&&le(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Bn(0,0,w,JSON.stringify(e),t)},setHeightCalculationMethod(e){Ue=e,Kt()},setWidthCalculationMethod(e){pt=e,en()},setTargetOrigin(e){le(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),ge(`Set targetOrigin: %c${e}`,h),dt=e},resize(e,t){void 0!==e&&le(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&le(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Rn(q,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){je("size()","resize()"),this.resize(e,t)}}),ht.parentIFrame=ht.parentIframe)}let cn=new Set;function ln(){const e=document.querySelectorAll(`[${T}]`);ot=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${I}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{Se("overflowIgnored"),ye("Ignoring elements with [data-iframe-ignore] > *:\n",n),ze()}),t}(e),Le=ot.size>0,"function"==typeof Set.prototype.symmetricDifference&&(Be=ot.symmetricDifference(cn).size>0),cn=ot}function dn(){switch(ln(),!0){case!Be:return;case ot.size>1:ye("Overflowed Elements:",ot);break;case Le:break;default:ye("No overflow detected")}Rn(W,"Overflow updated")}function un(e){const t={root:document.documentElement,side:Pe?C:P};return f=St(dn,t),f.attachObservers(e),f}function fn(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Rn(F,`Element resized <${function(e){switch(!0){case!ce(e):return"";case ce(e.id):return`${e.nodeName}#${e.id}`;case ce(e.name):return`${e.nodeName} (${e.name}`;case ce(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function mn(e){return Wt=new ResizeObserver(fn),Wt.observe(document.body),Bt.add(document.body),ye("Attached ResizeObserver to body"),m={attachObserverToNonStaticElements:Vt,detachObservers:Ge(Pt,Wt,Bt,Rt),disconnect:()=>{Wt.disconnect(),ye("Detached ResizeObserver")}},m.attachObserverToNonStaticElements(e),m}function pn(e){ge(`Visible: %c${e}`,h),Qe=!e,Rn(H,"Visibility changed")}const hn=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of Sn(n))t.add(e)}return ye("Inspecting:\n",t),t},gn=e=>{if(0===e.size)return;Se("addObservers");const t=hn(e);f.attachObservers(t),m.attachObserverToNonStaticElements(t),ze()},yn=e=>{if(0===e.size)return;Se("removeObservers");const t=hn(e);f.detachObservers(t),m.detachObservers(t),ze()};function bn(e){!function({addedNodes:e,removedNodes:t}){Se("contentMutated"),Dt(),kt(),ln(),ze(),yn(t),gn(e)}(e),Rn(V,"Mutation Observed")}function vn(){const e=Sn(document.documentElement);var t;ge("Attaching Observers"),t=[gt(bn),un(e),Ct(),mn(e),Ht(pn)],s.push(...t.map(e=>e.disconnect))}function zn(e){performance.mark(Ot);const t=se(e);let n=1,o=document.documentElement,r=De?0:document.documentElement.getBoundingClientRect().bottom;const i=De?ct:Le?Array.from(ot):Sn(document.documentElement);for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return ye(`${t} position calculated from:`,o),ye(`Checked %c${i.length}%c elements`,h,g),performance.mark(Mt,{detail:{hasTags:De,len:i.length,logging:Xe,Side:t}}),r}const wn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],$n=`* ${Array.from(J).map(e=>`:not(${e})`).join("")}`,Sn=e=>e.querySelectorAll($n),On={height:0,width:0},Mn={height:0,width:0},En=[h,g,h];function kn(e){function t(){return Mn[o]=r,On[o]=s,Math.max(r,1)}const n=e===Tn,o=e.label,r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${r}px %cPage: %c${s}px`;let l=0;switch(!0){case!e.enabled():return Math.max(s,1);case De:ye("Found element with data-iframe-size attribute"),l=e.taggedElement();break;case!Le&&Re&&0===Mn[o]&&0===On[o]:ye(`Initial page size values: ${c}`,...En),l=t();break;case ft&&r===Mn[o]&&s===On[o]:ye(`Size unchanged: ${c}`,...En),l=Math.max(r,s);break;case 0===r&&0!==s:ye(`Page is hidden: ${c}`,...En),l=s;break;case!Le&&r!==Mn[o]&&s<=On[o]:ye(`New <html> size: ${c} `,...En),ye(`Previous <html> size: %c${Mn[o]}px`,h),l=t();break;case!n:l=e.taggedElement();break;case!Le&&r<Mn[o]:ye(`<html> size decreased: ${c}`,...En),l=t();break;case s===a||s===i:ye(`<html> size equals page size: ${c}`,...En),l=t();break;case r>s:ye(`Page size < <html> size: ${c}`,...En),l=t();break;case Le:ye("Found elements possibly overflowing <html> "),l=e.taggedElement();break;default:ye(`Using <html> size: ${c}`,...En),l=t()}return ye(`Content ${o}: %c${l}px`,h),l+=function(e){const t=e.getOffset();return 0!==t&&ye(`Page offsetSize: %c${t}px`,h),t}(e),l}const Tn={label:j,enabled:()=>Pe,getOffset:()=>tt,auto:()=>kn(Tn),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,E)+parseInt(t.marginBottom,E)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Tn.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...wn(Tn)),min:()=>Math.min(...wn(Tn)),grow:()=>Tn.max(),lowestElement:()=>zn(C),taggedElement:()=>zn(C)},In={label:x,enabled:()=>Ne,getOffset:()=>nt,auto:()=>kn(In),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...wn(In)),min:()=>Math.min(...wn(In)),rightMostElement:()=>zn(P),scroll:()=>Math.max(In.bodyScroll(),In.documentElementScroll()),taggedElement:()=>zn(P)},jn=(e,t)=>!(Math.abs(e-t)<=ut);function xn(e,t){const n=e[t](),o=e.enabled()&&void 0!==ee?function(e){const t=ee(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}(n):n;return ve(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let An=!1;const Cn=re(()=>Te(te(4)));let Pn,Nn=!1;const Rn=$e((e,t,n,o,r)=>{switch(Se(e),!0){case!0===Qe:if(!0===Nn)break;ge("Iframe hidden - Ignored resize request"),Nn=!0,An=!1,cancelAnimationFrame(Pn);break;case!0===An&&e!==W:ge("Resize already pending - Ignored resize request");break;case!fe&&!(e in B):ye("Resizing disabled");break;default:Nn=!1,An=!0,Q=performance.now(),p=!0,Pn=requestAnimationFrame(()=>{An=!1,Se("requestAnimationFrame"),be(`Reset sendPending: %c${e}`,h)}),function(e,t,n,o,r){const i=n??xn(Tn,Ue),a=o??xn(In,pt),s=Pe&&jn(We,i)||Ne&&jn(mt,a)?R:e;switch(ge(`Resize event: %c${t}`,h),s){case z:case N:case R:We=i,mt=a;case D:Ln(We,mt,e,r);break;case W:case V:case F:case H:ge(U);break;default:ye(U)}p=!1}(e,t,n,o,r)}ze()});function qn(e){We=Tn[Ue](),mt=In[pt](),Bn(We,mt,e)}function Ln(e,t,o,r,i){Ke<-1||(void 0!==i?ge(`Message targetOrigin: %c${i}`,h):i=dt,function(){const a=`${rt}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(at)try{window.parent.iframeParentListener(Z+a)}catch(e){if(1!==Ke)throw e;return void Cn()}else lt.postMessage(Z+a,i);p&&ge(function(){const e=ae(performance.now()-Q);return o===z?`Initialised iframe in %c${e}ms`:`Size calculated in %c${e}ms`}(),h),ye(`Sending message to parent page via ${at?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}())}const Bn=$e((e,t,n,o,r)=>{Se(n),Ln(e,t,n,o,r),ze()}),Dn=$e(function(e){Se("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Bn(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void ge("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");lt=e.source,u=e.origin,wt(t),Re=!1,setTimeout(()=>{Je=!1},128)},reset(){Je?ge("Page reset ignored by init"):(ge("Page size reset by host page"),qn("resetPage"))},resize(){ge("Resize requested by host page"),Rn(L,"Parent window requested size check")},moveToAnchor(){_e.findTarget(s())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=s();ge("PageInfo received from parent:",o(e)),vt?oe(vt,n(e)):r($)},parentInfo(){const e=o(s());ge("ParentInfo received from parent:",e),zt?oe(zt,e):r(S)},message(){const e=s();ge("onMessage called from parent:%c",h,o(e)),oe(yt,n(e))}},a=()=>e.data.split("]")[1].split(":")[0],s=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function l(){const t=a();Se(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||Ee(`Unexpected message (${e.data})`)}Z===`${e.data}`.slice(0,13)&&function(){if(!1!==Re)return c()?(Oe(a()),Se(z),void i.init()):void ge(`Ignored message of type "${a()}". Received before initialization.`);l()}()});let Fn=!1;const Wn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Vn(){if("loading"===document.readyState||!Re||Fn)return;const{parent:e,top:t}=window;Se("ready"),ge("Sending%c ready%c to parent from",h,g,window.location.href),Wn(e),e!==t&&Wn(t),Fn=!0}"iframeChildListener"in window?Ee("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Dn({data:e,sameOrigin:!0})),_(window,w,Dn),_(document,A,Vn),setTimeout(Vn))}()}();
20
+ !function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},c=Object.assign(console);const{fromEntries:l,keys:d}=Object,u=e=>[e,c[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>l(d(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.5.6-beta.1",b="iframeResizer",v="beforeUnload",w="init",z="message",$="pageInfo",S="parentInfo",O="scrollToOffset",M="title",E=10,k="data-iframe-size",x="data-iframe-overflowed",T="data-iframe-ignore",I="height",j="width",A="readystatechange",C="bottom",P="right",N="autoResizeEnabled",R=Symbol("sizeChanged"),q="manualResize",L="parentResize",B={[q]:1,[L]:1},D="setOffsetSize",F="resizeObserver",W="overflowObserver",V="mutationObserver",H="visibilityObserver",U="No change in content size detected",Z="[iFrameSizer]",J=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),_=(e,t,n,o)=>e.addEventListener(t,n,o||!1),Q=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,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)},G=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"],X=["<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."],K=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],ee=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),te=e=>G(X[e]);var ne=e=>{const t=e[G(Y[0])]||e[G(Y[1])]||e[G(Y[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=Q(G(e));return n in ee&&(t=ee[n]),t}(n[0]);return 0===o||(e=>e[2]===Q(e[0]+e[1]))(n)||(o=-2),o};const oe=(e,...t)=>setTimeout(()=>e(...t),0),re=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},ie=e=>e,ae=e=>Math.round(1e3*e)/1e3,se=e=>e.charAt(0).toUpperCase()+e.slice(1),ce=e=>""!=`${e}`&&void 0!==e;const le=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${se(t)}`)};let de=!0,ue=b;const fe=(me=function(n={}){const l={},d={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some(([e])=>e in i)||!!h.expand;function w(){if(0!==p.length){c[v()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)c.assert(e in c,`Unknown console method: ${e}`),e in c&&c[e](...t);c.groupEnd(),b()}else b()}function z(){""===g&&(g=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)}`}())}function $(e,...t){0===p.length&&(z(),queueMicrotask(()=>queueMicrotask(w))),p.push([e,...t])}function S(e=r,...t){l[e]?$("log",`${e}: ${performance.now()-l[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,u),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[e]},endAutoGroup:w,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e),w()}return n},event:function(e){z(),h.event=e},purge:y,time:function(e=r){z(),l[e]=performance.now()},timeEnd:function(e=r){S(e),delete l[e]},timeLog:S,touch:z}},me?.__esModule?me.default:me);var me;const pe=fe({label:`${b}(child)`,expand:!1});const he=e=>(...t)=>!de||pe[e](...t),ge=he("log"),ye=ge,be=he("debug");const{assert:ve,endAutoGroup:we,error:ze,errorBoundary:$e,event:Se,label:Oe,purge:Me,warn:Ee}=pe,ke=e=>{return pe.warn((t=ie,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},xe=ke,Te=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))((e,t)=>ke(t)),Ie=Te("Method"),je=Te("Method","replaced with"),Ae=Te("Option"),Ce=["min-height","min-width","max-height","max-width"],Pe=new Set,Ne=e=>e.tagName?e.tagName.toLowerCase():"unknown",Re=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),qe=(e,t)=>{return(n=Re(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function Le({href:e}){Pe.has(e)||(ge("Unable to access stylesheet:",e),Pe.add(e))}const Be=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){Le(n)}return{source:"cross-origin stylesheet",value:Re(e,t)}}(e,t),De=(e,t)=>{const{source:n,value:o}=Be(e,t),r=Ne(e);ke(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function Fe(){for(const e of[document.documentElement,document.body])for(const t of Ce)ge(`Checking <${Ne(e)}> for blocking CSS: ${t}`),qe(e,t)&&De(e,t)}const We=e=>t=>void 0===t?void 0:e(t),Ve=We(e=>"true"===e),He=We(Number),Ue=(e="")=>t=>n=>{n.size>0&&be(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))},Ze=Ue("attached to"),Je=((e="")=>t=>n=>{n.size>0&&ze(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),_e=Ue("detached from"),Qe=(t,n=!0)=>o=>{o>0&&ye(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e)},Ge=(e,t,n,o)=>{const r=_e(e);return e=>{const i=new Set;let a=0;for(const o of e)n.has(o)&&(t.unobserve(o),n.delete(o),i.add(o),a+=1);r(i),o(a),i.clear()}},Ye="Mutation",Xe=new Set,Ke=new Set,et=new Set,tt=[],nt={attributes:!0,attributeFilter:[T,k],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let ot,rt=1,it=!1,at=0;const st=Ue("added")(Ye),ct=Ue("removed (page)")(Ye),lt=Ue("removed (added)")(Ye),dt=e=>e.nodeType!==Node.ELEMENT_NODE||J.has(e.tagName.toLowerCase());function ut(e){const t=e.addedNodes;for(const e of t)dt(e)||Xe.add(e)}function ft(e){const t=e.removedNodes;for(const e of t)dt(e)||(Xe.has(e)?(Xe.delete(e),et.add(e)):Ke.add(e))}const mt=e=>{ye("Mutations:",e);for(const t of e)ut(t),ft(t);st(Xe),ct(Ke),lt(et),et.clear()};const pt=e=>()=>{const t=performance.now(),n=t-at,o=16*rt+++2;if(n>o&&n<200)return Se("mutationThrottled"),ye("Update delayed due to heavy workload on the callStack"),ye(`EventLoop busy time: %c${ae(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(ot,16*rt),void(at=t);rt=1,tt.forEach(mt),tt.length=0,it=!1,Ke.size>0&&ge(`Detected %c${Ke.size} %cremoved element${Ke.size>1?"s":""}`,h,g),Xe.size>0&&ge(`Found %c${Xe.size} %cnew element${Xe.size>1?"s":""}`,h,g),e({addedNodes:Xe,removedNodes:Ke}),Xe.clear(),Ke.clear()};function ht(e){tt.push(e),it||(at=performance.now(),it=!0,requestAnimationFrame(ot))}function gt(e){const t=new window.MutationObserver(ht),n=document.body||document.documentElement;return ot=pt(e),t.observe(n,nt),ye("Attached MutationObserver to body"),{...t,disconnect:()=>{Xe.clear(),Ke.clear(),tt.length=0,t.disconnect(),ye("Detached MutationObserver")}}}const yt="Overflow",bt=Qe(yt),vt=Qe(yt,!1),wt=Ze(yt),zt=Je(yt),$t=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,St=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||ie,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(x,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t;if(!o)continue;const i=e[n],c=a(i,o)&&!$t(r);s(r,c)}r(i)},o),l=new WeakSet;return{attachObservers:function(e){const t=new Set,n=new Set;let o=0;for(const r of e)r.nodeType===Node.ELEMENT_NODE&&(l.has(r)?t.add(r):(c.observe(r),l.add(r),n.add(r),o+=1));zt(t),wt(n),bt(o),n.clear(),t.clear()},detachObservers:Ge(yt,c,l,vt),disconnect:()=>{c.disconnect(),ye("Detached OverflowObserver")}}},Ot="--ifr-start",Mt="--ifr-end",Et="--ifr-measure",kt=[];let xt,Tt={},It=0;function jt(){try{performance.clearMarks(Ot),performance.clearMarks(Mt),performance.clearMeasures(Et)}catch{}}function At(e){e.getEntries().forEach(e=>{if(e.name===Mt)try{const{duration:t}=performance.measure(Et,Ot,Mt);Tt=e.detail,kt.push(t),kt.length>100&&kt.shift()}catch{}})}function Ct(){ye("Attached PerformanceObserver to page");const e=new PerformanceObserver(At);return e.observe({entryTypes:["mark"]}),xt=setInterval(()=>{if(kt.length<10)return;if(Tt.hasTags&&Tt.len<25)return;kt.sort();const e=Math.min(kt.reduce((e,t)=>e+t,0)/kt.length,kt[Math.floor(kt.length/2)]),t=ae(e);t>It&&(It=t,Se("performanceObserver"),ge("Mean time:",ae(kt[Math.floor(kt.length/2)])),ge("Median time:",ae(kt.reduce((e,t)=>e+t,0)/kt.length)),ge("Average time:",t),ge("Max time:",ae(Math.max(...kt)))),jt(),e<=4||(clearInterval(xt),ke(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${ae(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Tt.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{jt(),clearInterval(xt),e.disconnect(),ye("Detached PerformanceObserver")}}}const Pt="Resize",Nt=Qe(Pt),Rt=Qe(Pt,!1),qt=Ze(Pt),Lt=Je(Pt),Bt=new WeakSet,Dt=new Set,Ft=new Set;let Wt;function Vt(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(Bt.has(n)?Dt.add(n):(Wt.observe(n),Bt.add(n),Ft.add(n),t+=1))}Lt(Dt),qt(Ft),Nt(t),Ft.clear(),Dt.clear()}function Ht(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),ye("Attached VisibilityObserver to page"),{disconnect:()=>{t.disconnect(),ye("Detached VisibilityObserver")}}}const Ut=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Zt=Ut("function"),Jt=Ut("number"),_t=Ut("string");"undefined"!=typeof window&&function(){const o={height:()=>(Ee("Custom height calculation function not defined"),xn.auto()),width:()=>(Ee("Custom width calculation function not defined"),Tn.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s=[],c="scroll";let l,d,u,f,m,p,Q,X,ee,fe=!0,me="",he=0,Me="",Te="",Ce=!1,Pe=!0,Ne=!1,Re=!0,qe=!1,Le=!1,Be=!0,De=!1,We=1,Ue=a,Ze="",Je=!0,_e={},Qe=!1,Ye=!1,Xe=!1,Ke=0,et=!1,tt=0,nt=0,ot=new Set,rt="",it="child",at=!1,st="",ct=[],lt=window.parent,dt="*",ut=0,ft=!1,mt=1,pt=c,ht=window,yt=()=>{Ee("onMessage function not defined")},bt=()=>{},vt=null,wt=null;function zt(e){var t;!function(e){rt=e[0]??rt,he=He(e[1])??he,Ne=Ve(e[2])??Ne,Xe=Ve(e[3])??Xe,fe=Ve(e[6])??fe,Me=e[7]??Me,Ue=e[8]??Ue,me=e[9]??me,Te=e[10]??Te,ut=He(e[11])??ut,_e.enable=Ve(e[12])??!1,it=e[13]??it,pt=e[14]??pt,et=Ve(e[15])??et,tt=He(e[16])??tt,nt=He(e[17])??nt,Pe=Ve(e[18])??Pe,l=e[19]??l,X=e[20]??X,Ke=He(e[21])??Ke,Ye=Ve(e[23])??Ye}(e),ue=(t={id:rt,enabled:Xe,expand:Ye}).id||b,pe.label(`${ue}`),pe.expand(t.expand),de=t.enabled,ge(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){ge("Reading data from page:",Object.keys(e)),ee=Zt(e,"onBeforeResize")??ee,yt=Zt(e,"onMessage")??yt,bt=Zt(e,"onReady")??bt,"number"==typeof e?.offset&&(Ae("offset","offsetSize"),Pe&&(tt=Jt(e,"offset")??tt),Ne&&(nt=Jt(e,"offset")??nt)),"number"==typeof e?.offsetSize&&(Pe&&(tt=Jt(e,"offsetSize")??tt),Ne&&(nt=Jt(e,"offsetSize")??nt)),d=_t(e,G(Y[0]))??d,Ze=_t(e,"ignoreSelector")??Ze,st=_t(e,"sizeSelector")??st,dt=_t(e,"targetOrigin")??dt,Ue=e?.heightCalculationMethod||Ue,pt=e?.widthCalculationMethod||pt}function t(e,t){return"function"==typeof e&&(ke(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Ke)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Ue=t(Ue,I),pt=t(pt,j),ye(`Set targetOrigin for parent: %c${dt}`,h))}(),[jt,Nt,tn,Tt,At,Kt,en,Yt,It,kt,Ce?ie:Fe,Dt,sn,an,rn,Ft,()=>qt("background",me),()=>qt("padding",Te),()=>qt("min-height","1px"),()=>qt("min-width","1px"),Ce?ie:Ut,on,nn,vn,$t].forEach(e=>{try{e()}catch(e){if(Ke<0)throw e;ke("<rb>Error in setup function</>\n<i>iframe-resizer</> detected an error during setup.\n\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>"),ze(e)}}),Et(re(bt)),ge("Initialization complete"),Rn(w,"Init message from host page",void 0,void 0,`${y}:${Ke}`),document.title&&""!==document.title&&Bn(0,0,M,document.title)}function $t(){_(window,v.toLowerCase(),()=>{s.forEach(e=>e()),Bn(0,0,v)})}function Et(e){"complete"===document.readyState?oe(e):_(document,A,()=>Et(e))}function kt(){ct=document.querySelectorAll(`[${k}]`),De=ct.length>0,ge(`Tagged elements found: %c${De}`,h)}let xt=0;function Tt(){const n=document.querySelectorAll(`*[${T}]`);return qe=n.length>0,qe&&n.length!==xt&&(function(n){const o=1===n.length?"":"s";Ee(`%c[${T}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),xt=n.length),qe}function It(){"BackCompat"===document.compatMode&&ke("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n")}function jt(){X&&""!==X&&"false"!==X?X!==y&&ke(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${X} - Child page: ${y}.\n`):ke("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n")}function At(){try{at=1===Ke||"iframeParentListener"in window.parent}catch(e){ge("Cross domain iframe detected")}}function Nt(){Ne===Pe&&(Ce=!0)}function qt(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),ye(`Set body ${e}: %c${t}`,h))}function Lt(e,t,n){if(""!==n){ge(`${e}: %c${n}`,h);for(const e of document.querySelectorAll(n))ge(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Dt(){Lt("sizeSelector",k,st),Lt("ignoreSelector",T,Ze)}function Ft(){var e,t;void 0===Me&&(Me=`${he}px`),qt("margin",(e="margin",(t=Me).includes("-")&&(Ee(`Negative CSS value ignored for ${e}`),t=""),t))}function Ut(){const e=e=>e.style.setProperty(I,"auto","important");e(document.documentElement),e(document.body),ge("Set HTML & body height: %cauto !important",h)}function Qt(e){({add(t){function n(){Rn(e.eventName,e.eventType)}i[t]=n,_(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),ge(`${se(e.method)} event listener: %c${e.eventType}`,h)}function Gt(e){Qt({method:e,eventType:"After Print",eventName:"afterprint"}),Qt({method:e,eventType:"Before Print",eventName:"beforeprint"}),Qt({method:e,eventType:"Ready State Change",eventName:A})}function Yt(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(k,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&ke("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}function Xt(e,t,n){const{label:o}=n;return t!==e&&(e in n||(Ee(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&ke(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${X?"remove this option.":`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n \nwindow.iframeResizer = {\n license: 'xxxx',\n ${o}CalculationMethod: 'auto',\n}\n`}\n`),ge(`Set ${o} calculation method: %c${e}`,h),e}function Kt(){Ue=Xt(Ue,a,xn)}function en(){pt=Xt(pt,c,Tn)}function tn(){const t=Ke,n=ne({key:l}),o=ne({key:d});if(Ke=Math.max(n,o),Ke<0){if(Ke=Math.min(n,o),ke(`${te(Ke+2)}${te(2)}`),ce(X))throw te(Ke+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!ce(X)||t>-1&&Ke>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${ue} %ciframe-resizer ${t}`,de||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>G(K[e]))(Ke)})`,Ke),Ke<2&&xe(te(3)),sessionStorage.setItem("ifr",y))}function nn(){!0!==fe&&ge("Auto Resize disabled"),Gt("add"),s.push(()=>Gt("remove"))}function on(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function rn(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,E)+parseInt(n.x,E),y:parseInt(t.top,E)+parseInt(n.y,E)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?(ge(`In page link (#${n}) not found in iframe, so sending to parent`),Bn(0,0,"inPageLink",`#${n}`)):function(t){const o=e(t);ge(`Moving to in page link (%c#${n}%c) at x: %c${o.x}%c y: %c${o.y}`,h,g,h,g,h),Bn(o.y,o.x,O)}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}_e.enable?1===Ke?ke("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):(ge("Setting up location.hash handlers"),function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&_(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),_(window,"hashchange",n),setTimeout(n,128)):ge("In page linking not enabled"),_e={findTarget:t}}function an(){function e(e){Bn(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){ge(`Add event listener: %c${n}`,h),_(window.document,t,e)}!0===et&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}function sn(){1!==Ke&&(ht.parentIframe=Object.freeze({autoResize:e=>(le(e,"boolean","parentIframe.autoResize(enable) enable"),!1===Ne&&!1===Pe?(Se(N),ke("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===fe?(fe=!0,queueMicrotask(()=>Rn(N,"Auto Resize enabled"))):!1===e&&!0===fe&&(fe=!1),Bn(0,0,"autoResize",JSON.stringify(fe)),fe)),close(){Bn(0,0,"close")},getId:()=>rt,getOrigin:()=>(Se("getOrigin"),Ie("getOrigin()","getParentOrigin()"),u),getParentOrigin:()=>u,getPageInfo(e){if("function"==typeof e)return vt=e,Bn(0,0,$),void je("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");vt=null,Bn(0,0,"pageInfoStop")},getParentProps:e=>(le(e,"function","parentIframe.getParentProps(callback) callback"),wt=e,Bn(0,0,S),()=>{wt=null,Bn(0,0,"parentInfoStop")}),getParentProperties(e){Ie("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){le(e,"string","parentIframe.moveToAnchor(anchor) anchor"),_e.findTarget(e)},reset(){!function(){const e=Ue;Ue=a,ge(`Reset trigger event: %c${"parentIframe.reset"}`,h),ft?ge("TriggerLock blocked calculation"):(ft=!0,be("Trigger event lock on"),requestAnimationFrame(()=>{ft=!1,be("Trigger event lock off")})),qn("reset"),Ue=e}()},setOffsetSize(e){le(e,"number","parentIframe.setOffsetSize(offset) offset"),tt=e,nt=e,Rn(D,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){le(e,"number","parentIframe.scrollBy(x, y) x"),le(t,"number","parentIframe.scrollBy(x, y) y"),Bn(t,e,"scrollBy")},scrollTo(e,t){le(e,"number","parentIframe.scrollTo(x, y) x"),le(t,"number","parentIframe.scrollTo(x, y) y"),Bn(t,e,"scrollTo")},scrollToOffset(e,t){le(e,"number","parentIframe.scrollToOffset(x, y) x"),le(t,"number","parentIframe.scrollToOffset(x, y) y"),Bn(t,e,O)},sendMessage(e,t){t&&le(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Bn(0,0,z,JSON.stringify(e),t)},setHeightCalculationMethod(e){Ue=e,Kt()},setWidthCalculationMethod(e){pt=e,en()},setTargetOrigin(e){le(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),ge(`Set targetOrigin: %c${e}`,h),dt=e},resize(e,t){void 0!==e&&le(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&le(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Rn(q,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){Ie("size()","resize()"),this.resize(e,t)}}),ht.parentIFrame=ht.parentIframe)}let cn=new Set;function ln(){const e=document.querySelectorAll(`[${x}]`);ot=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${T}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{Se("overflowIgnored"),ye("Ignoring elements with [data-iframe-ignore] > *:\n",n),we()}),t}(e),Le=ot.size>0,"function"==typeof Set.prototype.symmetricDifference&&(Be=ot.symmetricDifference(cn).size>0),cn=ot}function dn(){switch(ln(),!0){case!Be:return;case ot.size>1:ye("Overflowed Elements:",ot);break;case Le:break;default:ye("No overflow detected")}Rn(W,"Overflow updated")}function un(e){const t={root:document.documentElement,side:Pe?C:P};return f=St(dn,t),f.attachObservers(e),f}function fn(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Rn(F,`Element resized <${function(e){switch(!0){case!ce(e):return"";case ce(e.id):return`${e.nodeName}#${e.id}`;case ce(e.name):return`${e.nodeName} (${e.name}`;case ce(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function mn(e){return Wt=new ResizeObserver(fn),Wt.observe(document.body),Bt.add(document.body),ye("Attached ResizeObserver to body"),m={attachObserverToNonStaticElements:Vt,detachObservers:Ge(Pt,Wt,Bt,Rt),disconnect:()=>{Wt.disconnect(),ye("Detached ResizeObserver")}},m.attachObserverToNonStaticElements(e),m}function pn(e){ge(`Visible: %c${e}`,h),Qe=!e,Rn(H,"Visibility changed")}const hn=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of Sn(n))t.add(e)}return ye("Inspecting:\n",t),t},gn=e=>{if(0===e.size)return;Se("addObservers");const t=hn(e);f.attachObservers(t),m.attachObserverToNonStaticElements(t),we()},yn=e=>{if(0===e.size)return;Se("removeObservers");const t=hn(e);f.detachObservers(t),m.detachObservers(t),we()};function bn(e){!function({addedNodes:e,removedNodes:t}){Se("contentMutated"),Dt(),kt(),ln(),we(),yn(t),gn(e)}(e),Rn(V,"Mutation Observed")}function vn(){const e=Sn(document.documentElement);var t;ge("Attaching Observers"),t=[gt(bn),un(e),Ct(),mn(e),Ht(pn)],s.push(...t.map(e=>e.disconnect))}function wn(e){performance.mark(Ot);const t=se(e);let n=1,o=document.documentElement,r=De?0:document.documentElement.getBoundingClientRect().bottom;const i=De?ct:Le?Array.from(ot):Sn(document.documentElement);for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return ye(`${t} position calculated from:`,o),ye(`Checked %c${i.length}%c elements`,h,g),performance.mark(Mt,{detail:{hasTags:De,len:i.length,logging:Xe,Side:t}}),r}const zn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],$n=`* ${Array.from(J).map(e=>`:not(${e})`).join("")}`,Sn=e=>e.querySelectorAll($n),On={height:0,width:0},Mn={height:0,width:0},En=[h,g,h];function kn(e){function t(){return Mn[o]=r,On[o]=s,Math.max(r,1)}const n=e===xn,o=e.label,r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${r}px %cPage: %c${s}px`;let l=0;switch(!0){case!e.enabled():return Math.max(s,1);case De:ye("Found element with data-iframe-size attribute"),l=e.taggedElement();break;case!Le&&Re&&0===Mn[o]&&0===On[o]:ye(`Initial page size values: ${c}`,...En),l=t();break;case ft&&r===Mn[o]&&s===On[o]:ye(`Size unchanged: ${c}`,...En),l=Math.max(r,s);break;case 0===r&&0!==s:ye(`Page is hidden: ${c}`,...En),l=s;break;case!Le&&r!==Mn[o]&&s<=On[o]:ye(`New <html> size: ${c} `,...En),ye(`Previous <html> size: %c${Mn[o]}px`,h),l=t();break;case!n:l=e.taggedElement();break;case!Le&&r<Mn[o]:ye(`<html> size decreased: ${c}`,...En),l=t();break;case s===a||s===i:ye(`<html> size equals page size: ${c}`,...En),l=t();break;case r>s:ye(`Page size < <html> size: ${c}`,...En),l=t();break;case Le:ye("Found elements possibly overflowing <html> "),l=e.taggedElement();break;default:ye(`Using <html> size: ${c}`,...En),l=t()}return ye(`Content ${o}: %c${l}px`,h),l+=function(e){const t=e.getOffset();return 0!==t&&ye(`Page offsetSize: %c${t}px`,h),t}(e),l}const xn={label:I,enabled:()=>Pe,getOffset:()=>tt,auto:()=>kn(xn),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,E)+parseInt(t.marginBottom,E)},bodyScroll:()=>document.body.scrollHeight,offset:()=>xn.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...zn(xn)),min:()=>Math.min(...zn(xn)),grow:()=>xn.max(),lowestElement:()=>wn(C),taggedElement:()=>wn(C)},Tn={label:j,enabled:()=>Ne,getOffset:()=>nt,auto:()=>kn(Tn),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...zn(Tn)),min:()=>Math.min(...zn(Tn)),rightMostElement:()=>wn(P),scroll:()=>Math.max(Tn.bodyScroll(),Tn.documentElementScroll()),taggedElement:()=>wn(P)},In=(e,t)=>!(Math.abs(e-t)<=ut);function jn(e,t){const n=e[t](),o=e.enabled()&&void 0!==ee?function(e){const t=ee(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}(n):n;return ve(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let An=!1;const Cn=re(()=>xe(te(4)));let Pn,Nn=!1;const Rn=$e((e,t,n,o,r)=>{switch(Se(e),!0){case!0===Qe:if(!0===Nn)break;ge("Iframe hidden - Ignored resize request"),Nn=!0,An=!1,cancelAnimationFrame(Pn);break;case!0===An&&e!==W:ge("Resize already pending - Ignored resize request");break;case!fe&&!(e in B):ye("Resizing disabled");break;default:Nn=!1,An=!0,Q=performance.now(),p=!0,Pn=requestAnimationFrame(()=>{An=!1,Se("requestAnimationFrame"),be(`Reset sendPending: %c${e}`,h)}),function(e,t,n,o,r){const i=n??jn(xn,Ue),a=o??jn(Tn,pt),s=Pe&&In(We,i)||Ne&&In(mt,a)?R:e;switch(ge(`Resize event: %c${t}`,h),s){case w:case N:case R:We=i,mt=a;case D:Ln(We,mt,e,r);break;case W:case V:case F:case H:ge(U);break;default:ye(U)}p=!1}(e,t,n,o,r)}we()});function qn(e){We=xn[Ue](),mt=Tn[pt](),Bn(We,mt,e)}function Ln(e,t,o,r,i){Ke<-1||(void 0!==i?ge(`Message targetOrigin: %c${i}`,h):i=dt,function(){const a=`${rt}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(at)try{window.parent.iframeParentListener(Z+a)}catch(e){if(1!==Ke)throw e;return void Cn()}else lt.postMessage(Z+a,i);p&&ge(function(){const e=ae(performance.now()-Q);return o===w?`Initialised iframe in %c${e}ms`:`Size calculated in %c${e}ms`}(),h),ye(`Sending message to parent page via ${at?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}())}const Bn=$e((e,t,n,o,r)=>{Se(n),Ln(e,t,n,o,r),we()}),Dn=$e(function(e){Se("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Bn(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void ge("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");lt=e.source,u=e.origin,zt(t),Re=!1,setTimeout(()=>{Je=!1},128)},reset(){Je?ge("Page reset ignored by init"):(ge("Page size reset by host page"),qn("resetPage"))},resize(){ge("Resize requested by host page"),Rn(L,"Parent window requested size check")},moveToAnchor(){_e.findTarget(s())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=s();ge("PageInfo received from parent:",o(e)),vt?oe(vt,n(e)):r($)},parentInfo(){const e=o(s());ge("ParentInfo received from parent:",e),wt?oe(wt,e):r(S)},message(){const e=s();ge("onMessage called from parent:%c",h,o(e)),oe(yt,n(e))}},a=()=>e.data.split("]")[1].split(":")[0],s=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function l(){const t=a();Se(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||Ee(`Unexpected message (${e.data})`)}Z===`${e.data}`.slice(0,13)&&function(){if(!1!==Re)return c()?(Oe(a()),Se(w),void i.init()):void ge(`Ignored message of type "${a()}". Received before initialization.`);l()}()});let Fn=!1;const Wn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Vn(){if("loading"===document.readyState||!Re||Fn)return;const{parent:e,top:t}=window;Se("ready"),ge("Sending%c ready%c to parent from",h,g,window.location.href),Wn(e),e!==t&&Wn(t),Fn=!0}"iframeChildListener"in window?Ee("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Dn({data:e,sameOrigin:!0})),_(window,z,Dn),_(document,A,Vn),setTimeout(Vn))}()}();
21
21
  //# sourceMappingURL=iframeResizer.contentWindow.js.map