@iframe-resizer/child
Advanced tools
Comparing version 5.2.5 to 5.2.6
/*! | ||
* @preserve | ||
* | ||
* @module iframe-resizer/child 5.2.5 (cjs) - 2024-08-22 | ||
* @module iframe-resizer/child 5.2.6 (cjs) - 2024-08-22 | ||
* | ||
@@ -20,2 +20,2 @@ * @license GPL-3.0 for non-commercial use only. | ||
"use strict";const e="5.2.5",t=10,n="data-iframe-size",o="data-iframe-overflow",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;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u||"child"}]`,...e].join(" "),p=(...e)=>console?.info(`[iframe-resizer][${u}]`,...e),h=(...e)=>console?.warn(f(...e)),y=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(f)(...e)),g=e=>y(e);let b=[];const v=e=>{const t=e.side||i,n=e.onChange||d,r={root:document.documentElement,rootMargin:"0px",threshold:1},a=new WeakSet,l=new IntersectionObserver((e=>{e.forEach((e=>{e.target.toggleAttribute(o,(e=>0===e.boundingClientRect[t]||e.boundingClientRect[t]>e.rootBounds[t])(e))})),b=document.querySelectorAll(`[${o}]`),n()}),r);function s(e){e?.nodeType===Node.ELEMENT_NODE&&(a.has(e)||(l.observe(e),a.add(e)))}return e=>e.forEach(s)},w=()=>b.length>0,z=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",C=[],$=new WeakSet,O=e=>"object"==typeof e&&$.add(e),P=e=>Math.floor(e*z)/z;let M=null,T=null,A={};const N=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.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(N),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${P(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.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===E){const{duration:t}=performance.measure(j,S,E);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,$.has(T)||M===T||i&&o<=1||(r||O(T),M=T,p(`\n${n} position calculated from:`,T,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${P(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),O(document.documentElement),O(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",k):k()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(h("Custom height calculation function not defined"),xe.auto()),width:()=>(h("Custom width calculation function not defined"),Le.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,z={},j="checkVisibility"in window,C="auto",$="[iFrameSizer]",O=$.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,N,R,k=!0,I="",x=0,L="",q="",B=!0,D=!1,W=!0,F=!1,U=1,V=C,J=!0,H="",Z={},_=!1,Q=0,X=!1,Y="",G=d,K="child",ee=null,te=!1,ne="",oe=[],ie=window.parent,re="*",ae=0,le=!1,se="",ce=1,de=M,ue=window,me=()=>{h("onMessage function not defined")},fe=()=>{},pe=null,he=null;function ye(){var o,d,m;!function(){const e=e=>"true"===e,t=H.slice(O).split(":");Y=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),_=void 0===t[3]?_:e(t[3]),k=void 0===t[6]?k:e(t[6]),L=t[7],V=void 0===t[8]?V:t[8],I=t[9],q=t[10],ae=void 0===t[11]?ae:Number(t[11]),Z.enable=void 0!==t[12]&&e(t[12]),K=void 0===t[13]?K:t[13],de=void 0===t[14]?de:t[14],X=void 0===t[15]?X:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],se=t[20]||se,Q=void 0===t[21]?Q:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;me=e?.onMessage||me,fe=e?.onReady||fe,"number"==typeof e?.offset&&(y("<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</>."),B&&(A=e?.offset),D&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ne=e.sizeSelector),re=e?.targetOrigin||re,V=e?.heightCalculationMethod||V,de=e?.widthCalculationMethod||de}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}1!==Q&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),V=t(V,"height"),de=t(de,"width"))}(),u={id:Y,logging:_}.id,function(){try{te="iframeParentListener"in window.parent}catch(e){}}(),Q<0?g(`${c(Q+2)}${c(2)}`):se.codePointAt(0)>4||Q<2&&g(c(3)),se&&""!==se&&"false"!==se?se!==e&&y(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${se} - Child page: ${e}.\n`):y("<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"),Ee(),je(),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&&y("<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</>.")}(),ge(),B!==D&&(G=v({onChange:()=>Be("overflowChanged","Overflow updated"),side:B?i:r})),1!==Q&&(ue.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Be("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Ue(0,0,"autoResize",JSON.stringify(k)),k),close(){Ue(0,0,"close")},getId:()=>Y,getPageInfo(e){if("function"==typeof e)return pe=e,Ue(0,0,"pageInfo"),void y("<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");pe=null,Ue(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return he=e,Ue(0,0,"parentInfo"),()=>{he=null,Ue(0,0,"parentInfoStop")}},getParentProperties(e){y("<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){Z.findTarget(e)},reset(){Fe()},scrollBy(e,t){Ue(t,e,"scrollBy")},scrollTo(e,t){Ue(t,e,"scrollTo")},scrollToOffset(e,t){Ue(t,e,"scrollToOffset")},sendMessage(e,t){Ue(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){V=e,Ee()},setWidthCalculationMethod(e){de=e,je()},setTargetOrigin(e){re=e},resize(e,t){Be(a,`parentIFrame.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){y("<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)}}),ue.parentIFrame=ue.parentIframe),function(){function e(e){Ue(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===X&&(t("mouseenter"),t("mouseleave"))}(),Z=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);Ue(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?Ue(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&l(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),a(),s()}return Z.enable&&(1===Q?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),be(Ne(document)()),void 0===L&&(L=`${x}px`),ve("margin",(d="margin",(m=L).includes("-")&&(h(`Negative CSS value ignored for ${d}`),m=""),m)),ve("background",I),ve("padding",q),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)}(),we(),Be("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ue(0,0,"title",document.title),ze({method:o="add",eventType:"After Print",eventName:"afterprint"}),ze({method:o,eventType:"Before Print",eventName:"beforeprint"}),ze({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{const{length:n}=t;for(let o=0;o<n;o++){const{addedNodes:n,removedNodes:i}=t[o],r=n.length,a=i.length;if(r)for(let t=0;t<r;t++)e.add(n[t]);if(a)for(let t=0;t<a;t++)e.delete(i[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?(we(),ge(),be(e),e.forEach(Oe),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()}(),ee=new ResizeObserver(Ce),Me(document.body),Oe(document.body),fe()}function ge(){oe=document.querySelectorAll(`[${n}]`),F=oe.length>0}function be(e){F||G(e)}function ve(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ne&&document.querySelectorAll(ne).forEach((e=>{e.dataset.iframeSize=!0}))}function ze(e){({add(t){function n(){Be(e.eventName,e.eventType)}z[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=z[e];var n,o;delete z[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Se(e,t,n,o){return t!==e&&(e in n||(h(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in f&&y(`<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 Ee(){V=Se(V,C,xe,"height")}function je(){de=Se(de,M,Le,"width")}function Ce(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;R=()=>Be("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!m(e):return"";case m(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case m(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(m(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{R&&R(),R=void 0}),0)}const $e=e=>{if(e?.nodeType!==Node.ELEMENT_NODE)return!1;const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Oe=e=>e?.nodeType!==Node.ELEMENT_NODE?null:[...Ne(e)()].filter($e).forEach(Me),Pe=new WeakSet;function Me(e){Pe.has(e)||(ee.observe(e),Pe.add(e))}function Te(e){performance.mark(S);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=F?oe:w()?b:Ne(document)();let s=l.length;return l.forEach((t=>{F||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),T=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:F,logging:_}}),a}const Ae=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ne=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},ke={height:0,width:0};function Ie(e){function t(){return ke[i]=r,Re[i]=s,r}const n=w(),o=e===xe,i=o?"height":"width",r=e.boundingClientRect(),a=Math.ceil(r),l=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return s;case F:return e.taggedElement();case!n&&0===ke[i]&&0===Re[i]:return t();case le&&r===ke[i]&&s===Re[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==ke[i]&&s<=Re[i]:return t();case!o:return e.taggedElement();case!n&&r<ke[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const xe={enabled:()=>B,getOffset:()=>A,auto:()=>Ie(xe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>xe.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(...Ae(xe)),min:()=>Math.min(...Ae(xe)),grow:()=>xe.max(),lowestElement:()=>Te(i),taggedElement:()=>Te(i)},Le={enabled:()=>D,getOffset:()=>N,auto:()=>Ie(Le),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(...Ae(Le)),min:()=>Math.min(...Ae(Le)),rightMostElement:()=>Te(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Te(r)};function qe(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=ae);return r=void 0===n?xe[V]():n,a=void 0===o?Le[de]():o,B&&e(U,r)||D&&e(ce,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(B&&V in P||D&&de in P)&&Fe():(De(),U=r,ce=a,Ue(U,ce,e,i))}function Be(e,t,n,o,i){(k||e===a)&&(document.hidden||qe(e,0,n,o,i))}function De(){le||(le=!0,requestAnimationFrame((()=>{le=!1})))}function We(e){U=xe[V](),ce=Le[de](),Ue(U,ce,e)}function Fe(e){const t=V;V=C,De(),We("reset"),V=t}function Ue(e,t,n,o,i){Q<-1||(void 0!==i||(i=re),function(){const r=`${Y}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;te?window.parent.iframeParentListener($+r):ie.postMessage($+r,i)}())}function Ve(e){const t={init:function(){H=e.data,ie=e.source,ye(),W=!1,setTimeout((()=>{J=!1}),p)},reset(){J||We("resetPage")},resize(){Be(a)},moveToAnchor(){Z.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();pe?pe(JSON.parse(e)):Ue(0,0,"pageInfoStop")},parentInfo(){const e=o();he?he(Object.freeze(JSON.parse(e))):Ue(0,0,"parentInfoStop")},message(){const e=o();me(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,O)&&(!1!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Je(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?h("Already setup"):(window.iframeChildListener=e=>Ve({data:e,sameDomain:!0}),l(window,"message",Ve),l(window,"readystatechange",Je),Je())}(); | ||
"use strict";const e="5.2.6",t=10,n="data-iframe-size",o="data-iframe-overflow",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;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u||"child"}]`,...e].join(" "),p=(...e)=>console?.info(`[iframe-resizer][${u}]`,...e),h=(...e)=>console?.warn(f(...e)),y=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(f)(...e)),g=e=>y(e);let b=[];const v=e=>{const t=e.side||i,n=e.onChange||d,r={root:document.documentElement,rootMargin:"0px",threshold:1},a=new WeakSet,l=new IntersectionObserver((e=>{e.forEach((e=>{e.target.toggleAttribute(o,(e=>0===e.boundingClientRect[t]||e.boundingClientRect[t]>e.rootBounds[t])(e))})),b=document.querySelectorAll(`[${o}]`),n()}),r);function s(e){e?.nodeType===Node.ELEMENT_NODE&&(a.has(e)||(l.observe(e),a.add(e)))}return e=>e.forEach(s)},w=()=>b.length>0,z=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",C=[],$=new WeakSet,O=e=>"object"==typeof e&&$.add(e),P=e=>Math.floor(e*z)/z;let M=null,T=null,A={};const N=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.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(N),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${P(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.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===E){const{duration:t}=performance.measure(j,S,E);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,$.has(T)||M===T||i&&o<=1||(r||O(T),M=T,p(`\n${n} position calculated from:`,T,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${P(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),O(document.documentElement),O(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",k):k()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(h("Custom height calculation function not defined"),xe.auto()),width:()=>(h("Custom width calculation function not defined"),Le.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,z={},j="checkVisibility"in window,C="auto",$="[iFrameSizer]",O=$.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,N,R,k=!0,I="",x=0,L="",q="",B=!0,D=!1,W=!0,F=!1,U=1,V=C,J=!0,H="",Z={},_=!1,Q=0,X=!1,Y="",G=d,K="child",ee=null,te=!1,ne="",oe=[],ie=window.parent,re="*",ae=0,le=!1,se="",ce=1,de=M,ue=window,me=()=>{h("onMessage function not defined")},fe=()=>{},pe=null,he=null;function ye(){var o,d,m;!function(){const e=e=>"true"===e,t=H.slice(O).split(":");Y=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),_=void 0===t[3]?_:e(t[3]),k=void 0===t[6]?k:e(t[6]),L=t[7],V=void 0===t[8]?V:t[8],I=t[9],q=t[10],ae=void 0===t[11]?ae:Number(t[11]),Z.enable=void 0!==t[12]&&e(t[12]),K=void 0===t[13]?K:t[13],de=void 0===t[14]?de:t[14],X=void 0===t[15]?X:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],se=t[20]||se,Q=void 0===t[21]?Q:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;me=e?.onMessage||me,fe=e?.onReady||fe,"number"==typeof e?.offset&&(y("<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</>."),B&&(A=e?.offset),D&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ne=e.sizeSelector),re=e?.targetOrigin||re,V=e?.heightCalculationMethod||V,de=e?.widthCalculationMethod||de}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}1!==Q&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),V=t(V,"height"),de=t(de,"width"))}(),u={id:Y,logging:_}.id,function(){try{te="iframeParentListener"in window.parent}catch(e){}}(),Q<0?g(`${c(Q+2)}${c(2)}`):se.codePointAt(0)>4||Q<2&&g(c(3)),se&&""!==se&&"false"!==se?se!==e&&y(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${se} - Child page: ${e}.\n`):y("<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"),Ee(),je(),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&&y("<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</>.")}(),ge(),B!==D&&(G=v({onChange:()=>Be("overflowChanged","Overflow updated"),side:B?i:r})),1!==Q&&(ue.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Be("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Ue(0,0,"autoResize",JSON.stringify(k)),k),close(){Ue(0,0,"close")},getId:()=>Y,getPageInfo(e){if("function"==typeof e)return pe=e,Ue(0,0,"pageInfo"),void y("<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");pe=null,Ue(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return he=e,Ue(0,0,"parentInfo"),()=>{he=null,Ue(0,0,"parentInfoStop")}},getParentProperties(e){y("<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){Z.findTarget(e)},reset(){Fe()},scrollBy(e,t){Ue(t,e,"scrollBy")},scrollTo(e,t){Ue(t,e,"scrollTo")},scrollToOffset(e,t){Ue(t,e,"scrollToOffset")},sendMessage(e,t){Ue(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){V=e,Ee()},setWidthCalculationMethod(e){de=e,je()},setTargetOrigin(e){re=e},resize(e,t){Be(a,`parentIFrame.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){y("<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)}}),ue.parentIFrame=ue.parentIframe),function(){function e(e){Ue(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===X&&(t("mouseenter"),t("mouseleave"))}(),Z=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);Ue(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?Ue(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&l(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),a(),s()}return Z.enable&&(1===Q?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),be(Ne(document)()),void 0===L&&(L=`${x}px`),ve("margin",(d="margin",(m=L).includes("-")&&(h(`Negative CSS value ignored for ${d}`),m=""),m)),ve("background",I),ve("padding",q),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)}(),we(),Be("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ue(0,0,"title",document.title),ze({method:o="add",eventType:"After Print",eventName:"afterprint"}),ze({method:o,eventType:"Before Print",eventName:"beforeprint"}),ze({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{const{length:n}=t;for(let o=0;o<n;o++){const{addedNodes:n,removedNodes:i}=t[o],r=n.length,a=i.length;if(r)for(let t=0;t<r;t++)e.add(n[t]);if(a)for(let t=0;t<a;t++)e.delete(i[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?(we(),ge(),be(e),e.forEach(Oe),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()}(),ee=new ResizeObserver(Ce),Me(document.body),Oe(document.body),fe()}function ge(){oe=document.querySelectorAll(`[${n}]`),F=oe.length>0}function be(e){F||G(e)}function ve(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ne&&document.querySelectorAll(ne).forEach((e=>{e.dataset.iframeSize=!0}))}function ze(e){({add(t){function n(){Be(e.eventName,e.eventType)}z[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=z[e];var n,o;delete z[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Se(e,t,n,o){return t!==e&&(e in n||(h(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in f&&y(`<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 Ee(){V=Se(V,C,xe,"height")}function je(){de=Se(de,M,Le,"width")}function Ce(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;R=()=>Be("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!m(e):return"";case m(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case m(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(m(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{R&&R(),R=void 0}),0)}const $e=e=>{if(e?.nodeType!==Node.ELEMENT_NODE)return!1;const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Oe=e=>e?.nodeType!==Node.ELEMENT_NODE?null:[...Ne(e)()].filter($e).forEach(Me),Pe=new WeakSet;function Me(e){Pe.has(e)||(ee.observe(e),Pe.add(e))}function Te(e){performance.mark(S);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=F?oe:w()?b:Ne(document)();let s=l.length;return l.forEach((t=>{F||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),T=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:F,logging:_}}),a}const Ae=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ne=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},ke={height:0,width:0};function Ie(e){function t(){return ke[i]=r,Re[i]=s,r}const n=w(),o=e===xe,i=o?"height":"width",r=e.boundingClientRect(),a=Math.ceil(r),l=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return s;case F:return e.taggedElement();case!n&&0===ke[i]&&0===Re[i]:return t();case le&&r===ke[i]&&s===Re[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==ke[i]&&s<=Re[i]:return t();case!o:return e.taggedElement();case!n&&r<ke[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const xe={enabled:()=>B,getOffset:()=>A,auto:()=>Ie(xe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>xe.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(...Ae(xe)),min:()=>Math.min(...Ae(xe)),grow:()=>xe.max(),lowestElement:()=>Te(i),taggedElement:()=>Te(i)},Le={enabled:()=>D,getOffset:()=>N,auto:()=>Ie(Le),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(...Ae(Le)),min:()=>Math.min(...Ae(Le)),rightMostElement:()=>Te(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Te(r)};function qe(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=ae);return r=void 0===n?xe[V]():n,a=void 0===o?Le[de]():o,B&&e(U,r)||D&&e(ce,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(B&&V in P||D&&de in P)&&Fe():(De(),U=r,ce=a,Ue(U,ce,e,i))}function Be(e,t,n,o,i){(k||e===a)&&(document.hidden||qe(e,0,n,o,i))}function De(){le||(le=!0,requestAnimationFrame((()=>{le=!1})))}function We(e){U=xe[V](),ce=Le[de](),Ue(U,ce,e)}function Fe(e){const t=V;V=C,De(),We("reset"),V=t}function Ue(e,t,n,o,i){Q<-1||(void 0!==i||(i=re),function(){const r=`${Y}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;te?window.parent.iframeParentListener($+r):ie.postMessage($+r,i)}())}function Ve(e){const t={init:function(){H=e.data,ie=e.source,ye(),W=!1,setTimeout((()=>{J=!1}),p)},reset(){J||We("resetPage")},resize(){Be(a)},moveToAnchor(){Z.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();pe?pe(JSON.parse(e)):Ue(0,0,"pageInfoStop")},parentInfo(){const e=o();he?he(Object.freeze(JSON.parse(e))):Ue(0,0,"parentInfoStop")},message(){const e=o();me(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,O)&&(!1!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Je(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?h("Already setup"):(window.iframeChildListener=e=>Ve({data:e,sameDomain:!0}),l(window,"message",Ve),l(window,"readystatechange",Je),Je())}(); |
/*! | ||
* @preserve | ||
* | ||
* @module iframe-resizer/child 5.2.5 (esm) - 2024-08-22 | ||
* @module iframe-resizer/child 5.2.6 (esm) - 2024-08-22 | ||
* | ||
@@ -20,2 +20,2 @@ * @license GPL-3.0 for non-commercial use only. | ||
const e="5.2.5",t=10,n="data-iframe-size",o="data-iframe-overflow",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;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u||"child"}]`,...e].join(" "),p=(...e)=>console?.info(`[iframe-resizer][${u}]`,...e),h=(...e)=>console?.warn(f(...e)),y=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(f)(...e)),g=e=>y(e);let b=[];const v=e=>{const t=e.side||i,n=e.onChange||d,r={root:document.documentElement,rootMargin:"0px",threshold:1},a=new WeakSet,l=new IntersectionObserver((e=>{e.forEach((e=>{e.target.toggleAttribute(o,(e=>0===e.boundingClientRect[t]||e.boundingClientRect[t]>e.rootBounds[t])(e))})),b=document.querySelectorAll(`[${o}]`),n()}),r);function s(e){e?.nodeType===Node.ELEMENT_NODE&&(a.has(e)||(l.observe(e),a.add(e)))}return e=>e.forEach(s)},w=()=>b.length>0,z=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",C=[],$=new WeakSet,O=e=>"object"==typeof e&&$.add(e),P=e=>Math.floor(e*z)/z;let M=null,T=null,A={};const N=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.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(N),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${P(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.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===E){const{duration:t}=performance.measure(j,S,E);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,$.has(T)||M===T||i&&o<=1||(r||O(T),M=T,p(`\n${n} position calculated from:`,T,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${P(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),O(document.documentElement),O(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",k):k()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(h("Custom height calculation function not defined"),xe.auto()),width:()=>(h("Custom width calculation function not defined"),Le.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,z={},j="checkVisibility"in window,C="auto",$="[iFrameSizer]",O=$.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,N,R,k=!0,I="",x=0,L="",q="",B=!0,D=!1,W=!0,F=!1,U=1,V=C,J=!0,H="",Z={},_=!1,Q=0,X=!1,Y="",G=d,K="child",ee=null,te=!1,ne="",oe=[],ie=window.parent,re="*",ae=0,le=!1,se="",ce=1,de=M,ue=window,me=()=>{h("onMessage function not defined")},fe=()=>{},pe=null,he=null;function ye(){var o,d,m;!function(){const e=e=>"true"===e,t=H.slice(O).split(":");Y=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),_=void 0===t[3]?_:e(t[3]),k=void 0===t[6]?k:e(t[6]),L=t[7],V=void 0===t[8]?V:t[8],I=t[9],q=t[10],ae=void 0===t[11]?ae:Number(t[11]),Z.enable=void 0!==t[12]&&e(t[12]),K=void 0===t[13]?K:t[13],de=void 0===t[14]?de:t[14],X=void 0===t[15]?X:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],se=t[20]||se,Q=void 0===t[21]?Q:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;me=e?.onMessage||me,fe=e?.onReady||fe,"number"==typeof e?.offset&&(y("<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</>."),B&&(A=e?.offset),D&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ne=e.sizeSelector),re=e?.targetOrigin||re,V=e?.heightCalculationMethod||V,de=e?.widthCalculationMethod||de}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}1!==Q&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),V=t(V,"height"),de=t(de,"width"))}(),u={id:Y,logging:_}.id,function(){try{te="iframeParentListener"in window.parent}catch(e){}}(),Q<0?g(`${c(Q+2)}${c(2)}`):se.codePointAt(0)>4||Q<2&&g(c(3)),se&&""!==se&&"false"!==se?se!==e&&y(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${se} - Child page: ${e}.\n`):y("<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"),Ee(),je(),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&&y("<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</>.")}(),ge(),B!==D&&(G=v({onChange:()=>Be("overflowChanged","Overflow updated"),side:B?i:r})),1!==Q&&(ue.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Be("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Ue(0,0,"autoResize",JSON.stringify(k)),k),close(){Ue(0,0,"close")},getId:()=>Y,getPageInfo(e){if("function"==typeof e)return pe=e,Ue(0,0,"pageInfo"),void y("<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");pe=null,Ue(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return he=e,Ue(0,0,"parentInfo"),()=>{he=null,Ue(0,0,"parentInfoStop")}},getParentProperties(e){y("<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){Z.findTarget(e)},reset(){Fe()},scrollBy(e,t){Ue(t,e,"scrollBy")},scrollTo(e,t){Ue(t,e,"scrollTo")},scrollToOffset(e,t){Ue(t,e,"scrollToOffset")},sendMessage(e,t){Ue(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){V=e,Ee()},setWidthCalculationMethod(e){de=e,je()},setTargetOrigin(e){re=e},resize(e,t){Be(a,`parentIFrame.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){y("<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)}}),ue.parentIFrame=ue.parentIframe),function(){function e(e){Ue(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===X&&(t("mouseenter"),t("mouseleave"))}(),Z=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);Ue(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?Ue(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&l(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),a(),s()}return Z.enable&&(1===Q?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),be(Ne(document)()),void 0===L&&(L=`${x}px`),ve("margin",(d="margin",(m=L).includes("-")&&(h(`Negative CSS value ignored for ${d}`),m=""),m)),ve("background",I),ve("padding",q),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)}(),we(),Be("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ue(0,0,"title",document.title),ze({method:o="add",eventType:"After Print",eventName:"afterprint"}),ze({method:o,eventType:"Before Print",eventName:"beforeprint"}),ze({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{const{length:n}=t;for(let o=0;o<n;o++){const{addedNodes:n,removedNodes:i}=t[o],r=n.length,a=i.length;if(r)for(let t=0;t<r;t++)e.add(n[t]);if(a)for(let t=0;t<a;t++)e.delete(i[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?(we(),ge(),be(e),e.forEach(Oe),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()}(),ee=new ResizeObserver(Ce),Me(document.body),Oe(document.body),fe()}function ge(){oe=document.querySelectorAll(`[${n}]`),F=oe.length>0}function be(e){F||G(e)}function ve(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ne&&document.querySelectorAll(ne).forEach((e=>{e.dataset.iframeSize=!0}))}function ze(e){({add(t){function n(){Be(e.eventName,e.eventType)}z[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=z[e];var n,o;delete z[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Se(e,t,n,o){return t!==e&&(e in n||(h(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in f&&y(`<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 Ee(){V=Se(V,C,xe,"height")}function je(){de=Se(de,M,Le,"width")}function Ce(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;R=()=>Be("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!m(e):return"";case m(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case m(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(m(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{R&&R(),R=void 0}),0)}const $e=e=>{if(e?.nodeType!==Node.ELEMENT_NODE)return!1;const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Oe=e=>e?.nodeType!==Node.ELEMENT_NODE?null:[...Ne(e)()].filter($e).forEach(Me),Pe=new WeakSet;function Me(e){Pe.has(e)||(ee.observe(e),Pe.add(e))}function Te(e){performance.mark(S);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=F?oe:w()?b:Ne(document)();let s=l.length;return l.forEach((t=>{F||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),T=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:F,logging:_}}),a}const Ae=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ne=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},ke={height:0,width:0};function Ie(e){function t(){return ke[i]=r,Re[i]=s,r}const n=w(),o=e===xe,i=o?"height":"width",r=e.boundingClientRect(),a=Math.ceil(r),l=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return s;case F:return e.taggedElement();case!n&&0===ke[i]&&0===Re[i]:return t();case le&&r===ke[i]&&s===Re[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==ke[i]&&s<=Re[i]:return t();case!o:return e.taggedElement();case!n&&r<ke[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const xe={enabled:()=>B,getOffset:()=>A,auto:()=>Ie(xe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>xe.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(...Ae(xe)),min:()=>Math.min(...Ae(xe)),grow:()=>xe.max(),lowestElement:()=>Te(i),taggedElement:()=>Te(i)},Le={enabled:()=>D,getOffset:()=>N,auto:()=>Ie(Le),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(...Ae(Le)),min:()=>Math.min(...Ae(Le)),rightMostElement:()=>Te(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Te(r)};function qe(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=ae);return r=void 0===n?xe[V]():n,a=void 0===o?Le[de]():o,B&&e(U,r)||D&&e(ce,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(B&&V in P||D&&de in P)&&Fe():(De(),U=r,ce=a,Ue(U,ce,e,i))}function Be(e,t,n,o,i){(k||e===a)&&(document.hidden||qe(e,0,n,o,i))}function De(){le||(le=!0,requestAnimationFrame((()=>{le=!1})))}function We(e){U=xe[V](),ce=Le[de](),Ue(U,ce,e)}function Fe(e){const t=V;V=C,De(),We("reset"),V=t}function Ue(e,t,n,o,i){Q<-1||(void 0!==i||(i=re),function(){const r=`${Y}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;te?window.parent.iframeParentListener($+r):ie.postMessage($+r,i)}())}function Ve(e){const t={init:function(){H=e.data,ie=e.source,ye(),W=!1,setTimeout((()=>{J=!1}),p)},reset(){J||We("resetPage")},resize(){Be(a)},moveToAnchor(){Z.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();pe?pe(JSON.parse(e)):Ue(0,0,"pageInfoStop")},parentInfo(){const e=o();he?he(Object.freeze(JSON.parse(e))):Ue(0,0,"parentInfoStop")},message(){const e=o();me(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,O)&&(!1!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Je(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?h("Already setup"):(window.iframeChildListener=e=>Ve({data:e,sameDomain:!0}),l(window,"message",Ve),l(window,"readystatechange",Je),Je())}(); | ||
const e="5.2.6",t=10,n="data-iframe-size",o="data-iframe-overflow",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;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u||"child"}]`,...e].join(" "),p=(...e)=>console?.info(`[iframe-resizer][${u}]`,...e),h=(...e)=>console?.warn(f(...e)),y=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(f)(...e)),g=e=>y(e);let b=[];const v=e=>{const t=e.side||i,n=e.onChange||d,r={root:document.documentElement,rootMargin:"0px",threshold:1},a=new WeakSet,l=new IntersectionObserver((e=>{e.forEach((e=>{e.target.toggleAttribute(o,(e=>0===e.boundingClientRect[t]||e.boundingClientRect[t]>e.rootBounds[t])(e))})),b=document.querySelectorAll(`[${o}]`),n()}),r);function s(e){e?.nodeType===Node.ELEMENT_NODE&&(a.has(e)||(l.observe(e),a.add(e)))}return e=>e.forEach(s)},w=()=>b.length>0,z=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",C=[],$=new WeakSet,O=e=>"object"==typeof e&&$.add(e),P=e=>Math.floor(e*z)/z;let M=null,T=null,A={};const N=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.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(N),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${P(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.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===E){const{duration:t}=performance.measure(j,S,E);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,$.has(T)||M===T||i&&o<=1||(r||O(T),M=T,p(`\n${n} position calculated from:`,T,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${P(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),O(document.documentElement),O(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",k):k()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(h("Custom height calculation function not defined"),xe.auto()),width:()=>(h("Custom width calculation function not defined"),Le.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,z={},j="checkVisibility"in window,C="auto",$="[iFrameSizer]",O=$.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,N,R,k=!0,I="",x=0,L="",q="",B=!0,D=!1,W=!0,F=!1,U=1,V=C,J=!0,H="",Z={},_=!1,Q=0,X=!1,Y="",G=d,K="child",ee=null,te=!1,ne="",oe=[],ie=window.parent,re="*",ae=0,le=!1,se="",ce=1,de=M,ue=window,me=()=>{h("onMessage function not defined")},fe=()=>{},pe=null,he=null;function ye(){var o,d,m;!function(){const e=e=>"true"===e,t=H.slice(O).split(":");Y=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),_=void 0===t[3]?_:e(t[3]),k=void 0===t[6]?k:e(t[6]),L=t[7],V=void 0===t[8]?V:t[8],I=t[9],q=t[10],ae=void 0===t[11]?ae:Number(t[11]),Z.enable=void 0!==t[12]&&e(t[12]),K=void 0===t[13]?K:t[13],de=void 0===t[14]?de:t[14],X=void 0===t[15]?X:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],se=t[20]||se,Q=void 0===t[21]?Q:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;me=e?.onMessage||me,fe=e?.onReady||fe,"number"==typeof e?.offset&&(y("<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</>."),B&&(A=e?.offset),D&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ne=e.sizeSelector),re=e?.targetOrigin||re,V=e?.heightCalculationMethod||V,de=e?.widthCalculationMethod||de}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}1!==Q&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),V=t(V,"height"),de=t(de,"width"))}(),u={id:Y,logging:_}.id,function(){try{te="iframeParentListener"in window.parent}catch(e){}}(),Q<0?g(`${c(Q+2)}${c(2)}`):se.codePointAt(0)>4||Q<2&&g(c(3)),se&&""!==se&&"false"!==se?se!==e&&y(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${se} - Child page: ${e}.\n`):y("<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"),Ee(),je(),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&&y("<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</>.")}(),ge(),B!==D&&(G=v({onChange:()=>Be("overflowChanged","Overflow updated"),side:B?i:r})),1!==Q&&(ue.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Be("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Ue(0,0,"autoResize",JSON.stringify(k)),k),close(){Ue(0,0,"close")},getId:()=>Y,getPageInfo(e){if("function"==typeof e)return pe=e,Ue(0,0,"pageInfo"),void y("<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");pe=null,Ue(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return he=e,Ue(0,0,"parentInfo"),()=>{he=null,Ue(0,0,"parentInfoStop")}},getParentProperties(e){y("<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){Z.findTarget(e)},reset(){Fe()},scrollBy(e,t){Ue(t,e,"scrollBy")},scrollTo(e,t){Ue(t,e,"scrollTo")},scrollToOffset(e,t){Ue(t,e,"scrollToOffset")},sendMessage(e,t){Ue(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){V=e,Ee()},setWidthCalculationMethod(e){de=e,je()},setTargetOrigin(e){re=e},resize(e,t){Be(a,`parentIFrame.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){y("<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)}}),ue.parentIFrame=ue.parentIframe),function(){function e(e){Ue(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===X&&(t("mouseenter"),t("mouseleave"))}(),Z=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);Ue(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?Ue(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&l(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),a(),s()}return Z.enable&&(1===Q?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),be(Ne(document)()),void 0===L&&(L=`${x}px`),ve("margin",(d="margin",(m=L).includes("-")&&(h(`Negative CSS value ignored for ${d}`),m=""),m)),ve("background",I),ve("padding",q),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)}(),we(),Be("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ue(0,0,"title",document.title),ze({method:o="add",eventType:"After Print",eventName:"afterprint"}),ze({method:o,eventType:"Before Print",eventName:"beforeprint"}),ze({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{const{length:n}=t;for(let o=0;o<n;o++){const{addedNodes:n,removedNodes:i}=t[o],r=n.length,a=i.length;if(r)for(let t=0;t<r;t++)e.add(n[t]);if(a)for(let t=0;t<a;t++)e.delete(i[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?(we(),ge(),be(e),e.forEach(Oe),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()}(),ee=new ResizeObserver(Ce),Me(document.body),Oe(document.body),fe()}function ge(){oe=document.querySelectorAll(`[${n}]`),F=oe.length>0}function be(e){F||G(e)}function ve(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ne&&document.querySelectorAll(ne).forEach((e=>{e.dataset.iframeSize=!0}))}function ze(e){({add(t){function n(){Be(e.eventName,e.eventType)}z[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=z[e];var n,o;delete z[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Se(e,t,n,o){return t!==e&&(e in n||(h(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in f&&y(`<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 Ee(){V=Se(V,C,xe,"height")}function je(){de=Se(de,M,Le,"width")}function Ce(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;R=()=>Be("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!m(e):return"";case m(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case m(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(m(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{R&&R(),R=void 0}),0)}const $e=e=>{if(e?.nodeType!==Node.ELEMENT_NODE)return!1;const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Oe=e=>e?.nodeType!==Node.ELEMENT_NODE?null:[...Ne(e)()].filter($e).forEach(Me),Pe=new WeakSet;function Me(e){Pe.has(e)||(ee.observe(e),Pe.add(e))}function Te(e){performance.mark(S);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=F?oe:w()?b:Ne(document)();let s=l.length;return l.forEach((t=>{F||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),T=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:F,logging:_}}),a}const Ae=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ne=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},ke={height:0,width:0};function Ie(e){function t(){return ke[i]=r,Re[i]=s,r}const n=w(),o=e===xe,i=o?"height":"width",r=e.boundingClientRect(),a=Math.ceil(r),l=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return s;case F:return e.taggedElement();case!n&&0===ke[i]&&0===Re[i]:return t();case le&&r===ke[i]&&s===Re[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==ke[i]&&s<=Re[i]:return t();case!o:return e.taggedElement();case!n&&r<ke[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const xe={enabled:()=>B,getOffset:()=>A,auto:()=>Ie(xe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>xe.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(...Ae(xe)),min:()=>Math.min(...Ae(xe)),grow:()=>xe.max(),lowestElement:()=>Te(i),taggedElement:()=>Te(i)},Le={enabled:()=>D,getOffset:()=>N,auto:()=>Ie(Le),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(...Ae(Le)),min:()=>Math.min(...Ae(Le)),rightMostElement:()=>Te(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Te(r)};function qe(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=ae);return r=void 0===n?xe[V]():n,a=void 0===o?Le[de]():o,B&&e(U,r)||D&&e(ce,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(B&&V in P||D&&de in P)&&Fe():(De(),U=r,ce=a,Ue(U,ce,e,i))}function Be(e,t,n,o,i){(k||e===a)&&(document.hidden||qe(e,0,n,o,i))}function De(){le||(le=!0,requestAnimationFrame((()=>{le=!1})))}function We(e){U=xe[V](),ce=Le[de](),Ue(U,ce,e)}function Fe(e){const t=V;V=C,De(),We("reset"),V=t}function Ue(e,t,n,o,i){Q<-1||(void 0!==i||(i=re),function(){const r=`${Y}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;te?window.parent.iframeParentListener($+r):ie.postMessage($+r,i)}())}function Ve(e){const t={init:function(){H=e.data,ie=e.source,ye(),W=!1,setTimeout((()=>{J=!1}),p)},reset(){J||We("resetPage")},resize(){Be(a)},moveToAnchor(){Z.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();pe?pe(JSON.parse(e)):Ue(0,0,"pageInfoStop")},parentInfo(){const e=o();he?he(Object.freeze(JSON.parse(e))):Ue(0,0,"parentInfoStop")},message(){const e=o();me(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,O)&&(!1!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Je(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?h("Already setup"):(window.iframeChildListener=e=>Ve({data:e,sameDomain:!0}),l(window,"message",Ve),l(window,"readystatechange",Je),Je())}(); |
/*! | ||
* @preserve | ||
* | ||
* @module iframe-resizer/child 5.2.5 (umd) - 2024-08-22 | ||
* @module iframe-resizer/child 5.2.6 (umd) - 2024-08-22 | ||
* | ||
@@ -20,2 +20,2 @@ * @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.2.5",t=10,n="data-iframe-size",o="data-iframe-overflow",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;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u||"child"}]`,...e].join(" "),p=(...e)=>console?.info(`[iframe-resizer][${u}]`,...e),h=(...e)=>console?.warn(f(...e)),y=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(f)(...e)),g=e=>y(e);let b=[];const v=e=>{const t=e.side||i,n=e.onChange||d,r={root:document.documentElement,rootMargin:"0px",threshold:1},a=new WeakSet,l=new IntersectionObserver((e=>{e.forEach((e=>{e.target.toggleAttribute(o,(e=>0===e.boundingClientRect[t]||e.boundingClientRect[t]>e.rootBounds[t])(e))})),b=document.querySelectorAll(`[${o}]`),n()}),r);function s(e){e?.nodeType===Node.ELEMENT_NODE&&(a.has(e)||(l.observe(e),a.add(e)))}return e=>e.forEach(s)},w=()=>b.length>0,z=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",C=[],$=new WeakSet,O=e=>"object"==typeof e&&$.add(e),P=e=>Math.floor(e*z)/z;let M=null,T=null,A={};const N=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.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(N),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${P(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.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===E){const{duration:t}=performance.measure(j,S,E);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,$.has(T)||M===T||i&&o<=1||(r||O(T),M=T,p(`\n${n} position calculated from:`,T,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${P(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),O(document.documentElement),O(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",k):k()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(h("Custom height calculation function not defined"),xe.auto()),width:()=>(h("Custom width calculation function not defined"),Le.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,z={},j="checkVisibility"in window,C="auto",$="[iFrameSizer]",O=$.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,N,R,k=!0,I="",x=0,L="",q="",B=!0,D=!1,W=!0,F=!1,U=1,V=C,J=!0,H="",Z={},_=!1,Q=0,X=!1,Y="",G=d,K="child",ee=null,te=!1,ne="",oe=[],ie=window.parent,re="*",ae=0,le=!1,se="",ce=1,de=M,ue=window,me=()=>{h("onMessage function not defined")},fe=()=>{},pe=null,he=null;function ye(){var o,d,m;!function(){const e=e=>"true"===e,t=H.slice(O).split(":");Y=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),_=void 0===t[3]?_:e(t[3]),k=void 0===t[6]?k:e(t[6]),L=t[7],V=void 0===t[8]?V:t[8],I=t[9],q=t[10],ae=void 0===t[11]?ae:Number(t[11]),Z.enable=void 0!==t[12]&&e(t[12]),K=void 0===t[13]?K:t[13],de=void 0===t[14]?de:t[14],X=void 0===t[15]?X:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],se=t[20]||se,Q=void 0===t[21]?Q:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;me=e?.onMessage||me,fe=e?.onReady||fe,"number"==typeof e?.offset&&(y("<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</>."),B&&(A=e?.offset),D&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ne=e.sizeSelector),re=e?.targetOrigin||re,V=e?.heightCalculationMethod||V,de=e?.widthCalculationMethod||de}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}1!==Q&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),V=t(V,"height"),de=t(de,"width"))}(),u={id:Y,logging:_}.id,function(){try{te="iframeParentListener"in window.parent}catch(e){}}(),Q<0?g(`${c(Q+2)}${c(2)}`):se.codePointAt(0)>4||Q<2&&g(c(3)),se&&""!==se&&"false"!==se?se!==e&&y(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${se} - Child page: ${e}.\n`):y("<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"),Ee(),je(),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&&y("<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</>.")}(),ge(),B!==D&&(G=v({onChange:()=>Be("overflowChanged","Overflow updated"),side:B?i:r})),1!==Q&&(ue.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Be("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Ue(0,0,"autoResize",JSON.stringify(k)),k),close(){Ue(0,0,"close")},getId:()=>Y,getPageInfo(e){if("function"==typeof e)return pe=e,Ue(0,0,"pageInfo"),void y("<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");pe=null,Ue(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return he=e,Ue(0,0,"parentInfo"),()=>{he=null,Ue(0,0,"parentInfoStop")}},getParentProperties(e){y("<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){Z.findTarget(e)},reset(){Fe()},scrollBy(e,t){Ue(t,e,"scrollBy")},scrollTo(e,t){Ue(t,e,"scrollTo")},scrollToOffset(e,t){Ue(t,e,"scrollToOffset")},sendMessage(e,t){Ue(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){V=e,Ee()},setWidthCalculationMethod(e){de=e,je()},setTargetOrigin(e){re=e},resize(e,t){Be(a,`parentIFrame.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){y("<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)}}),ue.parentIFrame=ue.parentIframe),function(){function e(e){Ue(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===X&&(t("mouseenter"),t("mouseleave"))}(),Z=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);Ue(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?Ue(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&l(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),a(),s()}return Z.enable&&(1===Q?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),be(Ne(document)()),void 0===L&&(L=`${x}px`),ve("margin",(d="margin",(m=L).includes("-")&&(h(`Negative CSS value ignored for ${d}`),m=""),m)),ve("background",I),ve("padding",q),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)}(),we(),Be("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ue(0,0,"title",document.title),ze({method:o="add",eventType:"After Print",eventName:"afterprint"}),ze({method:o,eventType:"Before Print",eventName:"beforeprint"}),ze({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{const{length:n}=t;for(let o=0;o<n;o++){const{addedNodes:n,removedNodes:i}=t[o],r=n.length,a=i.length;if(r)for(let t=0;t<r;t++)e.add(n[t]);if(a)for(let t=0;t<a;t++)e.delete(i[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?(we(),ge(),be(e),e.forEach(Oe),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()}(),ee=new ResizeObserver(Ce),Me(document.body),Oe(document.body),fe()}function ge(){oe=document.querySelectorAll(`[${n}]`),F=oe.length>0}function be(e){F||G(e)}function ve(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ne&&document.querySelectorAll(ne).forEach((e=>{e.dataset.iframeSize=!0}))}function ze(e){({add(t){function n(){Be(e.eventName,e.eventType)}z[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=z[e];var n,o;delete z[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Se(e,t,n,o){return t!==e&&(e in n||(h(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in f&&y(`<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 Ee(){V=Se(V,C,xe,"height")}function je(){de=Se(de,M,Le,"width")}function Ce(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;R=()=>Be("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!m(e):return"";case m(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case m(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(m(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{R&&R(),R=void 0}),0)}const $e=e=>{if(e?.nodeType!==Node.ELEMENT_NODE)return!1;const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Oe=e=>e?.nodeType!==Node.ELEMENT_NODE?null:[...Ne(e)()].filter($e).forEach(Me),Pe=new WeakSet;function Me(e){Pe.has(e)||(ee.observe(e),Pe.add(e))}function Te(e){performance.mark(S);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=F?oe:w()?b:Ne(document)();let s=l.length;return l.forEach((t=>{F||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),T=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:F,logging:_}}),a}const Ae=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ne=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},ke={height:0,width:0};function Ie(e){function t(){return ke[i]=r,Re[i]=s,r}const n=w(),o=e===xe,i=o?"height":"width",r=e.boundingClientRect(),a=Math.ceil(r),l=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return s;case F:return e.taggedElement();case!n&&0===ke[i]&&0===Re[i]:return t();case le&&r===ke[i]&&s===Re[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==ke[i]&&s<=Re[i]:return t();case!o:return e.taggedElement();case!n&&r<ke[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const xe={enabled:()=>B,getOffset:()=>A,auto:()=>Ie(xe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>xe.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(...Ae(xe)),min:()=>Math.min(...Ae(xe)),grow:()=>xe.max(),lowestElement:()=>Te(i),taggedElement:()=>Te(i)},Le={enabled:()=>D,getOffset:()=>N,auto:()=>Ie(Le),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(...Ae(Le)),min:()=>Math.min(...Ae(Le)),rightMostElement:()=>Te(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Te(r)};function qe(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=ae);return r=void 0===n?xe[V]():n,a=void 0===o?Le[de]():o,B&&e(U,r)||D&&e(ce,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(B&&V in P||D&&de in P)&&Fe():(De(),U=r,ce=a,Ue(U,ce,e,i))}function Be(e,t,n,o,i){(k||e===a)&&(document.hidden||qe(e,0,n,o,i))}function De(){le||(le=!0,requestAnimationFrame((()=>{le=!1})))}function We(e){U=xe[V](),ce=Le[de](),Ue(U,ce,e)}function Fe(e){const t=V;V=C,De(),We("reset"),V=t}function Ue(e,t,n,o,i){Q<-1||(void 0!==i||(i=re),function(){const r=`${Y}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;te?window.parent.iframeParentListener($+r):ie.postMessage($+r,i)}())}function Ve(e){const t={init:function(){H=e.data,ie=e.source,ye(),W=!1,setTimeout((()=>{J=!1}),p)},reset(){J||We("resetPage")},resize(){Be(a)},moveToAnchor(){Z.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();pe?pe(JSON.parse(e)):Ue(0,0,"pageInfoStop")},parentInfo(){const e=o();he?he(Object.freeze(JSON.parse(e))):Ue(0,0,"parentInfoStop")},message(){const e=o();me(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,O)&&(!1!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Je(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?h("Already setup"):(window.iframeChildListener=e=>Ve({data:e,sameDomain:!0}),l(window,"message",Ve),l(window,"readystatechange",Je),Je())}()})); | ||
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e="5.2.6",t=10,n="data-iframe-size",o="data-iframe-overflow",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;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u||"child"}]`,...e].join(" "),p=(...e)=>console?.info(`[iframe-resizer][${u}]`,...e),h=(...e)=>console?.warn(f(...e)),y=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(f)(...e)),g=e=>y(e);let b=[];const v=e=>{const t=e.side||i,n=e.onChange||d,r={root:document.documentElement,rootMargin:"0px",threshold:1},a=new WeakSet,l=new IntersectionObserver((e=>{e.forEach((e=>{e.target.toggleAttribute(o,(e=>0===e.boundingClientRect[t]||e.boundingClientRect[t]>e.rootBounds[t])(e))})),b=document.querySelectorAll(`[${o}]`),n()}),r);function s(e){e?.nodeType===Node.ELEMENT_NODE&&(a.has(e)||(l.observe(e),a.add(e)))}return e=>e.forEach(s)},w=()=>b.length>0,z=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",C=[],$=new WeakSet,O=e=>"object"==typeof e&&$.add(e),P=e=>Math.floor(e*z)/z;let M=null,T=null,A={};const N=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.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(N),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${P(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.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===E){const{duration:t}=performance.measure(j,S,E);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,$.has(T)||M===T||i&&o<=1||(r||O(T),M=T,p(`\n${n} position calculated from:`,T,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${P(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:["mark"]}),O(document.documentElement),O(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",k):k()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(h("Custom height calculation function not defined"),xe.auto()),width:()=>(h("Custom width calculation function not defined"),Le.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,z={},j="checkVisibility"in window,C="auto",$="[iFrameSizer]",O=$.length,P={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,N,R,k=!0,I="",x=0,L="",q="",B=!0,D=!1,W=!0,F=!1,U=1,V=C,J=!0,H="",Z={},_=!1,Q=0,X=!1,Y="",G=d,K="child",ee=null,te=!1,ne="",oe=[],ie=window.parent,re="*",ae=0,le=!1,se="",ce=1,de=M,ue=window,me=()=>{h("onMessage function not defined")},fe=()=>{},pe=null,he=null;function ye(){var o,d,m;!function(){const e=e=>"true"===e,t=H.slice(O).split(":");Y=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),_=void 0===t[3]?_:e(t[3]),k=void 0===t[6]?k:e(t[6]),L=t[7],V=void 0===t[8]?V:t[8],I=t[9],q=t[10],ae=void 0===t[11]?ae:Number(t[11]),Z.enable=void 0!==t[12]&&e(t[12]),K=void 0===t[13]?K:t[13],de=void 0===t[14]?de:t[14],X=void 0===t[15]?X:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],se=t[20]||se,Q=void 0===t[21]?Q:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;me=e?.onMessage||me,fe=e?.onReady||fe,"number"==typeof e?.offset&&(y("<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</>."),B&&(A=e?.offset),D&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ne=e.sizeSelector),re=e?.targetOrigin||re,V=e?.heightCalculationMethod||V,de=e?.widthCalculationMethod||de}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}1!==Q&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),V=t(V,"height"),de=t(de,"width"))}(),u={id:Y,logging:_}.id,function(){try{te="iframeParentListener"in window.parent}catch(e){}}(),Q<0?g(`${c(Q+2)}${c(2)}`):se.codePointAt(0)>4||Q<2&&g(c(3)),se&&""!==se&&"false"!==se?se!==e&&y(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${se} - Child page: ${e}.\n`):y("<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"),Ee(),je(),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&&y("<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</>.")}(),ge(),B!==D&&(G=v({onChange:()=>Be("overflowChanged","Overflow updated"),side:B?i:r})),1!==Q&&(ue.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Be("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Ue(0,0,"autoResize",JSON.stringify(k)),k),close(){Ue(0,0,"close")},getId:()=>Y,getPageInfo(e){if("function"==typeof e)return pe=e,Ue(0,0,"pageInfo"),void y("<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");pe=null,Ue(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return he=e,Ue(0,0,"parentInfo"),()=>{he=null,Ue(0,0,"parentInfoStop")}},getParentProperties(e){y("<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){Z.findTarget(e)},reset(){Fe()},scrollBy(e,t){Ue(t,e,"scrollBy")},scrollTo(e,t){Ue(t,e,"scrollTo")},scrollToOffset(e,t){Ue(t,e,"scrollToOffset")},sendMessage(e,t){Ue(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){V=e,Ee()},setWidthCalculationMethod(e){de=e,je()},setTargetOrigin(e){re=e},resize(e,t){Be(a,`parentIFrame.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){y("<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)}}),ue.parentIFrame=ue.parentIframe),function(){function e(e){Ue(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===X&&(t("mouseenter"),t("mouseleave"))}(),Z=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);Ue(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?Ue(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&l(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),a(),s()}return Z.enable&&(1===Q?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),be(Ne(document)()),void 0===L&&(L=`${x}px`),ve("margin",(d="margin",(m=L).includes("-")&&(h(`Negative CSS value ignored for ${d}`),m=""),m)),ve("background",I),ve("padding",q),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)}(),we(),Be("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ue(0,0,"title",document.title),ze({method:o="add",eventType:"After Print",eventName:"afterprint"}),ze({method:o,eventType:"Before Print",eventName:"beforeprint"}),ze({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{const{length:n}=t;for(let o=0;o<n;o++){const{addedNodes:n,removedNodes:i}=t[o],r=n.length,a=i.length;if(r)for(let t=0;t<r;t++)e.add(n[t]);if(a)for(let t=0;t<a;t++)e.delete(i[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?(we(),ge(),be(e),e.forEach(Oe),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()}(),ee=new ResizeObserver(Ce),Me(document.body),Oe(document.body),fe()}function ge(){oe=document.querySelectorAll(`[${n}]`),F=oe.length>0}function be(e){F||G(e)}function ve(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ne&&document.querySelectorAll(ne).forEach((e=>{e.dataset.iframeSize=!0}))}function ze(e){({add(t){function n(){Be(e.eventName,e.eventType)}z[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=z[e];var n,o;delete z[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Se(e,t,n,o){return t!==e&&(e in n||(h(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in f&&y(`<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 Ee(){V=Se(V,C,xe,"height")}function je(){de=Se(de,M,Le,"width")}function Ce(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;R=()=>Be("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!m(e):return"";case m(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case m(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(m(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{R&&R(),R=void 0}),0)}const $e=e=>{if(e?.nodeType!==Node.ELEMENT_NODE)return!1;const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Oe=e=>e?.nodeType!==Node.ELEMENT_NODE?null:[...Ne(e)()].filter($e).forEach(Me),Pe=new WeakSet;function Me(e){Pe.has(e)||(ee.observe(e),Pe.add(e))}function Te(e){performance.mark(S);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=F?oe:w()?b:Ne(document)();let s=l.length;return l.forEach((t=>{F||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),T=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:F,logging:_}}),a}const Ae=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ne=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},ke={height:0,width:0};function Ie(e){function t(){return ke[i]=r,Re[i]=s,r}const n=w(),o=e===xe,i=o?"height":"width",r=e.boundingClientRect(),a=Math.ceil(r),l=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return s;case F:return e.taggedElement();case!n&&0===ke[i]&&0===Re[i]:return t();case le&&r===ke[i]&&s===Re[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==ke[i]&&s<=Re[i]:return t();case!o:return e.taggedElement();case!n&&r<ke[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const xe={enabled:()=>B,getOffset:()=>A,auto:()=>Ie(xe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>xe.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(...Ae(xe)),min:()=>Math.min(...Ae(xe)),grow:()=>xe.max(),lowestElement:()=>Te(i),taggedElement:()=>Te(i)},Le={enabled:()=>D,getOffset:()=>N,auto:()=>Ie(Le),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(...Ae(Le)),min:()=>Math.min(...Ae(Le)),rightMostElement:()=>Te(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Te(r)};function qe(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=ae);return r=void 0===n?xe[V]():n,a=void 0===o?Le[de]():o,B&&e(U,r)||D&&e(ce,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(B&&V in P||D&&de in P)&&Fe():(De(),U=r,ce=a,Ue(U,ce,e,i))}function Be(e,t,n,o,i){(k||e===a)&&(document.hidden||qe(e,0,n,o,i))}function De(){le||(le=!0,requestAnimationFrame((()=>{le=!1})))}function We(e){U=xe[V](),ce=Le[de](),Ue(U,ce,e)}function Fe(e){const t=V;V=C,De(),We("reset"),V=t}function Ue(e,t,n,o,i){Q<-1||(void 0!==i||(i=re),function(){const r=`${Y}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;te?window.parent.iframeParentListener($+r):ie.postMessage($+r,i)}())}function Ve(e){const t={init:function(){H=e.data,ie=e.source,ye(),W=!1,setTimeout((()=>{J=!1}),p)},reset(){J||We("resetPage")},resize(){Be(a)},moveToAnchor(){Z.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();pe?pe(JSON.parse(e)):Ue(0,0,"pageInfoStop")},parentInfo(){const e=o();he?he(Object.freeze(JSON.parse(e))):Ue(0,0,"parentInfoStop")},message(){const e=o();me(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,O)&&(!1!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Je(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?h("Already setup"):(window.iframeChildListener=e=>Ve({data:e,sameDomain:!0}),l(window,"message",Ve),l(window,"readystatechange",Je),Je())}()})); |
{ | ||
"name": "@iframe-resizer/child", | ||
"version": "5.2.5", | ||
"version": "5.2.6", | ||
"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.2.5 2024-08-22 - 16:41:12.233Z_ | ||
_iframe-resizer version 5.2.6 2024-08-22 - 18:01:31.031Z_ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package