@iframe-resizer/child 6.0.0-beta.0 → 6.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.umd.js CHANGED
@@ -1,54 +1,45 @@
1
- (function(s,E){typeof exports=="object"&&typeof module<"u"?E(require("auto-console-group")):typeof define=="function"&&define.amd?define(["auto-console-group"],E):(s=typeof globalThis<"u"?globalThis:s||self,E(s.acg))})(this,(function(s){"use strict";const E="6.0.0-beta.0",Oe="iframeResizer",Tn="[iFrameResizerChild]Ready",Rn="autoResize",Hn="beforeUnload",Mn="close",An="inPageLink",re="init",Se="message",$n="mouseenter",Ln="mouseleave",it="pageHide",ct="pageInfo",at="parentInfo",Nn="pageInfoStop",Cn="parentInfoStop",Gn="scrollBy",kn="scrollTo",lt="scrollToOffset",Pn="title",se="data-iframe-size",dt="data-iframe-overflowed",U="data-iframe-ignore",W="height",ut="width",Te="offset",Re="offsetSize",Dn="scroll",V="string",L="number",_n="boolean",jn="object",q="function",xn="undefined",Bn="false",Fn="null",ie="auto",ft="readystatechange",He="bottom",Me="right",Ae="autoResizeEnabled",mt=Symbol("sizeChanged"),$e="manualResize",Le="parentResize",ht={[$e]:1,[Le]:1},pt="setOffsetSize",gt="resizeObserver",Ne="overflowObserver",yt="mutationObserver",bt="visibilityObserver",Un="font-weight: bold;",Ce="none",vt="No change in content size detected",ce="[iFrameSizer]",wt=ce.length,Ge=ie,Et=Dn,zt=128,It=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),Wn=e=>(t,n="renamed to")=>(o,r,u="",l="")=>e(l,`<rb>Deprecated ${t}(${o.replace("()","")})</>
1
+ (function(r,w){typeof exports=="object"&&typeof module<"u"?w(require("auto-console-group")):typeof define=="function"&&define.amd?define(["auto-console-group"],w):(r=typeof globalThis<"u"?globalThis:r||self,w(r.acg))})(this,(function(r){"use strict";const w="6.0.0-beta.1",Ee="iframeResizer",On="[iFrameResizerChild]Ready",Sn="autoResize",Tn="beforeUnload",Rn="close",Hn="inPageLink",te="init",Oe="message",Mn="mouseenter",An="mouseleave",st="pageHide",rt="pageInfo",it="parentInfo",$n="pageInfoStop",Ln="parentInfoStop",Nn="scrollBy",kn="scrollTo",ct="scrollToOffset",Gn="title",ne="data-iframe-size",at="data-iframe-overflowed",U="data-iframe-ignore",oe="height",lt="width",Se="offset",Te="offsetSize",W="string",A="number",Pn="boolean",Cn="object",se="function",jn="undefined",_n="false",Dn="null",$="auto",dt="readystatechange",ut="bottom",ft="right",Re="autoResizeEnabled",mt=Symbol("sizeChanged"),He="manualResize",Me="parentResize",Ae={[He]:1,[Me]:1},ht="setOffsetSize",pt="resizeObserver",$e="overflowObserver",gt="mutationObserver",yt="visibilityObserver",xn="font-weight: bold;",Le="none",vt="No change in content size detected",re="[iFrameSizer]",bt=re.length,Bn=$,zt=128,wt=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),Fn=e=>(t,n="renamed to")=>(o,s,u="",l="")=>e(l,`<rb>Deprecated ${t}(${o.replace("()","")})</>
2
2
 
3
- The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${u}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`),Vn=e=>typeof e===V,ae=(e,...t)=>setTimeout(()=>e(...t),0),Ot=e=>{let t=!1;return function(...n){return t?void 0:(t=!0,e.apply(this,n))}},le=e=>e,St=1e3,P=e=>Math.round(e*St)/St,Tt=e=>e.charAt(0).toUpperCase()+e.slice(1),j=e=>`${e}`!=""&&e!==void 0,qn=e=>e(),Zn=e=>e.toLowerCase();function Yn(e){switch(!0){case!j(e):return"";case j(e.id):return`${e.nodeName}#${e.id}`;case j(e.name):return`${e.nodeName} (${e.name}`;case j(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}const Qn=e=>e?.__esModule?e.default:e,z=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${Tt(t)}`)},Rt={br:`
4
- `,rb:"\x1B[31;1m",bb:"\x1B[34;1m",b:"\x1B[1m",i:"\x1B[3m",u:"\x1B[4m","/":"\x1B[m"},Jn=Object.keys(Rt),Kn=new RegExp(`<(${Jn.join("|")})>`,"gi"),Xn=(e,t)=>Rt[t]??"",eo=e=>e.replace(Kn,Xn),to=e=>e.replaceAll("<br>",`
5
- `).replaceAll(/<\/?[^>]+>/gi,""),no=e=>t=>e(Vn(t)?window.chrome?eo(t):to(t):t);let ke=!0,Pe=Oe;const Z=Qn(s)({label:`${Oe}(child)`,expand:!1});function oo(e){Pe=e.id||Oe,Z.label(`${Pe}`),Z.expand(e.expand),ke=e.enabled}const Ht=e=>(...t)=>ke?Z[e](...t):!0,a=Ht("log"),d=a,de=Ht("debug");function ro(e,t){console.info(`${Pe} %ciframe-resizer ${e}`,ke||t<1?Un:s.NORMAL)}const{assert:Ii,endAutoGroup:D,error:Mt,errorBoundary:De,event:m,label:Oi,purge:Si,warn:I}=Z,so=no(le),h=(...e)=>Z.warn(...e.map(so)),_e=Wn((e,t)=>h(t)),At=_e("Method"),io=_e("Method","replaced with"),co=_e("Option"),je=[];function $t(e,t){a(`${e} event listener: %c${t}`,s.HIGHLIGHT)}const Lt=(e,t,n,o)=>{e.removeEventListener(t,n,o),$t("Removed",t)},N=(e,t,n,o=!1)=>{e.addEventListener(t,n,o),je.push(()=>Lt(e,t,n,o)),$t("Added",t)},c={applySelectors:null,firstRun:!0,hasTags:!1,hasOverflow:!1,height:0,isHidden:!1,initLock:!0,inPageLinks:{},origin:void 0,hasOverflowUpdated:!0,overflowedNodeSet:new Set,sameOrigin:!1,taggedElements:[],target:window?.parent,timerActive:!1,totalTime:0,triggerLocked:!1,width:0,win:window,onPageInfo:null,onParentInfo:null};let Nt=!1;const Ct=e=>e.postMessage(Tn,window?.iframeResizer?.targetOrigin||"*");function Gt(){if(document.readyState==="loading"||!c.firstRun||Nt)return;const{parent:e,top:t}=window;m("ready"),a("Sending%c ready%c to parent from",s.HIGHLIGHT,s.FOREGROUND,window.location.href),Ct(e),e!==t&&Ct(t),Nt=!0}const kt="iframeResize",ao=e=>ce===`${e.data}`.slice(0,wt),lo=()=>kt in window||window.jQuery!==void 0&&kt in window.jQuery.prototype,uo=e=>e.data.split(":")[2]in{true:1,false:1},fo=()=>[document.documentElement,document.body],mo=["min-height","min-width","max-height","max-width"],Pt=new Set,ho=e=>!!e&&e!=="0px"&&e!==ie&&e!==Ce,Dt=e=>e.tagName?e.tagName.toLowerCase():"unknown",_t=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),po=(e,t)=>ho(_t(e,t));function go(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}function yo({href:e}){Pt.has(e)||(a("Unable to access stylesheet:",e),Pt.add(e))}function bo(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const r=o.style[t];if(r)return{source:n.ownerNode.tagName==="STYLE"?"an inline <style> block":`stylesheet (${n.href})`,value:r}}}catch{yo(n)}return{source:"cross-origin stylesheet",value:_t(e,t)}}const vo=(e,t)=>go(e,t)||bo(e,t),wo=(e,t)=>{const{source:n,value:o}=vo(e,t),r=Dt(e);h(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.
3
+ The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${s}</>. ${u}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`),Un=e=>typeof e===W,ie=(e,...t)=>setTimeout(()=>e(...t),0),It=e=>{let t=!1;return function(...n){return t?void 0:(t=!0,e.apply(this,n))}},ce=e=>e,Et=1e3,G=e=>Math.round(e*Et)/Et,Ot=e=>e.charAt(0).toUpperCase()+e.slice(1),_=e=>`${e}`!=""&&e!==void 0,Wn=e=>e(),Vn=e=>e.toLowerCase();function qn(e){switch(!0){case!_(e):return"";case _(e.id):return`${e.nodeName}#${e.id}`;case _(e.name):return`${e.nodeName} (${e.name}`;case _(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}const Zn=e=>e?.__esModule?e.default:e,I=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${Ot(t)}`)},St={br:`
4
+ `,rb:"\x1B[31;1m",bb:"\x1B[34;1m",b:"\x1B[1m",i:"\x1B[3m",u:"\x1B[4m","/":"\x1B[m"},Qn=Object.keys(St),Yn=new RegExp(`<(${Qn.join("|")})>`,"gi"),Jn=(e,t)=>St[t]??"",Kn=e=>e.replace(Yn,Jn),Xn=e=>e.replaceAll("<br>",`
5
+ `).replaceAll(/<\/?[^>]+>/gi,""),eo=e=>t=>e(Un(t)?window.chrome?Kn(t):Xn(t):t);let Ne=!0,ke=Ee;const V=Zn(r)({label:`${Ee}(child)`,expand:!1});function to(e){ke=e.id||Ee,V.label(`${ke}`),V.expand(e.expand),Ne=e.enabled}const Tt=e=>(...t)=>Ne?V[e](...t):!0,a=Tt("log"),d=a,ae=Tt("debug");function no(e,t){console.info(`${ke} %ciframe-resizer ${e}`,Ne||t<1?xn:r.NORMAL)}const{assert:zi,endAutoGroup:P,error:Rt,errorBoundary:Ge,event:m,label:wi,purge:Ii,warn:C}=V,oo=eo(ce),g=(...e)=>V.warn(...e.map(oo)),Pe=Fn((e,t)=>g(t)),Ht=Pe("Method"),so=Pe("Method","replaced with"),ro=Pe("Option"),Ce=[];function Mt(e,t){a(`${e} event listener: %c${t}`,r.HIGHLIGHT)}const At=(e,t,n,o)=>{e.removeEventListener(t,n,o),Mt("Removed",t)},L=(e,t,n,o=!1)=>{e.addEventListener(t,n,o),Ce.push(()=>At(e,t,n,o)),Mt("Added",t)},i={applySelectors:null,firstRun:!0,hasTags:!1,hasOverflow:!1,height:0,isHidden:!1,initLock:!0,inPageLinks:{},origin:void 0,hasOverflowUpdated:!0,overflowedNodeSet:new Set,sameOrigin:!1,taggedElements:[],target:window?.parent,timerActive:!1,totalTime:0,triggerLocked:!1,width:0,win:window,onPageInfo:null,onParentInfo:null};let $t=!1;const Lt=e=>e.postMessage(On,window?.iframeResizer?.targetOrigin||"*");function Nt(){if(document.readyState==="loading"||!i.firstRun||$t)return;const{parent:e,top:t}=window;m("ready"),a("Sending%c ready%c to parent from",r.HIGHLIGHT,r.FOREGROUND,window.location.href),Lt(e),e!==t&&Lt(t),$t=!0}const kt="iframeResize",io=e=>re===`${e.data}`.slice(0,bt),co=()=>kt in window||window.jQuery!==void 0&&kt in window.jQuery.prototype,ao=e=>e.data.split(":")[2]in{true:1,false:1},lo=()=>[document.documentElement,document.body],uo=["min-height","min-width","max-height","max-width"],Gt=new Set,fo=e=>!!e&&e!=="0px"&&e!==$&&e!==Le,Pt=e=>e.tagName?e.tagName.toLowerCase():"unknown",Ct=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),mo=(e,t)=>fo(Ct(e,t));function ho(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}function po({href:e}){Gt.has(e)||(a("Unable to access stylesheet:",e),Gt.add(e))}function go(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const s=o.style[t];if(s)return{source:n.ownerNode.tagName==="STYLE"?"an inline <style> block":`stylesheet (${n.href})`,value:s}}}catch{po(n)}return{source:"cross-origin stylesheet",value:Ct(e,t)}}const yo=(e,t)=>ho(e,t)||go(e,t),vo=(e,t)=>{const{source:n,value:o}=yo(e,t),s=Pt(e);g(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${s}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.
6
6
 
7
- If you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function Eo(){for(const e of fo())for(const t of mo)a(`Checking <${Dt(e)}> for blocking CSS: ${t}`),po(e,t)&&wo(e,t)}const zo=({calculateWidth:e,calculateHeight:t})=>e===t,i={autoResize:!0,bodyBackground:"",bodyMargin:0,bodyMarginStr:"",bodyPadding:"",calculateHeight:!0,calculateWidth:!1,heightCalcMode:Ge,ignoreSelector:"",inPageLinks:!1,logging:!1,logExpand:!1,mode:0,mouseEvents:!1,offsetHeight:0,offsetWidth:0,sizeSelector:"",targetOrigin:"*",tolerance:0,widthCalcMode:Et,onBeforeResize:void 0,onMessage:()=>{I("onMessage function not defined")},onReady:()=>{}},Io=e=>`:not(${e})`,Oo=`* ${Array.from(It).map(Io).join("")}`,xe=e=>e.querySelectorAll(Oo),ue=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],C=[s.HIGHLIGHT,s.FOREGROUND,s.HIGHLIGHT],fe={height:0,width:0},x={height:0,width:0};function B(e,t,n){return x[e]=t,fe[e]=n,t}function So(e){const t=e.getOffset();return t!==0&&d(`Page offsetSize: %c${t}px`,s.HIGHLIGHT),t}const To=e=>e.documentElementScroll()+Math.max(0,e.getOffset());function jt(e){const{hasOverflow:t,hasTags:n,triggerLocked:o}=c,r=e.label,u=r===W,l=e.boundingClientRect(),y=Math.ceil(l),v=Math.floor(l),f=To(e),w=`HTML: %c${l}px %cPage: %c${f}px`;let p;switch(!0){case!e.enabled():return Math.max(f,1);case n:d("Found element with data-iframe-size attribute"),p=e.taggedElement();break;case(!t&&c.firstRun&&x[r]===0&&fe[r]===0):d(`Initial page size values: ${w}`,...C),p=B(r,l,f);break;case(o&&l===x[r]&&f===fe[r]):d(`Size unchanged: ${w}`,...C),p=Math.max(l,f);break;case(l===0&&f!==0):d(`Page is hidden: ${w}`,...C),p=f;break;case(!t&&l!==x[r]&&f<=fe[r]):d(`New <html> size: ${w} `,...C),d(`Previous <html> size: %c${x[r]}px`,s.HIGHLIGHT),p=B(r,l,f);break;case!u:p=e.taggedElement();break;case(!t&&l<x[r]):d(`<html> size decreased: ${w}`,...C),p=B(r,l,f);break;case(f===v||f===y):d(`<html> size equals page size: ${w}`,...C),p=B(r,l,f);break;case l>f:d(`Page size < <html> size: ${w}`,...C),p=B(r,l,f);break;case t:d("Found elements possibly overflowing <html> "),p=e.taggedElement();break;default:d(`Using <html> size: ${w}`,...C),p=B(r,l,f)}return d(`Content ${r}: %c${p}px`,s.HIGHLIGHT),p+=So(e),Math.max(p,1)}const Ro=()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)},Ho=5*1e3,Mo=4,Ao=10,$o=100,Be="--ifr-start",me="--ifr-end",xt="--ifr-measure",b=[];let he={},Bt=0,Fe;function Ft(){try{performance.clearMarks(Be),performance.clearMarks(me),performance.clearMeasures(xt)}catch{}}function Lo(){Fe=setInterval(()=>{if(b.length<Ao||he.hasTags&&he.len<25)return;b.sort();const e=Math.min(b.reduce((n,o)=>n+o,0)/b.length,b[Math.floor(b.length/2)]),t=P(e);t>Bt&&(Bt=t,m("performanceObserver"),a("Mean time:",P(b[Math.floor(b.length/2)])),a("Median time:",P(b.reduce((n,o)=>n+o,0)/b.length)),a("Average time:",t),a("Max time:",P(Math.max(...b)))),Ft(),!(e<=Mo)&&(clearInterval(Fe),h(`<rb>Performance Warning</>
7
+ If you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function bo(){for(const e of lo())for(const t of uo)a(`Checking <${Pt(e)}> for blocking CSS: ${t}`),mo(e,t)&&vo(e,t)}const zo=({calculateWidth:e,calculateHeight:t})=>e===t,c={autoResize:!0,bodyBackground:"",bodyMargin:0,bodyMarginStr:"",bodyPadding:"",calculateHeight:!0,calculateWidth:!1,heightCalcMode:$,ignoreSelector:"",inPageLinks:!1,logging:!1,logExpand:!1,mode:0,mouseEvents:!1,offsetHeight:0,offsetWidth:0,parentId:void 0,sizeSelector:"",targetOrigin:"*",tolerance:0,widthCalcMode:$,onBeforeResize:void 0,onMessage:()=>{C("onMessage function not defined")},onReady:()=>{}},N=[r.HIGHLIGHT,r.FOREGROUND,r.HIGHLIGHT],le={height:0,width:0},D={height:0,width:0};function x(e,t,n){return D[e]=t,le[e]=n,t}function wo(e){const t=e.getOffset();return t!==0&&d(`Page offsetSize: %c${t}px`,r.HIGHLIGHT),t}const Io=e=>e.documentElementScroll()+Math.max(0,e.getOffset());function jt(e){const{hasOverflow:t,hasTags:n,triggerLocked:o}=i,s=e.label,u=s===oe,l=e.boundingClientRect(),h=Math.ceil(l),b=Math.floor(l),f=Io(e),z=`HTML: %c${l}px %cPage: %c${f}px`;let p;switch(!0){case!e.enabled():return Math.max(f,1);case n:d("Found element with data-iframe-size attribute"),p=e.taggedElement();break;case(!t&&i.firstRun&&D[s]===0&&le[s]===0):d(`Initial page size values: ${z}`,...N),p=x(s,l,f);break;case(o&&l===D[s]&&f===le[s]):d(`Size unchanged: ${z}`,...N),p=Math.max(l,f);break;case(l===0&&f!==0):d(`Page is hidden: ${z}`,...N),p=f;break;case(!t&&l!==D[s]&&f<=le[s]):d(`New <html> size: ${z} `,...N),d(`Previous <html> size: %c${D[s]}px`,r.HIGHLIGHT),p=x(s,l,f);break;case!u:p=e.taggedElement();break;case(!t&&l<D[s]):d(`<html> size decreased: ${z}`,...N),p=x(s,l,f);break;case(f===b||f===h):d(`<html> size equals page size: ${z}`,...N),p=x(s,l,f);break;case l>f:d(`Page size < <html> size: ${z}`,...N),p=x(s,l,f);break;case t:d("Found elements possibly overflowing <html> "),p=e.taggedElement();break;default:d(`Using <html> size: ${z}`,...N),p=x(s,l,f)}return d(`Content ${s}: %c${p}px`,r.HIGHLIGHT),p+=wo(e),Math.max(p,1)}const Eo=5*1e3,Oo=4,So=10,To=100,je="--ifr-start",de="--ifr-end",_t="--ifr-measure",v=[];let ue={},Dt=0,_e;function xt(){try{performance.clearMarks(je),performance.clearMarks(de),performance.clearMeasures(_t)}catch{}}function Ro(){_e=setInterval(()=>{if(v.length<So||ue.hasTags&&ue.len<25)return;v.sort();const e=Math.min(v.reduce((n,o)=>n+o,0)/v.length,v[Math.floor(v.length/2)]),t=G(e);t>Dt&&(Dt=t,m("performanceObserver"),a("Mean time:",G(v[Math.floor(v.length/2)])),a("Median time:",G(v.reduce((n,o)=>n+o,0)/v.length)),a("Average time:",t),a("Max time:",G(Math.max(...v)))),xt(),!(e<=Oo)&&(clearInterval(_e),g(`<rb>Performance Warning</>
8
8
 
9
- Calculating the page size is taking an excessive amount of time (${P(e)}ms).
9
+ Calculating the page size is taking an excessive amount of time (${G(e)}ms).
10
10
 
11
- To improve performance add the <b>data-iframe-size</> attribute to the ${he.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},Ho)}function No(e){e.getEntries().forEach(t=>{if(t.name===me)try{const{duration:n}=performance.measure(xt,Be,me);he=t.detail,b.push(n),b.length>$o&&b.shift()}catch{}})}function Co(){d("Attached%c PerformanceObserver%c to page",s.HIGHLIGHT,s.FOREGROUND);const e=new PerformanceObserver(No);return e.observe({entryTypes:["mark"]}),Lo(),{disconnect:()=>{Ft(),clearInterval(Fe),e.disconnect(),d("Detached%c PerformanceObserver",s.HIGHLIGHT)}}}function Go(){const{hasOverflow:e,hasTags:t,overflowedNodeSet:n,taggedElements:o}=c;return t?o:e?Array.from(n):xe(document.documentElement)}function ko(e,t){const n=`margin-${t}`;let o,r=document.documentElement,u=c.hasTags?1:document.documentElement.getBoundingClientRect().bottom;for(const l of e)o=l.getBoundingClientRect()[t]+parseFloat(getComputedStyle(l).getPropertyValue(n)),o>u&&(u=o,r=l);return{maxEl:r,maxVal:u}}function pe(e){performance.mark(Be);const t=Tt(e),{logging:n}=i,{hasTags:o}=c,r=Go(),{maxEl:u,maxVal:l}=ko(r,e);return d(`${t} position calculated from:`,u),d(`Checked %c${r.length}%c elements`,s.HIGHLIGHT,s.FOREGROUND),performance.mark(me,{detail:{hasTags:o,len:r.length,logging:n,Side:t}}),l}const O={label:W,enabled:()=>i.calculateHeight,getOffset:()=>i.offsetHeight,auto:()=>jt(O),bodyOffset:Ro,bodyScroll:()=>document.body.scrollHeight,offset:()=>O.bodyOffset(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...ue(O)),min:()=>Math.min(...ue(O)),grow:()=>O.max(),lowestElement:()=>pe(He),taggedElement:()=>pe(He),custom:()=>(I("Custom height calculation function not defined"),O.auto())},S={label:ut,enabled:()=>i.calculateWidth,getOffset:()=>i.offsetWidth,auto:()=>jt(S),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...ue(S)),min:()=>Math.min(...ue(S)),rightMostElement:()=>pe(Me),scroll:()=>Math.max(S.bodyScroll(),S.documentElementScroll()),taggedElement:()=>pe(Me),custom:()=>(I("Custom width calculation function not defined"),S.auto())},Po={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},Do=e=>`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:
11
+ To improve performance add the <b>data-iframe-size</> attribute to the ${ue.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},Eo)}function Ho(e){e.getEntries().forEach(t=>{if(t.name===de)try{const{duration:n}=performance.measure(_t,je,de);ue=t.detail,v.push(n),v.length>To&&v.shift()}catch{}})}function Mo(){d("Attached%c PerformanceObserver%c to page",r.HIGHLIGHT,r.FOREGROUND);const e=new PerformanceObserver(Ho);return e.observe({entryTypes:["mark"]}),Ro(),{disconnect:()=>{xt(),clearInterval(_e),e.disconnect(),d("Detached%c PerformanceObserver",r.HIGHLIGHT)}}}const Ao=e=>`:not(${e})`,$o=`* ${Array.from(wt).map(Ao).join("")}`,De=e=>e.querySelectorAll($o);function Lo(){const{hasOverflow:e,hasTags:t,overflowedNodeSet:n,taggedElements:o}=i;return t?o:e?Array.from(n):De(document.documentElement)}function No(e,t){const n=`margin-${t}`;let o,s=document.documentElement,u=i.hasTags?1:document.documentElement.getBoundingClientRect().bottom;for(const l of e)o=l.getBoundingClientRect()[t]+parseFloat(getComputedStyle(l).getPropertyValue(n)),o>u&&(u=o,s=l);return{maxEl:s,maxVal:u}}function Bt(e){performance.mark(je);const t=Ot(e),{logging:n}=c,{hasTags:o}=i,s=Lo(),{maxEl:u,maxVal:l}=No(s,e);return d(`${t} position calculated from:`,u),d(`Checked %c${s.length}%c elements`,r.HIGHLIGHT,r.FOREGROUND),performance.mark(de,{detail:{hasTags:o,len:s.length,logging:n,Side:t}}),l}const fe={label:oe,enabled:()=>c.calculateHeight,getOffset:()=>c.offsetHeight,auto:()=>jt(fe),boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),documentElementScroll:()=>document.documentElement.scrollHeight,taggedElement:()=>Bt(ut)},me={label:lt,enabled:()=>c.calculateWidth,getOffset:()=>c.offsetWidth,auto:()=>jt(me),boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),documentElementScroll:()=>document.documentElement.scrollWidth,taggedElement:()=>Bt(ft)};function Ft(e,t){const{label:n}=t;return e&&e!==$&&g(`<rb>Ignored ${n}CalculationMethod (${e})</>
12
12
 
13
- window.iframeResizer = {
14
- license: 'xxxx',
15
- ${e}CalculationMethod: '${ie}',
16
- }
17
- `;function _o(e,t){const n=i.version?"remove this option.":Do(e);h(`<rb>Deprecated ${e}CalculationMethod (${t})</>
13
+ This version of <i>iframe-resizer</> auto detects the most suitable ${n} calculation method. The <b>${n}CalculationMethod</> option is no longer supported and has been ignored.
18
14
 
19
- This version of <i>iframe-resizer</> can auto detect the most suitable ${e} calculation method. It is recommended that you ${n}
20
- `)}function Ut(e,t,n){const{label:o}=n;return t!==e&&(e in n||(I(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in Po&&_o(o,e)),a(`Set ${o} calculation method: %c${e}`,s.HIGHLIGHT),e}function Wt(){i.heightCalcMode=Ut(i.heightCalcMode,Ge,O)}function Vt(){i.widthCalcMode=Ut(i.widthCalcMode,Et,S)}function jo(){try{c.sameOrigin=i.mode===1||"iframeParentListener"in window.parent}catch{a("Cross domain iframe detected")}}const xo=`<rb>Deprecated Attributes</>
15
+ To remove this warning, delete the <b>${n}CalculationMethod</> option from your parent page config and/or the <i>window.iframeResizer</> config on the child page.
16
+ `),a(`Set ${n} calculation method: %c${$}`,r.HIGHLIGHT),$}function ko(){c.heightCalcMode=Ft(c.heightCalcMode,fe)}function Go(){c.widthCalcMode=Ft(c.widthCalcMode,me)}function Po(){try{i.sameOrigin=c.mode===1||"iframeParentListener"in window.parent}catch{a("Cross domain iframe detected")}}const Co=`<rb>Deprecated Attributes</>
21
17
 
22
- The <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.`;function Bo(){let e=!1;const t=n=>document.querySelectorAll(`[${n}]`).forEach(o=>{o.toggleAttribute(se,!0),o.removeAttribute(n),e=!0});t("data-iframe-height"),t("data-iframe-width"),e&&h(xo)}let qt=0;function Fo(e){const t=e.length===1?"":"s";I(`%c[${U}]%c found on %c${e.length}%c element${t}`,s.BOLD,s.NORMAL,s.BOLD,s.NORMAL)}function Uo(){const e=document.querySelectorAll(`*[${U}]`),t=e.length>0;return t&&e.length!==qt&&(Fo(e),qt=e.length),t}const Zt=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},G=e=>e.replace(/[A-Za-z]/g,t=>String.fromCodePoint((t<="Z"?90:122)>=(t=t.codePointAt(0)+19)?t:t-26)),Y=["spjluzl","rlf","clyzpvu","rlf2"],Wo=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],Vo=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],Yt=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5","2b5sdlfhbev","zo4ui3arjo","oclbb4thgl"].map((e,t)=>[e,Math.max(0,t-1)])),F=e=>G(Wo[e]),qo=e=>G(Vo[e]),Zo=e=>G(Y[e]),Qt=e=>{const t=e[G(Y[0])]||e[G(Y[1])]||e[G(Y[2])]||e[G(Y[3])];if(!t)return-1;const n=t.split("-");let o=(function(r=""){let u=-2;const l=Zt(G(r));return l in Yt&&(u=Yt[l]),u>4?u-4:u})(n[0]);return o===0||(r=>r[2]===Zt(r[0]+r[1]))(n)||(o=-2),o};function Yo({key:e,key2:t,mode:n,version:o}){const r=n,u=Qt({key:e}),l=Qt({key2:t});if(i.mode=n=Math.max(u,l),n<0){if(n=Math.min(u,l),h(`${F(n+2)}${F(2)}`),j(o))throw c.firstRun=!1,F(n+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!j(o)||r>-1&&n>r)&&(sessionStorage.getItem("ifr")!==E&&ro(`v${E} (${qo(n)})`,n),n<2&&h(F(3)),sessionStorage.setItem("ifr",E))}const Qo="BackCompat",Jo=`<rb>Quirks Mode Detected</>
18
+ The <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.`;function jo(){let e=!1;const t=n=>document.querySelectorAll(`[${n}]`).forEach(o=>{o.toggleAttribute(ne,!0),o.removeAttribute(n),e=!0});t("data-iframe-height"),t("data-iframe-width"),e&&g(Co)}let Ut=0;function _o(e){const t=e.length===1?"":"s";C(`%c[${U}]%c found on %c${e.length}%c element${t}`,r.BOLD,r.NORMAL,r.BOLD,r.NORMAL)}function Do(){const e=document.querySelectorAll(`*[${U}]`),t=e.length>0;return t&&e.length!==Ut&&(_o(e),Ut=e.length),t}const he=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,s=0;s<e.length;s++)o=e.codePointAt(s),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},R=e=>e.replace(/[A-Za-z]/g,t=>String.fromCodePoint((t<="Z"?90:122)>=(t=t.codePointAt(0)+19)?t:t-26)),xo=new Date,Wt=e=>new Set(Array.from({length:9},e)),Bo=e=>[e[0],...e.slice(1).map(t=>`${t} - lewpylk`),`${e[4]} - lewpylk`,...e.slice(1)],B=["spjluzl","rlf","clyzpvu","rlf2","nlaMbssFlhy"],Fo=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.","<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> vm <p>pmyhtl-ylzpgly</> fvb jhu bzl aol mpyza 11 johyhjalyz vm fvb spjlujl rlf av nla h 60% kpzjvbua ha <ii>oaaw://pmyhtl-ylzpgly.jvt</>.","<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Av bwnyhkl av clyzpvu 6 vm<p>pmyhtl-ylzpgly</> wslhzl kvdusvhk aol shalza rlf myvt sltvu-zxbllgf.jvt.","<yi>VLT rlf lewpylk</><iy><iy>Wslhzl kvdusvhk aol shalza rlf myvt sltvu-zxbllgf.jvt."],Uo=Bo(["NWSc3","zvsv","wyv","ibzpulzz","VLT"]),Vt=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5","1foobarqaz","2b5sdlfhbev","zo4ui3arjo","oclbb4thgl","igb1wzrjqr"].map((e,t)=>[e,Math.max(0,t-1)])),Wo=new Set([1,6]),qt=xo[R(B[4])](),Vo=Wt((e,t)=>he(`${qt+t}`)),qo=Wt((e,t)=>he(`${qt-++t}`)),Zo=e=>Vo.has(e)?9:qo.has(e)?5:-2,xe=e=>Wo.has(e),F=e=>R(Fo[e]),Qo=e=>R(Uo[e]),Zt=e=>R(B[e]),Qt=e=>{const t=e[R(B[0])]||e[R(B[1])]||e[R(B[2])]||e[R(B[3])];if(!t)return-1;const n=t.split("-");let o=(function(s="",u=""){let l=-2;const h=he(R(s));return h in Vt&&(l=Vt[h]),l===9?Zo(u):l})(...n);return o===0||(s=>s[2]===he(s[0]+s[1]))(n)||(o=-2),o};function Yo({key:e,key2:t,mode:n,version:o}){const s=n,u=Qt({key:e}),l=Qt({key2:t});if(c.mode=n=Math.max(u,l),n<0){if(n=Math.min(u,l),g(`${F(n+2)}${F(2)}`),_(o))throw i.firstRun=!1,F(n+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!_(o)||s>-1&&n>s)&&(sessionStorage.getItem("ifr")!==w&&no(`v${w} (${Qo(n)})`,n),n<2&&g(F(3)),sessionStorage.setItem("ifr",w))}const Jo="BackCompat",Ko=`<rb>Quirks Mode Detected</>
23
19
 
24
20
  This iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.
25
21
 
26
22
  For more information see <u>https://iframe-resizer.com/quirks-mode</>.
27
- `;function Ko(){document.compatMode===Qo&&h(Jo)}const Xo="complete";let Jt=!1;function Kt(e){document.readyState===Xo?ae(e):Jt||N(document,ft,()=>Kt(e)),Jt=!0}const er=()=>{d(`Set targetOrigin for parent: %c${i.targetOrigin}`,s.HIGHLIGHT),i.autoResize!==!0&&a("Auto Resize disabled")};function Xt(){c.taggedElements=document.querySelectorAll(`[${se}]`),c.hasTags=c.taggedElements.length>0,a(`Tagged elements found: %c${c.hasTags}`,s.HIGHLIGHT)}const tr=`<rb>Legacy version detected on parent page</>
23
+ `;function Xo(){document.compatMode===Jo&&g(Ko)}const es="complete";let Yt=!1;function Jt(e){document.readyState===es?ie(e):Yt||L(document,dt,()=>Jt(e)),Yt=!0}const ts=()=>{d(`Set targetOrigin for parent: %c${c.targetOrigin}`,r.HIGHLIGHT),c.autoResize!==!0&&a("Auto Resize disabled")};function Kt(){i.taggedElements=document.querySelectorAll(`[${ne}]`),i.hasTags=i.taggedElements.length>0,a(`Tagged elements found: %c${i.hasTags}`,r.HIGHLIGHT)}const ns=`<rb>Legacy version detected on parent page</>
28
24
 
29
25
  Detected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.
30
26
 
31
27
  See <u>https://iframe-resizer.com/setup/</> for more details.
32
- `,nr=e=>`<b>Version mismatch</>
28
+ `,os=e=>`<b>Version mismatch</>
33
29
 
34
30
  The parent and child pages are running different versions of <i>iframe resizer</>.
35
31
 
36
- Parent page: ${e} - Child page: ${E}.
37
- `;function or({version:e}){!e||e===""||e===Bn?h(tr):e!==E&&h(nr(e))}const rr=Ot(()=>h(F(4)));function sr(e){if(!c.timerActive)return;const t=P(performance.now()-c.totalTime),n=e===re?`Initialised iframe in %c${t}ms`:`Size calculated in %c${t}ms`;a(n,s.HIGHLIGHT)}function ir(e){return e===void 0?e=i.targetOrigin:a(`Message targetOrigin: %c${e}`,s.HIGHLIGHT),e}function cr(e,t){const{mode:n}=i,{sameOrigin:o,target:r}=c;if(o)try{window.parent.iframeParentListener(ce+e)}catch(u){if(n===1)rr();else throw u;return!1}else r.postMessage(ce+e,ir(t));return!0}function en(e,t,n,o,r){const{parentId:u}=i,{sameOrigin:l}=c,y=`${e}:${t}`,v=`${u}:${y}:${n}${o===void 0?"":`:${o}`}`;i.mode<-1||!cr(v,r)||(sr(n),d(`Sending message to parent page via ${l?"sameOrigin":"postMessage"}: %c%c${v}`,s.ITALIC,s.HIGHLIGHT))}const g=De((e,t,n,o,r)=>{m(n),en(e,t,n,o,r),D()}),ar=e=>g(0,0,e.type,`${e.screenY}:${e.screenX}`);function tn(e,t){a(`Add event listener: %c${t}`,s.HIGHLIGHT),N(window.document,e,ar)}function lr({mouseEvents:e}){e===!0&&(tn($n,"Mouse Enter"),tn(Ln,"Mouse Leave"))}const dr=()=>g(0,0,Hn);function ur({persisted:e}){e||dr(),m(it),d("Page persisted:",e),!e&&je.forEach(qn)}const fr=()=>N(window,Zn(it),ur),nn=(e,t)=>!(Math.abs(e-t)<=i.tolerance);function mr(e,t){const{calculateHeight:n,calculateWidth:o}=i,{height:r,width:u}=c;return n&&nn(r,e)||o&&nn(u,t)}function hr(e){const t=i.onBeforeResize(e);if(t===void 0)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}const on=e=>t=>{const n=e[t]();return e.enabled()&&i.onBeforeResize!==void 0?hr(n):n},pr=on(O),gr=on(S);function yr(e,t,n,o){const{heightCalcMode:r,widthCalcMode:u}=i,l=n??pr(r),y=o??gr(u),v=mr(l,y)?mt:e;switch(a(`Resize event: %c${t}`,s.HIGHLIGHT),v){case re:case Ae:case mt:case $e:case Le:c.height=l,c.width=y;case pt:return c;case Ne:case yt:case gt:case bt:{a(vt);break}default:d(vt)}return null}let ge=!1,Ue=!1,Q=null;function br(e,t,n,o,r){const{autoResize:u}=i,{isHidden:l}=c;switch(m(e),!0){case l===!0:{if(Ue===!0)break;a("Iframe hidden - Ignored resize request"),Ue=!0,ge=!1,cancelAnimationFrame(Q),Q=null;break}case(ge===!0&&e!==Ne&&!(e in ht)):{a("Resize already pending - Ignored resize request");break}case(!u&&!(e in ht)):{d("Resizing disabled");break}default:{Ue=!1,ge=!0,c.totalTime=performance.now(),c.timerActive=!0;const y=yr(e,t,n,o);y&&en(y.height,y.width,e,r),Q||(Q=requestAnimationFrame(()=>{ge=!1,Q=null,m("requestAnimationFrame"),de(`Reset sendPending: %c${e}`,s.HIGHLIGHT)})),c.timerActive=!1}}D()}const T=De(br);function rn({eventType:e,eventName:t}){N(window,t,()=>T(t,e),{passive:!0})}function vr(){rn({eventType:"After Print",eventName:"afterprint"}),rn({eventType:"Before Print",eventName:"beforeprint"})}function wr(){if(c.triggerLocked){a("TriggerLock blocked calculation");return}c.triggerLocked=!0,de("Trigger event lock on"),requestAnimationFrame(()=>{c.triggerLocked=!1,de("Trigger event lock off")})}function sn(e){const{heightCalcMode:t,widthCalcMode:n}=i,o=O[t](),r=S[n]();a(`Reset trigger event: %c${e}`,s.HIGHLIGHT),g(o,r,e)}function Er(e){const t=i.heightCalcMode;a(`Reset trigger event: %c${e}`,s.HIGHLIGHT),i.heightCalcMode=Ge,wr(),sn("reset"),i.heightCalcMode=t}const zr=`Auto Resize can not be changed when <b>direction</> is set to '${Ce}'.`;function Ir(e){z(e,_n,"parentIframe.autoResize(enable) enable");const{autoResize:t,calculateHeight:n,calculateWidth:o}=i;return o===!1&&n===!1?(m(Ae),h(zr),!1):(e===!0&&t===!1?(i.autoResize=!0,queueMicrotask(()=>T(Ae,"Auto Resize enabled"))):e===!1&&t===!0&&(i.autoResize=!1),g(0,0,Rn,JSON.stringify(i.autoResize)),i.autoResize)}function Or(e){i.heightCalcMode=e,Wt()}function Sr(e){i.widthCalcMode=e,Vt()}function Tr(e){z(e,V,"parentIframe.moveToAnchor(anchor) anchor"),c.inPageLinks.findTarget(e)}function Rr(e){z(e,L,"parentIframe.setOffsetSize(offset) offset"),i.offsetHeight=e,i.offsetWidth=e,T(pt,`parentIframe.setOffsetSize(${e})`)}function Hr(){return m("getOrigin"),At("getOrigin()","getParentOrigin()"),c.origin}const Mr=()=>c.origin;function Ar(e){z(e,V,"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),a(`Set targetOrigin: %c${e}`,s.HIGHLIGHT),i.targetOrigin=e}function $r(e){if(typeof e===q){c.onPageInfo=e,g(0,0,ct),io("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");return}c.onPageInfo=null,g(0,0,Nn)}function cn(e){return z(e,q,"parentIframe.getParentProps(callback) callback"),c.onParentInfo=e,g(0,0,at),()=>{c.onParentInfo=null,g(0,0,Cn)}}function Lr(e){At("getParentProperties()","getParentProps()"),cn(e)}const Nr=e=>`<rb>Deprecated API object name</>
32
+ Parent page: ${e} - Child page: ${w}.
33
+ `;function ss({version:e}){!e||e===""||e===_n?g(ns):e!==w&&g(os(e))}const rs=It(()=>g(F(4)));function is(e){if(!i.timerActive)return;const t=G(performance.now()-i.totalTime),n=e===te?`Initialised iframe in %c${t}ms`:`Size calculated in %c${t}ms`;a(n,r.HIGHLIGHT)}function cs(e){return e===void 0?e=c.targetOrigin:a(`Message targetOrigin: %c${e}`,r.HIGHLIGHT),e}function as(e,t){const{mode:n}=c,{sameOrigin:o,target:s}=i;if(o)try{window.parent.iframeParentListener(re+e)}catch(u){if(xe(n))rs();else throw u;return!1}else s.postMessage(re+e,cs(t));return!0}function Xt(e,t,n,o,s){const{parentId:u}=c,{sameOrigin:l}=i,h=`${e}:${t}`,b=`${u}:${h}:${n}${o===void 0?"":`:${o}`}`;c.mode<-1||!as(b,s)||(is(n),d(`Sending message to parent page via ${l?"sameOrigin":"postMessage"}: %c%c${b}`,r.ITALIC,r.HIGHLIGHT))}const y=Ge((e,t,n,o,s)=>{m(n),Xt(e,t,n,o,s),P()}),ls=e=>y(0,0,e.type,`${e.screenY}:${e.screenX}`);function en(e,t){a(`Add event listener: %c${t}`,r.HIGHLIGHT),L(window.document,e,ls)}function ds({mouseEvents:e}){e===!0&&(en(Mn,"Mouse Enter"),en(An,"Mouse Leave"))}const us=()=>y(0,0,Tn);function fs({persisted:e}){e||us(),m(st),d("Page persisted:",e),!e&&Ce.forEach(Wn)}const ms=()=>L(window,Vn(st),fs),tn=(e,t)=>!(Math.abs(e-t)<=c.tolerance);function hs(e,t){const{calculateHeight:n,calculateWidth:o}=c,{height:s,width:u}=i;return n&&tn(s,e)||o&&tn(u,t)}function ps(e,t,n){const o=c.onBeforeResize(e,t,n);if(o===void 0)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(o))throw new TypeError(`Invalid value returned from onBeforeResize(): ${o}, expected Number`);if(o<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${o}, must be at least 1`);return o}const nn=(e,t)=>(n,o)=>{const s=e[n]();return e.enabled()&&c.onBeforeResize!==void 0?ps(s,o,t):s},gs=nn(fe,oe),ys=nn(me,lt);function vs(e,t,n,o){const{heightCalcMode:s,widthCalcMode:u}=c,l=n??gs(s,e),h=o??ys(u,e),b=hs(l,h)?mt:e;switch(a(`Resize event: %c${t}`,r.HIGHLIGHT),b){case te:case Re:case mt:case He:case Me:i.height=l,i.width=h;case ht:return i;case $e:case gt:case pt:case yt:{a(vt);break}default:d(vt)}return null}let pe=!1,Be=!1,q=null;function bs(e,t,n,o,s){const{autoResize:u}=c,{isHidden:l}=i;switch(m(e),!0){case(l===!0&&!(e in Ae)):{if(Be===!0)break;a("Iframe hidden - Ignored resize request"),Be=!0,pe=!1,cancelAnimationFrame(q),q=null;break}case(pe===!0&&e!==$e&&!(e in Ae)):{a("Resize already pending - Ignored resize request");break}case(!u&&!(e in Ae)):{d("Resizing disabled");break}default:{Be=!1,pe=!0,i.totalTime=performance.now(),i.timerActive=!0;const h=vs(e,t,n,o);h&&Xt(h.height,h.width,e,s),q||(q=requestAnimationFrame(()=>{pe=!1,q=null,m("requestAnimationFrame"),ae(`Reset sendPending: %c${e}`,r.HIGHLIGHT)})),i.timerActive=!1}}P()}const E=Ge(bs);function on({eventType:e,eventName:t}){L(window,t,()=>E(t,e),{passive:!0})}function zs(){on({eventType:"After Print",eventName:"afterprint"}),on({eventType:"Before Print",eventName:"beforeprint"})}function ws(){if(i.triggerLocked){a("TriggerLock blocked calculation");return}i.triggerLocked=!0,ae("Trigger event lock on"),requestAnimationFrame(()=>{i.triggerLocked=!1,ae("Trigger event lock off")})}function sn(e){const{heightCalcMode:t,widthCalcMode:n}=c,o=fe[t](),s=me[n]();a(`Reset trigger event: %c${e}`,r.HIGHLIGHT),y(o,s,e)}function Is(e){const t=c.heightCalcMode;a(`Reset trigger event: %c${e}`,r.HIGHLIGHT),c.heightCalcMode=Bn,ws(),sn("reset"),c.heightCalcMode=t}const Es=`Auto Resize can not be changed when <b>direction</> is set to '${Le}'.`;function Os(e){I(e,Pn,"parentIframe.autoResize(enable) enable");const{autoResize:t,calculateHeight:n,calculateWidth:o}=c;return o===!1&&n===!1?(m(Re),g(Es),!1):(e===!0&&t===!1?(c.autoResize=!0,queueMicrotask(()=>E(Re,"Auto Resize enabled"))):e===!1&&t===!0&&(c.autoResize=!1),y(0,0,Sn,JSON.stringify(c.autoResize)),c.autoResize)}function Ss(e){I(e,W,"parentIframe.moveToAnchor(anchor) anchor"),i.inPageLinks.findTarget(e)}function Ts(e){I(e,A,"parentIframe.setOffsetSize(offset) offset"),c.offsetHeight=e,c.offsetWidth=e,E(ht,`parentIframe.setOffsetSize(${e})`)}function Rs(){return m("getOrigin"),Ht("getOrigin()","getParentOrigin()"),i.origin}const Hs=()=>i.origin;function Ms(e){I(e,W,"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),a(`Set targetOrigin: %c${e}`,r.HIGHLIGHT),c.targetOrigin=e}function As(e){if(typeof e===se){i.onPageInfo=e,y(0,0,rt),so("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");return}i.onPageInfo=null,y(0,0,$n)}function rn(e){return I(e,se,"parentIframe.getParentProps(callback) callback"),i.onParentInfo=e,y(0,0,it),()=>{i.onParentInfo=null,y(0,0,Ln)}}function $s(e){Ht("getParentProperties()","getParentProps()"),rn(e)}const Ls=e=>`<rb>Deprecated API object name</>
38
34
  The <b>window.parentIFrame</> object has been renamed to <b>window.parentIframe</>. Please update your code as the old object will be removed in a future version.
39
35
 
40
36
  Called property: '${String(e)}'
41
- `;function Cr(e){const t=new Set;return new Proxy(e,{get(n,o){t.has(o)||(h(Nr(o)),t.add(o));const r=n[o],u=Object.getOwnPropertyDescriptor(n,o);return u&&!u.configurable&&!u.writable?r:typeof r=="function"?r.bind(n):r}})}function Gr(e,t){e!==void 0&&z(e,L,"parentIframe.resize(customHeight, customWidth) customHeight"),t!==void 0&&z(t,L,"parentIframe.resize(customHeight, customWidth) customWidth");const n=`${e||""}${t?`,${t}`:""}`;T($e,`parentIframe.resize(${n})`,e,t)}const We=e=>(t,n)=>{z(t,L,`parentIframe.${e}(x, y) x`),z(n,L,`parentIframe.${e}(x, y) y`),g(n,t,e)},kr=We(Gn),Pr=We(kn),Dr=We(lt);function _r(e,t){t&&z(t,V,"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),g(0,0,Se,JSON.stringify(e),t)}const jr=()=>g(0,0,Mn),xr=()=>i.parentId,Br=()=>Er("parentIframe.reset"),Fr=()=>I("parentIframe.size() has been renamed parentIframe.resize()");function Ur(){const{win:e}=c;i.mode!==1&&(e.parentIframe=Object.freeze({autoResize:Ir,close:jr,getId:xr,getOrigin:Hr,getParentOrigin:Mr,getPageInfo:$r,getParentProps:cn,getParentProperties:Lr,moveToAnchor:Tr,reset:Br,setOffsetSize:Rr,scrollBy:kr,scrollTo:Pr,scrollToOffset:Dr,sendMessage:_r,setHeightCalculationMethod:Or,setWidthCalculationMethod:Sr,setTargetOrigin:Ar,resize:Gr,size:Fr}),e.parentIFrame=Cr(e.parentIframe))}const J=(e="")=>t=>n=>{n.size>0&&de(`${t}Observer ${e}:`,...Array.from(n).flatMap(o=>[`
42
- `,o]))},Wr=(e="")=>t=>n=>{n.size>0&&Mt(`${t}Observer ${e}:`,...Array.from(n).flatMap(o=>[`
43
- `,o]))},an=J("attached to"),ln=Wr("already attached"),Vr=J("detached from"),ye=(e,t=!0)=>n=>{n>0&&d(`${t?"At":"De"}tached %c${e}Observer%c ${t?"to":"from"} %c${n}%c element${n===1?"":"s"}`,s.HIGHLIGHT,s.NORMAL,s.HIGHLIGHT,s.NORMAL)},dn=(e,t,n,o)=>{const r=Vr(e);return u=>{const l=new Set;let y=0;for(const v of u)n.has(v)&&(t.unobserve(v),n.delete(v),l.add(v),y+=1);r(l),o(y),l.clear()}},un=16,fn=2,qr=200,Ve="Mutation",R=new Set,k=new Set,qe=new Set,be=[],Zr={attributes:!0,attributeFilter:[U,se],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let Ze=1,Ye,Qe=!1,Je=0;const Yr=J("added")(Ve),Qr=J("removed (page)")(Ve),Jr=J("removed (added)")(Ve),mn=e=>e.nodeType!==Node.ELEMENT_NODE||It.has(e.tagName.toLowerCase());function Kr(e){const t=e.addedNodes;for(const n of t)mn(n)||R.add(n)}function Xr(e){const t=e.removedNodes;for(const n of t)mn(n)||(R.has(n)?(R.delete(n),qe.add(n)):k.add(n))}const es=e=>{d("Mutations:",e);for(const t of e)Kr(t),Xr(t);Yr(R),Qr(k),Jr(qe),qe.clear()};function ts(){k.size>0&&a(`Detected %c${k.size} %cremoved element${k.size>1?"s":""}`,s.HIGHLIGHT,s.FOREGROUND),R.size>0&&a(`Found %c${R.size} %cnew element${R.size>1?"s":""}`,s.HIGHLIGHT,s.FOREGROUND)}const ns=e=>()=>{const t=performance.now(),n=t-Je,o=un*Ze+++fn;if(n>o&&n<qr){m("mutationThrottled"),d("Update delayed due to heavy workload on the callStack"),d(`EventLoop busy time: %c${P(n)}ms %c> Max wait: %c${o-fn}ms`,s.HIGHLIGHT,s.FOREGROUND,s.HIGHLIGHT),setTimeout(Ye,un*Ze),Je=t;return}Ze=1,be.forEach(es),be.length=0,Qe=!1,ts(),e({addedNodes:R,removedNodes:k}),R.clear(),k.clear()};function os(e){be.push(e),!Qe&&(Je=performance.now(),Qe=!0,requestAnimationFrame(Ye))}function rs(e){const t=new window.MutationObserver(os),n=document.body||document.documentElement;return Ye=ns(e),t.observe(n,Zr),d("Attached%c MutationObserver%c to body",s.HIGHLIGHT,s.FOREGROUND),{...t,disconnect:()=>{R.clear(),k.clear(),be.length=0,t.disconnect(),d("Detached%c MutationObserver",s.HIGHLIGHT)}}}const ss={characterData:!0,childList:!0,subtree:!0};function is(e){const t=document.querySelector("title")??document.head??document.documentElement,n=new MutationObserver(e);return n.observe(t,ss),d("Attached%c TitleObserver%c to head",s.HIGHLIGHT,s.FOREGROUND),setTimeout(e),{disconnect:()=>{n.disconnect(),d("Detached%c TitleObserver",s.HIGHLIGHT)}}}function cs(e){const t=new IntersectionObserver(o=>e(o.at(-1)?.isIntersecting??!1),{threshold:0}),n=document.documentElement;return t.observe(n),d("Attached%c VisibilityObserver%c to page",s.HIGHLIGHT,s.FOREGROUND),{disconnect:()=>{t.disconnect(),d("Detached%c VisibilityObserver",s.HIGHLIGHT)}}}let hn=new Set;function as(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${U}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{m("overflowIgnored"),d(`Ignoring elements with [data-iframe-ignore] > *:
44
- `,n),D()}),t}function pn(){const e=document.querySelectorAll(`[${dt}]`),t=as(e);let n=!1;return typeof Set.prototype.symmetricDifference===q&&(n=t.symmetricDifference(hn).size>0),hn=t,c.overflowedNodeSet=t,c.hasOverflow=t.size>0,{hasOverflowUpdated:n,overflowedNodeSet:t}}const H={},gn=e=>{const t=new Set;for(const n of e){t.add(n);for(const o of xe(n))t.add(o)}return d(`Inspecting:
45
- `,t),t},ls=e=>{if(e.size===0)return;m("addObservers");const t=gn(e);H.overflow.attachObservers(t),H.resize.attachObserverToNonStaticElements(t),D()},ds=e=>{if(e.size===0)return;m("removeObservers");const t=gn(e);H.overflow.detachObservers(t),H.resize.detachObservers(t),D()};function us({addedNodes:e,removedNodes:t}){m("contentMutated"),c.applySelectors(),Xt(),pn(),D(),ds(t),ls(e)}function fs(e){us(e),T(yt,"Mutation Observed")}const K="Overflow",ms=ye(K),hs=ye(K,!1),ps=an(K),gs=ln(K),ys=e=>e.hidden||e.offsetParent===null||e.style.display===Ce,bs=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||le,u=(M=!1)=>e(M),l=(M,A)=>M===0||M>A[n],y=(M,A)=>M.toggleAttribute(dt,A);function v(M){for(const A of M){const{boundingClientRect:ne,rootBounds:oe,target:$}=A;if(!oe)continue;const gi=ne[n],yi=l(gi,oe)&&!ys($);y($,yi)}r(u)}const f=new IntersectionObserver(v,o),w=new WeakSet;function p(M){const A=new Set,ne=new Set;let oe=0;for(const $ of M)if($.nodeType===Node.ELEMENT_NODE){if(w.has($)){A.add($);continue}f.observe($),w.add($),ne.add($),oe+=1}gs(A),ps(ne),ms(oe),ne.clear(),A.clear()}return{attachObservers:p,detachObservers:dn(K,f,w,hs),disconnect:()=>{f.disconnect(),d("Detached%c OverflowObserver",s.HIGHLIGHT)}}};function vs(){const{hasOverflow:e}=c,{hasOverflowUpdated:t,overflowedNodeSet:n}=pn();switch(!0){case!t:return;case n.size>1:d("Overflowed Elements:",n);break;case e:break;default:d("No overflow detected")}T(Ne,"Overflow updated")}function ws(e){const t={root:document.documentElement,side:i.calculateHeight?He:Me};return H.overflow=bs(vs,t),H.overflow.attachObservers(e),H.overflow}const X="Resize",Es=ye(X),zs=ye(X,!1),Is=an(X),Os=ln(X),ve=new WeakSet,Ke=new Set,Xe=new Set;let ee;function Ss(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const o=getComputedStyle(n)?.position;if(!(o===""||o==="static")){if(ve.has(n)){Ke.add(n);continue}ee.observe(n),ve.add(n),Xe.add(n),t+=1}}Os(Ke),Is(Xe),Es(t),Xe.clear(),Ke.clear()}const Ts=e=>(ee=new ResizeObserver(e),ee.observe(document.body),ve.add(document.body),d("Attached%c ResizeObserver%c to body",s.HIGHLIGHT,s.FOREGROUND),{attachObserverToNonStaticElements:Ss,detachObservers:dn(X,ee,ve,zs),disconnect:()=>{ee.disconnect(),d("Detached%c ResizeObserver",s.HIGHLIGHT)}});function Rs(e){if(!Array.isArray(e)||e.length===0)return;const t=e[0].target;T(gt,`Element resized <${Yn(t)}>`)}function Hs(e){return H.resize=Ts(Rs),H.resize.attachObserverToNonStaticElements(e),H.resize}let yn;function Ms(){const e=document.title;e!==yn&&(yn=e,a(`Title: %c${e}`,s.HIGHLIGHT),e&&g(0,0,Pn,e))}function As(e){a(`Visible: %c${e}`,s.HIGHLIGHT),c.isHidden=!e,T(bt,"Visibility changed")}function $s(e){je.push(...e.map(t=>t.disconnect))}function Ls(){m("attachObservers");const e=xe(document.documentElement),t=[rs(fs),ws(e),Co(),Hs(e),is(Ms),cs(As)];$s(t)}const bn=(e,t,n)=>{if(n!==""){a(`${e}: %c${n}`,s.HIGHLIGHT);for(const o of document.querySelectorAll(n))a(`Applying ${t} to:`,o),o.toggleAttribute(t,!0)}};function Ns({sizeSelector:e,ignoreSelector:t}){return()=>{bn("sizeSelector",se,e),bn("ignoreSelector",U,t)}}function Cs(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function Gs(e,t){return t.includes("-")&&(I(`Negative CSS value ignored for ${e}`),t=""),t}function et(e,t){t===void 0||t===""||t===Fn||(document.body.style.setProperty(e,t),d(`Set body ${e}: %c${t}`,s.HIGHLIGHT))}function ks({bodyMarginStr:e,bodyMargin:t}){e===void 0&&(e=`${t}px`),et("margin",Gs("margin",e))}const Ps=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function Ds(e){const t=e.getBoundingClientRect(),n=Ps();return{x:parseInt(t.left,10)+parseInt(n.x,10),y:parseInt(t.top,10)+parseInt(n.y,10)}}function _s(e,t){const n=Ds(t);a(`Moving to in page link (%c#${e}%c) at x: %c${n.x}%c y: %c${n.y}`,s.HIGHLIGHT,s.FOREGROUND,s.HIGHLIGHT,s.FOREGROUND,s.HIGHLIGHT),g(n.y,n.x,lt)}function tt(e){const t=e.split("#")[1]||e,n=decodeURIComponent(t),o=document.getElementById(n)||document.getElementsByName(n)[0];if(o!==void 0){_s(t,o);return}a(`In page link (#${t}) not found in iframe, so sending to parent`),g(0,0,An,`#${t}`)}function vn(){const{hash:e,href:t}=window.location;e!==""&&e!=="#"&&tt(t)}function js(){for(const e of document.querySelectorAll('a[href^="#"]'))e.getAttribute("href")!=="#"&&N(e,"click",t=>{t.preventDefault(),tt(e.getAttribute("href"))})}function xs(){N(window,"hashchange",vn)}function Bs(){setTimeout(vn,zt)}function Fs(){a("Setting up location.hash handlers"),js(),xs(),Bs(),c.inPageLinks={findTarget:tt}}function Us(e){const{mode:t}=i;e?t===1?h(F(5)):Fs():a("In page linking not enabled")}const Ws="important";function Vs(){const e=t=>t.style.setProperty(W,ie,Ws);e(document.documentElement),e(document.body),a("Set HTML & body height: %cauto !important",s.HIGHLIGHT)}const qs="custom",Zs=e=>`<rb>Deprecated Option(${e}CalculationMethod)</>
46
-
47
- The use of <b>${e}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.
48
-
49
- See <u>https://iframe-resizer.com/api/child</> for more details.
50
- `;function wn(e,t){return typeof e!==q?e:(h(Zs(t)),t===W?O.custom=e:S.custom=e,qs)}const nt=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},ot=nt(q),we=nt(L),Ee=nt(V),Ys=e=>e!==null&&typeof e===jn&&!Array.isArray(e);function Qs(e){const{calculateHeight:t,calculateWidth:n}=i;let o,r;return typeof e?.offset===L&&(co(Te,Re),t&&(o=we(e,Te)),n&&(r=we(e,Te))),typeof e?.offsetSize===L&&(t&&(o=we(e,Re)),n&&(r=we(e,Re))),{offsetHeight:o,offsetWidth:r}}function Js(e){a("Reading data from page:",Object.keys(e));const{offsetHeight:t,offsetWidth:n}=Qs(e);return{offsetHeight:t,offsetWidth:n,ignoreSelector:Ee(e,"ignoreSelector"),key2:Ee(e,Zo(0)),sizeSelector:Ee(e,"sizeSelector"),targetOrigin:Ee(e,"targetOrigin"),heightCalcMode:wn(e?.heightCalculationMethod,W),widthCalcMode:wn(e?.widthCalculationMethod,ut),onBeforeResize:ot(e,"onBeforeResize"),onMessage:ot(e,"onMessage"),onReady:ot(e,"onReady")}}function Ks(){const{mode:e}=i;if(e===1)return{};const t=window.iframeResizer||window.iFrameResizer;return Ys(t)?Js(t):{}}const Xs=e=>e==="true",En=e=>t=>t===void 0?void 0:e(t),_=En(Xs),te=En(Number),ei=e=>({parentId:e[0],bodyMargin:te(e[1]),calculateWidth:_(e[2]),logging:_(e[3]),autoResize:_(e[6]),bodyMarginStr:e[7],heightCalcMode:e[8],bodyBackground:e[9],bodyPadding:e[10],tolerance:te(e[11]),inPageLinks:_(e[12]),widthCalcMode:e[14],mouseEvents:_(e[15]),offsetHeight:te(e[16]),offsetWidth:te(e[17]),calculateHeight:_(e[18]),key:e[19],version:e[20],mode:te(e[21]),logExpand:_(e[23])});function ti(e){const{mode:t}=i;e.forEach(n=>{try{n()}catch(o){if(t<0)throw o;h(`<rb>Error in setup function</>
37
+ `;function Ns(e){const t=new Set;return new Proxy(e,{get(n,o){t.has(o)||(g(Ls(o)),t.add(o));const s=n[o],u=Object.getOwnPropertyDescriptor(n,o);return u&&!u.configurable&&!u.writable?s:typeof s=="function"?s.bind(n):s}})}function ks(e,t){e!==void 0&&I(e,A,"parentIframe.resize(customHeight, customWidth) customHeight"),t!==void 0&&I(t,A,"parentIframe.resize(customHeight, customWidth) customWidth");const n=`${e||""}${t?`,${t}`:""}`;E(He,`parentIframe.resize(${n})`,e,t)}const Fe=e=>(t,n)=>{I(t,A,`parentIframe.${e}(x, y) x`),I(n,A,`parentIframe.${e}(x, y) y`),y(n,t,e)},Gs=Fe(Nn),Ps=Fe(kn),Cs=Fe(ct);function js(e,t){t&&I(t,W,"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),y(0,0,Oe,JSON.stringify(e),t)}const _s=()=>y(0,0,Rn),Ds=()=>c.parentId,xs=()=>Is("parentIframe.reset"),Bs=()=>C("parentIframe.size() has been renamed parentIframe.resize()");function Fs(){const{win:e}=i;c.mode!==1&&(e.parentIframe=Object.freeze({autoResize:Os,close:_s,getId:Ds,getOrigin:Rs,getParentOrigin:Hs,getPageInfo:As,getParentProps:rn,getParentProperties:$s,moveToAnchor:Ss,reset:xs,setOffsetSize:Ts,scrollBy:Gs,scrollTo:Ps,scrollToOffset:Cs,sendMessage:js,setTargetOrigin:Ms,resize:ks,size:Bs}),e.parentIFrame=Ns(e.parentIframe))}const Z=(e="")=>t=>n=>{n.size>0&&ae(`${t}Observer ${e}:`,...Array.from(n).flatMap(o=>[`
38
+ `,o]))},Us=(e="")=>t=>n=>{n.size>0&&Rt(`${t}Observer ${e}:`,...Array.from(n).flatMap(o=>[`
39
+ `,o]))},cn=Z("attached to"),an=Us("already attached"),Ws=Z("detached from"),ge=(e,t=!0)=>n=>{n>0&&d(`${t?"At":"De"}tached %c${e}Observer%c ${t?"to":"from"} %c${n}%c element${n===1?"":"s"}`,r.HIGHLIGHT,r.NORMAL,r.HIGHLIGHT,r.NORMAL)},ln=(e,t,n,o)=>{const s=Ws(e);return u=>{const l=new Set;let h=0;for(const b of u)n.has(b)&&(t.unobserve(b),n.delete(b),l.add(b),h+=1);s(l),o(h),l.clear()}},dn=16,un=2,Vs=200,Ue="Mutation",O=new Set,k=new Set,We=new Set,ye=[],qs={attributes:!0,attributeFilter:[U,ne],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let Ve=1,qe,Ze=!1,Qe=0;const Zs=Z("added")(Ue),Qs=Z("removed (page)")(Ue),Ys=Z("removed (added)")(Ue),fn=e=>e.nodeType!==Node.ELEMENT_NODE||wt.has(e.tagName.toLowerCase());function Js(e){const t=e.addedNodes;for(const n of t)fn(n)||O.add(n)}function Ks(e){const t=e.removedNodes;for(const n of t)fn(n)||(O.has(n)?(O.delete(n),We.add(n)):k.add(n))}const Xs=e=>{d("Mutations:",e);for(const t of e)Js(t),Ks(t);Zs(O),Qs(k),Ys(We),We.clear()};function er(){k.size>0&&a(`Detected %c${k.size} %cremoved element${k.size>1?"s":""}`,r.HIGHLIGHT,r.FOREGROUND),O.size>0&&a(`Found %c${O.size} %cnew element${O.size>1?"s":""}`,r.HIGHLIGHT,r.FOREGROUND)}const tr=e=>()=>{const t=performance.now(),n=t-Qe,o=dn*Ve+++un;if(n>o&&n<Vs){m("mutationThrottled"),d("Update delayed due to heavy workload on the callStack"),d(`EventLoop busy time: %c${G(n)}ms %c> Max wait: %c${o-un}ms`,r.HIGHLIGHT,r.FOREGROUND,r.HIGHLIGHT),setTimeout(qe,dn*Ve),Qe=t;return}Ve=1,ye.forEach(Xs),ye.length=0,Ze=!1,er(),e({addedNodes:O,removedNodes:k}),O.clear(),k.clear()};function nr(e){ye.push(e),!Ze&&(Qe=performance.now(),Ze=!0,requestAnimationFrame(qe))}function or(e){const t=new window.MutationObserver(nr),n=document.body||document.documentElement;return qe=tr(e),t.observe(n,qs),d("Attached%c MutationObserver%c to body",r.HIGHLIGHT,r.FOREGROUND),{...t,disconnect:()=>{O.clear(),k.clear(),ye.length=0,t.disconnect(),d("Detached%c MutationObserver",r.HIGHLIGHT)}}}const sr={characterData:!0,childList:!0,subtree:!0};function rr(e){const t=document.querySelector("title")??document.head??document.documentElement,n=new MutationObserver(e);return n.observe(t,sr),d("Attached%c TitleObserver%c to head",r.HIGHLIGHT,r.FOREGROUND),setTimeout(e),{disconnect:()=>{n.disconnect(),d("Detached%c TitleObserver",r.HIGHLIGHT)}}}function ir(e){const t=new IntersectionObserver(o=>e(o.at(-1)?.isIntersecting??!1),{threshold:0}),n=document.documentElement;return t.observe(n),d("Attached%c VisibilityObserver%c to page",r.HIGHLIGHT,r.FOREGROUND),{disconnect:()=>{t.disconnect(),d("Detached%c VisibilityObserver",r.HIGHLIGHT)}}}let mn=new Set;function cr(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${U}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{m("overflowIgnored"),d(`Ignoring elements with [data-iframe-ignore] > *:
40
+ `,n),P()}),t}function hn(){const e=document.querySelectorAll(`[${at}]`),t=cr(e);let n=!1;return typeof Set.prototype.symmetricDifference===se&&(n=t.symmetricDifference(mn).size>0),mn=t,i.overflowedNodeSet=t,i.hasOverflow=t.size>0,{hasOverflowUpdated:n,overflowedNodeSet:t}}const S={},pn=e=>{const t=new Set;for(const n of e){t.add(n);for(const o of De(n))t.add(o)}return d(`Inspecting:
41
+ `,t),t},ar=e=>{if(e.size===0)return;m("addObservers");const t=pn(e);S.overflow.attachObservers(t),S.resize.attachObserverToNonStaticElements(t),P()},lr=e=>{if(e.size===0)return;m("removeObservers");const t=pn(e);S.overflow.detachObservers(t),S.resize.detachObservers(t),P()};function dr({addedNodes:e,removedNodes:t}){m("contentMutated"),i.applySelectors(),Kt(),hn(),P(),lr(t),ar(e)}function ur(e){dr(e),E(gt,"Mutation Observed")}const Q="Overflow",fr=ge(Q),mr=ge(Q,!1),hr=cn(Q),pr=an(Q),gr=e=>e.hidden||e.offsetParent===null||e.style.display===Le,yr=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},s=window?.requestAnimationFrame||ce,u=(T=!1)=>e(T),l=(T,H)=>T===0||T>H[n],h=(T,H)=>T.toggleAttribute(at,H);function b(T){for(const H of T){const{boundingClientRect:X,rootBounds:ee,target:M}=H;if(!ee)continue;const mi=X[n],hi=l(mi,ee)&&!gr(M);h(M,hi)}s(u)}const f=new IntersectionObserver(b,o),z=new WeakSet;function p(T){const H=new Set,X=new Set;let ee=0;for(const M of T)if(M.nodeType===Node.ELEMENT_NODE){if(z.has(M)){H.add(M);continue}f.observe(M),z.add(M),X.add(M),ee+=1}pr(H),hr(X),fr(ee),X.clear(),H.clear()}return{attachObservers:p,detachObservers:ln(Q,f,z,mr),disconnect:()=>{f.disconnect(),d("Detached%c OverflowObserver",r.HIGHLIGHT)}}};function vr(){const{hasOverflow:e}=i,{hasOverflowUpdated:t,overflowedNodeSet:n}=hn();switch(!0){case!t:return;case n.size>1:d("Overflowed Elements:",n);break;case e:break;default:d("No overflow detected")}E($e,"Overflow updated")}function br(e){const t={root:document.documentElement,side:c.calculateHeight?ut:ft};return S.overflow=yr(vr,t),S.overflow.attachObservers(e),S.overflow}const Y="Resize",zr=ge(Y),wr=ge(Y,!1),Ir=cn(Y),Er=an(Y),ve=new WeakSet,Ye=new Set,Je=new Set;let J;function Or(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const o=getComputedStyle(n)?.position;if(!(o===""||o==="static")){if(ve.has(n)){Ye.add(n);continue}J.observe(n),ve.add(n),Je.add(n),t+=1}}Er(Ye),Ir(Je),zr(t),Je.clear(),Ye.clear()}const Sr=e=>(J=new ResizeObserver(e),J.observe(document.body),ve.add(document.body),d("Attached%c ResizeObserver%c to body",r.HIGHLIGHT,r.FOREGROUND),{attachObserverToNonStaticElements:Or,detachObservers:ln(Y,J,ve,wr),disconnect:()=>{J.disconnect(),d("Detached%c ResizeObserver",r.HIGHLIGHT)}});function Tr(e){if(!Array.isArray(e)||e.length===0)return;const t=e[0].target;E(pt,`Element resized <${qn(t)}>`)}function Rr(e){return S.resize=Sr(Tr),S.resize.attachObserverToNonStaticElements(e),S.resize}let gn;function Hr(){const e=document.title;e!==gn&&(gn=e,a(`Title: %c${e}`,r.HIGHLIGHT),e&&y(0,0,Gn,e))}function Mr(e){a(`Visible: %c${e}`,r.HIGHLIGHT),i.isHidden=!e,E(yt,"Visibility changed")}function Ar(e){Ce.push(...e.map(t=>t.disconnect))}function $r(){m("attachObservers");const e=De(document.documentElement),t=[or(ur),br(e),Mo(),Rr(e),rr(Hr),ir(Mr)];Ar(t)}const yn=(e,t,n)=>{if(n!==""){a(`${e}: %c${n}`,r.HIGHLIGHT);for(const o of document.querySelectorAll(n))a(`Applying ${t} to:`,o),o.toggleAttribute(t,!0)}};function Lr({sizeSelector:e,ignoreSelector:t}){return()=>{yn("sizeSelector",ne,e),yn("ignoreSelector",U,t)}}function Nr(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function kr(e,t){return t.includes("-")&&(C(`Negative CSS value ignored for ${e}`),t=""),t}function Ke(e,t){t===void 0||t===""||t===Dn||(document.body.style.setProperty(e,t),d(`Set body ${e}: %c${t}`,r.HIGHLIGHT))}function Gr({bodyMarginStr:e,bodyMargin:t}){e===void 0&&(e=`${t}px`),Ke("margin",kr("margin",e))}const Pr=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function Cr(e){const t=e.getBoundingClientRect(),n=Pr();return{x:parseInt(t.left,10)+parseInt(n.x,10),y:parseInt(t.top,10)+parseInt(n.y,10)}}function jr(e,t){const n=Cr(t);a(`Moving to in page link (%c#${e}%c) at x: %c${n.x}%c y: %c${n.y}`,r.HIGHLIGHT,r.FOREGROUND,r.HIGHLIGHT,r.FOREGROUND,r.HIGHLIGHT),y(n.y,n.x,ct)}function Xe(e){const t=e.split("#")[1]||e,n=decodeURIComponent(t),o=document.getElementById(n)||document.getElementsByName(n)[0];if(o!==void 0){jr(t,o);return}a(`In page link (#${t}) not found in iframe, so sending to parent`),y(0,0,Hn,`#${t}`)}function vn(){const{hash:e,href:t}=window.location;e!==""&&e!=="#"&&Xe(t)}function _r(){for(const e of document.querySelectorAll('a[href^="#"]'))e.getAttribute("href")!=="#"&&L(e,"click",t=>{t.preventDefault(),Xe(e.getAttribute("href"))})}function Dr(){L(window,"hashchange",vn)}function xr(){setTimeout(vn,zt)}function Br(){a("Setting up location.hash handlers"),_r(),Dr(),xr(),i.inPageLinks={findTarget:Xe}}function Fr(e){const{mode:t}=c;e?xe(t)?g(F(5)):Br():a("In page linking not enabled")}const Ur="important";function Wr(){const e=t=>t.style.setProperty(oe,$,Ur);e(document.documentElement),e(document.body),a("Set HTML & body height: %cauto !important",r.HIGHLIGHT)}const et=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},tt=et(se),be=et(A),ze=et(W),Vr=e=>e!==null&&typeof e===Cn&&!Array.isArray(e);function qr(e){const{calculateHeight:t,calculateWidth:n}=c;let o,s;return typeof e?.offset===A&&(ro(Se,Te),t&&(o=be(e,Se)),n&&(s=be(e,Se))),typeof e?.offsetSize===A&&(t&&(o=be(e,Te)),n&&(s=be(e,Te))),{offsetHeight:o,offsetWidth:s}}function Zr(e){a("Reading data from page:",Object.keys(e));const{offsetHeight:t,offsetWidth:n}=qr(e);return{offsetHeight:t,offsetWidth:n,ignoreSelector:ze(e,"ignoreSelector"),[Zt(3)]:ze(e,Zt(0)),sizeSelector:ze(e,"sizeSelector"),targetOrigin:ze(e,"targetOrigin"),onBeforeResize:tt(e,"onBeforeResize"),onMessage:tt(e,"onMessage"),onReady:tt(e,"onReady")}}function Qr(){const{mode:e}=c;if(xe(e))return{};const t=window.iframeResizer||window.iFrameResizer;return Vr(t)?Zr(t):{}}const Yr=e=>e==="true",bn=e=>t=>t===void 0?void 0:e(t),j=bn(Yr),K=bn(Number),Jr=e=>({parentId:e[0],bodyMargin:K(e[1]),calculateWidth:j(e[2]),logging:j(e[3]),autoResize:j(e[6]),bodyMarginStr:e[7],heightCalcMode:e[8],bodyBackground:e[9],bodyPadding:e[10],tolerance:K(e[11]),inPageLinks:j(e[12]),widthCalcMode:e[14],mouseEvents:j(e[15]),offsetHeight:K(e[16]),offsetWidth:K(e[17]),calculateHeight:j(e[18]),key:e[19],version:e[20],mode:K(e[21]),logExpand:j(e[23])});function Kr(e){const{mode:t}=c;e.forEach(n=>{try{n()}catch(o){if(t<0)throw o;g(`<rb>Error in setup function</>
51
42
  <i>iframe-resizer</> detected an error during setup.
52
43
 
53
- Please report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>`),Mt(o)}})}function zn(e){for(const[t,n]of Object.entries(e))n!==void 0&&(i[t]=n)}function ni({logExpand:e,logging:t,parentId:n}){oo({id:n,enabled:t,expand:e}),m("initReceived"),a(`Initialising iframe v${E} ${window.location.href}`)}function oi(e){m("ready"),Kt(Ot(e)),a("Initialization complete",(({key:t,key2:n,...o})=>o)(i))}function ri({bodyBackground:e,bodyPadding:t,inPageLinks:n,onReady:o}){const r=zo(i),u=[()=>or(i),()=>Yo(i),Uo,jo,Wt,Vt,Bo,Ko,Xt,er,r?le:Eo,()=>ks(i),()=>et("background",e),()=>et("padding",t),r?le:Vs,Cs,c.applySelectors,()=>Us(n),vr,()=>lr(i),fr,()=>Ur(),()=>T(re,"Init message from host page",void 0,void 0,`${E}:${i.mode}`),Ls,D];ti(u),oi(o)}function si(e){c.firstRun&&(zn(ei(e)),ni(i),zn(Ks()),c.applySelectors=Ns(i),ri(i))}function ii(e){if(document.readyState==="loading"){a("Page not ready, ignoring init message");return}const t=e.data.slice(wt).split(":");c.target=e.source,c.origin=e.origin,si(t),c.firstRun=!1,setTimeout(()=>{c.initLock=!1},zt)}const{freeze:ci}=Object,{parse:rt}=JSON,st=e=>ci(rt(e)),In=e=>g(0,0,`${e}Stop`),ze=e=>e.data.slice(e.data.indexOf(":")+1),ai=e=>uo(e)?re:e.data.split("]")[1].split(":")[0];function li(e){const t=ze(e);a("onMessage called from parent:%c",s.HIGHLIGHT,st(t)),ae(i.onMessage,rt(t))}function di(e){const{onPageInfo:t}=c,n=ze(e);a("PageInfo received from parent:",st(n)),t?ae(t,rt(n)):In(ct)}function ui(e){const{onParentInfo:t}=c,n=st(ze(e));a("ParentInfo received from parent:",n),t?ae(t,n):In(at)}function fi(){if(c.initLock){a("Page reset ignored by init");return}a("Page size reset by host page"),sn("resetPage")}function mi(){a("Resize requested by host page"),T(Le,"Parent window requested size check")}const On=e=>c.inPageLinks.findTarget(ze(e)),Sn={init:ii,reset:fi,resize:mi,moveToAnchor:On,inPageLink:On,pageInfo:di,parentInfo:ui,message:li};function hi(e){const{firstRun:t}=c,n=ai(e);switch(m(n),!0){case n in Sn:Sn[n](e);break;case(t&&lo()):I(`Ignored message of type "${n}". Received before initialization.`);break;default:I(`Unexpected message (${e.data}), this is likely due to a newer version of iframe-resizer running on the parent page.`)}}const Ie=De(e=>{ao(e)&&hi(e)});function pi(){if("iframeChildListener"in window){I("Already setup");return}window.iframeChildListener=t=>setTimeout(()=>Ie({data:t,sameOrigin:!0})),m("listen"),N(window,Se,Ie),N(document,ft,Gt),Gt();function e(t){return Ie(t),c.win}try{top?.document?.getElementById("banner")&&(c.win={},window.mockMsgListener=e,Lt(window,Se,Ie),typeof window.define=="function"&&window.define([],()=>e))}catch{}}typeof window!==xn&&pi()}));
44
+ Please report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>`),Rt(o)}})}function zn(e){for(const[t,n]of Object.entries(e))n!==void 0&&(c[t]=n)}function Xr({logExpand:e,logging:t,parentId:n}){to({id:n,enabled:t,expand:e}),m("initReceived"),a(`Initialising iframe v${w} ${window.location.href}`)}function ei(e){m("ready"),Jt(It(e)),a("Initialization complete",(({key:t,key2:n,...o})=>o)(c))}function ti({bodyBackground:e,bodyPadding:t,inPageLinks:n,onReady:o}){const s=zo(c),u=[()=>ss(c),()=>Yo(c),Do,Po,ko,Go,jo,Xo,Kt,ts,s?ce:bo,()=>Gr(c),()=>Ke("background",e),()=>Ke("padding",t),s?ce:Wr,Nr,i.applySelectors,()=>Fr(n),zs,()=>ds(c),ms,()=>Fs(),()=>E(te,"Init message from host page",void 0,void 0,`${w}:${c.mode}`),$r,P];Kr(u),ei(o)}function ni(e){i.firstRun&&(zn(Jr(e)),Xr(c),zn(Qr()),i.applySelectors=Lr(c),ti(c))}function oi(e){if(document.readyState==="loading"){a("Page not ready, ignoring init message");return}const t=e.data.slice(bt).split(":");i.target=e.source,i.origin=e.origin,ni(t),i.firstRun=!1,setTimeout(()=>{i.initLock=!1},zt)}const{freeze:si}=Object,{parse:nt}=JSON,ot=e=>si(nt(e)),wn=e=>y(0,0,`${e}Stop`),we=e=>e.data.slice(e.data.indexOf(":")+1),ri=e=>ao(e)?te:e.data.split("]")[1].split(":")[0];function ii(e){const t=we(e);a("onMessage called from parent:%c",r.HIGHLIGHT,ot(t)),ie(c.onMessage,nt(t))}function ci(e){const{onPageInfo:t}=i,n=we(e);a("PageInfo received from parent:",ot(n)),t?ie(t,nt(n)):wn(rt)}function ai(e){const{onParentInfo:t}=i,n=ot(we(e));a("ParentInfo received from parent:",n),t?ie(t,n):wn(it)}function li(){if(i.initLock){a("Page reset ignored by init");return}a("Page size reset by host page"),sn("resetPage")}function di(){a("Resize requested by host page"),E(Me,"Parent window requested size check")}const In=e=>i.inPageLinks.findTarget(we(e)),En={init:oi,reset:li,resize:di,moveToAnchor:In,inPageLink:In,pageInfo:ci,parentInfo:ai,message:ii};function ui(e){const{firstRun:t}=i,n=ri(e);switch(m(n),!0){case n in En:En[n](e);break;case(t&&co()):C(`Ignored message of type "${n}". Received before initialization.`);break;default:C(`Unexpected message (${e.data}), this is likely due to a newer version of iframe-resizer running on the parent page.`)}}const Ie=Ge(e=>{io(e)&&ui(e)});function fi(){if("iframeChildListener"in window){C("Already setup");return}window.iframeChildListener=t=>setTimeout(()=>Ie({data:t,sameOrigin:!0})),m("listen"),L(window,Oe,Ie),L(document,dt,Nt),Nt();function e(t){return Ie(t),i.win}try{top?.document?.getElementById("banner")&&(i.win={},window.mockMsgListener=e,At(window,Oe,Ie),typeof window.define=="function"&&window.define([],()=>e))}catch{}}typeof window!==jn&&fi()}));
54
45
  //# sourceMappingURL=index.umd.js.map