@iframe-resizer/child 5.3.1 → 5.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,4 +22,4 @@ yarn add @iframe-resizer/child
22
22
 
23
23
  ---
24
24
 
25
- _iframe-resizer version 5.3.1 2024-09-12 - 13:44:54.185Z_
25
+ _iframe-resizer version 5.3.2 2024-10-22 - 10:41:37.836Z_
@@ -53,7 +53,7 @@ declare module '@iframe-resizer/child' {
53
53
  *
54
54
  * Pass false to disable the callback.
55
55
  */
56
- getParentProps(callback: (data: ParentProps) => void): void
56
+ getParentProps(callback: (data: ParentProps) => void): () => void
57
57
 
58
58
  /**
59
59
  * Scroll the parent page by x and y
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.3.1 (cjs) - 2024-09-12
4
+ * @module iframe-resizer/child 5.3.2 (cjs) - 2024-10-22
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,4 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- "use strict";const e="5.3.1",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let P=null,A={};const O=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(O),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,T.has(P)||i&&o<=1||(r||M(P),b(`\n ${n} position calculated from:`,P,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),qe.auto()),width:()=>(v("Custom width calculation function not defined"),Le.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,O,N,I,k=!0,R="",x=0,q="",L="",B=!0,D=!1,W=!0,U=!1,F=!1,V=1,J=b,H=!0,Z="",_={},Q=!1,X=0,Y=!1,G="",K=d,ee=[],te="child",ne=null,oe=!1,ie="",re=[],ae=window.parent,le="*",se=0,ce=!1,de="",ue=1,me=M,fe=window,pe=()=>{v("onMessage function not defined")},he=()=>{},ye=null,ge=null;function be(){var o,d,u;!function(){const e=e=>"true"===e,t=Z.slice(C).split(":");G=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),Q=void 0===t[3]?Q:e(t[3]),k=void 0===t[6]?k:e(t[6]),q=t[7],J=void 0===t[8]?J:t[8],R=t[9],L=t[10],se=void 0===t[11]?se:Number(t[11]),_.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],me=void 0===t[14]?me:t[14],Y=void 0===t[15]?Y:e(t[15]),A=void 0===t[16]?A:Number(t[16]),O=void 0===t[17]?O:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],de=t[20]||de,X=void 0===t[21]?X:Number(t[21])}(),h({id:G,logging:Q}),function(){function e(e){pe=e?.onMessage||pe,he=e?.onReady||he,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),B&&(A=e?.offset),D&&(O=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(O=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),le=e?.targetOrigin||le,J=e?.heightCalculationMethod||J,me=e?.widthCalculationMethod||me}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===X)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),J=t(J,"height"),me=t(me,"width"))}(),function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),X<0?z(`${c(X+2)}${c(2)}`):de.codePointAt(0)>4||X<2&&z(c(3)),de&&""!==de&&"false"!==de?de!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${de} - Child page: ${e}.\n`):w("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),Ce(),Te(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),we(),B!==D&&(K=S({onChange:ve,root:document.documentElement,side:B?i:r})),1!==X&&(fe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,We("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Je(0,0,"autoResize",JSON.stringify(k)),k),close(){Je(0,0,"close")},getId:()=>G,getPageInfo(e){if("function"==typeof e)return ye=e,Je(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ye=null,Je(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return ge=e,Je(0,0,"parentInfo"),()=>{ge=null,Je(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){_.findTarget(e)},reset(){Ve()},scrollBy(e,t){Je(t,e,"scrollBy")},scrollTo(e,t){Je(t,e,"scrollTo")},scrollToOffset(e,t){Je(t,e,"scrollToOffset")},sendMessage(e,t){Je(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){J=e,Ce()},setWidthCalculationMethod(e){me=e,Te()},setTargetOrigin(e){le=e},resize(e,t){We(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),fe.parentIFrame=fe.parentIframe),function(){function e(e){Je(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===Y&&(t("mouseenter"),t("mouseleave"))}(),_=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);Je(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?Je(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return _.enable&&(1===X?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),ze(Ie(document)()),void 0===q&&(q=`${x}px`),Se("margin",(d="margin",(u=q).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Se("background",R),Se("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)}(),Ee(),We("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Je(0,0,"title",document.title),je({method:o="add",eventType:"After Print",eventName:"afterprint"}),je({method:o,eventType:"Before Print",eventName:"beforeprint"}),je({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(Ee(),we(),ze(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),ne=new ResizeObserver(Me),ne.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(he)}function ve(e){ee=e,U=ee.length>0,We("overflowChanged","Overflow updated")}function we(){re=document.querySelectorAll(`[${n}]`),F=re.length>0}function ze(e){F||K(e)}function Se(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function Ee(){if(""!==ie)for(const e of document.querySelectorAll(ie))e.dataset.iframeSize=!0}function je(e){({add(t){function n(){We(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function $e(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Ce(){J=$e(J,b,qe,"height")}function Te(){me=$e(me,M,Le,"width")}function Me(e){Array.isArray(e)&&0!==e.length&&We("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(ne.observe(e),Pe.add(e))}const t=Ie(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(ne.observe(e),Pe.add(e))}}function Oe(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=F?re:U?ee:Ie(document)();let s=l.length;for(const t of l)F||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return P=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:F,logging:Q}}),a}const Ne=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ie=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)"),ke={height:0,width:0},Re={height:0,width:0};function xe(e){function t(){return Re[o]=i,ke[o]=l,i}const n=e===qe,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case F:return e.taggedElement();case!U&&0===Re[o]&&0===ke[o]:return t();case ce&&i===Re[o]&&l===ke[o]:return Math.max(i,l);case 0===i:return l;case!U&&i!==Re[o]&&l<=ke[o]:return t();case!n:return e.taggedElement();case!U&&i<Re[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const qe={enabled:()=>B,getOffset:()=>A,auto:()=>xe(qe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>qe.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ne(qe)),min:()=>Math.min(...Ne(qe)),grow:()=>qe.max(),lowestElement:()=>Oe(i),taggedElement:()=>Oe(i)},Le={enabled:()=>D,getOffset:()=>O,auto:()=>xe(Le),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ne(Le)),min:()=>Math.min(...Ne(Le)),rightMostElement:()=>Oe(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Oe(r)},Be=(e,t)=>!(Math.abs(e-t)<=se);let De=!1;function We(e,t,n,o,i){I=performance.now(),(k||e===a)&&(document.hidden||(De||(N=!0,function(e,t,n,o,i){const r=void 0===n?qe[J]():n,l=void 0===o?Le[me]():o;B&&Be(V,r)||D&&Be(ue,l)||"init"===e?(Ue(),V=r,ue=l,Je(V,ue,e,i)):!e!==a&&(B&&J in T||D&&me in T)?Ve():N=!1}(e,0,n,o,i),requestAnimationFrame((()=>{De=!1}))),De=!0))}function Ue(){ce||(ce=!0,requestAnimationFrame((()=>{ce=!1})))}function Fe(e){V=qe[J](),ue=Le[me](),Je(V,ue,e)}function Ve(e){const t=J;J=b,Ue(),Fe("reset"),J=t}function Je(e,t,n,o,i){X<-1||(void 0!==i||(i=le),function(){const r=`${G}:${e+(A||0)}:${t+(O||0)}:${n}${void 0===o?"":`:${o}`}`;Q&&(console.group(`[iframe-resizer][${G}]`),console.info("Sending message to host page via "+(oe?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),N&&console.info(function(){const e=m(performance.now()-I);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),N=!1,oe?window.parent.iframeParentListener($+r):ae.postMessage($+r,i)}())}function He(e){const t={init:function(){Z=e.data,ae=e.source,be(),W=!1,setTimeout((()=>{H=!1}),f)},reset(){H||Fe("resetPage")},resize(){We(a)},moveToAnchor(){_.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ye?setTimeout((()=>ye(JSON.parse(e)))):Je(0,0,"pageInfoStop")},parentInfo(){const e=o();ge?setTimeout(ge(Object.freeze(JSON.parse(e)))):Je(0,0,"parentInfoStop")},message(){const e=o();pe(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!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function Ze(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>He({data:e,sameDomain:!0}))),l(window,"message",He),l(window,"readystatechange",Ze),Ze())}();
20
+ "use strict";const e="5.3.2",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let O=null,P={};const A=setInterval((()=>{if(C.length<10)return;if(P.hasTags&&P.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(A),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${P.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;P=e,T.has(O)||i&&o<=1||(r||M(O),b(`\n ${n} position calculated from:`,O,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),Le.auto()),width:()=>(v("Custom width calculation function not defined"),Be.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let P,A,N,I,k,R=!0,x="",q=0,L="",B="",D=!0,W=!1,U=!0,F=!1,V=!1,J=1,H=b,Z=!0,_="",Q={},X=!1,Y=0,G=!1,K="",ee=d,te=[],ne="child",oe=null,ie=!1,re="",ae=[],le=window.parent,se="*",ce=0,de=!1,ue="",me=1,fe=M,pe=window,he=()=>{v("onMessage function not defined")},ye=()=>{},ge=null,be=null;function ve(){var o,d,u;!function(){const e=e=>"true"===e,t=_.slice(C).split(":");K=t[0],q=void 0===t[1]?q:Number(t[1]),W=void 0===t[2]?W:e(t[2]),X=void 0===t[3]?X:e(t[3]),R=void 0===t[6]?R:e(t[6]),L=t[7],H=void 0===t[8]?H:t[8],x=t[9],B=t[10],ce=void 0===t[11]?ce:Number(t[11]),Q.enable=void 0!==t[12]&&e(t[12]),ne=void 0===t[13]?ne:t[13],fe=void 0===t[14]?fe:t[14],G=void 0===t[15]?G:e(t[15]),P=void 0===t[16]?P:Number(t[16]),A=void 0===t[17]?A:Number(t[17]),D=void 0===t[18]?D:e(t[18]),t[19],ue=t[20]||ue,Y=void 0===t[21]?Y:Number(t[21])}(),h({id:K,logging:X}),function(){function e(e){he=e?.onMessage||he,ye=e?.onReady||ye,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),D&&(P=e?.offset),W&&(A=e?.offset)),"number"==typeof e?.offsetSize&&(D&&(P=e?.offsetSize),W&&(A=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(re=e.sizeSelector),se=e?.targetOrigin||se,H=e?.heightCalculationMethod||H,fe=e?.widthCalculationMethod||fe}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===Y)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),H=t(H,"height"),fe=t(fe,"width"))}(),function(){try{ie="iframeParentListener"in window.parent}catch(e){}}(),Y<0?z(`${c(Y+2)}${c(2)}`):ue.codePointAt(0)>4||Y<2&&z(c(3)),ue&&""!==ue&&"false"!==ue?ue!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ue} - Child page: ${e}.\n`):w("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),Te(),Me(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),ze(),D!==W&&(ee=S({onChange:we,root:document.documentElement,side:D?i:r})),1!==Y&&(pe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===R?(R=!0,Ue("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===R&&(R=!1),He(0,0,"autoResize",JSON.stringify(R)),R),close(){He(0,0,"close")},getId:()=>K,getOrigin:()=>N,getPageInfo(e){if("function"==typeof e)return ge=e,He(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ge=null,He(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return be=e,He(0,0,"parentInfo"),()=>{be=null,He(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Q.findTarget(e)},reset(){Je()},scrollBy(e,t){He(t,e,"scrollBy")},scrollTo(e,t){He(t,e,"scrollTo")},scrollToOffset(e,t){He(t,e,"scrollToOffset")},sendMessage(e,t){He(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Te()},setWidthCalculationMethod(e){fe=e,Me()},setTargetOrigin(e){se=e},resize(e,t){Ue(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),pe.parentIFrame=pe.parentIframe),function(){function e(e){He(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===G&&(t("mouseenter"),t("mouseleave"))}(),Q=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);He(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?He(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return Q.enable&&(1===Y?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),Se(ke(document)()),void 0===L&&(L=`${q}px`),Ee("margin",(d="margin",(u=L).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Ee("background",x),Ee("padding",B),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),je(),Ue("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&He(0,0,"title",document.title),$e({method:o="add",eventType:"After Print",eventName:"afterprint"}),$e({method:o,eventType:"Before Print",eventName:"beforeprint"}),$e({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(je(),ze(),Se(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),oe=new ResizeObserver(Oe),oe.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(ye)}function we(e){te=e,F=te.length>0,Ue("overflowChanged","Overflow updated")}function ze(){ae=document.querySelectorAll(`[${n}]`),V=ae.length>0}function Se(e){V||ee(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function je(){if(""!==re)for(const e of document.querySelectorAll(re))e.dataset.iframeSize=!0}function $e(e){({add(t){function n(){Ue(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ce(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Te(){H=Ce(H,b,Le,"height")}function Me(){fe=Ce(fe,M,Be,"width")}function Oe(e){Array.isArray(e)&&0!==e.length&&Ue("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}const t=ke(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}}function Ne(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=V?ae:F?te:ke(document)();let s=l.length;for(const t of l)V||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return O=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:V,logging:X}}),a}const Ie=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],ke=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Re={height:0,width:0},xe={height:0,width:0};function qe(e){function t(){return xe[o]=i,Re[o]=l,i}const n=e===Le,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case V:return e.taggedElement();case!F&&0===xe[o]&&0===Re[o]:return t();case de&&i===xe[o]&&l===Re[o]:return Math.max(i,l);case 0===i:return l;case!F&&i!==xe[o]&&l<=Re[o]:return t();case!n:return e.taggedElement();case!F&&i<xe[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const Le={enabled:()=>D,getOffset:()=>P,auto:()=>qe(Le),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Le.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ie(Le)),min:()=>Math.min(...Ie(Le)),grow:()=>Le.max(),lowestElement:()=>Ne(i),taggedElement:()=>Ne(i)},Be={enabled:()=>W,getOffset:()=>A,auto:()=>qe(Be),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ie(Be)),min:()=>Math.min(...Ie(Be)),rightMostElement:()=>Ne(r),scroll:()=>Math.max(Be.bodyScroll(),Be.documentElementScroll()),taggedElement:()=>Ne(r)},De=(e,t)=>!(Math.abs(e-t)<=ce);let We=!1;function Ue(e,t,n,o,i){k=performance.now(),(R||e===a)&&(document.hidden||(We||(I=!0,function(e,t,n,o,i){const r=void 0===n?Le[H]():n,l=void 0===o?Be[fe]():o;D&&De(J,r)||W&&De(me,l)||"init"===e?(Fe(),J=r,me=l,He(J,me,e,i)):!e!==a&&(D&&H in T||W&&fe in T)?Je():I=!1}(e,0,n,o,i),requestAnimationFrame((()=>{We=!1}))),We=!0))}function Fe(){de||(de=!0,requestAnimationFrame((()=>{de=!1})))}function Ve(e){J=Le[H](),me=Be[fe](),He(J,me,e)}function Je(e){const t=H;H=b,Fe(),Ve("reset"),H=t}function He(e,t,n,o,i){Y<-1||(void 0!==i||(i=se),function(){const r=`${K}:${e+(P||0)}:${t+(A||0)}:${n}${void 0===o?"":`:${o}`}`;X&&(console.group(`[iframe-resizer][${K}]`),console.info("Sending message to host page via "+(ie?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),I&&console.info(function(){const e=m(performance.now()-k);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),I=!1,ie?window.parent.iframeParentListener($+r):le.postMessage($+r,i)}())}function Ze(e){const t={init:function(){_=e.data,le=e.source,N=e.origin,ve(),U=!1,setTimeout((()=>{Z=!1}),f)},reset(){Z||Ve("resetPage")},resize(){Ue(a)},moveToAnchor(){Q.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ge?setTimeout((()=>ge(JSON.parse(e)))):He(0,0,"pageInfoStop")},parentInfo(){const e=o();be?setTimeout(be(Object.freeze(JSON.parse(e)))):He(0,0,"parentInfoStop")},message(){const e=o();he(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==U?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function _e(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Ze({data:e,sameDomain:!0}))),l(window,"message",Ze),l(window,"readystatechange",_e),_e())}();
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.3.1 (esm) - 2024-09-12
4
+ * @module iframe-resizer/child 5.3.2 (esm) - 2024-10-22
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,4 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- const e="5.3.1",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let P=null,A={};const O=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(O),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,T.has(P)||i&&o<=1||(r||M(P),b(`\n ${n} position calculated from:`,P,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),qe.auto()),width:()=>(v("Custom width calculation function not defined"),Le.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,O,N,I,k=!0,R="",x=0,q="",L="",B=!0,D=!1,W=!0,U=!1,F=!1,V=1,J=b,H=!0,Z="",_={},Q=!1,X=0,Y=!1,G="",K=d,ee=[],te="child",ne=null,oe=!1,ie="",re=[],ae=window.parent,le="*",se=0,ce=!1,de="",ue=1,me=M,fe=window,pe=()=>{v("onMessage function not defined")},he=()=>{},ye=null,ge=null;function be(){var o,d,u;!function(){const e=e=>"true"===e,t=Z.slice(C).split(":");G=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),Q=void 0===t[3]?Q:e(t[3]),k=void 0===t[6]?k:e(t[6]),q=t[7],J=void 0===t[8]?J:t[8],R=t[9],L=t[10],se=void 0===t[11]?se:Number(t[11]),_.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],me=void 0===t[14]?me:t[14],Y=void 0===t[15]?Y:e(t[15]),A=void 0===t[16]?A:Number(t[16]),O=void 0===t[17]?O:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],de=t[20]||de,X=void 0===t[21]?X:Number(t[21])}(),h({id:G,logging:Q}),function(){function e(e){pe=e?.onMessage||pe,he=e?.onReady||he,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),B&&(A=e?.offset),D&&(O=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(O=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),le=e?.targetOrigin||le,J=e?.heightCalculationMethod||J,me=e?.widthCalculationMethod||me}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===X)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),J=t(J,"height"),me=t(me,"width"))}(),function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),X<0?z(`${c(X+2)}${c(2)}`):de.codePointAt(0)>4||X<2&&z(c(3)),de&&""!==de&&"false"!==de?de!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${de} - Child page: ${e}.\n`):w("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),Ce(),Te(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),we(),B!==D&&(K=S({onChange:ve,root:document.documentElement,side:B?i:r})),1!==X&&(fe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,We("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Je(0,0,"autoResize",JSON.stringify(k)),k),close(){Je(0,0,"close")},getId:()=>G,getPageInfo(e){if("function"==typeof e)return ye=e,Je(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ye=null,Je(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return ge=e,Je(0,0,"parentInfo"),()=>{ge=null,Je(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){_.findTarget(e)},reset(){Ve()},scrollBy(e,t){Je(t,e,"scrollBy")},scrollTo(e,t){Je(t,e,"scrollTo")},scrollToOffset(e,t){Je(t,e,"scrollToOffset")},sendMessage(e,t){Je(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){J=e,Ce()},setWidthCalculationMethod(e){me=e,Te()},setTargetOrigin(e){le=e},resize(e,t){We(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),fe.parentIFrame=fe.parentIframe),function(){function e(e){Je(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===Y&&(t("mouseenter"),t("mouseleave"))}(),_=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);Je(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?Je(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return _.enable&&(1===X?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),ze(Ie(document)()),void 0===q&&(q=`${x}px`),Se("margin",(d="margin",(u=q).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Se("background",R),Se("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)}(),Ee(),We("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Je(0,0,"title",document.title),je({method:o="add",eventType:"After Print",eventName:"afterprint"}),je({method:o,eventType:"Before Print",eventName:"beforeprint"}),je({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(Ee(),we(),ze(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),ne=new ResizeObserver(Me),ne.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(he)}function ve(e){ee=e,U=ee.length>0,We("overflowChanged","Overflow updated")}function we(){re=document.querySelectorAll(`[${n}]`),F=re.length>0}function ze(e){F||K(e)}function Se(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function Ee(){if(""!==ie)for(const e of document.querySelectorAll(ie))e.dataset.iframeSize=!0}function je(e){({add(t){function n(){We(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function $e(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Ce(){J=$e(J,b,qe,"height")}function Te(){me=$e(me,M,Le,"width")}function Me(e){Array.isArray(e)&&0!==e.length&&We("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(ne.observe(e),Pe.add(e))}const t=Ie(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(ne.observe(e),Pe.add(e))}}function Oe(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=F?re:U?ee:Ie(document)();let s=l.length;for(const t of l)F||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return P=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:F,logging:Q}}),a}const Ne=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ie=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)"),ke={height:0,width:0},Re={height:0,width:0};function xe(e){function t(){return Re[o]=i,ke[o]=l,i}const n=e===qe,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case F:return e.taggedElement();case!U&&0===Re[o]&&0===ke[o]:return t();case ce&&i===Re[o]&&l===ke[o]:return Math.max(i,l);case 0===i:return l;case!U&&i!==Re[o]&&l<=ke[o]:return t();case!n:return e.taggedElement();case!U&&i<Re[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const qe={enabled:()=>B,getOffset:()=>A,auto:()=>xe(qe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>qe.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ne(qe)),min:()=>Math.min(...Ne(qe)),grow:()=>qe.max(),lowestElement:()=>Oe(i),taggedElement:()=>Oe(i)},Le={enabled:()=>D,getOffset:()=>O,auto:()=>xe(Le),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ne(Le)),min:()=>Math.min(...Ne(Le)),rightMostElement:()=>Oe(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Oe(r)},Be=(e,t)=>!(Math.abs(e-t)<=se);let De=!1;function We(e,t,n,o,i){I=performance.now(),(k||e===a)&&(document.hidden||(De||(N=!0,function(e,t,n,o,i){const r=void 0===n?qe[J]():n,l=void 0===o?Le[me]():o;B&&Be(V,r)||D&&Be(ue,l)||"init"===e?(Ue(),V=r,ue=l,Je(V,ue,e,i)):!e!==a&&(B&&J in T||D&&me in T)?Ve():N=!1}(e,0,n,o,i),requestAnimationFrame((()=>{De=!1}))),De=!0))}function Ue(){ce||(ce=!0,requestAnimationFrame((()=>{ce=!1})))}function Fe(e){V=qe[J](),ue=Le[me](),Je(V,ue,e)}function Ve(e){const t=J;J=b,Ue(),Fe("reset"),J=t}function Je(e,t,n,o,i){X<-1||(void 0!==i||(i=le),function(){const r=`${G}:${e+(A||0)}:${t+(O||0)}:${n}${void 0===o?"":`:${o}`}`;Q&&(console.group(`[iframe-resizer][${G}]`),console.info("Sending message to host page via "+(oe?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),N&&console.info(function(){const e=m(performance.now()-I);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),N=!1,oe?window.parent.iframeParentListener($+r):ae.postMessage($+r,i)}())}function He(e){const t={init:function(){Z=e.data,ae=e.source,be(),W=!1,setTimeout((()=>{H=!1}),f)},reset(){H||Fe("resetPage")},resize(){We(a)},moveToAnchor(){_.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ye?setTimeout((()=>ye(JSON.parse(e)))):Je(0,0,"pageInfoStop")},parentInfo(){const e=o();ge?setTimeout(ge(Object.freeze(JSON.parse(e)))):Je(0,0,"parentInfoStop")},message(){const e=o();pe(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!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function Ze(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>He({data:e,sameDomain:!0}))),l(window,"message",He),l(window,"readystatechange",Ze),Ze())}();
20
+ const e="5.3.2",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let O=null,P={};const A=setInterval((()=>{if(C.length<10)return;if(P.hasTags&&P.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(A),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${P.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;P=e,T.has(O)||i&&o<=1||(r||M(O),b(`\n ${n} position calculated from:`,O,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),Le.auto()),width:()=>(v("Custom width calculation function not defined"),Be.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let P,A,N,I,k,R=!0,x="",q=0,L="",B="",D=!0,W=!1,U=!0,F=!1,V=!1,J=1,H=b,Z=!0,_="",Q={},X=!1,Y=0,G=!1,K="",ee=d,te=[],ne="child",oe=null,ie=!1,re="",ae=[],le=window.parent,se="*",ce=0,de=!1,ue="",me=1,fe=M,pe=window,he=()=>{v("onMessage function not defined")},ye=()=>{},ge=null,be=null;function ve(){var o,d,u;!function(){const e=e=>"true"===e,t=_.slice(C).split(":");K=t[0],q=void 0===t[1]?q:Number(t[1]),W=void 0===t[2]?W:e(t[2]),X=void 0===t[3]?X:e(t[3]),R=void 0===t[6]?R:e(t[6]),L=t[7],H=void 0===t[8]?H:t[8],x=t[9],B=t[10],ce=void 0===t[11]?ce:Number(t[11]),Q.enable=void 0!==t[12]&&e(t[12]),ne=void 0===t[13]?ne:t[13],fe=void 0===t[14]?fe:t[14],G=void 0===t[15]?G:e(t[15]),P=void 0===t[16]?P:Number(t[16]),A=void 0===t[17]?A:Number(t[17]),D=void 0===t[18]?D:e(t[18]),t[19],ue=t[20]||ue,Y=void 0===t[21]?Y:Number(t[21])}(),h({id:K,logging:X}),function(){function e(e){he=e?.onMessage||he,ye=e?.onReady||ye,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),D&&(P=e?.offset),W&&(A=e?.offset)),"number"==typeof e?.offsetSize&&(D&&(P=e?.offsetSize),W&&(A=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(re=e.sizeSelector),se=e?.targetOrigin||se,H=e?.heightCalculationMethod||H,fe=e?.widthCalculationMethod||fe}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===Y)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),H=t(H,"height"),fe=t(fe,"width"))}(),function(){try{ie="iframeParentListener"in window.parent}catch(e){}}(),Y<0?z(`${c(Y+2)}${c(2)}`):ue.codePointAt(0)>4||Y<2&&z(c(3)),ue&&""!==ue&&"false"!==ue?ue!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ue} - Child page: ${e}.\n`):w("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),Te(),Me(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),ze(),D!==W&&(ee=S({onChange:we,root:document.documentElement,side:D?i:r})),1!==Y&&(pe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===R?(R=!0,Ue("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===R&&(R=!1),He(0,0,"autoResize",JSON.stringify(R)),R),close(){He(0,0,"close")},getId:()=>K,getOrigin:()=>N,getPageInfo(e){if("function"==typeof e)return ge=e,He(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ge=null,He(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return be=e,He(0,0,"parentInfo"),()=>{be=null,He(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Q.findTarget(e)},reset(){Je()},scrollBy(e,t){He(t,e,"scrollBy")},scrollTo(e,t){He(t,e,"scrollTo")},scrollToOffset(e,t){He(t,e,"scrollToOffset")},sendMessage(e,t){He(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Te()},setWidthCalculationMethod(e){fe=e,Me()},setTargetOrigin(e){se=e},resize(e,t){Ue(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),pe.parentIFrame=pe.parentIframe),function(){function e(e){He(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===G&&(t("mouseenter"),t("mouseleave"))}(),Q=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);He(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?He(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return Q.enable&&(1===Y?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),Se(ke(document)()),void 0===L&&(L=`${q}px`),Ee("margin",(d="margin",(u=L).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Ee("background",x),Ee("padding",B),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),je(),Ue("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&He(0,0,"title",document.title),$e({method:o="add",eventType:"After Print",eventName:"afterprint"}),$e({method:o,eventType:"Before Print",eventName:"beforeprint"}),$e({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(je(),ze(),Se(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),oe=new ResizeObserver(Oe),oe.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(ye)}function we(e){te=e,F=te.length>0,Ue("overflowChanged","Overflow updated")}function ze(){ae=document.querySelectorAll(`[${n}]`),V=ae.length>0}function Se(e){V||ee(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function je(){if(""!==re)for(const e of document.querySelectorAll(re))e.dataset.iframeSize=!0}function $e(e){({add(t){function n(){Ue(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ce(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Te(){H=Ce(H,b,Le,"height")}function Me(){fe=Ce(fe,M,Be,"width")}function Oe(e){Array.isArray(e)&&0!==e.length&&Ue("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}const t=ke(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}}function Ne(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=V?ae:F?te:ke(document)();let s=l.length;for(const t of l)V||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return O=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:V,logging:X}}),a}const Ie=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],ke=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Re={height:0,width:0},xe={height:0,width:0};function qe(e){function t(){return xe[o]=i,Re[o]=l,i}const n=e===Le,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case V:return e.taggedElement();case!F&&0===xe[o]&&0===Re[o]:return t();case de&&i===xe[o]&&l===Re[o]:return Math.max(i,l);case 0===i:return l;case!F&&i!==xe[o]&&l<=Re[o]:return t();case!n:return e.taggedElement();case!F&&i<xe[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const Le={enabled:()=>D,getOffset:()=>P,auto:()=>qe(Le),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Le.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ie(Le)),min:()=>Math.min(...Ie(Le)),grow:()=>Le.max(),lowestElement:()=>Ne(i),taggedElement:()=>Ne(i)},Be={enabled:()=>W,getOffset:()=>A,auto:()=>qe(Be),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ie(Be)),min:()=>Math.min(...Ie(Be)),rightMostElement:()=>Ne(r),scroll:()=>Math.max(Be.bodyScroll(),Be.documentElementScroll()),taggedElement:()=>Ne(r)},De=(e,t)=>!(Math.abs(e-t)<=ce);let We=!1;function Ue(e,t,n,o,i){k=performance.now(),(R||e===a)&&(document.hidden||(We||(I=!0,function(e,t,n,o,i){const r=void 0===n?Le[H]():n,l=void 0===o?Be[fe]():o;D&&De(J,r)||W&&De(me,l)||"init"===e?(Fe(),J=r,me=l,He(J,me,e,i)):!e!==a&&(D&&H in T||W&&fe in T)?Je():I=!1}(e,0,n,o,i),requestAnimationFrame((()=>{We=!1}))),We=!0))}function Fe(){de||(de=!0,requestAnimationFrame((()=>{de=!1})))}function Ve(e){J=Le[H](),me=Be[fe](),He(J,me,e)}function Je(e){const t=H;H=b,Fe(),Ve("reset"),H=t}function He(e,t,n,o,i){Y<-1||(void 0!==i||(i=se),function(){const r=`${K}:${e+(P||0)}:${t+(A||0)}:${n}${void 0===o?"":`:${o}`}`;X&&(console.group(`[iframe-resizer][${K}]`),console.info("Sending message to host page via "+(ie?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),I&&console.info(function(){const e=m(performance.now()-k);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),I=!1,ie?window.parent.iframeParentListener($+r):le.postMessage($+r,i)}())}function Ze(e){const t={init:function(){_=e.data,le=e.source,N=e.origin,ve(),U=!1,setTimeout((()=>{Z=!1}),f)},reset(){Z||Ve("resetPage")},resize(){Ue(a)},moveToAnchor(){Q.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ge?setTimeout((()=>ge(JSON.parse(e)))):He(0,0,"pageInfoStop")},parentInfo(){const e=o();be?setTimeout(be(Object.freeze(JSON.parse(e)))):He(0,0,"parentInfoStop")},message(){const e=o();he(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==U?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function _e(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Ze({data:e,sameDomain:!0}))),l(window,"message",Ze),l(window,"readystatechange",_e),_e())}();
package/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.3.1 (umd) - 2024-09-12
4
+ * @module iframe-resizer/child 5.3.2 (umd) - 2024-10-22
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,4 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e="5.3.1",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let P=null,A={};const O=setInterval((()=>{if(C.length<10)return;if(A.hasTags&&A.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(O),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,T.has(P)||i&&o<=1||(r||M(P),b(`\n ${n} position calculated from:`,P,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),qe.auto()),width:()=>(v("Custom width calculation function not defined"),Le.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let A,O,N,I,k=!0,R="",x=0,q="",L="",B=!0,D=!1,W=!0,U=!1,F=!1,V=1,J=b,H=!0,Z="",_={},Q=!1,X=0,Y=!1,G="",K=d,ee=[],te="child",ne=null,oe=!1,ie="",re=[],ae=window.parent,le="*",se=0,ce=!1,de="",ue=1,me=M,fe=window,pe=()=>{v("onMessage function not defined")},he=()=>{},ye=null,ge=null;function be(){var o,d,u;!function(){const e=e=>"true"===e,t=Z.slice(C).split(":");G=t[0],x=void 0===t[1]?x:Number(t[1]),D=void 0===t[2]?D:e(t[2]),Q=void 0===t[3]?Q:e(t[3]),k=void 0===t[6]?k:e(t[6]),q=t[7],J=void 0===t[8]?J:t[8],R=t[9],L=t[10],se=void 0===t[11]?se:Number(t[11]),_.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],me=void 0===t[14]?me:t[14],Y=void 0===t[15]?Y:e(t[15]),A=void 0===t[16]?A:Number(t[16]),O=void 0===t[17]?O:Number(t[17]),B=void 0===t[18]?B:e(t[18]),t[19],de=t[20]||de,X=void 0===t[21]?X:Number(t[21])}(),h({id:G,logging:Q}),function(){function e(e){pe=e?.onMessage||pe,he=e?.onReady||he,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),B&&(A=e?.offset),D&&(O=e?.offset)),"number"==typeof e?.offsetSize&&(B&&(A=e?.offsetSize),D&&(O=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),le=e?.targetOrigin||le,J=e?.heightCalculationMethod||J,me=e?.widthCalculationMethod||me}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===X)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),J=t(J,"height"),me=t(me,"width"))}(),function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),X<0?z(`${c(X+2)}${c(2)}`):de.codePointAt(0)>4||X<2&&z(c(3)),de&&""!==de&&"false"!==de?de!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${de} - Child page: ${e}.\n`):w("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),Ce(),Te(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),we(),B!==D&&(K=S({onChange:ve,root:document.documentElement,side:B?i:r})),1!==X&&(fe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===k?(k=!0,We("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===k&&(k=!1),Je(0,0,"autoResize",JSON.stringify(k)),k),close(){Je(0,0,"close")},getId:()=>G,getPageInfo(e){if("function"==typeof e)return ye=e,Je(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ye=null,Je(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return ge=e,Je(0,0,"parentInfo"),()=>{ge=null,Je(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){_.findTarget(e)},reset(){Ve()},scrollBy(e,t){Je(t,e,"scrollBy")},scrollTo(e,t){Je(t,e,"scrollTo")},scrollToOffset(e,t){Je(t,e,"scrollToOffset")},sendMessage(e,t){Je(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){J=e,Ce()},setWidthCalculationMethod(e){me=e,Te()},setTargetOrigin(e){le=e},resize(e,t){We(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),fe.parentIFrame=fe.parentIframe),function(){function e(e){Je(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===Y&&(t("mouseenter"),t("mouseleave"))}(),_=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);Je(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?Je(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return _.enable&&(1===X?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),ze(Ie(document)()),void 0===q&&(q=`${x}px`),Se("margin",(d="margin",(u=q).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Se("background",R),Se("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)}(),Ee(),We("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Je(0,0,"title",document.title),je({method:o="add",eventType:"After Print",eventName:"afterprint"}),je({method:o,eventType:"Before Print",eventName:"beforeprint"}),je({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(Ee(),we(),ze(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),ne=new ResizeObserver(Me),ne.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(he)}function ve(e){ee=e,U=ee.length>0,We("overflowChanged","Overflow updated")}function we(){re=document.querySelectorAll(`[${n}]`),F=re.length>0}function ze(e){F||K(e)}function Se(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function Ee(){if(""!==ie)for(const e of document.querySelectorAll(ie))e.dataset.iframeSize=!0}function je(e){({add(t){function n(){We(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function $e(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Ce(){J=$e(J,b,qe,"height")}function Te(){me=$e(me,M,Le,"width")}function Me(e){Array.isArray(e)&&0!==e.length&&We("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(ne.observe(e),Pe.add(e))}const t=Ie(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(ne.observe(e),Pe.add(e))}}function Oe(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=F?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=F?re:U?ee:Ie(document)();let s=l.length;for(const t of l)F||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return P=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:F,logging:Q}}),a}const Ne=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ie=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)"),ke={height:0,width:0},Re={height:0,width:0};function xe(e){function t(){return Re[o]=i,ke[o]=l,i}const n=e===qe,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case F:return e.taggedElement();case!U&&0===Re[o]&&0===ke[o]:return t();case ce&&i===Re[o]&&l===ke[o]:return Math.max(i,l);case 0===i:return l;case!U&&i!==Re[o]&&l<=ke[o]:return t();case!n:return e.taggedElement();case!U&&i<Re[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const qe={enabled:()=>B,getOffset:()=>A,auto:()=>xe(qe),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>qe.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ne(qe)),min:()=>Math.min(...Ne(qe)),grow:()=>qe.max(),lowestElement:()=>Oe(i),taggedElement:()=>Oe(i)},Le={enabled:()=>D,getOffset:()=>O,auto:()=>xe(Le),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ne(Le)),min:()=>Math.min(...Ne(Le)),rightMostElement:()=>Oe(r),scroll:()=>Math.max(Le.bodyScroll(),Le.documentElementScroll()),taggedElement:()=>Oe(r)},Be=(e,t)=>!(Math.abs(e-t)<=se);let De=!1;function We(e,t,n,o,i){I=performance.now(),(k||e===a)&&(document.hidden||(De||(N=!0,function(e,t,n,o,i){const r=void 0===n?qe[J]():n,l=void 0===o?Le[me]():o;B&&Be(V,r)||D&&Be(ue,l)||"init"===e?(Ue(),V=r,ue=l,Je(V,ue,e,i)):!e!==a&&(B&&J in T||D&&me in T)?Ve():N=!1}(e,0,n,o,i),requestAnimationFrame((()=>{De=!1}))),De=!0))}function Ue(){ce||(ce=!0,requestAnimationFrame((()=>{ce=!1})))}function Fe(e){V=qe[J](),ue=Le[me](),Je(V,ue,e)}function Ve(e){const t=J;J=b,Ue(),Fe("reset"),J=t}function Je(e,t,n,o,i){X<-1||(void 0!==i||(i=le),function(){const r=`${G}:${e+(A||0)}:${t+(O||0)}:${n}${void 0===o?"":`:${o}`}`;Q&&(console.group(`[iframe-resizer][${G}]`),console.info("Sending message to host page via "+(oe?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),N&&console.info(function(){const e=m(performance.now()-I);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),N=!1,oe?window.parent.iframeParentListener($+r):ae.postMessage($+r,i)}())}function He(e){const t={init:function(){Z=e.data,ae=e.source,be(),W=!1,setTimeout((()=>{H=!1}),f)},reset(){H||Fe("resetPage")},resize(){We(a)},moveToAnchor(){_.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ye?setTimeout((()=>ye(JSON.parse(e)))):Je(0,0,"pageInfoStop")},parentInfo(){const e=o();ge?setTimeout(ge(Object.freeze(JSON.parse(e)))):Je(0,0,"parentInfoStop")},message(){const e=o();pe(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!==W?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function Ze(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>He({data:e,sameDomain:!0}))),l(window,"message",He),l(window,"readystatechange",Ze),Ze())}()}));
20
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e="5.3.2",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>e,u=1e5,m=e=>Math.round(e*u)/u;let f="",p=!1;const h=e=>{f=e.id,p=e.logging},y=e=>""!=`${e}`&&void 0!==e;const g=(...e)=>[`[iframe-resizer][${f||"child"}]`,...e].join(" "),b=(...e)=>p&&console?.info(`%c[iframe-resizer][${f}]%c`,"font-weight: bold;","font-weight: normal;",...e),v=(...e)=>console?.warn(g(...e)),w=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(g)(...e)),z=e=>w(e),S=e=>{const t=e.side||i,n=e.onChange||d,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},E="--ifr-start",j="--ifr-end",$="--ifr-measure",C=[],T=new WeakSet,M=e=>"object"==typeof e&&T.add(e);let O=null,P={};const A=setInterval((()=>{if(C.length<10)return;if(P.hasTags&&P.len<25)return;C.sort();const e=Math.min(C.reduce(((e,t)=>e+t),0)/C.length,C[Math.floor(C.length/2)]);e<=4||(clearInterval(A),w(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${m(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${P.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;P=e,T.has(O)||i&&o<=1||(r||M(O),b(`\n ${n} position calculated from:`,O,`\n Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${m(t)}ms`))}(e.detail,t),C.push(t),C.length>100&&C.shift()}}))}function I(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(v("Custom height calculation function not defined"),Le.auto()),width:()=>(v("Custom width calculation function not defined"),Be.auto())},u={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},f=128,p={},g="checkVisibility"in window,b="auto",$="[iFrameSizer]",C=$.length,T={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="scroll";let P,A,N,I,k,R=!0,x="",q=0,L="",B="",D=!0,W=!1,U=!0,F=!1,V=!1,J=1,H=b,Z=!0,_="",Q={},X=!1,Y=0,G=!1,K="",ee=d,te=[],ne="child",oe=null,ie=!1,re="",ae=[],le=window.parent,se="*",ce=0,de=!1,ue="",me=1,fe=M,pe=window,he=()=>{v("onMessage function not defined")},ye=()=>{},ge=null,be=null;function ve(){var o,d,u;!function(){const e=e=>"true"===e,t=_.slice(C).split(":");K=t[0],q=void 0===t[1]?q:Number(t[1]),W=void 0===t[2]?W:e(t[2]),X=void 0===t[3]?X:e(t[3]),R=void 0===t[6]?R:e(t[6]),L=t[7],H=void 0===t[8]?H:t[8],x=t[9],B=t[10],ce=void 0===t[11]?ce:Number(t[11]),Q.enable=void 0!==t[12]&&e(t[12]),ne=void 0===t[13]?ne:t[13],fe=void 0===t[14]?fe:t[14],G=void 0===t[15]?G:e(t[15]),P=void 0===t[16]?P:Number(t[16]),A=void 0===t[17]?A:Number(t[17]),D=void 0===t[18]?D:e(t[18]),t[19],ue=t[20]||ue,Y=void 0===t[21]?Y:Number(t[21])}(),h({id:K,logging:X}),function(){function e(e){he=e?.onMessage||he,ye=e?.onReady||ye,"number"==typeof e?.offset&&(w("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),D&&(P=e?.offset),W&&(A=e?.offset)),"number"==typeof e?.offsetSize&&(D&&(P=e?.offsetSize),W&&(A=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(re=e.sizeSelector),se=e?.targetOrigin||se,H=e?.heightCalculationMethod||H,fe=e?.widthCalculationMethod||fe}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}if(1===Y)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),H=t(H,"height"),fe=t(fe,"width"))}(),function(){try{ie="iframeParentListener"in window.parent}catch(e){}}(),Y<0?z(`${c(Y+2)}${c(2)}`):ue.codePointAt(0)>4||Y<2&&z(c(3)),ue&&""!==ue&&"false"!==ue?ue!==e&&w(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ue} - Child page: ${e}.\n`):w("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),Te(),Me(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&w("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),ze(),D!==W&&(ee=S({onChange:we,root:document.documentElement,side:D?i:r})),1!==Y&&(pe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===R?(R=!0,Ue("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===R&&(R=!1),He(0,0,"autoResize",JSON.stringify(R)),R),close(){He(0,0,"close")},getId:()=>K,getOrigin:()=>N,getPageInfo(e){if("function"==typeof e)return ge=e,He(0,0,"pageInfo"),void w("<rb>Deprecated Method</>\n \nThe <b>getPageInfo()</> method has been deprecated and replaced with <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");ge=null,He(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return be=e,He(0,0,"parentInfo"),()=>{be=null,He(0,0,"parentInfoStop")}},getParentProperties(e){w("<rb>Renamed Method</>\n \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){Q.findTarget(e)},reset(){Je()},scrollBy(e,t){He(t,e,"scrollBy")},scrollTo(e,t){He(t,e,"scrollTo")},scrollToOffset(e,t){He(t,e,"scrollToOffset")},sendMessage(e,t){He(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Te()},setWidthCalculationMethod(e){fe=e,Me()},setTargetOrigin(e){se=e},resize(e,t){Ue(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){w("<rb>Deprecated Method</>\n \nThe <b>size()</> method has been deprecated and replaced with <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),pe.parentIFrame=pe.parentIframe),function(){function e(e){He(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===G&&(t("mouseenter"),t("mouseleave"))}(),Q=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);He(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?He(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,f)}function c(){r(),a(),s()}return Q.enable&&(1===Y?w("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),Se(ke(document)()),void 0===L&&(L=`${q}px`),Ee("margin",(d="margin",(u=L).includes("-")&&(v(`Negative CSS value ignored for ${d}`),u=""),u)),Ee("background",x),Ee("padding",B),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),je(),Ue("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&He(0,0,"title",document.title),$e({method:o="add",eventType:"After Print",eventName:"afterprint"}),$e({method:o,eventType:"Before Print",eventName:"beforeprint"}),$e({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?(je(),ze(),Se(e),e.forEach(Ae),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),oe=new ResizeObserver(Oe),oe.observe(document.body),Pe.add(document.body),Ae(document.body),setTimeout(ye)}function we(e){te=e,F=te.length>0,Ue("overflowChanged","Overflow updated")}function ze(){ae=document.querySelectorAll(`[${n}]`),V=ae.length>0}function Se(e){V||ee(e)}function Ee(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function je(){if(""!==re)for(const e of document.querySelectorAll(re))e.dataset.iframeSize=!0}function $e(e){({add(t){function n(){Ue(e.eventName,e.eventType)}p[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=p[e];var n,o;delete p[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Ce(e,t,n,o){return t!==e&&(e in n||(v(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in u&&w(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Te(){H=Ce(H,b,Le,"height")}function Me(){fe=Ce(fe,M,Be,"width")}function Oe(e){Array.isArray(e)&&0!==e.length&&Ue("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!y(e):return"";case y(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case y(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(y(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Pe=new WeakSet;function Ae(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Pe.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}const t=ke(e)();for(const e of t){if(Pe.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(oe.observe(e),Pe.add(e))}}function Ne(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=V?ae:F?te:ke(document)();let s=l.length;for(const t of l)V||!g||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return O=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:V,logging:X}}),a}const Ie=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],ke=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),Re={height:0,width:0},xe={height:0,width:0};function qe(e){function t(){return xe[o]=i,Re[o]=l,i}const n=e===Le,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case V:return e.taggedElement();case!F&&0===xe[o]&&0===Re[o]:return t();case de&&i===xe[o]&&l===Re[o]:return Math.max(i,l);case 0===i:return l;case!F&&i!==xe[o]&&l<=Re[o]:return t();case!n:return e.taggedElement();case!F&&i<xe[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const Le={enabled:()=>D,getOffset:()=>P,auto:()=>qe(Le),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Le.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Ie(Le)),min:()=>Math.min(...Ie(Le)),grow:()=>Le.max(),lowestElement:()=>Ne(i),taggedElement:()=>Ne(i)},Be={enabled:()=>W,getOffset:()=>A,auto:()=>qe(Be),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Ie(Be)),min:()=>Math.min(...Ie(Be)),rightMostElement:()=>Ne(r),scroll:()=>Math.max(Be.bodyScroll(),Be.documentElementScroll()),taggedElement:()=>Ne(r)},De=(e,t)=>!(Math.abs(e-t)<=ce);let We=!1;function Ue(e,t,n,o,i){k=performance.now(),(R||e===a)&&(document.hidden||(We||(I=!0,function(e,t,n,o,i){const r=void 0===n?Le[H]():n,l=void 0===o?Be[fe]():o;D&&De(J,r)||W&&De(me,l)||"init"===e?(Fe(),J=r,me=l,He(J,me,e,i)):!e!==a&&(D&&H in T||W&&fe in T)?Je():I=!1}(e,0,n,o,i),requestAnimationFrame((()=>{We=!1}))),We=!0))}function Fe(){de||(de=!0,requestAnimationFrame((()=>{de=!1})))}function Ve(e){J=Le[H](),me=Be[fe](),He(J,me,e)}function Je(e){const t=H;H=b,Fe(),Ve("reset"),H=t}function He(e,t,n,o,i){Y<-1||(void 0!==i||(i=se),function(){const r=`${K}:${e+(P||0)}:${t+(A||0)}:${n}${void 0===o?"":`:${o}`}`;X&&(console.group(`[iframe-resizer][${K}]`),console.info("Sending message to host page via "+(ie?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),I&&console.info(function(){const e=m(performance.now()-k);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),I=!1,ie?window.parent.iframeParentListener($+r):le.postMessage($+r,i)}())}function Ze(e){const t={init:function(){_=e.data,le=e.source,N=e.origin,ve(),U=!1,setTimeout((()=>{Z=!1}),f)},reset(){Z||Ve("resetPage")},resize(){Ue(a)},moveToAnchor(){Q.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ge?setTimeout((()=>ge(JSON.parse(e)))):He(0,0,"pageInfoStop")},parentInfo(){const e=o();be?setTimeout(be(Object.freeze(JSON.parse(e)))):He(0,0,"parentInfoStop")},message(){const e=o();he(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};$===`${e.data}`.slice(0,C)&&(!1!==U?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||v(`Unexpected message (${e.data})`)}())}function _e(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?v("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>Ze({data:e,sameDomain:!0}))),l(window,"message",Ze),l(window,"readystatechange",_e),_e())}()}));
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@iframe-resizer/child",
3
- "version": "5.3.1",
3
+ "version": "5.3.2",
4
4
  "license": "GPL-3.0",
5
5
  "homepage": "https://iframe-resizer.com",
6
6
  "author": {
7
7
  "name": "David J. Bradshaw",
8
8
  "email": "info@iframe-resizer.com"
9
9
  },
10
- "description": "Keep iFrames sized to their content.",
10
+ "description": "Keep iframes sized to their content.",
11
11
  "github": "https://github.com/davidjbradshaw/iframe-resizer",
12
12
  "repository": {
13
13
  "type": "git",