@iframe-resizer/child
Advanced tools
Comparing version 5.2.0 to 5.2.1
/*! | ||
* @preserve | ||
* | ||
* @module iframe-resizer/child 5.2.0 (cjs) - 2024-07-16 | ||
* @module iframe-resizer/child 5.2.1 (cjs) - 2024-07-16 | ||
* | ||
@@ -20,2 +20,2 @@ * @license GPL-3.0 for non-commercial use only. | ||
"use strict";const e="5.2.0",t=10,n="data-iframe-size",o="data-iframe-overflow",i="bottom",r="right",a=(e,t,n,o)=>e.addEventListener(t,n,o||!1),l=["<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 s=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(l[e]),c=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},d=e=>e;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u}]`,...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 v=[];const b=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))})),v=document.querySelectorAll(`[${o}]`),n()}),r);return e=>e.forEach((e=>{a.has(e)||(l.observe(e),a.add(e))}))},z=()=>v.length>0,w=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",P=[],$=new WeakSet,C=e=>"object"==typeof e&&$.add(e),O=e=>Math.floor(e*w)/w;let M=null,A=null,T={};const I=setInterval((()=>{if(P.length<10)return;if(T.hasTags&&T.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);e<=4||(clearInterval(I),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${O(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${T.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;T=e,$.has(A)||M===A||i&&o<=1||(r||C(A),M=A,p(`\n${n} position calculated from:\n`,A,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${O(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:PerformanceObserver.supportedEntryTypes}),C(document.documentElement),C(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},l={height:()=>(h("Custom height calculation function not defined"),De.auto()),width:()=>(h("Custom width calculation function not defined"),Fe.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,w={},j="checkVisibility"in window,P="auto",$="[iFrameSizer]",C=$.length,O={max:1,min:1,bodyScroll:1,documentElementScroll:1},M=["body"],T="scroll";let I,R,k=!0,N="",x=0,B="",q=null,L="",W=!0,U=!1,D=null,F=!0,V=!1,J=1,H=P,Z=!0,Q="",X={},Y=!1,G=0,K=!1,_="",ee=d,te="child",ne=null,oe=!1,ie="",re=window.parent,ae="*",le=0,se=!1,ce="",de=1,ue=T,me=window,fe=()=>{h("onMessage function not defined")},pe=()=>{},he=null,ye=null;function ge(){var o,d;!function(){const e=e=>"true"===e,t=Q.slice(C).split(":");_=t[0],x=void 0===t[1]?x:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),k=void 0===t[6]?k:e(t[6]),B=t[7],H=void 0===t[8]?H:t[8],N=t[9],L=t[10],le=void 0===t[11]?le:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],ue=void 0===t[14]?ue:t[14],K=void 0===t[15]?K:e(t[15]),I=void 0===t[16]?I:Number(t[16]),R=void 0===t[17]?R:Number(t[17]),W=void 0===t[18]?W:e(t[18]),t[19],ce=t[20]||ce,G=void 0===t[21]?G:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;fe=e?.onMessage||fe,pe=e?.onReady||pe,"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</>."),W&&(I=e?.offset),U&&(R=e?.offset)),"number"==typeof e?.offsetSize&&(W&&(I=e?.offsetSize),U&&(R=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),ae=e?.targetOrigin||ae,H=e?.heightCalculationMethod||H,ue=e?.widthCalculationMethod||ue}function t(e,t){return"function"==typeof e&&(l[t]=e,e="custom"),e}1!==G&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),H=t(H,"height"),ue=t(ue,"width"))}(),u={id:_,logging:Y}.id,function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),G<0?g(`${s(G+2)}${s(2)}`):ce.codePointAt(0)>4||G<2&&g(s(3)),ce&&""!==ce&&"false"!==ce?ce!==e&&y(`<rb>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ce} - 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"),Pe(),$e(),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</>.")}(),W!==U&&(ee=b({onChange:c(ve),side:W?i:r})),be(),1!==G&&(me.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Ce()):!1===e&&!0===k&&(k=!1,Ee("remove"),ne?.disconnect(),q?.disconnect()),Xe(0,0,"autoResize",JSON.stringify(k)),k),close(){Xe(0,0,"close")},getId:()=>_,getPageInfo(e){if("function"==typeof e)return he=e,Xe(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");he=null,Xe(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return ye=e,Xe(0,0,"parentInfo"),()=>{ye=null,Xe(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){X.findTarget(e)},reset(){Qe()},scrollBy(e,t){Xe(t,e,"scrollBy")},scrollTo(e,t){Xe(t,e,"scrollTo")},scrollToOffset(e,t){Xe(t,e,"scrollToOffset")},sendMessage(e,t){Xe(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Pe()},setWidthCalculationMethod(e){ue=e,$e()},setTargetOrigin(e){ae=e},resize(e,t){Je("size",`parentIFrame.size(${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)}}),me.parentIFrame=me.parentIframe),function(){function e(e){Xe(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){a(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=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);Xe(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?Xe(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")&&a(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){a(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),l(),s()}return X.enable&&(1===G?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),void 0===B&&(B=`${x}px`),ze("margin",(o="margin",(d=B).includes("-")&&(h(`Negative CSS value ignored for ${o}`),d=""),d)),ze("background",N),ze("padding",L),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()}const ve=()=>{Je("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Xe(0,0,"title",document.title),Ce(),pe()};function be(){const e=document.querySelectorAll(`[${n}]`);V=e.length>0,D=V?e:qe(document)(),V?setTimeout(ve):ee(D)}function ze(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ie&&document.querySelectorAll(ie).forEach((e=>{e.dataset.iframeSize=!0}))}function Se(e){({add(t){function n(){Je(e.eventName,e.eventType)}w[t]=n,a(window,t,n,{passive:!0})},remove(e){const t=w[e];var n,o;delete w[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ee(e){Se({method:e,eventType:"After Print",eventName:"afterprint"}),Se({method:e,eventType:"Before Print",eventName:"beforeprint"}),Se({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function je(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 Pe(){H=je(H,P,De,"height")}function $e(){ue=je(ue,T,Fe,"width")}function Ce(){!0===k&&(Ee("add"),q=function(){function e(e){e.forEach(Ne),we(),be()}function t(){const t=new window.MutationObserver(e),n=document.querySelector("body"),o={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return t.observe(n,o),t}const n=t();return{disconnect(){n.disconnect()}}}(),ne=new ResizeObserver(Me),ke(window.document))}let Oe;function Me(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Oe=()=>Je("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((()=>{Oe&&Oe(),Oe=void 0}),0)}const Ae=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Te=()=>[...qe(document)()].filter(Ae),Ie=new WeakSet;function Re(e){e&&(Ie.has(e)||(ne.observe(e),Ie.add(e)))}function ke(e){[...Te(),...M.flatMap((t=>e.querySelector(t)))].forEach(Re)}function Ne(e){"childList"===e.type&&ke(e.target)}function xe(e){const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=!V&&z()?v:D;let s=l.length;return l.forEach((t=>{V||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),A=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:V,logging:Y}}),a}const Be=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],qe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},We={height:0,width:0};function Ue(e){function t(){return We[i]=r,Le[i]=s,r}const n=z(),o=e===De,i=o?"height":"width",r=e.documentElementBoundingClientRect(),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 V:return e.taggedElement();case!n&&0===We[i]&&0===Le[i]:return t();case se&&r===We[i]&&s===Le[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==We[i]&&s<=Le[i]:return t();case!o:return e.taggedElement();case!n&&r<We[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const De={enabled:()=>W,getOffset:()=>I,auto:()=>Ue(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>l.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...Be(De)),min:()=>Math.min(...Be(De)),grow:()=>De.max(),lowestElement:()=>xe(i),taggedElement:()=>xe(i)},Fe={enabled:()=>U,getOffset:()=>R,auto:()=>Ue(Fe),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>l.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...Be(Fe)),min:()=>Math.min(...Be(Fe)),rightMostElement:()=>xe(r),scroll:()=>Math.max(Fe.bodyScroll(),Fe.documentElementScroll()),taggedElement:()=>xe(r)};function Ve(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=le);return r=void 0===n?De[H]():n,a=void 0===o?Fe[ue]():o,W&&e(J,r)||U&&e(de,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(W&&H in O||U&&ue in O)&&Qe():(He(),J=r,de=a,Xe(J,de,e,i))}function Je(e,t,n,o,i){document.hidden||Ve(e,0,n,o,i)}function He(){se||(se=!0,requestAnimationFrame((()=>{se=!1})))}function Ze(e){J=De[H](),de=Fe[ue](),Xe(J,de,e)}function Qe(e){const t=H;H=P,He(),Ze("reset"),H=t}function Xe(e,t,n,o,i){G<-1||(void 0!==i||(i=ae),function(){const r=`${_}:${e+(I||0)}:${t+(R||0)}:${n}${void 0===o?"":`:${o}`}`;oe?window.parent.iframeParentListener($+r):re.postMessage($+r,i)}())}function Ye(e){const t={init:function(){Q=e.data,re=e.source,ge(),F=!1,setTimeout((()=>{Z=!1}),p)},reset(){Z||Ze("resetPage")},resize(){Je("resizeParent")},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();he?he(JSON.parse(e)):Xe(0,0,"pageInfoStop")},parentInfo(){const e=o();ye?ye(Object.freeze(JSON.parse(e))):Xe(0,0,"parentInfoStop")},message(){const e=o();fe(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==F?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Ge(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}window.iframeChildListener=e=>Ye({data:e,sameDomain:!0}),a(window,"message",Ye),a(window,"readystatechange",Ge),Ge()}(); | ||
"use strict";const e="5.2.1",t=10,n="data-iframe-size",o="data-iframe-overflow",i="bottom",r="right",a=(e,t,n,o)=>e.addEventListener(t,n,o||!1),l=["<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 s=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(l[e]),c=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},d=e=>e;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u}]`,...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 v=[];const b=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))})),v=document.querySelectorAll(`[${o}]`),n()}),r);return e=>e.forEach((e=>{a.has(e)||(l.observe(e),a.add(e))}))},z=()=>v.length>0,w=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",P=[],$=new WeakSet,C=e=>"object"==typeof e&&$.add(e),O=e=>Math.floor(e*w)/w;let M=null,A=null,T={};const I=setInterval((()=>{if(P.length<10)return;if(T.hasTags&&T.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);e<=4||(clearInterval(I),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${O(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${T.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;T=e,$.has(A)||M===A||i&&o<=1||(r||C(A),M=A,p(`\n${n} position calculated from:\n`,A,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${O(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:PerformanceObserver.supportedEntryTypes}),C(document.documentElement),C(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},l={height:()=>(h("Custom height calculation function not defined"),De.auto()),width:()=>(h("Custom width calculation function not defined"),Fe.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,w={},j="checkVisibility"in window,P="auto",$="[iFrameSizer]",C=$.length,O={max:1,min:1,bodyScroll:1,documentElementScroll:1},M=["body"],T="scroll";let I,R,k=!0,N="",x=0,B="",q=null,L="",W=!0,U=!1,D=null,F=!0,V=!1,J=1,H=P,Z=!0,Q="",X={},Y=!1,G=0,K=!1,_="",ee=d,te="child",ne=null,oe=!1,ie="",re=window.parent,ae="*",le=0,se=!1,ce="",de=1,ue=T,me=window,fe=()=>{h("onMessage function not defined")},pe=()=>{},he=null,ye=null;function ge(){var o,d;!function(){const e=e=>"true"===e,t=Q.slice(C).split(":");_=t[0],x=void 0===t[1]?x:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),k=void 0===t[6]?k:e(t[6]),B=t[7],H=void 0===t[8]?H:t[8],N=t[9],L=t[10],le=void 0===t[11]?le:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],ue=void 0===t[14]?ue:t[14],K=void 0===t[15]?K:e(t[15]),I=void 0===t[16]?I:Number(t[16]),R=void 0===t[17]?R:Number(t[17]),W=void 0===t[18]?W:e(t[18]),t[19],ce=t[20]||ce,G=void 0===t[21]?G:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;fe=e?.onMessage||fe,pe=e?.onReady||pe,"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</>."),W&&(I=e?.offset),U&&(R=e?.offset)),"number"==typeof e?.offsetSize&&(W&&(I=e?.offsetSize),U&&(R=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),ae=e?.targetOrigin||ae,H=e?.heightCalculationMethod||H,ue=e?.widthCalculationMethod||ue}function t(e,t){return"function"==typeof e&&(l[t]=e,e="custom"),e}1!==G&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),H=t(H,"height"),ue=t(ue,"width"))}(),u={id:_,logging:Y}.id,function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),G<0?g(`${s(G+2)}${s(2)}`):ce.codePointAt(0)>4||G<2&&g(s(3)),ce&&""!==ce&&"false"!==ce?ce!==e&&y(`<rb>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ce} - 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"),Pe(),$e(),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</>.")}(),W!==U&&(ee=b({onChange:c(ve),side:W?i:r})),be(),1!==G&&(me.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Ce()):!1===e&&!0===k&&(k=!1,Ee("remove"),ne?.disconnect(),q?.disconnect()),Xe(0,0,"autoResize",JSON.stringify(k)),k),close(){Xe(0,0,"close")},getId:()=>_,getPageInfo(e){if("function"==typeof e)return he=e,Xe(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");he=null,Xe(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return ye=e,Xe(0,0,"parentInfo"),()=>{ye=null,Xe(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){X.findTarget(e)},reset(){Qe()},scrollBy(e,t){Xe(t,e,"scrollBy")},scrollTo(e,t){Xe(t,e,"scrollTo")},scrollToOffset(e,t){Xe(t,e,"scrollToOffset")},sendMessage(e,t){Xe(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Pe()},setWidthCalculationMethod(e){ue=e,$e()},setTargetOrigin(e){ae=e},resize(e,t){Je("size",`parentIFrame.size(${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)}}),me.parentIFrame=me.parentIframe),function(){function e(e){Xe(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){a(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=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);Xe(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?Xe(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")&&a(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){a(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),l(),s()}return X.enable&&(1===G?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),void 0===B&&(B=`${x}px`),ze("margin",(o="margin",(d=B).includes("-")&&(h(`Negative CSS value ignored for ${o}`),d=""),d)),ze("background",N),ze("padding",L),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()}const ve=()=>{Je("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Xe(0,0,"title",document.title),Ce(),pe()};function be(){const e=document.querySelectorAll(`[${n}]`);V=e.length>0,D=V?e:qe(document)(),V?setTimeout(ve):ee(D)}function ze(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ie&&document.querySelectorAll(ie).forEach((e=>{e.dataset.iframeSize=!0}))}function Se(e){({add(t){function n(){Je(e.eventName,e.eventType)}w[t]=n,a(window,t,n,{passive:!0})},remove(e){const t=w[e];var n,o;delete w[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ee(e){Se({method:e,eventType:"After Print",eventName:"afterprint"}),Se({method:e,eventType:"Before Print",eventName:"beforeprint"}),Se({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function je(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 Pe(){H=je(H,P,De,"height")}function $e(){ue=je(ue,T,Fe,"width")}function Ce(){!0===k&&(Ee("add"),q=function(){function e(e){e.forEach(Ne),we(),be()}function t(){const t=new window.MutationObserver(e),n=document.querySelector("body"),o={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return t.observe(n,o),t}const n=t();return{disconnect(){n.disconnect()}}}(),ne=new ResizeObserver(Me),ke(window.document))}let Oe;function Me(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Oe=()=>Je("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((()=>{Oe&&Oe(),Oe=void 0}),0)}const Ae=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Te=()=>[...qe(document)()].filter(Ae),Ie=new WeakSet;function Re(e){e&&(Ie.has(e)||(ne.observe(e),Ie.add(e)))}function ke(e){[...Te(),...M.flatMap((t=>e.querySelector(t)))].forEach(Re)}function Ne(e){"childList"===e.type&&ke(e.target)}function xe(e){const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=!V&&z()?v:D;let s=l.length;return l.forEach((t=>{V||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),A=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:V,logging:Y}}),a}const Be=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],qe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},We={height:0,width:0};function Ue(e){function t(){return We[i]=r,Le[i]=s,r}const n=z(),o=e===De,i=o?"height":"width",r=e.documentElementBoundingClientRect(),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 V:return e.taggedElement();case!n&&0===We[i]&&0===Le[i]:return t();case se&&r===We[i]&&s===Le[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==We[i]&&s<=Le[i]:return t();case!o:return e.taggedElement();case!n&&r<We[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const De={enabled:()=>W,getOffset:()=>I,auto:()=>Ue(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>l.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...Be(De)),min:()=>Math.min(...Be(De)),grow:()=>De.max(),lowestElement:()=>xe(i),taggedElement:()=>xe(i)},Fe={enabled:()=>U,getOffset:()=>R,auto:()=>Ue(Fe),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>l.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...Be(Fe)),min:()=>Math.min(...Be(Fe)),rightMostElement:()=>xe(r),scroll:()=>Math.max(Fe.bodyScroll(),Fe.documentElementScroll()),taggedElement:()=>xe(r)};function Ve(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=le);return r=void 0===n?De[H]():n,a=void 0===o?Fe[ue]():o,W&&e(J,r)||U&&e(de,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(W&&H in O||U&&ue in O)&&Qe():(He(),J=r,de=a,Xe(J,de,e,i))}function Je(e,t,n,o,i){document.hidden||Ve(e,0,n,o,i)}function He(){se||(se=!0,requestAnimationFrame((()=>{se=!1})))}function Ze(e){J=De[H](),de=Fe[ue](),Xe(J,de,e)}function Qe(e){const t=H;H=P,He(),Ze("reset"),H=t}function Xe(e,t,n,o,i){G<-1||(void 0!==i||(i=ae),function(){const r=`${_}:${e+(I||0)}:${t+(R||0)}:${n}${void 0===o?"":`:${o}`}`;oe?window.parent.iframeParentListener($+r):re.postMessage($+r,i)}())}function Ye(e){const t={init:function(){Q=e.data,re=e.source,ge(),F=!1,setTimeout((()=>{Z=!1}),p)},reset(){Z||Ze("resetPage")},resize(){Je("resizeParent")},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();he?he(JSON.parse(e)):Xe(0,0,"pageInfoStop")},parentInfo(){const e=o();ye?ye(Object.freeze(JSON.parse(e))):Xe(0,0,"parentInfoStop")},message(){const e=o();fe(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==F?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Ge(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}window.iframeChildListener=e=>Ye({data:e,sameDomain:!0}),a(window,"message",Ye),a(window,"readystatechange",Ge),Ge()}(); |
/*! | ||
* @preserve | ||
* | ||
* @module iframe-resizer/child 5.2.0 (esm) - 2024-07-16 | ||
* @module iframe-resizer/child 5.2.1 (esm) - 2024-07-16 | ||
* | ||
@@ -20,2 +20,2 @@ * @license GPL-3.0 for non-commercial use only. | ||
const e="5.2.0",t=10,n="data-iframe-size",o="data-iframe-overflow",i="bottom",r="right",a=(e,t,n,o)=>e.addEventListener(t,n,o||!1),l=["<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 s=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(l[e]),c=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},d=e=>e;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u}]`,...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 v=[];const b=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))})),v=document.querySelectorAll(`[${o}]`),n()}),r);return e=>e.forEach((e=>{a.has(e)||(l.observe(e),a.add(e))}))},z=()=>v.length>0,w=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",P=[],$=new WeakSet,C=e=>"object"==typeof e&&$.add(e),O=e=>Math.floor(e*w)/w;let M=null,A=null,T={};const I=setInterval((()=>{if(P.length<10)return;if(T.hasTags&&T.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);e<=4||(clearInterval(I),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${O(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${T.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;T=e,$.has(A)||M===A||i&&o<=1||(r||C(A),M=A,p(`\n${n} position calculated from:\n`,A,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${O(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:PerformanceObserver.supportedEntryTypes}),C(document.documentElement),C(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},l={height:()=>(h("Custom height calculation function not defined"),De.auto()),width:()=>(h("Custom width calculation function not defined"),Fe.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,w={},j="checkVisibility"in window,P="auto",$="[iFrameSizer]",C=$.length,O={max:1,min:1,bodyScroll:1,documentElementScroll:1},M=["body"],T="scroll";let I,R,k=!0,N="",x=0,B="",q=null,L="",W=!0,U=!1,D=null,F=!0,V=!1,J=1,H=P,Z=!0,Q="",X={},Y=!1,G=0,K=!1,_="",ee=d,te="child",ne=null,oe=!1,ie="",re=window.parent,ae="*",le=0,se=!1,ce="",de=1,ue=T,me=window,fe=()=>{h("onMessage function not defined")},pe=()=>{},he=null,ye=null;function ge(){var o,d;!function(){const e=e=>"true"===e,t=Q.slice(C).split(":");_=t[0],x=void 0===t[1]?x:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),k=void 0===t[6]?k:e(t[6]),B=t[7],H=void 0===t[8]?H:t[8],N=t[9],L=t[10],le=void 0===t[11]?le:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],ue=void 0===t[14]?ue:t[14],K=void 0===t[15]?K:e(t[15]),I=void 0===t[16]?I:Number(t[16]),R=void 0===t[17]?R:Number(t[17]),W=void 0===t[18]?W:e(t[18]),t[19],ce=t[20]||ce,G=void 0===t[21]?G:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;fe=e?.onMessage||fe,pe=e?.onReady||pe,"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</>."),W&&(I=e?.offset),U&&(R=e?.offset)),"number"==typeof e?.offsetSize&&(W&&(I=e?.offsetSize),U&&(R=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),ae=e?.targetOrigin||ae,H=e?.heightCalculationMethod||H,ue=e?.widthCalculationMethod||ue}function t(e,t){return"function"==typeof e&&(l[t]=e,e="custom"),e}1!==G&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),H=t(H,"height"),ue=t(ue,"width"))}(),u={id:_,logging:Y}.id,function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),G<0?g(`${s(G+2)}${s(2)}`):ce.codePointAt(0)>4||G<2&&g(s(3)),ce&&""!==ce&&"false"!==ce?ce!==e&&y(`<rb>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ce} - 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"),Pe(),$e(),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</>.")}(),W!==U&&(ee=b({onChange:c(ve),side:W?i:r})),be(),1!==G&&(me.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Ce()):!1===e&&!0===k&&(k=!1,Ee("remove"),ne?.disconnect(),q?.disconnect()),Xe(0,0,"autoResize",JSON.stringify(k)),k),close(){Xe(0,0,"close")},getId:()=>_,getPageInfo(e){if("function"==typeof e)return he=e,Xe(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");he=null,Xe(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return ye=e,Xe(0,0,"parentInfo"),()=>{ye=null,Xe(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){X.findTarget(e)},reset(){Qe()},scrollBy(e,t){Xe(t,e,"scrollBy")},scrollTo(e,t){Xe(t,e,"scrollTo")},scrollToOffset(e,t){Xe(t,e,"scrollToOffset")},sendMessage(e,t){Xe(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Pe()},setWidthCalculationMethod(e){ue=e,$e()},setTargetOrigin(e){ae=e},resize(e,t){Je("size",`parentIFrame.size(${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)}}),me.parentIFrame=me.parentIframe),function(){function e(e){Xe(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){a(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=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);Xe(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?Xe(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")&&a(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){a(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),l(),s()}return X.enable&&(1===G?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),void 0===B&&(B=`${x}px`),ze("margin",(o="margin",(d=B).includes("-")&&(h(`Negative CSS value ignored for ${o}`),d=""),d)),ze("background",N),ze("padding",L),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()}const ve=()=>{Je("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Xe(0,0,"title",document.title),Ce(),pe()};function be(){const e=document.querySelectorAll(`[${n}]`);V=e.length>0,D=V?e:qe(document)(),V?setTimeout(ve):ee(D)}function ze(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ie&&document.querySelectorAll(ie).forEach((e=>{e.dataset.iframeSize=!0}))}function Se(e){({add(t){function n(){Je(e.eventName,e.eventType)}w[t]=n,a(window,t,n,{passive:!0})},remove(e){const t=w[e];var n,o;delete w[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ee(e){Se({method:e,eventType:"After Print",eventName:"afterprint"}),Se({method:e,eventType:"Before Print",eventName:"beforeprint"}),Se({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function je(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 Pe(){H=je(H,P,De,"height")}function $e(){ue=je(ue,T,Fe,"width")}function Ce(){!0===k&&(Ee("add"),q=function(){function e(e){e.forEach(Ne),we(),be()}function t(){const t=new window.MutationObserver(e),n=document.querySelector("body"),o={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return t.observe(n,o),t}const n=t();return{disconnect(){n.disconnect()}}}(),ne=new ResizeObserver(Me),ke(window.document))}let Oe;function Me(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Oe=()=>Je("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((()=>{Oe&&Oe(),Oe=void 0}),0)}const Ae=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Te=()=>[...qe(document)()].filter(Ae),Ie=new WeakSet;function Re(e){e&&(Ie.has(e)||(ne.observe(e),Ie.add(e)))}function ke(e){[...Te(),...M.flatMap((t=>e.querySelector(t)))].forEach(Re)}function Ne(e){"childList"===e.type&&ke(e.target)}function xe(e){const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=!V&&z()?v:D;let s=l.length;return l.forEach((t=>{V||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),A=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:V,logging:Y}}),a}const Be=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],qe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},We={height:0,width:0};function Ue(e){function t(){return We[i]=r,Le[i]=s,r}const n=z(),o=e===De,i=o?"height":"width",r=e.documentElementBoundingClientRect(),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 V:return e.taggedElement();case!n&&0===We[i]&&0===Le[i]:return t();case se&&r===We[i]&&s===Le[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==We[i]&&s<=Le[i]:return t();case!o:return e.taggedElement();case!n&&r<We[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const De={enabled:()=>W,getOffset:()=>I,auto:()=>Ue(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>l.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...Be(De)),min:()=>Math.min(...Be(De)),grow:()=>De.max(),lowestElement:()=>xe(i),taggedElement:()=>xe(i)},Fe={enabled:()=>U,getOffset:()=>R,auto:()=>Ue(Fe),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>l.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...Be(Fe)),min:()=>Math.min(...Be(Fe)),rightMostElement:()=>xe(r),scroll:()=>Math.max(Fe.bodyScroll(),Fe.documentElementScroll()),taggedElement:()=>xe(r)};function Ve(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=le);return r=void 0===n?De[H]():n,a=void 0===o?Fe[ue]():o,W&&e(J,r)||U&&e(de,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(W&&H in O||U&&ue in O)&&Qe():(He(),J=r,de=a,Xe(J,de,e,i))}function Je(e,t,n,o,i){document.hidden||Ve(e,0,n,o,i)}function He(){se||(se=!0,requestAnimationFrame((()=>{se=!1})))}function Ze(e){J=De[H](),de=Fe[ue](),Xe(J,de,e)}function Qe(e){const t=H;H=P,He(),Ze("reset"),H=t}function Xe(e,t,n,o,i){G<-1||(void 0!==i||(i=ae),function(){const r=`${_}:${e+(I||0)}:${t+(R||0)}:${n}${void 0===o?"":`:${o}`}`;oe?window.parent.iframeParentListener($+r):re.postMessage($+r,i)}())}function Ye(e){const t={init:function(){Q=e.data,re=e.source,ge(),F=!1,setTimeout((()=>{Z=!1}),p)},reset(){Z||Ze("resetPage")},resize(){Je("resizeParent")},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();he?he(JSON.parse(e)):Xe(0,0,"pageInfoStop")},parentInfo(){const e=o();ye?ye(Object.freeze(JSON.parse(e))):Xe(0,0,"parentInfoStop")},message(){const e=o();fe(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==F?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Ge(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}window.iframeChildListener=e=>Ye({data:e,sameDomain:!0}),a(window,"message",Ye),a(window,"readystatechange",Ge),Ge()}(); | ||
const e="5.2.1",t=10,n="data-iframe-size",o="data-iframe-overflow",i="bottom",r="right",a=(e,t,n,o)=>e.addEventListener(t,n,o||!1),l=["<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 s=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(l[e]),c=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},d=e=>e;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u}]`,...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 v=[];const b=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))})),v=document.querySelectorAll(`[${o}]`),n()}),r);return e=>e.forEach((e=>{a.has(e)||(l.observe(e),a.add(e))}))},z=()=>v.length>0,w=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",P=[],$=new WeakSet,C=e=>"object"==typeof e&&$.add(e),O=e=>Math.floor(e*w)/w;let M=null,A=null,T={};const I=setInterval((()=>{if(P.length<10)return;if(T.hasTags&&T.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);e<=4||(clearInterval(I),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${O(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${T.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;T=e,$.has(A)||M===A||i&&o<=1||(r||C(A),M=A,p(`\n${n} position calculated from:\n`,A,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${O(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:PerformanceObserver.supportedEntryTypes}),C(document.documentElement),C(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},l={height:()=>(h("Custom height calculation function not defined"),De.auto()),width:()=>(h("Custom width calculation function not defined"),Fe.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,w={},j="checkVisibility"in window,P="auto",$="[iFrameSizer]",C=$.length,O={max:1,min:1,bodyScroll:1,documentElementScroll:1},M=["body"],T="scroll";let I,R,k=!0,N="",x=0,B="",q=null,L="",W=!0,U=!1,D=null,F=!0,V=!1,J=1,H=P,Z=!0,Q="",X={},Y=!1,G=0,K=!1,_="",ee=d,te="child",ne=null,oe=!1,ie="",re=window.parent,ae="*",le=0,se=!1,ce="",de=1,ue=T,me=window,fe=()=>{h("onMessage function not defined")},pe=()=>{},he=null,ye=null;function ge(){var o,d;!function(){const e=e=>"true"===e,t=Q.slice(C).split(":");_=t[0],x=void 0===t[1]?x:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),k=void 0===t[6]?k:e(t[6]),B=t[7],H=void 0===t[8]?H:t[8],N=t[9],L=t[10],le=void 0===t[11]?le:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],ue=void 0===t[14]?ue:t[14],K=void 0===t[15]?K:e(t[15]),I=void 0===t[16]?I:Number(t[16]),R=void 0===t[17]?R:Number(t[17]),W=void 0===t[18]?W:e(t[18]),t[19],ce=t[20]||ce,G=void 0===t[21]?G:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;fe=e?.onMessage||fe,pe=e?.onReady||pe,"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</>."),W&&(I=e?.offset),U&&(R=e?.offset)),"number"==typeof e?.offsetSize&&(W&&(I=e?.offsetSize),U&&(R=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),ae=e?.targetOrigin||ae,H=e?.heightCalculationMethod||H,ue=e?.widthCalculationMethod||ue}function t(e,t){return"function"==typeof e&&(l[t]=e,e="custom"),e}1!==G&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),H=t(H,"height"),ue=t(ue,"width"))}(),u={id:_,logging:Y}.id,function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),G<0?g(`${s(G+2)}${s(2)}`):ce.codePointAt(0)>4||G<2&&g(s(3)),ce&&""!==ce&&"false"!==ce?ce!==e&&y(`<rb>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ce} - 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"),Pe(),$e(),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</>.")}(),W!==U&&(ee=b({onChange:c(ve),side:W?i:r})),be(),1!==G&&(me.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Ce()):!1===e&&!0===k&&(k=!1,Ee("remove"),ne?.disconnect(),q?.disconnect()),Xe(0,0,"autoResize",JSON.stringify(k)),k),close(){Xe(0,0,"close")},getId:()=>_,getPageInfo(e){if("function"==typeof e)return he=e,Xe(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");he=null,Xe(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return ye=e,Xe(0,0,"parentInfo"),()=>{ye=null,Xe(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){X.findTarget(e)},reset(){Qe()},scrollBy(e,t){Xe(t,e,"scrollBy")},scrollTo(e,t){Xe(t,e,"scrollTo")},scrollToOffset(e,t){Xe(t,e,"scrollToOffset")},sendMessage(e,t){Xe(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Pe()},setWidthCalculationMethod(e){ue=e,$e()},setTargetOrigin(e){ae=e},resize(e,t){Je("size",`parentIFrame.size(${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)}}),me.parentIFrame=me.parentIframe),function(){function e(e){Xe(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){a(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=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);Xe(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?Xe(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")&&a(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){a(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),l(),s()}return X.enable&&(1===G?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),void 0===B&&(B=`${x}px`),ze("margin",(o="margin",(d=B).includes("-")&&(h(`Negative CSS value ignored for ${o}`),d=""),d)),ze("background",N),ze("padding",L),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()}const ve=()=>{Je("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Xe(0,0,"title",document.title),Ce(),pe()};function be(){const e=document.querySelectorAll(`[${n}]`);V=e.length>0,D=V?e:qe(document)(),V?setTimeout(ve):ee(D)}function ze(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ie&&document.querySelectorAll(ie).forEach((e=>{e.dataset.iframeSize=!0}))}function Se(e){({add(t){function n(){Je(e.eventName,e.eventType)}w[t]=n,a(window,t,n,{passive:!0})},remove(e){const t=w[e];var n,o;delete w[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ee(e){Se({method:e,eventType:"After Print",eventName:"afterprint"}),Se({method:e,eventType:"Before Print",eventName:"beforeprint"}),Se({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function je(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 Pe(){H=je(H,P,De,"height")}function $e(){ue=je(ue,T,Fe,"width")}function Ce(){!0===k&&(Ee("add"),q=function(){function e(e){e.forEach(Ne),we(),be()}function t(){const t=new window.MutationObserver(e),n=document.querySelector("body"),o={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return t.observe(n,o),t}const n=t();return{disconnect(){n.disconnect()}}}(),ne=new ResizeObserver(Me),ke(window.document))}let Oe;function Me(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Oe=()=>Je("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((()=>{Oe&&Oe(),Oe=void 0}),0)}const Ae=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Te=()=>[...qe(document)()].filter(Ae),Ie=new WeakSet;function Re(e){e&&(Ie.has(e)||(ne.observe(e),Ie.add(e)))}function ke(e){[...Te(),...M.flatMap((t=>e.querySelector(t)))].forEach(Re)}function Ne(e){"childList"===e.type&&ke(e.target)}function xe(e){const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=!V&&z()?v:D;let s=l.length;return l.forEach((t=>{V||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),A=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:V,logging:Y}}),a}const Be=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],qe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},We={height:0,width:0};function Ue(e){function t(){return We[i]=r,Le[i]=s,r}const n=z(),o=e===De,i=o?"height":"width",r=e.documentElementBoundingClientRect(),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 V:return e.taggedElement();case!n&&0===We[i]&&0===Le[i]:return t();case se&&r===We[i]&&s===Le[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==We[i]&&s<=Le[i]:return t();case!o:return e.taggedElement();case!n&&r<We[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const De={enabled:()=>W,getOffset:()=>I,auto:()=>Ue(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>l.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...Be(De)),min:()=>Math.min(...Be(De)),grow:()=>De.max(),lowestElement:()=>xe(i),taggedElement:()=>xe(i)},Fe={enabled:()=>U,getOffset:()=>R,auto:()=>Ue(Fe),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>l.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...Be(Fe)),min:()=>Math.min(...Be(Fe)),rightMostElement:()=>xe(r),scroll:()=>Math.max(Fe.bodyScroll(),Fe.documentElementScroll()),taggedElement:()=>xe(r)};function Ve(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=le);return r=void 0===n?De[H]():n,a=void 0===o?Fe[ue]():o,W&&e(J,r)||U&&e(de,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(W&&H in O||U&&ue in O)&&Qe():(He(),J=r,de=a,Xe(J,de,e,i))}function Je(e,t,n,o,i){document.hidden||Ve(e,0,n,o,i)}function He(){se||(se=!0,requestAnimationFrame((()=>{se=!1})))}function Ze(e){J=De[H](),de=Fe[ue](),Xe(J,de,e)}function Qe(e){const t=H;H=P,He(),Ze("reset"),H=t}function Xe(e,t,n,o,i){G<-1||(void 0!==i||(i=ae),function(){const r=`${_}:${e+(I||0)}:${t+(R||0)}:${n}${void 0===o?"":`:${o}`}`;oe?window.parent.iframeParentListener($+r):re.postMessage($+r,i)}())}function Ye(e){const t={init:function(){Q=e.data,re=e.source,ge(),F=!1,setTimeout((()=>{Z=!1}),p)},reset(){Z||Ze("resetPage")},resize(){Je("resizeParent")},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();he?he(JSON.parse(e)):Xe(0,0,"pageInfoStop")},parentInfo(){const e=o();ye?ye(Object.freeze(JSON.parse(e))):Xe(0,0,"parentInfoStop")},message(){const e=o();fe(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==F?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Ge(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}window.iframeChildListener=e=>Ye({data:e,sameDomain:!0}),a(window,"message",Ye),a(window,"readystatechange",Ge),Ge()}(); |
/*! | ||
* @preserve | ||
* | ||
* @module iframe-resizer/child 5.2.0 (umd) - 2024-07-16 | ||
* @module iframe-resizer/child 5.2.1 (umd) - 2024-07-16 | ||
* | ||
@@ -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.0",t=10,n="data-iframe-size",o="data-iframe-overflow",i="bottom",r="right",a=(e,t,n,o)=>e.addEventListener(t,n,o||!1),l=["<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 s=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(l[e]),c=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},d=e=>e;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u}]`,...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 v=[];const b=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))})),v=document.querySelectorAll(`[${o}]`),n()}),r);return e=>e.forEach((e=>{a.has(e)||(l.observe(e),a.add(e))}))},z=()=>v.length>0,w=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",P=[],$=new WeakSet,C=e=>"object"==typeof e&&$.add(e),O=e=>Math.floor(e*w)/w;let M=null,A=null,T={};const I=setInterval((()=>{if(P.length<10)return;if(T.hasTags&&T.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);e<=4||(clearInterval(I),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${O(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${T.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;T=e,$.has(A)||M===A||i&&o<=1||(r||C(A),M=A,p(`\n${n} position calculated from:\n`,A,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${O(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:PerformanceObserver.supportedEntryTypes}),C(document.documentElement),C(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},l={height:()=>(h("Custom height calculation function not defined"),De.auto()),width:()=>(h("Custom width calculation function not defined"),Fe.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,w={},j="checkVisibility"in window,P="auto",$="[iFrameSizer]",C=$.length,O={max:1,min:1,bodyScroll:1,documentElementScroll:1},M=["body"],T="scroll";let I,R,k=!0,N="",x=0,B="",q=null,L="",W=!0,U=!1,D=null,F=!0,V=!1,J=1,H=P,Z=!0,Q="",X={},Y=!1,G=0,K=!1,_="",ee=d,te="child",ne=null,oe=!1,ie="",re=window.parent,ae="*",le=0,se=!1,ce="",de=1,ue=T,me=window,fe=()=>{h("onMessage function not defined")},pe=()=>{},he=null,ye=null;function ge(){var o,d;!function(){const e=e=>"true"===e,t=Q.slice(C).split(":");_=t[0],x=void 0===t[1]?x:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),k=void 0===t[6]?k:e(t[6]),B=t[7],H=void 0===t[8]?H:t[8],N=t[9],L=t[10],le=void 0===t[11]?le:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],ue=void 0===t[14]?ue:t[14],K=void 0===t[15]?K:e(t[15]),I=void 0===t[16]?I:Number(t[16]),R=void 0===t[17]?R:Number(t[17]),W=void 0===t[18]?W:e(t[18]),t[19],ce=t[20]||ce,G=void 0===t[21]?G:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;fe=e?.onMessage||fe,pe=e?.onReady||pe,"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</>."),W&&(I=e?.offset),U&&(R=e?.offset)),"number"==typeof e?.offsetSize&&(W&&(I=e?.offsetSize),U&&(R=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),ae=e?.targetOrigin||ae,H=e?.heightCalculationMethod||H,ue=e?.widthCalculationMethod||ue}function t(e,t){return"function"==typeof e&&(l[t]=e,e="custom"),e}1!==G&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),H=t(H,"height"),ue=t(ue,"width"))}(),u={id:_,logging:Y}.id,function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),G<0?g(`${s(G+2)}${s(2)}`):ce.codePointAt(0)>4||G<2&&g(s(3)),ce&&""!==ce&&"false"!==ce?ce!==e&&y(`<rb>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ce} - 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"),Pe(),$e(),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</>.")}(),W!==U&&(ee=b({onChange:c(ve),side:W?i:r})),be(),1!==G&&(me.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Ce()):!1===e&&!0===k&&(k=!1,Ee("remove"),ne?.disconnect(),q?.disconnect()),Xe(0,0,"autoResize",JSON.stringify(k)),k),close(){Xe(0,0,"close")},getId:()=>_,getPageInfo(e){if("function"==typeof e)return he=e,Xe(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");he=null,Xe(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return ye=e,Xe(0,0,"parentInfo"),()=>{ye=null,Xe(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){X.findTarget(e)},reset(){Qe()},scrollBy(e,t){Xe(t,e,"scrollBy")},scrollTo(e,t){Xe(t,e,"scrollTo")},scrollToOffset(e,t){Xe(t,e,"scrollToOffset")},sendMessage(e,t){Xe(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Pe()},setWidthCalculationMethod(e){ue=e,$e()},setTargetOrigin(e){ae=e},resize(e,t){Je("size",`parentIFrame.size(${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)}}),me.parentIFrame=me.parentIframe),function(){function e(e){Xe(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){a(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=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);Xe(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?Xe(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")&&a(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){a(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),l(),s()}return X.enable&&(1===G?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),void 0===B&&(B=`${x}px`),ze("margin",(o="margin",(d=B).includes("-")&&(h(`Negative CSS value ignored for ${o}`),d=""),d)),ze("background",N),ze("padding",L),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()}const ve=()=>{Je("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Xe(0,0,"title",document.title),Ce(),pe()};function be(){const e=document.querySelectorAll(`[${n}]`);V=e.length>0,D=V?e:qe(document)(),V?setTimeout(ve):ee(D)}function ze(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ie&&document.querySelectorAll(ie).forEach((e=>{e.dataset.iframeSize=!0}))}function Se(e){({add(t){function n(){Je(e.eventName,e.eventType)}w[t]=n,a(window,t,n,{passive:!0})},remove(e){const t=w[e];var n,o;delete w[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ee(e){Se({method:e,eventType:"After Print",eventName:"afterprint"}),Se({method:e,eventType:"Before Print",eventName:"beforeprint"}),Se({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function je(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 Pe(){H=je(H,P,De,"height")}function $e(){ue=je(ue,T,Fe,"width")}function Ce(){!0===k&&(Ee("add"),q=function(){function e(e){e.forEach(Ne),we(),be()}function t(){const t=new window.MutationObserver(e),n=document.querySelector("body"),o={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return t.observe(n,o),t}const n=t();return{disconnect(){n.disconnect()}}}(),ne=new ResizeObserver(Me),ke(window.document))}let Oe;function Me(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Oe=()=>Je("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((()=>{Oe&&Oe(),Oe=void 0}),0)}const Ae=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Te=()=>[...qe(document)()].filter(Ae),Ie=new WeakSet;function Re(e){e&&(Ie.has(e)||(ne.observe(e),Ie.add(e)))}function ke(e){[...Te(),...M.flatMap((t=>e.querySelector(t)))].forEach(Re)}function Ne(e){"childList"===e.type&&ke(e.target)}function xe(e){const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=!V&&z()?v:D;let s=l.length;return l.forEach((t=>{V||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),A=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:V,logging:Y}}),a}const Be=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],qe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},We={height:0,width:0};function Ue(e){function t(){return We[i]=r,Le[i]=s,r}const n=z(),o=e===De,i=o?"height":"width",r=e.documentElementBoundingClientRect(),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 V:return e.taggedElement();case!n&&0===We[i]&&0===Le[i]:return t();case se&&r===We[i]&&s===Le[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==We[i]&&s<=Le[i]:return t();case!o:return e.taggedElement();case!n&&r<We[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const De={enabled:()=>W,getOffset:()=>I,auto:()=>Ue(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>l.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...Be(De)),min:()=>Math.min(...Be(De)),grow:()=>De.max(),lowestElement:()=>xe(i),taggedElement:()=>xe(i)},Fe={enabled:()=>U,getOffset:()=>R,auto:()=>Ue(Fe),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>l.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...Be(Fe)),min:()=>Math.min(...Be(Fe)),rightMostElement:()=>xe(r),scroll:()=>Math.max(Fe.bodyScroll(),Fe.documentElementScroll()),taggedElement:()=>xe(r)};function Ve(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=le);return r=void 0===n?De[H]():n,a=void 0===o?Fe[ue]():o,W&&e(J,r)||U&&e(de,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(W&&H in O||U&&ue in O)&&Qe():(He(),J=r,de=a,Xe(J,de,e,i))}function Je(e,t,n,o,i){document.hidden||Ve(e,0,n,o,i)}function He(){se||(se=!0,requestAnimationFrame((()=>{se=!1})))}function Ze(e){J=De[H](),de=Fe[ue](),Xe(J,de,e)}function Qe(e){const t=H;H=P,He(),Ze("reset"),H=t}function Xe(e,t,n,o,i){G<-1||(void 0!==i||(i=ae),function(){const r=`${_}:${e+(I||0)}:${t+(R||0)}:${n}${void 0===o?"":`:${o}`}`;oe?window.parent.iframeParentListener($+r):re.postMessage($+r,i)}())}function Ye(e){const t={init:function(){Q=e.data,re=e.source,ge(),F=!1,setTimeout((()=>{Z=!1}),p)},reset(){Z||Ze("resetPage")},resize(){Je("resizeParent")},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();he?he(JSON.parse(e)):Xe(0,0,"pageInfoStop")},parentInfo(){const e=o();ye?ye(Object.freeze(JSON.parse(e))):Xe(0,0,"parentInfoStop")},message(){const e=o();fe(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==F?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Ge(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}window.iframeChildListener=e=>Ye({data:e,sameDomain:!0}),a(window,"message",Ye),a(window,"readystatechange",Ge),Ge()}()})); | ||
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e="5.2.1",t=10,n="data-iframe-size",o="data-iframe-overflow",i="bottom",r="right",a=(e,t,n,o)=>e.addEventListener(t,n,o||!1),l=["<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 s=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(l[e]),c=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},d=e=>e;let u="";const m=e=>""!=`${e}`&&void 0!==e;const f=(...e)=>[`[iframe-resizer][${u}]`,...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 v=[];const b=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))})),v=document.querySelectorAll(`[${o}]`),n()}),r);return e=>e.forEach((e=>{a.has(e)||(l.observe(e),a.add(e))}))},z=()=>v.length>0,w=1e5,S="--ifr-start",E="--ifr-end",j="--ifr-measure",P=[],$=new WeakSet,C=e=>"object"==typeof e&&$.add(e),O=e=>Math.floor(e*w)/w;let M=null,A=null,T={};const I=setInterval((()=>{if(P.length<10)return;if(T.hasTags&&T.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);e<=4||(clearInterval(I),y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${O(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${T.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;T=e,$.has(A)||M===A||i&&o<=1||(r||C(A),M=A,p(`\n${n} position calculated from:\n`,A,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${O(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function k(){new PerformanceObserver(R).observe({entryTypes:PerformanceObserver.supportedEntryTypes}),C(document.documentElement),C(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},l={height:()=>(h("Custom height calculation function not defined"),De.auto()),width:()=>(h("Custom width calculation function not defined"),Fe.auto())},f={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,w={},j="checkVisibility"in window,P="auto",$="[iFrameSizer]",C=$.length,O={max:1,min:1,bodyScroll:1,documentElementScroll:1},M=["body"],T="scroll";let I,R,k=!0,N="",x=0,B="",q=null,L="",W=!0,U=!1,D=null,F=!0,V=!1,J=1,H=P,Z=!0,Q="",X={},Y=!1,G=0,K=!1,_="",ee=d,te="child",ne=null,oe=!1,ie="",re=window.parent,ae="*",le=0,se=!1,ce="",de=1,ue=T,me=window,fe=()=>{h("onMessage function not defined")},pe=()=>{},he=null,ye=null;function ge(){var o,d;!function(){const e=e=>"true"===e,t=Q.slice(C).split(":");_=t[0],x=void 0===t[1]?x:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),k=void 0===t[6]?k:e(t[6]),B=t[7],H=void 0===t[8]?H:t[8],N=t[9],L=t[10],le=void 0===t[11]?le:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],ue=void 0===t[14]?ue:t[14],K=void 0===t[15]?K:e(t[15]),I=void 0===t[16]?I:Number(t[16]),R=void 0===t[17]?R:Number(t[17]),W=void 0===t[18]?W:e(t[18]),t[19],ce=t[20]||ce,G=void 0===t[21]?G:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;fe=e?.onMessage||fe,pe=e?.onReady||pe,"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</>."),W&&(I=e?.offset),U&&(R=e?.offset)),"number"==typeof e?.offsetSize&&(W&&(I=e?.offsetSize),U&&(R=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),ae=e?.targetOrigin||ae,H=e?.heightCalculationMethod||H,ue=e?.widthCalculationMethod||ue}function t(e,t){return"function"==typeof e&&(l[t]=e,e="custom"),e}1!==G&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),H=t(H,"height"),ue=t(ue,"width"))}(),u={id:_,logging:Y}.id,function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),G<0?g(`${s(G+2)}${s(2)}`):ce.codePointAt(0)>4||G<2&&g(s(3)),ce&&""!==ce&&"false"!==ce?ce!==e&&y(`<rb>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ce} - 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"),Pe(),$e(),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</>.")}(),W!==U&&(ee=b({onChange:c(ve),side:W?i:r})),be(),1!==G&&(me.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,Ce()):!1===e&&!0===k&&(k=!1,Ee("remove"),ne?.disconnect(),q?.disconnect()),Xe(0,0,"autoResize",JSON.stringify(k)),k),close(){Xe(0,0,"close")},getId:()=>_,getPageInfo(e){if("function"==typeof e)return he=e,Xe(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");he=null,Xe(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return ye=e,Xe(0,0,"parentInfo"),()=>{ye=null,Xe(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){X.findTarget(e)},reset(){Qe()},scrollBy(e,t){Xe(t,e,"scrollBy")},scrollTo(e,t){Xe(t,e,"scrollTo")},scrollToOffset(e,t){Xe(t,e,"scrollToOffset")},sendMessage(e,t){Xe(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Pe()},setWidthCalculationMethod(e){ue=e,$e()},setTargetOrigin(e){ae=e},resize(e,t){Je("size",`parentIFrame.size(${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)}}),me.parentIFrame=me.parentIframe),function(){function e(e){Xe(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){a(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=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);Xe(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?Xe(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")&&a(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){a(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),l(),s()}return X.enable&&(1===G?y("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),void 0===B&&(B=`${x}px`),ze("margin",(o="margin",(d=B).includes("-")&&(h(`Negative CSS value ignored for ${o}`),d=""),d)),ze("background",N),ze("padding",L),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()}const ve=()=>{Je("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Xe(0,0,"title",document.title),Ce(),pe()};function be(){const e=document.querySelectorAll(`[${n}]`);V=e.length>0,D=V?e:qe(document)(),V?setTimeout(ve):ee(D)}function ze(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function we(){""!==ie&&document.querySelectorAll(ie).forEach((e=>{e.dataset.iframeSize=!0}))}function Se(e){({add(t){function n(){Je(e.eventName,e.eventType)}w[t]=n,a(window,t,n,{passive:!0})},remove(e){const t=w[e];var n,o;delete w[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ee(e){Se({method:e,eventType:"After Print",eventName:"afterprint"}),Se({method:e,eventType:"Before Print",eventName:"beforeprint"}),Se({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function je(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 Pe(){H=je(H,P,De,"height")}function $e(){ue=je(ue,T,Fe,"width")}function Ce(){!0===k&&(Ee("add"),q=function(){function e(e){e.forEach(Ne),we(),be()}function t(){const t=new window.MutationObserver(e),n=document.querySelector("body"),o={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return t.observe(n,o),t}const n=t();return{disconnect(){n.disconnect()}}}(),ne=new ResizeObserver(Me),ke(window.document))}let Oe;function Me(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Oe=()=>Je("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((()=>{Oe&&Oe(),Oe=void 0}),0)}const Ae=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Te=()=>[...qe(document)()].filter(Ae),Ie=new WeakSet;function Re(e){e&&(Ie.has(e)||(ne.observe(e),Ie.add(e)))}function ke(e){[...Te(),...M.flatMap((t=>e.querySelector(t)))].forEach(Re)}function Ne(e){"childList"===e.type&&ke(e.target)}function xe(e){const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(S);const l=!V&&z()?v:D;let s=l.length;return l.forEach((t=>{V||!j||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),A=r,performance.mark(E,{detail:{Side:t,len:s,hasTags:V,logging:Y}}),a}const Be=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],qe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Le={height:0,width:0},We={height:0,width:0};function Ue(e){function t(){return We[i]=r,Le[i]=s,r}const n=z(),o=e===De,i=o?"height":"width",r=e.documentElementBoundingClientRect(),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 V:return e.taggedElement();case!n&&0===We[i]&&0===Le[i]:return t();case se&&r===We[i]&&s===Le[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==We[i]&&s<=Le[i]:return t();case!o:return e.taggedElement();case!n&&r<We[i]:case s===l||s===a:case r>s:return t()}return Math.max(e.taggedElement(),t())}const De={enabled:()=>W,getOffset:()=>I,auto:()=>Ue(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>l.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...Be(De)),min:()=>Math.min(...Be(De)),grow:()=>De.max(),lowestElement:()=>xe(i),taggedElement:()=>xe(i)},Fe={enabled:()=>U,getOffset:()=>R,auto:()=>Ue(Fe),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>l.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...Be(Fe)),min:()=>Math.min(...Be(Fe)),rightMostElement:()=>xe(r),scroll:()=>Math.max(Fe.bodyScroll(),Fe.documentElementScroll()),taggedElement:()=>xe(r)};function Ve(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=le);return r=void 0===n?De[H]():n,a=void 0===o?Fe[ue]():o,W&&e(J,r)||U&&e(de,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(W&&H in O||U&&ue in O)&&Qe():(He(),J=r,de=a,Xe(J,de,e,i))}function Je(e,t,n,o,i){document.hidden||Ve(e,0,n,o,i)}function He(){se||(se=!0,requestAnimationFrame((()=>{se=!1})))}function Ze(e){J=De[H](),de=Fe[ue](),Xe(J,de,e)}function Qe(e){const t=H;H=P,He(),Ze("reset"),H=t}function Xe(e,t,n,o,i){G<-1||(void 0!==i||(i=ae),function(){const r=`${_}:${e+(I||0)}:${t+(R||0)}:${n}${void 0===o?"":`:${o}`}`;oe?window.parent.iframeParentListener($+r):re.postMessage($+r,i)}())}function Ye(e){const t={init:function(){Q=e.data,re=e.source,ge(),F=!1,setTimeout((()=>{Z=!1}),p)},reset(){Z||Ze("resetPage")},resize(){Je("resizeParent")},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();he?he(JSON.parse(e)):Xe(0,0,"pageInfoStop")},parentInfo(){const e=o();ye?ye(Object.freeze(JSON.parse(e))):Xe(0,0,"parentInfoStop")},message(){const e=o();fe(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==F?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||h(`Unexpected message (${e.data})`)}())}function Ge(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}window.iframeChildListener=e=>Ye({data:e,sameDomain:!0}),a(window,"message",Ye),a(window,"readystatechange",Ge),Ge()}()})); |
{ | ||
"name": "@iframe-resizer/child", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"license": "GPL-3.0", | ||
@@ -5,0 +5,0 @@ "homepage": "https://iframe-resizer.com", |
@@ -25,2 +25,2 @@ [<img src="https://iframe-resizer.com/logo-full.svg" alt="" title="" style="margin-bottom: -20px">](https://iframe-resizer.com) | ||
_iframe-resizer version 5.2.0 2024-07-16 - 14:51:09.225Z_ | ||
_iframe-resizer version 5.2.1 2024-07-16 - 19:19:47.416Z_ |
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