New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@iframe-resizer/child

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iframe-resizer/child - npm Package Compare versions

Comparing version 5.3.2 to 5.3.3-beta.1

index.cjs.js.map

5

index.cjs.js
/*!
* @preserve
*
* @module iframe-resizer/child 5.3.2 (cjs) - 2024-10-22
* @module iframe-resizer/child 5.3.3-beta.1 (cjs) - 2024-10-23
*

@@ -20,2 +20,3 @@ * @license GPL-3.0 for non-commercial use only.

"use strict";const e="5.3.2",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let O=null,P={};const A=setInterval((()=>{if(C.length<10)return;if(P.hasTags&&P.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(A),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${P.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;P=e,T.has(O)||i&&o<=1||(r||M(O),b(`\n ${n} position calculated from:`,O,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),Le.auto()),width:()=>(v("Custom width calculation function not defined"),Be.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let P,A,N,I,k,R=!0,x="",q=0,L="",B="",D=!0,W=!1,U=!0,F=!1,V=!1,J=1,H=b,Z=!0,_="",Q={},X=!1,Y=0,G=!1,K="",ee=d,te=[],ne="child",oe=null,ie=!1,re="",ae=[],le=window.parent,se="*",ce=0,de=!1,ue="",me=1,fe=M,pe=window,he=()=>{v("onMessage function not defined")},ye=()=>{},ge=null,be=null;function ve(){var o,d,u;!function(){const e=e=>"true"===e,t=_.slice(C).split(":");K=t[0],q=void 0===t[1]?q:Number(t[1]),W=void 0===t[2]?W:e(t[2]),X=void 0===t[3]?X:e(t[3]),R=void 0===t[6]?R:e(t[6]),L=t[7],H=void 0===t[8]?H:t[8],x=t[9],B=t[10],ce=void 0===t[11]?ce:Number(t[11]),Q.enable=void 0!==t[12]&&e(t[12]),ne=void 0===t[13]?ne:t[13],fe=void 0===t[14]?fe:t[14],G=void 0===t[15]?G:e(t[15]),P=void 0===t[16]?P:Number(t[16]),A=void 0===t[17]?A:Number(t[17]),D=void 0===t[18]?D:e(t[18]),t[19],ue=t[20]||ue,Y=void 0===t[21]?Y:Number(t[21])}(),h({id:K,logging:X}),function(){function e(e){he=e?.onMessage||he,ye=e?.onReady||ye,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),D&&(P=e?.offset),W&&(A=e?.offset)),"number"==typeof e?.offsetSize&&(D&&(P=e?.offsetSize),W&&(A=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(re=e.sizeSelector),se=e?.targetOrigin||se,H=e?.heightCalculationMethod||H,fe=e?.widthCalculationMethod||fe}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===Y)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),H=t(H,"height"),fe=t(fe,"width"))}(),function(){try{ie="iframeParentListener"in window.parent}catch(e){}}(),Y<0?z(`${c(Y+2)}${c(2)}`):ue.codePointAt(0)>4||Y<2&&z(c(3)),ue&&""!==ue&&"false"!==ue?ue!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ue} - Child page: ${e}.\n`):w("<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"),Te(),Me(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<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</>.")}(),ze(),D!==W&&(ee=S({onChange:we,root:document.documentElement,side:D?i:r})),1!==Y&&(pe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===R?(R=!0,Ue("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===R&&(R=!1),He(0,0,"autoResize",JSON.stringify(R)),R),close(){He(0,0,"close")},getId:()=>K,getOrigin:()=>N,getPageInfo(e){if("function"==typeof e)return ge=e,He(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ge=null,He(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return be=e,He(0,0,"parentInfo"),()=>{be=null,He(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Q.findTarget(e)},reset(){Je()},scrollBy(e,t){He(t,e,"scrollBy")},scrollTo(e,t){He(t,e,"scrollTo")},scrollToOffset(e,t){He(t,e,"scrollToOffset")},sendMessage(e,t){He(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Te()},setWidthCalculationMethod(e){fe=e,Me()},setTargetOrigin(e){se=e},resize(e,t){Ue(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),pe.parentIFrame=pe.parentIframe),function(){function e(e){He(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===G&&(t("mouseenter"),t("mouseleave"))}(),Q=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);He(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?He(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return Q.enable&&(1===Y?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),Se(ke(document)()),void 0===L&&(L=`${q}px`),Ee("margin",(d="margin",(u=L).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Ee("background",x),Ee("padding",B),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),je(),Ue("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&He(0,0,"title",document.title),$e({method:o="add",eventType:"After Print",eventName:"afterprint"}),$e({method:o,eventType:"Before Print",eventName:"beforeprint"}),$e({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(je(),ze(),Se(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),oe=new ResizeObserver(Oe),oe.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(ye)}function we(e){te=e,F=te.length>0,Ue("overflowChanged","Overflow updated")}function ze(){ae=document.querySelectorAll(`[${n}]`),V=ae.length>0}function Se(e){V||ee(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function je(){if(""!==re)for(const e of document.querySelectorAll(re))e.dataset.iframeSize=!0}function $e(e){({add(t){function n(){Ue(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ce(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<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 remove this option.`)),e}function Te(){H=Ce(H,b,Le,"height")}function Me(){fe=Ce(fe,M,Be,"width")}function Oe(e){Array.isArray(e)&&0!==e.length&&Ue("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}const t=ke(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}}function Ne(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=V?ae:F?te:ke(document)();let s=l.length;for(const t of l)V||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return O=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:V,logging:X}}),a}const Ie=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],ke=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Re={height:0,width:0},xe={height:0,width:0};function qe(e){function t(){return xe[o]=i,Re[o]=l,i}const n=e===Le,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case V:return e.taggedElement();case!F&&0===xe[o]&&0===Re[o]:return t();case de&&i===xe[o]&&l===Re[o]:return Math.max(i,l);case 0===i:return l;case!F&&i!==xe[o]&&l<=Re[o]:return t();case!n:return e.taggedElement();case!F&&i<xe[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const Le={enabled:()=>D,getOffset:()=>P,auto:()=>qe(Le),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Le.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ie(Le)),min:()=>Math.min(...Ie(Le)),grow:()=>Le.max(),lowestElement:()=>Ne(i),taggedElement:()=>Ne(i)},Be={enabled:()=>W,getOffset:()=>A,auto:()=>qe(Be),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ie(Be)),min:()=>Math.min(...Ie(Be)),rightMostElement:()=>Ne(r),scroll:()=>Math.max(Be.bodyScroll(),Be.documentElementScroll()),taggedElement:()=>Ne(r)},De=(e,t)=>!(Math.abs(e-t)<=ce);let We=!1;function Ue(e,t,n,o,i){k=performance.now(),(R||e===a)&&(document.hidden||(We||(I=!0,function(e,t,n,o,i){const r=void 0===n?Le[H]():n,l=void 0===o?Be[fe]():o;D&&De(J,r)||W&&De(me,l)||"init"===e?(Fe(),J=r,me=l,He(J,me,e,i)):!e!==a&&(D&&H in T||W&&fe in T)?Je():I=!1}(e,0,n,o,i),requestAnimationFrame((()=>{We=!1}))),We=!0))}function Fe(){de||(de=!0,requestAnimationFrame((()=>{de=!1})))}function Ve(e){J=Le[H](),me=Be[fe](),He(J,me,e)}function Je(e){const t=H;H=b,Fe(),Ve("reset"),H=t}function He(e,t,n,o,i){Y<-1||(void 0!==i||(i=se),function(){const r=`${K}:${e+(P||0)}:${t+(A||0)}:${n}${void 0===o?"":`:${o}`}`;X&&(console.group(`[iframe-resizer][${K}]`),console.info("Sending message to host page via "+(ie?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),I&&console.info(function(){const e=m(performance.now()-k);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),I=!1,ie?window.parent.iframeParentListener($+r):le.postMessage($+r,i)}())}function Ze(e){const t={init:function(){_=e.data,le=e.source,N=e.origin,ve(),U=!1,setTimeout((()=>{Z=!1}),f)},reset(){Z||Ve("resetPage")},resize(){Ue(a)},moveToAnchor(){Q.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ge?setTimeout((()=>ge(JSON.parse(e)))):He(0,0,"pageInfoStop")},parentInfo(){const e=o();be?setTimeout(be(Object.freeze(JSON.parse(e)))):He(0,0,"parentInfoStop")},message(){const e=o();he(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==U?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function _e(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Ze({data:e,sameDomain:!0}))),l(window,"message",Ze),l(window,"readystatechange",_e),_e())}();
"use strict";const e="5.3.3-beta.1",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const d=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),c=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const g=e=>{f=e.id,p=e.logging},h=e=>e.charAt(0).toUpperCase()+e.slice(1),y=e=>""!=`${e}`&&void 0!==e;function b(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}const v=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),z=(...e)=>p&&console?.log(v(...e)),w=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),$=(...e)=>console?.warn(v(...e)),S=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(v)(...e)),M=e=>S(e),E=e=>{const t=e.side||i,n=e.onChange||c,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},T="--ifr-start",O="--ifr-end",j="--ifr-measure",P=[],C=new WeakSet,A=e=>"object"==typeof e&&C.add(e);let I=null,N={};const k=setInterval((()=>{if(P.length<10)return;if(N.hasTags&&N.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);z("Max time:",Math.max(...P)),e<=4||(clearInterval(k),S(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${N.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function R(e){e.getEntries().forEach((e=>{if(e.name===O){const{duration:t}=performance.measure(j,T,O);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;N=e,C.has(I)||i&&o<=1||(r||A(I),w(`\n ${n} position calculated from:`,I,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function x(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),A(document.documentElement),A(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",x):x()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>($("Custom height calculation function not defined"),De.auto()),width:()=>($("Custom width calculation function not defined"),We.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},y="checkVisibility"in window,v="auto",w="[iFrameSizer]",j=w.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},C="scroll";let A,N,k,R,x,L=!0,q="",B=0,D="",W="",U=!0,F=!1,H=!0,V=!1,J=!1,Z=1,_=v,Q=!0,X="",Y={},G=!1,K=0,ee=!1,te="",ne=c,oe=[],ie="child",re=null,ae=!1,le="",se=[],de=window.parent,ce="*",ue=0,me=!1,fe="",pe=1,ge=C,he=window,ye=()=>{$("onMessage function not defined")},be=()=>{},ve=null,ze=null;function we(){var o,c,u;!function(){const e=e=>"true"===e,t=X.slice(j).split(":");te=t[0],B=void 0===t[1]?B:Number(t[1]),F=void 0===t[2]?F:e(t[2]),G=void 0===t[3]?G:e(t[3]),L=void 0===t[6]?L:e(t[6]),D=t[7],_=void 0===t[8]?_:t[8],q=t[9],W=t[10],ue=void 0===t[11]?ue:Number(t[11]),Y.enable=void 0!==t[12]&&e(t[12]),ie=void 0===t[13]?ie:t[13],ge=void 0===t[14]?ge:t[14],ee=void 0===t[15]?ee:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),U=void 0===t[18]?U:e(t[18]),t[19],fe=t[20]||fe,K=void 0===t[21]?K:Number(t[21])}(),g({id:te,logging:G}),z(`Initialising iframe v${e} (${window.location.href})`),function(){function e(e){z(`Reading data from page: ${JSON.stringify(e)}`),ye=e?.onMessage||ye,be=e?.onReady||be,"number"==typeof e?.offset&&(S("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),U&&(A=e?.offset),F&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(U&&(A=e?.offsetSize),F&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(le=e.sizeSelector),ce=e?.targetOrigin||ce,_=e?.heightCalculationMethod||_,ge=e?.widthCalculationMethod||ge}function t(e,t){return"function"==typeof e&&(z(`Setup custom ${t}CalcMethod`),s[t]=e,e="custom"),e}if(1===K)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),_=t(_,"height"),ge=t(ge,"width"),z(`TargetOrigin for parent set to: ${ce}`))}(),function(){try{ae="iframeParentListener"in window.parent}catch(e){z("Cross domain iframe detected.")}}(),K<0?M(`${d(K+2)}${d(2)}`):fe.codePointAt(0)>4||K<2&&M(d(3)),fe&&""!==fe&&"false"!==fe?fe!==e&&S(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${fe} - Child page: ${e}.\n`):S("<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"),Pe(),Ce(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&S("<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</>.")}(),Se(),U!==F&&(ne=E({onChange:$e,root:document.documentElement,side:U?i:r})),1!==K&&(he.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===L?(L=!0,He("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===L&&(L=!1),_e(0,0,"autoResize",JSON.stringify(L)),L),close(){_e(0,0,"close")},getId:()=>te,getOrigin:()=>(S("<rb>Deprecated Method</>\n \nThe <b>getOrigin()</> method has been deprecated and replaced with <b>getParentOrigin()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),k),getParentOrigin:()=>k,getPageInfo(e){if("function"==typeof e)return ve=e,_e(0,0,"pageInfo"),void S("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ve=null,_e(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return ze=e,_e(0,0,"parentInfo"),()=>{ze=null,_e(0,0,"parentInfoStop")}},getParentProperties(e){S("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Y.findTarget(e)},reset(){Ze("parentIframe.reset")},scrollBy(e,t){_e(t,e,"scrollBy")},scrollTo(e,t){_e(t,e,"scrollTo")},scrollToOffset(e,t){_e(t,e,"scrollToOffset")},sendMessage(e,t){_e(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){_=e,Pe()},setWidthCalculationMethod(e){ge=e,Ce()},setTargetOrigin(e){z(`Set targetOrigin: ${e}`),ce=e},resize(e,t){He(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){S("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),he.parentIFrame=he.parentIframe),function(){function e(e){_e(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){z(`Add event listener: ${n}`),l(window.document,t,e)}!0===ee&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),Y=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);z(`Moving to in page link (#${o}) at x: ${t.x}y: ${t.y}`),_e(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?(z(`In page link (#${o}) not found in iFrame, so sending to parent`),_e(0,0,"inPageLink",`#${o}`)):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function d(){z("Setting up location.hash handlers"),r(),a(),s()}return Y.enable?1===K?S("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):d():z("In page linking not enabled"),{findTarget:o}}(),Me(xe(document)()),void 0===D&&(D=`${B}px`),Ee("margin",(c="margin",(u=D).includes("-")&&($(`Negative CSS value ignored for ${c}`),u=""),u)),Ee("background",q),Ee("padding",W),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body),z('HTML & body height set to "auto !important"')}(),Te(),He("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&_e(0,0,"title",document.title),!0!==L&&z("Auto Resize disabled"),Oe({method:o="add",eventType:"After Print",eventName:"afterprint"}),Oe({method:o,eventType:"Before Print",eventName:"beforeprint"}),Oe({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function d(){z("MutationObserver: processMutations");const c=performance.now(),u=c-n,m=r*s+++a;if(u>m&&u<l)return z(`MutationObserver delay: ${u}ms > ${m}`),setTimeout(d,r*s),void(n=c);s=1,o.forEach(i),o=[],0!==e.size?(Te(),Se(),Me(e),e.forEach(Ne),e.clear(),t=!1):t=!1}function c(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(d))}function u(){const e=new window.MutationObserver(c),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return z("Create <body/> MutationObserver"),e.observe(t,n),e}u()}(),re=new ResizeObserver(Ae),re.observe(document.body),Ie.add(document.body),Ne(document.body),setTimeout(be),z("Initialization complete"),z("---")}function $e(e){z("Overflowed Elements:",e.length),oe=e,V=oe.length>0,He("overflowChanged","Overflow updated")}function Se(){se=document.querySelectorAll(`[${n}]`),J=se.length>0,z(`Tagged elements found: ${J}`)}function Me(e){J||ne(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),z(`Body ${e} set to "${t}"`))}function Te(){if(""!==le){z(`Applying sizeSelector: ${le}`);for(const e of document.querySelectorAll(le))z(`Applying data-iframe-size to: ${b(e)}`),e.dataset.iframeSize=!0}}function Oe(e){({add(t){function n(){He(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),z(`${h(e.method)} event listener: ${e.eventType}`)}function je(e,t,n,o){return t!==e&&(e in n||($(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&S(`<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 remove this option.`),z(`${o} calculation method set to "${e}"`)),e}function Pe(){_=je(_,v,De,"height")}function Ce(){ge=je(ge,C,We,"width")}function Ae(e){Array.isArray(e)&&0!==e.length&&He("resizeObserver",`Resize Observed: ${b(e[0].target)}`)}const Ie=new WeakSet;function Ne(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Ie.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(re.observe(e),Ie.add(e),z(`Attached resizeObserver: ${b(e)}`))}const t=xe(e)();for(const e of t){if(Ie.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(re.observe(e),Ie.add(e),z(`Attached resizeObserver: ${b(e)}`))}}function ke(e){performance.mark(T);const t=h(e);let n=0,i=document.documentElement,r=J?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(T);const a=J?se:V?oe:xe(document)();let l=a.length;for(const t of a)J||!y||t.checkVisibility(o)?(n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,i=t)):l-=1;return I=i,performance.mark(O,{detail:{Side:t,len:l,hasTags:J,logging:G}}),r}const Re=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],xe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},qe={height:0,width:0};function Be(e){function t(){return qe[o]=i,Le[o]=l,i}const n=e===De,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),s=`HTML: ${i} Page: ${l}`;switch(!0){case!e.enabled():return l;case J:return e.taggedElement();case!V&&0===qe[o]&&0===Le[o]:return z(`Initial page size values: ${s}`),t();case me&&i===qe[o]&&l===Le[o]:return z(`Size unchanged: ${s}`),Math.max(i,l);case 0===i:return z(`Page is hidden: ${s}`),l;case!V&&i!==qe[o]&&l<=Le[o]:return z(`New HTML bounding size: ${s}`,"Previous bounding size:",qe[o]),t();case!n:return e.taggedElement();case!V&&i<qe[o]:return z("HTML bounding size decreased:",s),t();case l===a||l===r:return z("HTML bounding size equals page size:",s),t();case i>l:return z(`Page size < HTML bounding size: ${s}`),t();default:z(`Content overflowing HTML element: ${s}`)}return Math.max(e.taggedElement(),t())}const De={enabled:()=>U,getOffset:()=>A,auto:()=>Be(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Re(De)),min:()=>Math.min(...Re(De)),grow:()=>De.max(),lowestElement:()=>ke(i),taggedElement:()=>ke(i)},We={enabled:()=>F,getOffset:()=>N,auto:()=>Be(We),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Re(We)),min:()=>Math.min(...Re(We)),rightMostElement:()=>ke(r),scroll:()=>Math.max(We.bodyScroll(),We.documentElementScroll()),taggedElement:()=>ke(r)},Ue=(e,t)=>!(Math.abs(e-t)<=ue);let Fe=!1;function He(e,t,n,o,i){x=performance.now(),L||e===a?document.hidden?z("Page hidden - Ignored resize request"):(Fe||(z(`Resize event: ${t}`),R=!0,function(e,t,n,o,i){const r=void 0===n?De[_]():n,l=void 0===o?We[ge]():o;U&&Ue(Z,r)||F&&Ue(pe,l)||"init"===e?(Ve(),Z=r,pe=l,_e(Z,pe,e,i)):!e!==a&&(U&&_ in P||F&&ge in P)?Ze(t):R=!1}(e,t,n,o,i),requestAnimationFrame((()=>{Fe=!1}))),Fe=!0):z("Resizing disabled")}function Ve(){me||(me=!0,z("Trigger event lock on"),requestAnimationFrame((()=>{me=!1,z("Trigger event lock off"),z("--")})))}function Je(e){Z=De[_](),pe=We[ge](),_e(Z,pe,e)}function Ze(e){const t=_;_=v,z(`Reset trigger event: ${e}`),Ve(),Je("reset"),_=t}function _e(e,t,n,o,i){K<-1||(void 0!==i?z(`Message targetOrigin: ${i}`):i=ce,function(){const r=`${te}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;G&&(console.group(`[iframe-resizer][${te}]`),console.info("Sending message to host page via "+(ae?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),R&&console.info(function(){const e=m(performance.now()-x);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),R=!1,ae?window.parent.iframeParentListener(w+r):de.postMessage(w+r,i)}())}function Qe(e){const t={init:function(){X=e.data,de=e.source,k=e.origin,we(),H=!1,setTimeout((()=>{Q=!1}),f)},reset(){Q?z("Page reset ignored by init"):(z("Page size reset by host page"),Je("resetPage"))},resize(){He(a,"Parent window requested size check")},moveToAnchor(){Y.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();z(`PageInfo received from parent: ${e}`),ve?setTimeout((()=>ve(JSON.parse(e)))):_e(0,0,"pageInfoStop"),z(" --")},parentInfo(){const e=o();z(`ParentInfo received from parent: ${e}`),ze?setTimeout(ze(Object.freeze(JSON.parse(e)))):_e(0,0,"parentInfoStop"),z(" --")},message(){const e=o();z(`onMessage called from parent: ${e}`),ye(JSON.parse(e)),z(" --")}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};w===`${e.data}`.slice(0,j)&&(!1!==H?r()?t.init():z(`Ignored message of type "${n()}". Received before initialization.`):function(){const o=n();o in t?t[o]():i()||r()||$(`Unexpected message (${e.data})`)}())}function Xe(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?$("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Qe({data:e,sameDomain:!0}))),l(window,"message",Qe),l(window,"readystatechange",Xe),Xe())}();
//# sourceMappingURL=index.cjs.js.map
/*!
* @preserve
*
* @module iframe-resizer/child 5.3.2 (esm) - 2024-10-22
* @module iframe-resizer/child 5.3.3-beta.1 (esm) - 2024-10-23
*

@@ -20,2 +20,3 @@ * @license GPL-3.0 for non-commercial use only.

const e="5.3.2",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let O=null,P={};const A=setInterval((()=>{if(C.length<10)return;if(P.hasTags&&P.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(A),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${P.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;P=e,T.has(O)||i&&o<=1||(r||M(O),b(`\n ${n} position calculated from:`,O,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),Le.auto()),width:()=>(v("Custom width calculation function not defined"),Be.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let P,A,N,I,k,R=!0,x="",q=0,L="",B="",D=!0,W=!1,U=!0,F=!1,V=!1,J=1,H=b,Z=!0,_="",Q={},X=!1,Y=0,G=!1,K="",ee=d,te=[],ne="child",oe=null,ie=!1,re="",ae=[],le=window.parent,se="*",ce=0,de=!1,ue="",me=1,fe=M,pe=window,he=()=>{v("onMessage function not defined")},ye=()=>{},ge=null,be=null;function ve(){var o,d,u;!function(){const e=e=>"true"===e,t=_.slice(C).split(":");K=t[0],q=void 0===t[1]?q:Number(t[1]),W=void 0===t[2]?W:e(t[2]),X=void 0===t[3]?X:e(t[3]),R=void 0===t[6]?R:e(t[6]),L=t[7],H=void 0===t[8]?H:t[8],x=t[9],B=t[10],ce=void 0===t[11]?ce:Number(t[11]),Q.enable=void 0!==t[12]&&e(t[12]),ne=void 0===t[13]?ne:t[13],fe=void 0===t[14]?fe:t[14],G=void 0===t[15]?G:e(t[15]),P=void 0===t[16]?P:Number(t[16]),A=void 0===t[17]?A:Number(t[17]),D=void 0===t[18]?D:e(t[18]),t[19],ue=t[20]||ue,Y=void 0===t[21]?Y:Number(t[21])}(),h({id:K,logging:X}),function(){function e(e){he=e?.onMessage||he,ye=e?.onReady||ye,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),D&&(P=e?.offset),W&&(A=e?.offset)),"number"==typeof e?.offsetSize&&(D&&(P=e?.offsetSize),W&&(A=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(re=e.sizeSelector),se=e?.targetOrigin||se,H=e?.heightCalculationMethod||H,fe=e?.widthCalculationMethod||fe}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===Y)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),H=t(H,"height"),fe=t(fe,"width"))}(),function(){try{ie="iframeParentListener"in window.parent}catch(e){}}(),Y<0?z(`${c(Y+2)}${c(2)}`):ue.codePointAt(0)>4||Y<2&&z(c(3)),ue&&""!==ue&&"false"!==ue?ue!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ue} - Child page: ${e}.\n`):w("<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"),Te(),Me(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<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</>.")}(),ze(),D!==W&&(ee=S({onChange:we,root:document.documentElement,side:D?i:r})),1!==Y&&(pe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===R?(R=!0,Ue("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===R&&(R=!1),He(0,0,"autoResize",JSON.stringify(R)),R),close(){He(0,0,"close")},getId:()=>K,getOrigin:()=>N,getPageInfo(e){if("function"==typeof e)return ge=e,He(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ge=null,He(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return be=e,He(0,0,"parentInfo"),()=>{be=null,He(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Q.findTarget(e)},reset(){Je()},scrollBy(e,t){He(t,e,"scrollBy")},scrollTo(e,t){He(t,e,"scrollTo")},scrollToOffset(e,t){He(t,e,"scrollToOffset")},sendMessage(e,t){He(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Te()},setWidthCalculationMethod(e){fe=e,Me()},setTargetOrigin(e){se=e},resize(e,t){Ue(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),pe.parentIFrame=pe.parentIframe),function(){function e(e){He(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===G&&(t("mouseenter"),t("mouseleave"))}(),Q=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);He(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?He(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return Q.enable&&(1===Y?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),Se(ke(document)()),void 0===L&&(L=`${q}px`),Ee("margin",(d="margin",(u=L).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Ee("background",x),Ee("padding",B),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),je(),Ue("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&He(0,0,"title",document.title),$e({method:o="add",eventType:"After Print",eventName:"afterprint"}),$e({method:o,eventType:"Before Print",eventName:"beforeprint"}),$e({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(je(),ze(),Se(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),oe=new ResizeObserver(Oe),oe.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(ye)}function we(e){te=e,F=te.length>0,Ue("overflowChanged","Overflow updated")}function ze(){ae=document.querySelectorAll(`[${n}]`),V=ae.length>0}function Se(e){V||ee(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function je(){if(""!==re)for(const e of document.querySelectorAll(re))e.dataset.iframeSize=!0}function $e(e){({add(t){function n(){Ue(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ce(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<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 remove this option.`)),e}function Te(){H=Ce(H,b,Le,"height")}function Me(){fe=Ce(fe,M,Be,"width")}function Oe(e){Array.isArray(e)&&0!==e.length&&Ue("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}const t=ke(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}}function Ne(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=V?ae:F?te:ke(document)();let s=l.length;for(const t of l)V||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return O=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:V,logging:X}}),a}const Ie=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],ke=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Re={height:0,width:0},xe={height:0,width:0};function qe(e){function t(){return xe[o]=i,Re[o]=l,i}const n=e===Le,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case V:return e.taggedElement();case!F&&0===xe[o]&&0===Re[o]:return t();case de&&i===xe[o]&&l===Re[o]:return Math.max(i,l);case 0===i:return l;case!F&&i!==xe[o]&&l<=Re[o]:return t();case!n:return e.taggedElement();case!F&&i<xe[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const Le={enabled:()=>D,getOffset:()=>P,auto:()=>qe(Le),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Le.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ie(Le)),min:()=>Math.min(...Ie(Le)),grow:()=>Le.max(),lowestElement:()=>Ne(i),taggedElement:()=>Ne(i)},Be={enabled:()=>W,getOffset:()=>A,auto:()=>qe(Be),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ie(Be)),min:()=>Math.min(...Ie(Be)),rightMostElement:()=>Ne(r),scroll:()=>Math.max(Be.bodyScroll(),Be.documentElementScroll()),taggedElement:()=>Ne(r)},De=(e,t)=>!(Math.abs(e-t)<=ce);let We=!1;function Ue(e,t,n,o,i){k=performance.now(),(R||e===a)&&(document.hidden||(We||(I=!0,function(e,t,n,o,i){const r=void 0===n?Le[H]():n,l=void 0===o?Be[fe]():o;D&&De(J,r)||W&&De(me,l)||"init"===e?(Fe(),J=r,me=l,He(J,me,e,i)):!e!==a&&(D&&H in T||W&&fe in T)?Je():I=!1}(e,0,n,o,i),requestAnimationFrame((()=>{We=!1}))),We=!0))}function Fe(){de||(de=!0,requestAnimationFrame((()=>{de=!1})))}function Ve(e){J=Le[H](),me=Be[fe](),He(J,me,e)}function Je(e){const t=H;H=b,Fe(),Ve("reset"),H=t}function He(e,t,n,o,i){Y<-1||(void 0!==i||(i=se),function(){const r=`${K}:${e+(P||0)}:${t+(A||0)}:${n}${void 0===o?"":`:${o}`}`;X&&(console.group(`[iframe-resizer][${K}]`),console.info("Sending message to host page via "+(ie?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),I&&console.info(function(){const e=m(performance.now()-k);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),I=!1,ie?window.parent.iframeParentListener($+r):le.postMessage($+r,i)}())}function Ze(e){const t={init:function(){_=e.data,le=e.source,N=e.origin,ve(),U=!1,setTimeout((()=>{Z=!1}),f)},reset(){Z||Ve("resetPage")},resize(){Ue(a)},moveToAnchor(){Q.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ge?setTimeout((()=>ge(JSON.parse(e)))):He(0,0,"pageInfoStop")},parentInfo(){const e=o();be?setTimeout(be(Object.freeze(JSON.parse(e)))):He(0,0,"parentInfoStop")},message(){const e=o();he(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==U?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function _e(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Ze({data:e,sameDomain:!0}))),l(window,"message",Ze),l(window,"readystatechange",_e),_e())}();
const e="5.3.3-beta.1",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const d=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),c=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const g=e=>{f=e.id,p=e.logging},h=e=>e.charAt(0).toUpperCase()+e.slice(1),y=e=>""!=`${e}`&&void 0!==e;function b(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}const v=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),z=(...e)=>p&&console?.log(v(...e)),w=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),$=(...e)=>console?.warn(v(...e)),S=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(v)(...e)),M=e=>S(e),E=e=>{const t=e.side||i,n=e.onChange||c,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},T="--ifr-start",O="--ifr-end",j="--ifr-measure",P=[],C=new WeakSet,A=e=>"object"==typeof e&&C.add(e);let I=null,N={};const k=setInterval((()=>{if(P.length<10)return;if(N.hasTags&&N.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);z("Max time:",Math.max(...P)),e<=4||(clearInterval(k),S(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${N.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function R(e){e.getEntries().forEach((e=>{if(e.name===O){const{duration:t}=performance.measure(j,T,O);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;N=e,C.has(I)||i&&o<=1||(r||A(I),w(`\n ${n} position calculated from:`,I,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function x(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),A(document.documentElement),A(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",x):x()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>($("Custom height calculation function not defined"),De.auto()),width:()=>($("Custom width calculation function not defined"),We.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},y="checkVisibility"in window,v="auto",w="[iFrameSizer]",j=w.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},C="scroll";let A,N,k,R,x,L=!0,q="",B=0,D="",W="",U=!0,F=!1,H=!0,V=!1,J=!1,Z=1,_=v,Q=!0,X="",Y={},G=!1,K=0,ee=!1,te="",ne=c,oe=[],ie="child",re=null,ae=!1,le="",se=[],de=window.parent,ce="*",ue=0,me=!1,fe="",pe=1,ge=C,he=window,ye=()=>{$("onMessage function not defined")},be=()=>{},ve=null,ze=null;function we(){var o,c,u;!function(){const e=e=>"true"===e,t=X.slice(j).split(":");te=t[0],B=void 0===t[1]?B:Number(t[1]),F=void 0===t[2]?F:e(t[2]),G=void 0===t[3]?G:e(t[3]),L=void 0===t[6]?L:e(t[6]),D=t[7],_=void 0===t[8]?_:t[8],q=t[9],W=t[10],ue=void 0===t[11]?ue:Number(t[11]),Y.enable=void 0!==t[12]&&e(t[12]),ie=void 0===t[13]?ie:t[13],ge=void 0===t[14]?ge:t[14],ee=void 0===t[15]?ee:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),U=void 0===t[18]?U:e(t[18]),t[19],fe=t[20]||fe,K=void 0===t[21]?K:Number(t[21])}(),g({id:te,logging:G}),z(`Initialising iframe v${e} (${window.location.href})`),function(){function e(e){z(`Reading data from page: ${JSON.stringify(e)}`),ye=e?.onMessage||ye,be=e?.onReady||be,"number"==typeof e?.offset&&(S("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),U&&(A=e?.offset),F&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(U&&(A=e?.offsetSize),F&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(le=e.sizeSelector),ce=e?.targetOrigin||ce,_=e?.heightCalculationMethod||_,ge=e?.widthCalculationMethod||ge}function t(e,t){return"function"==typeof e&&(z(`Setup custom ${t}CalcMethod`),s[t]=e,e="custom"),e}if(1===K)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),_=t(_,"height"),ge=t(ge,"width"),z(`TargetOrigin for parent set to: ${ce}`))}(),function(){try{ae="iframeParentListener"in window.parent}catch(e){z("Cross domain iframe detected.")}}(),K<0?M(`${d(K+2)}${d(2)}`):fe.codePointAt(0)>4||K<2&&M(d(3)),fe&&""!==fe&&"false"!==fe?fe!==e&&S(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${fe} - Child page: ${e}.\n`):S("<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"),Pe(),Ce(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&S("<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</>.")}(),Se(),U!==F&&(ne=E({onChange:$e,root:document.documentElement,side:U?i:r})),1!==K&&(he.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===L?(L=!0,He("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===L&&(L=!1),_e(0,0,"autoResize",JSON.stringify(L)),L),close(){_e(0,0,"close")},getId:()=>te,getOrigin:()=>(S("<rb>Deprecated Method</>\n \nThe <b>getOrigin()</> method has been deprecated and replaced with <b>getParentOrigin()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),k),getParentOrigin:()=>k,getPageInfo(e){if("function"==typeof e)return ve=e,_e(0,0,"pageInfo"),void S("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ve=null,_e(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return ze=e,_e(0,0,"parentInfo"),()=>{ze=null,_e(0,0,"parentInfoStop")}},getParentProperties(e){S("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Y.findTarget(e)},reset(){Ze("parentIframe.reset")},scrollBy(e,t){_e(t,e,"scrollBy")},scrollTo(e,t){_e(t,e,"scrollTo")},scrollToOffset(e,t){_e(t,e,"scrollToOffset")},sendMessage(e,t){_e(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){_=e,Pe()},setWidthCalculationMethod(e){ge=e,Ce()},setTargetOrigin(e){z(`Set targetOrigin: ${e}`),ce=e},resize(e,t){He(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){S("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),he.parentIFrame=he.parentIframe),function(){function e(e){_e(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){z(`Add event listener: ${n}`),l(window.document,t,e)}!0===ee&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),Y=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);z(`Moving to in page link (#${o}) at x: ${t.x}y: ${t.y}`),_e(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?(z(`In page link (#${o}) not found in iFrame, so sending to parent`),_e(0,0,"inPageLink",`#${o}`)):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function d(){z("Setting up location.hash handlers"),r(),a(),s()}return Y.enable?1===K?S("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):d():z("In page linking not enabled"),{findTarget:o}}(),Me(xe(document)()),void 0===D&&(D=`${B}px`),Ee("margin",(c="margin",(u=D).includes("-")&&($(`Negative CSS value ignored for ${c}`),u=""),u)),Ee("background",q),Ee("padding",W),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body),z('HTML & body height set to "auto !important"')}(),Te(),He("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&_e(0,0,"title",document.title),!0!==L&&z("Auto Resize disabled"),Oe({method:o="add",eventType:"After Print",eventName:"afterprint"}),Oe({method:o,eventType:"Before Print",eventName:"beforeprint"}),Oe({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function d(){z("MutationObserver: processMutations");const c=performance.now(),u=c-n,m=r*s+++a;if(u>m&&u<l)return z(`MutationObserver delay: ${u}ms > ${m}`),setTimeout(d,r*s),void(n=c);s=1,o.forEach(i),o=[],0!==e.size?(Te(),Se(),Me(e),e.forEach(Ne),e.clear(),t=!1):t=!1}function c(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(d))}function u(){const e=new window.MutationObserver(c),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return z("Create <body/> MutationObserver"),e.observe(t,n),e}u()}(),re=new ResizeObserver(Ae),re.observe(document.body),Ie.add(document.body),Ne(document.body),setTimeout(be),z("Initialization complete"),z("---")}function $e(e){z("Overflowed Elements:",e.length),oe=e,V=oe.length>0,He("overflowChanged","Overflow updated")}function Se(){se=document.querySelectorAll(`[${n}]`),J=se.length>0,z(`Tagged elements found: ${J}`)}function Me(e){J||ne(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),z(`Body ${e} set to "${t}"`))}function Te(){if(""!==le){z(`Applying sizeSelector: ${le}`);for(const e of document.querySelectorAll(le))z(`Applying data-iframe-size to: ${b(e)}`),e.dataset.iframeSize=!0}}function Oe(e){({add(t){function n(){He(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),z(`${h(e.method)} event listener: ${e.eventType}`)}function je(e,t,n,o){return t!==e&&(e in n||($(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&S(`<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 remove this option.`),z(`${o} calculation method set to "${e}"`)),e}function Pe(){_=je(_,v,De,"height")}function Ce(){ge=je(ge,C,We,"width")}function Ae(e){Array.isArray(e)&&0!==e.length&&He("resizeObserver",`Resize Observed: ${b(e[0].target)}`)}const Ie=new WeakSet;function Ne(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Ie.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(re.observe(e),Ie.add(e),z(`Attached resizeObserver: ${b(e)}`))}const t=xe(e)();for(const e of t){if(Ie.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(re.observe(e),Ie.add(e),z(`Attached resizeObserver: ${b(e)}`))}}function ke(e){performance.mark(T);const t=h(e);let n=0,i=document.documentElement,r=J?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(T);const a=J?se:V?oe:xe(document)();let l=a.length;for(const t of a)J||!y||t.checkVisibility(o)?(n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,i=t)):l-=1;return I=i,performance.mark(O,{detail:{Side:t,len:l,hasTags:J,logging:G}}),r}const Re=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],xe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},qe={height:0,width:0};function Be(e){function t(){return qe[o]=i,Le[o]=l,i}const n=e===De,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),s=`HTML: ${i} Page: ${l}`;switch(!0){case!e.enabled():return l;case J:return e.taggedElement();case!V&&0===qe[o]&&0===Le[o]:return z(`Initial page size values: ${s}`),t();case me&&i===qe[o]&&l===Le[o]:return z(`Size unchanged: ${s}`),Math.max(i,l);case 0===i:return z(`Page is hidden: ${s}`),l;case!V&&i!==qe[o]&&l<=Le[o]:return z(`New HTML bounding size: ${s}`,"Previous bounding size:",qe[o]),t();case!n:return e.taggedElement();case!V&&i<qe[o]:return z("HTML bounding size decreased:",s),t();case l===a||l===r:return z("HTML bounding size equals page size:",s),t();case i>l:return z(`Page size < HTML bounding size: ${s}`),t();default:z(`Content overflowing HTML element: ${s}`)}return Math.max(e.taggedElement(),t())}const De={enabled:()=>U,getOffset:()=>A,auto:()=>Be(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Re(De)),min:()=>Math.min(...Re(De)),grow:()=>De.max(),lowestElement:()=>ke(i),taggedElement:()=>ke(i)},We={enabled:()=>F,getOffset:()=>N,auto:()=>Be(We),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Re(We)),min:()=>Math.min(...Re(We)),rightMostElement:()=>ke(r),scroll:()=>Math.max(We.bodyScroll(),We.documentElementScroll()),taggedElement:()=>ke(r)},Ue=(e,t)=>!(Math.abs(e-t)<=ue);let Fe=!1;function He(e,t,n,o,i){x=performance.now(),L||e===a?document.hidden?z("Page hidden - Ignored resize request"):(Fe||(z(`Resize event: ${t}`),R=!0,function(e,t,n,o,i){const r=void 0===n?De[_]():n,l=void 0===o?We[ge]():o;U&&Ue(Z,r)||F&&Ue(pe,l)||"init"===e?(Ve(),Z=r,pe=l,_e(Z,pe,e,i)):!e!==a&&(U&&_ in P||F&&ge in P)?Ze(t):R=!1}(e,t,n,o,i),requestAnimationFrame((()=>{Fe=!1}))),Fe=!0):z("Resizing disabled")}function Ve(){me||(me=!0,z("Trigger event lock on"),requestAnimationFrame((()=>{me=!1,z("Trigger event lock off"),z("--")})))}function Je(e){Z=De[_](),pe=We[ge](),_e(Z,pe,e)}function Ze(e){const t=_;_=v,z(`Reset trigger event: ${e}`),Ve(),Je("reset"),_=t}function _e(e,t,n,o,i){K<-1||(void 0!==i?z(`Message targetOrigin: ${i}`):i=ce,function(){const r=`${te}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;G&&(console.group(`[iframe-resizer][${te}]`),console.info("Sending message to host page via "+(ae?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),R&&console.info(function(){const e=m(performance.now()-x);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),R=!1,ae?window.parent.iframeParentListener(w+r):de.postMessage(w+r,i)}())}function Qe(e){const t={init:function(){X=e.data,de=e.source,k=e.origin,we(),H=!1,setTimeout((()=>{Q=!1}),f)},reset(){Q?z("Page reset ignored by init"):(z("Page size reset by host page"),Je("resetPage"))},resize(){He(a,"Parent window requested size check")},moveToAnchor(){Y.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();z(`PageInfo received from parent: ${e}`),ve?setTimeout((()=>ve(JSON.parse(e)))):_e(0,0,"pageInfoStop"),z(" --")},parentInfo(){const e=o();z(`ParentInfo received from parent: ${e}`),ze?setTimeout(ze(Object.freeze(JSON.parse(e)))):_e(0,0,"parentInfoStop"),z(" --")},message(){const e=o();z(`onMessage called from parent: ${e}`),ye(JSON.parse(e)),z(" --")}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};w===`${e.data}`.slice(0,j)&&(!1!==H?r()?t.init():z(`Ignored message of type "${n()}". Received before initialization.`):function(){const o=n();o in t?t[o]():i()||r()||$(`Unexpected message (${e.data})`)}())}function Xe(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?$("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Qe({data:e,sameDomain:!0}))),l(window,"message",Qe),l(window,"readystatechange",Xe),Xe())}();
//# sourceMappingURL=index.esm.js.map
/*!
* @preserve
*
* @module iframe-resizer/child 5.3.2 (umd) - 2024-10-22
* @module iframe-resizer/child 5.3.3-beta.1 (umd) - 2024-10-23
*

@@ -20,2 +20,3 @@ * @license GPL-3.0 for non-commercial use only.

!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e="5.3.2",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let O=null,P={};const A=setInterval((()=>{if(C.length<10)return;if(P.hasTags&&P.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(A),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${P.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;P=e,T.has(O)||i&&o<=1||(r||M(O),b(`\n ${n} position calculated from:`,O,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),Le.auto()),width:()=>(v("Custom width calculation function not defined"),Be.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let P,A,N,I,k,R=!0,x="",q=0,L="",B="",D=!0,W=!1,U=!0,F=!1,V=!1,J=1,H=b,Z=!0,_="",Q={},X=!1,Y=0,G=!1,K="",ee=d,te=[],ne="child",oe=null,ie=!1,re="",ae=[],le=window.parent,se="*",ce=0,de=!1,ue="",me=1,fe=M,pe=window,he=()=>{v("onMessage function not defined")},ye=()=>{},ge=null,be=null;function ve(){var o,d,u;!function(){const e=e=>"true"===e,t=_.slice(C).split(":");K=t[0],q=void 0===t[1]?q:Number(t[1]),W=void 0===t[2]?W:e(t[2]),X=void 0===t[3]?X:e(t[3]),R=void 0===t[6]?R:e(t[6]),L=t[7],H=void 0===t[8]?H:t[8],x=t[9],B=t[10],ce=void 0===t[11]?ce:Number(t[11]),Q.enable=void 0!==t[12]&&e(t[12]),ne=void 0===t[13]?ne:t[13],fe=void 0===t[14]?fe:t[14],G=void 0===t[15]?G:e(t[15]),P=void 0===t[16]?P:Number(t[16]),A=void 0===t[17]?A:Number(t[17]),D=void 0===t[18]?D:e(t[18]),t[19],ue=t[20]||ue,Y=void 0===t[21]?Y:Number(t[21])}(),h({id:K,logging:X}),function(){function e(e){he=e?.onMessage||he,ye=e?.onReady||ye,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),D&&(P=e?.offset),W&&(A=e?.offset)),"number"==typeof e?.offsetSize&&(D&&(P=e?.offsetSize),W&&(A=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(re=e.sizeSelector),se=e?.targetOrigin||se,H=e?.heightCalculationMethod||H,fe=e?.widthCalculationMethod||fe}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===Y)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),H=t(H,"height"),fe=t(fe,"width"))}(),function(){try{ie="iframeParentListener"in window.parent}catch(e){}}(),Y<0?z(`${c(Y+2)}${c(2)}`):ue.codePointAt(0)>4||Y<2&&z(c(3)),ue&&""!==ue&&"false"!==ue?ue!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ue} - Child page: ${e}.\n`):w("<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"),Te(),Me(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<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</>.")}(),ze(),D!==W&&(ee=S({onChange:we,root:document.documentElement,side:D?i:r})),1!==Y&&(pe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===R?(R=!0,Ue("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===R&&(R=!1),He(0,0,"autoResize",JSON.stringify(R)),R),close(){He(0,0,"close")},getId:()=>K,getOrigin:()=>N,getPageInfo(e){if("function"==typeof e)return ge=e,He(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ge=null,He(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return be=e,He(0,0,"parentInfo"),()=>{be=null,He(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Q.findTarget(e)},reset(){Je()},scrollBy(e,t){He(t,e,"scrollBy")},scrollTo(e,t){He(t,e,"scrollTo")},scrollToOffset(e,t){He(t,e,"scrollToOffset")},sendMessage(e,t){He(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Te()},setWidthCalculationMethod(e){fe=e,Me()},setTargetOrigin(e){se=e},resize(e,t){Ue(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),pe.parentIFrame=pe.parentIframe),function(){function e(e){He(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===G&&(t("mouseenter"),t("mouseleave"))}(),Q=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);He(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?He(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return Q.enable&&(1===Y?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),Se(ke(document)()),void 0===L&&(L=`${q}px`),Ee("margin",(d="margin",(u=L).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Ee("background",x),Ee("padding",B),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),je(),Ue("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&He(0,0,"title",document.title),$e({method:o="add",eventType:"After Print",eventName:"afterprint"}),$e({method:o,eventType:"Before Print",eventName:"beforeprint"}),$e({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(je(),ze(),Se(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),oe=new ResizeObserver(Oe),oe.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(ye)}function we(e){te=e,F=te.length>0,Ue("overflowChanged","Overflow updated")}function ze(){ae=document.querySelectorAll(`[${n}]`),V=ae.length>0}function Se(e){V||ee(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function je(){if(""!==re)for(const e of document.querySelectorAll(re))e.dataset.iframeSize=!0}function $e(e){({add(t){function n(){Ue(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ce(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<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 remove this option.`)),e}function Te(){H=Ce(H,b,Le,"height")}function Me(){fe=Ce(fe,M,Be,"width")}function Oe(e){Array.isArray(e)&&0!==e.length&&Ue("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}const t=ke(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}}function Ne(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=V?ae:F?te:ke(document)();let s=l.length;for(const t of l)V||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return O=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:V,logging:X}}),a}const Ie=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],ke=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Re={height:0,width:0},xe={height:0,width:0};function qe(e){function t(){return xe[o]=i,Re[o]=l,i}const n=e===Le,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case V:return e.taggedElement();case!F&&0===xe[o]&&0===Re[o]:return t();case de&&i===xe[o]&&l===Re[o]:return Math.max(i,l);case 0===i:return l;case!F&&i!==xe[o]&&l<=Re[o]:return t();case!n:return e.taggedElement();case!F&&i<xe[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const Le={enabled:()=>D,getOffset:()=>P,auto:()=>qe(Le),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Le.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ie(Le)),min:()=>Math.min(...Ie(Le)),grow:()=>Le.max(),lowestElement:()=>Ne(i),taggedElement:()=>Ne(i)},Be={enabled:()=>W,getOffset:()=>A,auto:()=>qe(Be),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ie(Be)),min:()=>Math.min(...Ie(Be)),rightMostElement:()=>Ne(r),scroll:()=>Math.max(Be.bodyScroll(),Be.documentElementScroll()),taggedElement:()=>Ne(r)},De=(e,t)=>!(Math.abs(e-t)<=ce);let We=!1;function Ue(e,t,n,o,i){k=performance.now(),(R||e===a)&&(document.hidden||(We||(I=!0,function(e,t,n,o,i){const r=void 0===n?Le[H]():n,l=void 0===o?Be[fe]():o;D&&De(J,r)||W&&De(me,l)||"init"===e?(Fe(),J=r,me=l,He(J,me,e,i)):!e!==a&&(D&&H in T||W&&fe in T)?Je():I=!1}(e,0,n,o,i),requestAnimationFrame((()=>{We=!1}))),We=!0))}function Fe(){de||(de=!0,requestAnimationFrame((()=>{de=!1})))}function Ve(e){J=Le[H](),me=Be[fe](),He(J,me,e)}function Je(e){const t=H;H=b,Fe(),Ve("reset"),H=t}function He(e,t,n,o,i){Y<-1||(void 0!==i||(i=se),function(){const r=`${K}:${e+(P||0)}:${t+(A||0)}:${n}${void 0===o?"":`:${o}`}`;X&&(console.group(`[iframe-resizer][${K}]`),console.info("Sending message to host page via "+(ie?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),I&&console.info(function(){const e=m(performance.now()-k);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),I=!1,ie?window.parent.iframeParentListener($+r):le.postMessage($+r,i)}())}function Ze(e){const t={init:function(){_=e.data,le=e.source,N=e.origin,ve(),U=!1,setTimeout((()=>{Z=!1}),f)},reset(){Z||Ve("resetPage")},resize(){Ue(a)},moveToAnchor(){Q.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ge?setTimeout((()=>ge(JSON.parse(e)))):He(0,0,"pageInfoStop")},parentInfo(){const e=o();be?setTimeout(be(Object.freeze(JSON.parse(e)))):He(0,0,"parentInfoStop")},message(){const e=o();he(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==U?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function _e(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Ze({data:e,sameDomain:!0}))),l(window,"message",Ze),l(window,"readystatechange",_e),_e())}()}));
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e="5.3.3-beta.1",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const d=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),c=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const g=e=>{f=e.id,p=e.logging},h=e=>e.charAt(0).toUpperCase()+e.slice(1),y=e=>""!=`${e}`&&void 0!==e;function b(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}const v=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),z=(...e)=>p&&console?.log(v(...e)),w=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),$=(...e)=>console?.warn(v(...e)),S=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(v)(...e)),M=e=>S(e),E=e=>{const t=e.side||i,n=e.onChange||c,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},T="--ifr-start",O="--ifr-end",j="--ifr-measure",P=[],C=new WeakSet,A=e=>"object"==typeof e&&C.add(e);let I=null,N={};const k=setInterval((()=>{if(P.length<10)return;if(N.hasTags&&N.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);z("Max time:",Math.max(...P)),e<=4||(clearInterval(k),S(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${N.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function R(e){e.getEntries().forEach((e=>{if(e.name===O){const{duration:t}=performance.measure(j,T,O);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;N=e,C.has(I)||i&&o<=1||(r||A(I),w(`\n ${n} position calculated from:`,I,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function x(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),A(document.documentElement),A(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",x):x()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>($("Custom height calculation function not defined"),De.auto()),width:()=>($("Custom width calculation function not defined"),We.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},y="checkVisibility"in window,v="auto",w="[iFrameSizer]",j=w.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},C="scroll";let A,N,k,R,x,L=!0,q="",B=0,D="",W="",U=!0,F=!1,H=!0,V=!1,J=!1,Z=1,_=v,Q=!0,X="",Y={},G=!1,K=0,ee=!1,te="",ne=c,oe=[],ie="child",re=null,ae=!1,le="",se=[],de=window.parent,ce="*",ue=0,me=!1,fe="",pe=1,ge=C,he=window,ye=()=>{$("onMessage function not defined")},be=()=>{},ve=null,ze=null;function we(){var o,c,u;!function(){const e=e=>"true"===e,t=X.slice(j).split(":");te=t[0],B=void 0===t[1]?B:Number(t[1]),F=void 0===t[2]?F:e(t[2]),G=void 0===t[3]?G:e(t[3]),L=void 0===t[6]?L:e(t[6]),D=t[7],_=void 0===t[8]?_:t[8],q=t[9],W=t[10],ue=void 0===t[11]?ue:Number(t[11]),Y.enable=void 0!==t[12]&&e(t[12]),ie=void 0===t[13]?ie:t[13],ge=void 0===t[14]?ge:t[14],ee=void 0===t[15]?ee:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),U=void 0===t[18]?U:e(t[18]),t[19],fe=t[20]||fe,K=void 0===t[21]?K:Number(t[21])}(),g({id:te,logging:G}),z(`Initialising iframe v${e} (${window.location.href})`),function(){function e(e){z(`Reading data from page: ${JSON.stringify(e)}`),ye=e?.onMessage||ye,be=e?.onReady||be,"number"==typeof e?.offset&&(S("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),U&&(A=e?.offset),F&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(U&&(A=e?.offsetSize),F&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(le=e.sizeSelector),ce=e?.targetOrigin||ce,_=e?.heightCalculationMethod||_,ge=e?.widthCalculationMethod||ge}function t(e,t){return"function"==typeof e&&(z(`Setup custom ${t}CalcMethod`),s[t]=e,e="custom"),e}if(1===K)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),_=t(_,"height"),ge=t(ge,"width"),z(`TargetOrigin for parent set to: ${ce}`))}(),function(){try{ae="iframeParentListener"in window.parent}catch(e){z("Cross domain iframe detected.")}}(),K<0?M(`${d(K+2)}${d(2)}`):fe.codePointAt(0)>4||K<2&&M(d(3)),fe&&""!==fe&&"false"!==fe?fe!==e&&S(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${fe} - Child page: ${e}.\n`):S("<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"),Pe(),Ce(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&S("<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</>.")}(),Se(),U!==F&&(ne=E({onChange:$e,root:document.documentElement,side:U?i:r})),1!==K&&(he.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===L?(L=!0,He("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===L&&(L=!1),_e(0,0,"autoResize",JSON.stringify(L)),L),close(){_e(0,0,"close")},getId:()=>te,getOrigin:()=>(S("<rb>Deprecated Method</>\n \nThe <b>getOrigin()</> method has been deprecated and replaced with <b>getParentOrigin()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),k),getParentOrigin:()=>k,getPageInfo(e){if("function"==typeof e)return ve=e,_e(0,0,"pageInfo"),void S("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ve=null,_e(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return ze=e,_e(0,0,"parentInfo"),()=>{ze=null,_e(0,0,"parentInfoStop")}},getParentProperties(e){S("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Y.findTarget(e)},reset(){Ze("parentIframe.reset")},scrollBy(e,t){_e(t,e,"scrollBy")},scrollTo(e,t){_e(t,e,"scrollTo")},scrollToOffset(e,t){_e(t,e,"scrollToOffset")},sendMessage(e,t){_e(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){_=e,Pe()},setWidthCalculationMethod(e){ge=e,Ce()},setTargetOrigin(e){z(`Set targetOrigin: ${e}`),ce=e},resize(e,t){He(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){S("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),he.parentIFrame=he.parentIframe),function(){function e(e){_e(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){z(`Add event listener: ${n}`),l(window.document,t,e)}!0===ee&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),Y=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);z(`Moving to in page link (#${o}) at x: ${t.x}y: ${t.y}`),_e(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?(z(`In page link (#${o}) not found in iFrame, so sending to parent`),_e(0,0,"inPageLink",`#${o}`)):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function d(){z("Setting up location.hash handlers"),r(),a(),s()}return Y.enable?1===K?S("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):d():z("In page linking not enabled"),{findTarget:o}}(),Me(xe(document)()),void 0===D&&(D=`${B}px`),Ee("margin",(c="margin",(u=D).includes("-")&&($(`Negative CSS value ignored for ${c}`),u=""),u)),Ee("background",q),Ee("padding",W),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body),z('HTML & body height set to "auto !important"')}(),Te(),He("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&_e(0,0,"title",document.title),!0!==L&&z("Auto Resize disabled"),Oe({method:o="add",eventType:"After Print",eventName:"afterprint"}),Oe({method:o,eventType:"Before Print",eventName:"beforeprint"}),Oe({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function d(){z("MutationObserver: processMutations");const c=performance.now(),u=c-n,m=r*s+++a;if(u>m&&u<l)return z(`MutationObserver delay: ${u}ms > ${m}`),setTimeout(d,r*s),void(n=c);s=1,o.forEach(i),o=[],0!==e.size?(Te(),Se(),Me(e),e.forEach(Ne),e.clear(),t=!1):t=!1}function c(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(d))}function u(){const e=new window.MutationObserver(c),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return z("Create <body/> MutationObserver"),e.observe(t,n),e}u()}(),re=new ResizeObserver(Ae),re.observe(document.body),Ie.add(document.body),Ne(document.body),setTimeout(be),z("Initialization complete"),z("---")}function $e(e){z("Overflowed Elements:",e.length),oe=e,V=oe.length>0,He("overflowChanged","Overflow updated")}function Se(){se=document.querySelectorAll(`[${n}]`),J=se.length>0,z(`Tagged elements found: ${J}`)}function Me(e){J||ne(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),z(`Body ${e} set to "${t}"`))}function Te(){if(""!==le){z(`Applying sizeSelector: ${le}`);for(const e of document.querySelectorAll(le))z(`Applying data-iframe-size to: ${b(e)}`),e.dataset.iframeSize=!0}}function Oe(e){({add(t){function n(){He(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),z(`${h(e.method)} event listener: ${e.eventType}`)}function je(e,t,n,o){return t!==e&&(e in n||($(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&S(`<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 remove this option.`),z(`${o} calculation method set to "${e}"`)),e}function Pe(){_=je(_,v,De,"height")}function Ce(){ge=je(ge,C,We,"width")}function Ae(e){Array.isArray(e)&&0!==e.length&&He("resizeObserver",`Resize Observed: ${b(e[0].target)}`)}const Ie=new WeakSet;function Ne(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Ie.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(re.observe(e),Ie.add(e),z(`Attached resizeObserver: ${b(e)}`))}const t=xe(e)();for(const e of t){if(Ie.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(re.observe(e),Ie.add(e),z(`Attached resizeObserver: ${b(e)}`))}}function ke(e){performance.mark(T);const t=h(e);let n=0,i=document.documentElement,r=J?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(T);const a=J?se:V?oe:xe(document)();let l=a.length;for(const t of a)J||!y||t.checkVisibility(o)?(n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,i=t)):l-=1;return I=i,performance.mark(O,{detail:{Side:t,len:l,hasTags:J,logging:G}}),r}const Re=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],xe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},qe={height:0,width:0};function Be(e){function t(){return qe[o]=i,Le[o]=l,i}const n=e===De,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),s=`HTML: ${i} Page: ${l}`;switch(!0){case!e.enabled():return l;case J:return e.taggedElement();case!V&&0===qe[o]&&0===Le[o]:return z(`Initial page size values: ${s}`),t();case me&&i===qe[o]&&l===Le[o]:return z(`Size unchanged: ${s}`),Math.max(i,l);case 0===i:return z(`Page is hidden: ${s}`),l;case!V&&i!==qe[o]&&l<=Le[o]:return z(`New HTML bounding size: ${s}`,"Previous bounding size:",qe[o]),t();case!n:return e.taggedElement();case!V&&i<qe[o]:return z("HTML bounding size decreased:",s),t();case l===a||l===r:return z("HTML bounding size equals page size:",s),t();case i>l:return z(`Page size < HTML bounding size: ${s}`),t();default:z(`Content overflowing HTML element: ${s}`)}return Math.max(e.taggedElement(),t())}const De={enabled:()=>U,getOffset:()=>A,auto:()=>Be(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Re(De)),min:()=>Math.min(...Re(De)),grow:()=>De.max(),lowestElement:()=>ke(i),taggedElement:()=>ke(i)},We={enabled:()=>F,getOffset:()=>N,auto:()=>Be(We),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Re(We)),min:()=>Math.min(...Re(We)),rightMostElement:()=>ke(r),scroll:()=>Math.max(We.bodyScroll(),We.documentElementScroll()),taggedElement:()=>ke(r)},Ue=(e,t)=>!(Math.abs(e-t)<=ue);let Fe=!1;function He(e,t,n,o,i){x=performance.now(),L||e===a?document.hidden?z("Page hidden - Ignored resize request"):(Fe||(z(`Resize event: ${t}`),R=!0,function(e,t,n,o,i){const r=void 0===n?De[_]():n,l=void 0===o?We[ge]():o;U&&Ue(Z,r)||F&&Ue(pe,l)||"init"===e?(Ve(),Z=r,pe=l,_e(Z,pe,e,i)):!e!==a&&(U&&_ in P||F&&ge in P)?Ze(t):R=!1}(e,t,n,o,i),requestAnimationFrame((()=>{Fe=!1}))),Fe=!0):z("Resizing disabled")}function Ve(){me||(me=!0,z("Trigger event lock on"),requestAnimationFrame((()=>{me=!1,z("Trigger event lock off"),z("--")})))}function Je(e){Z=De[_](),pe=We[ge](),_e(Z,pe,e)}function Ze(e){const t=_;_=v,z(`Reset trigger event: ${e}`),Ve(),Je("reset"),_=t}function _e(e,t,n,o,i){K<-1||(void 0!==i?z(`Message targetOrigin: ${i}`):i=ce,function(){const r=`${te}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;G&&(console.group(`[iframe-resizer][${te}]`),console.info("Sending message to host page via "+(ae?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),R&&console.info(function(){const e=m(performance.now()-x);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),R=!1,ae?window.parent.iframeParentListener(w+r):de.postMessage(w+r,i)}())}function Qe(e){const t={init:function(){X=e.data,de=e.source,k=e.origin,we(),H=!1,setTimeout((()=>{Q=!1}),f)},reset(){Q?z("Page reset ignored by init"):(z("Page size reset by host page"),Je("resetPage"))},resize(){He(a,"Parent window requested size check")},moveToAnchor(){Y.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();z(`PageInfo received from parent: ${e}`),ve?setTimeout((()=>ve(JSON.parse(e)))):_e(0,0,"pageInfoStop"),z(" --")},parentInfo(){const e=o();z(`ParentInfo received from parent: ${e}`),ze?setTimeout(ze(Object.freeze(JSON.parse(e)))):_e(0,0,"parentInfoStop"),z(" --")},message(){const e=o();z(`onMessage called from parent: ${e}`),ye(JSON.parse(e)),z(" --")}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};w===`${e.data}`.slice(0,j)&&(!1!==H?r()?t.init():z(`Ignored message of type "${n()}". Received before initialization.`):function(){const o=n();o in t?t[o]():i()||r()||$(`Unexpected message (${e.data})`)}())}function Xe(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?$("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Qe({data:e,sameDomain:!0}))),l(window,"message",Qe),l(window,"readystatechange",Xe),Xe())}()}));
//# sourceMappingURL=index.umd.js.map

2

package.json
{
"name": "@iframe-resizer/child",
"version": "5.3.2",
"version": "5.3.3-beta.1",
"license": "GPL-3.0",

@@ -5,0 +5,0 @@ "homepage": "https://iframe-resizer.com",

@@ -25,2 +25,2 @@ [<img src="https://iframe-resizer.com/logo-full.svg" alt="" title="" style="margin-bottom: -20px">](https://iframe-resizer.com)

_iframe-resizer version 5.3.2 2024-10-22 - 10:41:37.836Z_
_iframe-resizer version 5.3.3-beta.1 2024-10-23 - 10:40:11.965Z_
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc