@streamlayer/react 1.14.2 → 1.14.4

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react/jsx-runtime"),qe=require("react"),X=require("./provider.js"),ge=require("./useStreamLayerApp2.js"),p_=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function mh(i){return typeof i=="string"&&p_.test(i)}function gc(i){if(!mh(i))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(i.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(i.slice(9,13),16))>>>8,e&255,(e=parseInt(i.slice(14,18),16))>>>8,e&255,(e=parseInt(i.slice(19,23),16))>>>8,e&255,(e=parseInt(i.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}function g_(i){i=unescape(encodeURIComponent(i));const e=new Uint8Array(i.length);for(let t=0;t<i.length;++t)e[t]=i.charCodeAt(t);return e}const m_="6ba7b810-9dad-11d1-80b4-00c04fd430c8",f_="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function y_(i,e,t,r,n,s){const a=typeof t=="string"?g_(t):t,l=typeof r=="string"?gc(r):r;if(typeof r=="string"&&(r=gc(r)),(r==null?void 0:r.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+a.length);if(u.set(l),u.set(a,l.length),u=e(u),u[6]=u[6]&15|i,u[8]=u[8]&63|128,n){s=s||0;for(let p=0;p<16;++p)n[s+p]=u[p];return n}return ge.unsafeStringify(u)}function __(i,e,t,r){switch(i){case 0:return e&t^~e&r;case 1:return e^t^r;case 2:return e&t^e&r^t&r;case 3:return e^t^r}}function _o(i,e){return i<<e|i>>>32-e}function b_(i){const e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520],r=new Uint8Array(i.length+1);r.set(i),r[i.length]=128,i=r;const n=i.length/4+2,s=Math.ceil(n/16),a=new Array(s);for(let l=0;l<s;++l){const u=new Uint32Array(16);for(let p=0;p<16;++p)u[p]=i[l*64+p*4]<<24|i[l*64+p*4+1]<<16|i[l*64+p*4+2]<<8|i[l*64+p*4+3];a[l]=u}a[s-1][14]=(i.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(i.length-1)*8&4294967295;for(let l=0;l<s;++l){const u=new Uint32Array(80);for(let C=0;C<16;++C)u[C]=a[l][C];for(let C=16;C<80;++C)u[C]=_o(u[C-3]^u[C-8]^u[C-14]^u[C-16],1);let p=t[0],g=t[1],b=t[2],S=t[3],w=t[4];for(let C=0;C<80;++C){const v=Math.floor(C/20),D=_o(p,5)+__(v,g,b,S)+w+e[v]+u[C]>>>0;w=S,S=b,b=_o(g,30)>>>0,g=p,p=D}t[0]=t[0]+p>>>0,t[1]=t[1]+g>>>0,t[2]=t[2]+b>>>0,t[3]=t[3]+S>>>0,t[4]=t[4]+w>>>0}return Uint8Array.of(t[0]>>24,t[0]>>16,t[0]>>8,t[0],t[1]>>24,t[1]>>16,t[1]>>8,t[1],t[2]>>24,t[2]>>16,t[2]>>8,t[2],t[3]>>24,t[3]>>16,t[3]>>8,t[3],t[4]>>24,t[4]>>16,t[4]>>8,t[4])}function Hs(i,e,t,r){return y_(80,b_,i,e,t,r)}Hs.DNS=m_;Hs.URL=f_;const v_=X.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),T_="a1rlj479",S_="s35f1di",E_="sj4471g",w_="b12050d8",k_="b1d5ybek",C_=i=>i==="left"||i==="right"?S_:w_,I_=i=>i==="left"||i==="right"?E_:k_,A_=i=>i==="left"?"avdxyl3":i==="right"?"a1bisd08":i==="top"?"a1u9y2aj":"a1qqaks",bl=({children:i,style:e,className:t,enabled:r=!0,hiding:n,direction:s="left",onAnimationEnd:a})=>W.jsx(v_,{style:e,className:X.cx_default(t,T_,A_(s),r&&!n&&C_(s),r&&n&&I_(s)),onAnimationEnd:a,children:i}),x_=X.styled_default("a")({name:"Link",class:"l1sgte8c",propsAsIs:!1}),L_=X.styled_default("div")({name:"BannerContainer",class:"b7yfc72",propsAsIs:!1}),D_=()=>x_,P_=X.styled_default(D_())({name:"BannerLink",class:"bejjq94",propsAsIs:!0}),R_=({promotion:i,promotionId:e,hiding:t,direction:r="bottom"})=>{var n,s;if(!((n=i.additionalBanner)!=null&&n.imageUrl))return null;let a=(s=i.additionalBanner)==null?void 0:s.url;return a&&a.indexOf("http")!==0&&(a=`https://${a}`),W.jsx(bl,{direction:r,hiding:t,children:W.jsx(L_,{className:"BannerContainer",children:W.jsx(P_,{as:a?"a":"span",className:"BannerLink",href:a,style:{backgroundImage:`url(${i.additionalBanner.imageUrl})`,cursor:a?"pointer":"default"},"data-promo-id":e,"data-promo-type":i.type,"data-analytics":"banner",target:"_blank"})})})},N_=X.styled_default("div")({name:"NotificationContent",class:"n18wsqoo",propsAsIs:!1}),O_=X.styled_default("div")({name:"Body",class:"b1ia90c2",propsAsIs:!1}),U_=X.styled_default("div")({name:"Title",class:"tg2z08v",propsAsIs:!1}),M_=X.styled_default("div")({name:"Text",class:"t59zdk1",propsAsIs:!1}),vl=X.styled_default("div")({name:"MediaImgBottom",class:"m1ab9fq",propsAsIs:!1}),B_=()=>vl,F_=X.styled_default(B_())({name:"MediaImgMiddle",class:"m9fsr0y",propsAsIs:!0}),j_=X.styled_default("img")({name:"CtaIcon",class:"cvi9y5q",propsAsIs:!1}),q_=X.styled_default("button")({name:"Button",class:"bgl6boa",propsAsIs:!1}),$_=X.styled_default("div")({name:"Logo",class:"l5mq0z",propsAsIs:!1}),V_=X.styled_default("div")({name:"Footer",class:"f1mse0ft",propsAsIs:!1}),H_=X.styled_default("div")({name:"Vector",class:"v1hcloah",propsAsIs:!1}),z_=X.styled_default("div")({name:"NotificationContainer",class:"n3n65jf",propsAsIs:!1}),W_={[ge.NotificationPromotionImagePosition.BOTTOM]:vl,[ge.NotificationPromotionImagePosition.MIDDLE]:F_},G_=({src:i,imagePosition:e})=>{const t=W_[e]||vl;return W.jsx(t,{children:W.jsx("img",{src:i,alt:""})})},X_=({notification:i,open:e})=>{if(!i||!i.promotion||i.enabled!==ge.NotificationEnabled.NOTIFICATION_ENABLED)return null;const{title:t,body:r,image:n,promotion:s}=i,{sponsorLogo:a,sponsorLogoMode:l,imagePosition:u,ctaButton:p}=s;return W.jsxs(z_,{className:"SL_Lower_Third_Notification",onClick:e,children:[W.jsxs(N_,{children:[W.jsx(G_,{src:n,imagePosition:u}),W.jsxs(O_,{children:[t&&W.jsx(U_,{children:t}),r&&W.jsx(M_,{children:r})]})]}),W.jsxs(V_,{children:[l!==ge.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&W.jsxs(W.Fragment,{children:[W.jsx($_,{children:W.jsx("img",{src:a,alt:t})}),W.jsx(H_,{})]}),W.jsxs(q_,{name:"promo-button",style:{color:p==null?void 0:p.textColor,backgroundColor:p==null?void 0:p.color},children:[(p==null?void 0:p.ctaIcon)&&(p==null?void 0:p.ctaIconMode)===ge.CtaIconMode.CTA_ICON_TRANSPARENT&&W.jsx(j_,{src:p==null?void 0:p.ctaIcon,alt:"cta-icon"}),(p==null?void 0:p.label)||"Open"]})]})]})},K_=X.styled_default("div")({name:"NotificationContent",class:"n1ku6hz",propsAsIs:!1}),Y_=X.styled_default("div")({name:"NotificationContainer",class:"nbxqmol",propsAsIs:!1}),Q_=X.styled_default("div")({name:"Body",class:"b1gu3eml",propsAsIs:!1}),J_=X.styled_default("div")({name:"Title",class:"t1u17zva",propsAsIs:!1}),Z_=X.styled_default("div")({name:"Text",class:"t10ko1g",propsAsIs:!1}),va=X.styled_default("div")({name:"Media",class:"mntc42e",propsAsIs:!1}),e0=()=>va,mc=X.styled_default(e0())({name:"MediaImgFit",class:"ml060eo",propsAsIs:!0}),t0=()=>va,fh=X.styled_default(t0())({name:"MediaImgCentered",class:"m1vqlvig",propsAsIs:!0}),i0=()=>fh,r0=X.styled_default(i0())({name:"MediaImgBottom",class:"m1e7tvi5",propsAsIs:!0}),n0=()=>va,s0=X.styled_default(n0())({name:"MediaImgSolid",class:"mqvntt2",propsAsIs:!0}),a0=()=>va,o0=X.styled_default(a0())({name:"MediaImgMiddle",class:"m12jtj3u",propsAsIs:!0}),l0=X.styled_default("img")({name:"CtaIcon",class:"ckq1frv",propsAsIs:!1}),u0=X.styled_default("button")({name:"Button",class:"bis90pl",propsAsIs:!1}),c0=()=>X.k1,d0=X.styled_default(c0())({name:"StyledChevronRight",class:"s9mjmz3",propsAsIs:!0}),h0=X.styled_default("div")({name:"Logo",class:"l1cf50a7",propsAsIs:!1}),p0={[ge.NotificationPromotionImagePosition.UNSET]:mc,[ge.NotificationPromotionImagePosition.FIT]:mc,[ge.NotificationPromotionImagePosition.CENTERED]:fh,[ge.NotificationPromotionImagePosition.BOTTOM]:r0,[ge.NotificationPromotionImagePosition.SOLID]:s0,[ge.NotificationPromotionImagePosition.MIDDLE]:o0},g0=({src:i,imagePosition:e})=>{const t=p0[e];return W.jsx(t,{children:W.jsx("img",{src:i,alt:""})})},m0=({notification:i,open:e,promotionId:t,hiding:r,direction:n="left"})=>{if(!i||!i.promotion||i.enabled!==ge.NotificationEnabled.NOTIFICATION_ENABLED)return null;if(i.promotion.mode===ge.NotificationPromotionMode.LOWER_THIRD)return W.jsx(X_,{notification:i,open:e});const{title:s,body:a,image:l,promotion:u}=i,{sponsorLogo:p,sponsorLogoMode:g,imagePosition:b,ctaButton:S}=u;return W.jsx(bl,{className:"SL_Rich_Notification",direction:n,hiding:r,children:W.jsxs(Y_,{onClick:e,children:[g!==ge.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&p&&W.jsx(h0,{children:W.jsx("img",{src:p,alt:s})}),W.jsxs(K_,{children:[W.jsx(g0,{src:l,imagePosition:b}),W.jsxs(Q_,{children:[s&&W.jsx(J_,{children:s}),a&&W.jsx(Z_,{children:a})]}),W.jsxs(u0,{name:"promo-button",style:{color:S==null?void 0:S.textColor,backgroundColor:S==null?void 0:S.color},children:[(S==null?void 0:S.ctaIcon)&&(S==null?void 0:S.ctaIconMode)===ge.CtaIconMode.CTA_ICON_TRANSPARENT&&W.jsx(l0,{src:S==null?void 0:S.ctaIcon,alt:"cta-icon"}),(S==null?void 0:S.label)||"Open"]}),W.jsx(d0,{name:"chevronRight"})]})]})})},f0=X.styled_default("div")({name:"OverlayContainer",class:"okzhq2w",propsAsIs:!1}),yh=X.styled_default("div")({name:"PromoOverlay",class:"pmgz5i",propsAsIs:!1}),_h=X.styled_default("div")({name:"Header",class:"hyxi3jt",propsAsIs:!1}),bh=X.styled_default("div")({name:"HeaderContent",class:"h149e3gp",propsAsIs:!1}),vh="h10toh7",fc=X.styled_default("img")({name:"SponsorLogo",class:"s1jyea6t",propsAsIs:!1}),y0=X.styled_default("div")({name:"SponsorName",class:"szpfa3h",propsAsIs:!1}),Th=X.styled_default("div")({name:"Media",class:"m1crmu01",propsAsIs:!1}),_0=X.styled_default("img")({name:"PromoImg",class:"p1l37r8s",propsAsIs:!1}),b0="s1nmch9k",yc=X.styled_default("div")({name:"Content",class:"c1er0ljd",propsAsIs:!1}),v0=X.styled_default("div")({name:"Description",class:"dydopmr",propsAsIs:!1}),T0=X.styled_default("div")({name:"Sponsor",class:"s1w6nt04",propsAsIs:!1}),S0=X.styled_default("div")({name:"SponsorText",class:"s1evcmtq",propsAsIs:!1}),Sh=X.styled_default("div")({name:"ADLogo",class:"awodx0x",propsAsIs:!1}),E0=X.styled_default("span")({name:"SponsoredText",class:"s1q3n6oi",propsAsIs:!1}),Eh=X.styled_default("div")({name:"ActionBtnWrap",class:"a8d4xfk",propsAsIs:!1}),wh=X.styled_default("a")({name:"ActionButton",class:"at6oobh",propsAsIs:!1}),w0=X.styled_default("div")({name:"Title",class:"t1gyg7tt",propsAsIs:!1}),k0="h17rwbtk",C0=X.styled_default("div")({name:"Container",class:"c10m2bce",propsAsIs:!1}),_c=X.styled_default("div")({name:"Item",class:"ig23yq5",propsAsIs:!1}),I0=X.styled_default("div")({name:"Dot",class:"d1f6aqua",propsAsIs:!1}),A0=({time:i,adCount:e,adPosition:t})=>{const r=Math.floor(i/60),n=i-r*60;return r===0&&n===0&&e===t?null:W.jsxs(C0,{children:[e>1&&W.jsxs(W.Fragment,{children:[W.jsxs(_c,{children:[t," of ",e]}),W.jsx(I0,{})]}),W.jsxs(_c,{children:[r,":",n<10?`0${n}`:n]})]})},x0=X.styled_default("a")({name:"WhyThisAdLink",class:"w13o8uld",propsAsIs:!1}),L0=({whyThisAd:i})=>!i.iconClickThroughURLTemplate||!i.staticResource?null:W.jsx(x0,{style:{width:i.width,height:i.height,[i.xPosition]:1,[i.yPosition]:1},href:i.iconClickThroughURLTemplate,target:"_blank",rel:"noreferrer",children:W.jsx("img",{alt:"GoogleWhyThisAd",src:i.staticResource})}),D0=X.styled_default("button")({name:"MuteIcon",class:"m1xzooj9",propsAsIs:!1}),P0=X.styled_default("button")({name:"PlayIcon",class:"p1bo41vr",propsAsIs:!1}),R0=X.styled_default("div")({name:"Container",class:"c13efyu8",propsAsIs:!1}),N0=X.styled_default("div")({name:"ControlsContainer",class:"cladkgh",propsAsIs:!1}),bc="mjnga56",vc="m7qs1am",Tc="m12n261r",Sc=globalThis||void 0||self;function Tl(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:i.id||null,adId:i.adId||null,sequence:i.sequence||null,apiFramework:i.apiFramework||null,universalAdIds:[],creativeExtensions:[]}}const O0=["ADCATEGORIES","ADCOUNT","ADPLAYHEAD","ADSERVINGID","ADTYPE","APIFRAMEWORKS","APPBUNDLE","ASSETURI","BLOCKEDADCATEGORIES","BREAKMAXADLENGTH","BREAKMAXADS","BREAKMAXDURATION","BREAKMINADLENGTH","BREAKMINDURATION","BREAKPOSITION","CLICKPOS","CLICKTYPE","CLIENTUA","CONTENTID","CONTENTPLAYHEAD","CONTENTURI","DEVICEIP","DEVICEUA","DOMAIN","EXTENSIONS","GDPRCONSENT","IFA","IFATYPE","INVENTORYSTATE","LATLONG","LIMITADTRACKING","MEDIAMIME","MEDIAPLAYHEAD","OMIDPARTNER","PAGEURL","PLACEMENTTYPE","PLAYERCAPABILITIES","PLAYERSIZE","PLAYERSTATE","PODSEQUENCE","REGULATIONS","SERVERSIDE","SERVERUA","TRANSACTIONID","UNIVERSALADID","VASTVERSIONS","VERIFICATIONVENDORS"];function Ec(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=[],n=Ch(i);!e.ERRORCODE||t.isCustomCode||/^[0-9]{3}$/.test(e.ERRORCODE)||(e.ERRORCODE=900),e.CACHEBUSTING=xh(Math.round(1e8*Math.random())),e.TIMESTAMP=new Date().toISOString(),e.RANDOM=e.random=e.CACHEBUSTING;for(const s in e)e[s]=Ah(e[s]);for(const s in n){const a=n[s];typeof a=="string"&&r.push(kh(a,e))}return r}function kh(i,e){const t=(i=wc(i,e)).match(/[^[\]]+(?=])/g);if(!t)return i;let r=t.filter(n=>O0.indexOf(n)>-1);return r.length===0?i:(r=r.reduce((n,s)=>(n[s]=-1,n),{}),wc(i,r))}function wc(i,e){let t=i;for(const r in e){const n=e[r];t=t.replace(new RegExp("(?:\\[|%%)(".concat(r,")(?:\\]|%%)"),"g"),n)}return t}function Ch(i){return Array.isArray(i)?i.map(e=>e&&e.hasOwnProperty("url")?e.url:e):i}function kc(i){return/^(https?:\/\/|\/\/)/.test(i)}function Cc(i,e){for(let t=0;t<e.length;t++)if(Ih(e[t],i))return!0;return!1}function Ih(i,e){if(i&&e){const t=Object.getOwnPropertyNames(i),r=Object.getOwnPropertyNames(e);return t.length===r.length&&i.id===e.id&&i.url===e.url}return!1}function Ah(i){return encodeURIComponent(i).replace(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16)))}function xh(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8;return i.toString().padStart(e,"0")}const Ee={track:function(i,e,t){Ec(i,e,t).forEach(r=>{typeof window<"u"&&window!==null&&(new Image().src=r)})},resolveURLTemplates:Ec,extractURLsFromTemplates:Ch,filterUrlTemplates:function(i){return i.reduce((e,t)=>{const r=t.url||t;return kc(r)?e.validUrls.push(r):e.invalidUrls.push(r),e},{validUrls:[],invalidUrls:[]})},containsTemplateObject:Cc,isTemplateObjectEqual:Ih,encodeURIComponentRFC3986:Ah,replaceUrlMacros:kh,isNumeric:function(i){return!isNaN(parseFloat(i))&&isFinite(i)},flatten:function i(e){return e.reduce((t,r)=>t.concat(Array.isArray(r)?i(r):r),[])},joinArrayOfUniqueTemplateObjs:function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const t=Array.isArray(i)?i:[],r=Array.isArray(e)?e:[];return t.concat(r).reduce((n,s)=>(Cc(s,n)||n.push(s),n),[])},isValidTimeValue:function(i){return Number.isFinite(i)&&i>=-2},addLeadingZeros:xh,isValidUrl:kc,isBrowserEnvironment:function(){return typeof window<"u"},formatMacrosValues:function(i){return typeof i!="object"?i:JSON.stringify(i)}};function Ic(i){return["true","TRUE","True","1"].includes(i)}function U0(i){if(i==null)return-1;if(Ee.isNumeric(i))return parseInt(i);const e=i.split(":");if(e.length!==3)return-1;const t=e[2].split(".");let r=parseInt(t[0]);t.length===2&&(r+=parseFloat("0.".concat(t[1])));const n=parseInt(60*e[1]),s=parseInt(60*e[0]*60);return isNaN(s)||isNaN(n)||isNaN(r)||n>3600||r>60?-1:s+n+r}const j={childByName:function(i,e){return Array.from(i.childNodes).find(t=>t.nodeName===e)},childrenByName:function(i,e){return Array.from(i.childNodes).filter(t=>t.nodeName===e)},resolveVastAdTagURI:function(i,e){if(!e)return i;if(i.startsWith("//")){const{protocol:t}=location;return"".concat(t).concat(i)}if(!i.includes("://")){const t=e.slice(0,e.lastIndexOf("/"));return"".concat(t,"/").concat(i)}return i},parseBoolean:Ic,parseNodeText:function(i){return i&&(i.textContent||i.text||"").trim()},copyNodeAttribute:function(i,e,t){const r=e.getAttribute(i);r&&t.setAttribute(i,r)},parseAttributes:function(i){return Array.from(i.attributes).reduce((e,t)=>(e[t.nodeName]=t.nodeValue,e),{})},parseDuration:U0,getStandAloneAds:function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter(i=>!parseInt(i.sequence,10))},getSortedAdPods:function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter(i=>parseInt(i.sequence,10)).sort((i,e)=>i.sequence-e.sequence)},assignAttributes:function(i,e){i&&Array.from(i).forEach(t=>{let{nodeName:r,nodeValue:n}=t;if(r&&n&&e.hasOwnProperty(r)){let s=n;typeof e[r]=="boolean"&&(s=Ic(s)),e[r]=s}})},mergeWrapperAdData:function(i,e){var t;i.errorURLTemplates=e.errorURLTemplates.concat(i.errorURLTemplates),i.impressionURLTemplates=e.impressionURLTemplates.concat(i.impressionURLTemplates),i.extensions=e.extensions.concat(i.extensions),e.viewableImpression.length>0&&(i.viewableImpression=[...i.viewableImpression,...e.viewableImpression]),i.followAdditionalWrappers=e.followAdditionalWrappers,i.allowMultipleAds=e.allowMultipleAds,i.fallbackOnNoAd=e.fallbackOnNoAd;const r=(e.creatives||[]).filter(l=>l&&l.type==="companion"),n=r.reduce((l,u)=>((u.variations||[]).forEach(p=>{(p.companionClickTrackingURLTemplates||[]).forEach(g=>{Ee.containsTemplateObject(g,l)||l.push(g)})}),l),[]);i.creatives=r.concat(i.creatives);const s=e.videoClickTrackingURLTemplates&&e.videoClickTrackingURLTemplates.length,a=e.videoCustomClickURLTemplates&&e.videoCustomClickURLTemplates.length;if(i.creatives.forEach(l=>{if(e.trackingEvents&&e.trackingEvents[l.type])for(const u in e.trackingEvents[l.type]){const p=e.trackingEvents[l.type][u];Array.isArray(l.trackingEvents[u])||(l.trackingEvents[u]=[]),l.trackingEvents[u]=l.trackingEvents[u].concat(p)}l.type==="linear"&&(s&&(l.videoClickTrackingURLTemplates=l.videoClickTrackingURLTemplates.concat(e.videoClickTrackingURLTemplates)),a&&(l.videoCustomClickURLTemplates=l.videoCustomClickURLTemplates.concat(e.videoCustomClickURLTemplates)),!e.videoClickThroughURLTemplate||l.videoClickThroughURLTemplate!==null&&l.videoClickThroughURLTemplate!==void 0||(l.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate)),l.type==="companion"&&n.length&&(l.variations||[]).forEach(u=>{u.companionClickTrackingURLTemplates=Ee.joinArrayOfUniqueTemplateObjs(u.companionClickTrackingURLTemplates,n)})}),e.adVerifications&&(i.adVerifications=i.adVerifications.concat(e.adVerifications)),e.blockedAdCategories&&(i.blockedAdCategories=i.blockedAdCategories.concat(e.blockedAdCategories)),(t=e.creatives)!==null&&t!==void 0&&t.length){const l=e.creatives.filter(u=>{var p;return((p=u.icons)===null||p===void 0?void 0:p.length)&&!u.mediaFiles.length});l.length&&(i.creatives=i.creatives.concat(l))}}};function M0(i,e){const t=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:n,adId:s,sequence:a,apiFramework:l}=Tl(r);return{id:n,adId:s,sequence:a,apiFramework:l,type:"companion",required:null,variations:[]}}(e);return t.required=i.getAttribute("required")||null,t.variations=j.childrenByName(i,"Companion").map(r=>{const n=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:l.id||null,adType:"companionAd",width:l.width||0,height:l.height||0,assetWidth:l.assetWidth||null,assetHeight:l.assetHeight||null,expandedWidth:l.expandedWidth||null,expandedHeight:l.expandedHeight||null,apiFramework:l.apiFramework||null,adSlotId:l.adSlotId||null,pxratio:l.pxratio||"1",renderingMode:l.renderingMode||"default",staticResources:[],htmlResources:[],iframeResources:[],adParameters:null,altText:null,companionClickThroughURLTemplate:null,companionClickTrackingURLTemplates:[],trackingEvents:{}}}(j.parseAttributes(r));n.htmlResources=j.childrenByName(r,"HTMLResource").reduce((l,u)=>{const p=j.parseNodeText(u);return p?l.concat(p):l},[]),n.iframeResources=j.childrenByName(r,"IFrameResource").reduce((l,u)=>{const p=j.parseNodeText(u);return p?l.concat(p):l},[]),n.staticResources=j.childrenByName(r,"StaticResource").reduce((l,u)=>{const p=j.parseNodeText(u);return p?l.concat({url:p,creativeType:u.getAttribute("creativeType")||null}):l},[]),n.altText=j.parseNodeText(j.childByName(r,"AltText"))||null;const s=j.childByName(r,"TrackingEvents");s&&j.childrenByName(s,"Tracking").forEach(l=>{const u=l.getAttribute("event"),p=j.parseNodeText(l);u&&p&&(Array.isArray(n.trackingEvents[u])||(n.trackingEvents[u]=[]),n.trackingEvents[u].push(p))}),n.companionClickTrackingURLTemplates=j.childrenByName(r,"CompanionClickTracking").map(l=>({id:l.getAttribute("id")||null,url:j.parseNodeText(l)})),n.companionClickThroughURLTemplate=j.parseNodeText(j.childByName(r,"CompanionClickThrough"))||null;const a=j.childByName(r,"AdParameters");return a&&(n.adParameters={value:j.parseNodeText(a),xmlEncoded:a.getAttribute("xmlEncoded")||null}),n}),t}function B0(i,e){let t;const r=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:p,adId:g,sequence:b,apiFramework:S}=Tl(u);return{id:p,adId:g,sequence:b,apiFramework:S,type:"linear",duration:0,skipDelay:null,mediaFiles:[],mezzanine:null,interactiveCreativeFile:null,closedCaptionFiles:[],videoClickThroughURLTemplate:null,videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[],adParameters:null,icons:[],trackingEvents:{}}}(e);r.duration=j.parseDuration(j.parseNodeText(j.childByName(i,"Duration")));const n=i.getAttribute("skipoffset");if(n==null)r.skipDelay=null;else if(n.charAt(n.length-1)==="%"&&r.duration!==-1){const u=parseInt(n,10);r.skipDelay=r.duration*(u/100)}else r.skipDelay=j.parseDuration(n);const s=j.childByName(i,"VideoClicks");if(s){const u=j.childByName(s,"ClickThrough");r.videoClickThroughURLTemplate=u?{id:u.getAttribute("id")||null,url:j.parseNodeText(u)}:null,j.childrenByName(s,"ClickTracking").forEach(p=>{r.videoClickTrackingURLTemplates.push({id:p.getAttribute("id")||null,url:j.parseNodeText(p)})}),j.childrenByName(s,"CustomClick").forEach(p=>{r.videoCustomClickURLTemplates.push({id:p.getAttribute("id")||null,url:j.parseNodeText(p)})})}const a=j.childByName(i,"AdParameters");a&&(r.adParameters={value:j.parseNodeText(a),xmlEncoded:a.getAttribute("xmlEncoded")||null}),j.childrenByName(i,"TrackingEvents").forEach(u=>{j.childrenByName(u,"Tracking").forEach(p=>{let g=p.getAttribute("event");const b=j.parseNodeText(p);if(g&&b){if(g==="progress"){if(t=p.getAttribute("offset"),!t)return;g=t.charAt(t.length-1)==="%"?"progress-".concat(t):"progress-".concat(j.parseDuration(t))}Array.isArray(r.trackingEvents[g])||(r.trackingEvents[g]=[]),r.trackingEvents[g].push(b)}})}),j.childrenByName(i,"MediaFiles").forEach(u=>{j.childrenByName(u,"MediaFile").forEach(w=>{r.mediaFiles.push(function(C){const v={id:null,fileURL:null,fileSize:0,deliveryType:"progressive",mimeType:null,mediaType:null,codec:null,bitrate:0,minBitrate:0,maxBitrate:0,width:0,height:0,apiFramework:null,scalable:null,maintainAspectRatio:null};v.id=C.getAttribute("id"),v.fileURL=j.parseNodeText(C),v.deliveryType=C.getAttribute("delivery"),v.codec=C.getAttribute("codec"),v.mimeType=C.getAttribute("type"),v.mediaType=C.getAttribute("mediaType")||"2D",v.apiFramework=C.getAttribute("apiFramework"),v.fileSize=parseInt(C.getAttribute("fileSize")||0),v.bitrate=parseInt(C.getAttribute("bitrate")||0),v.minBitrate=parseInt(C.getAttribute("minBitrate")||0),v.maxBitrate=parseInt(C.getAttribute("maxBitrate")||0),v.width=parseInt(C.getAttribute("width")||0),v.height=parseInt(C.getAttribute("height")||0);const D=C.getAttribute("scalable");D&&typeof D=="string"&&(v.scalable=j.parseBoolean(D));const L=C.getAttribute("maintainAspectRatio");return L&&typeof L=="string"&&(v.maintainAspectRatio=j.parseBoolean(L)),v}(w))});const p=j.childByName(u,"InteractiveCreativeFile");p&&(r.interactiveCreativeFile=function(w){const C=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:v.type||null,apiFramework:v.apiFramework||null,variableDuration:j.parseBoolean(v.variableDuration),fileURL:null}}(j.parseAttributes(w));return C.fileURL=j.parseNodeText(w),C}(p));const g=j.childByName(u,"ClosedCaptionFiles");g&&j.childrenByName(g,"ClosedCaptionFile").forEach(w=>{const C=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:v.type||null,language:v.language||null,fileURL:null}}(j.parseAttributes(w));C.fileURL=j.parseNodeText(w),r.closedCaptionFiles.push(C)});const b=j.childByName(u,"Mezzanine"),S=function(w,C){const v={};let D=!1;return C.forEach(L=>{w&&w.getAttribute(L)?v[L]=w.getAttribute(L):D=!0}),D?null:v}(b,["delivery","type","width","height"]);if(S){const w={id:null,fileURL:null,delivery:null,codec:null,type:null,width:0,height:0,fileSize:0,mediaType:"2D"};w.id=b.getAttribute("id"),w.fileURL=j.parseNodeText(b),w.delivery=S.delivery,w.codec=b.getAttribute("codec"),w.type=S.type,w.width=parseInt(S.width,10),w.height=parseInt(S.height,10),w.fileSize=parseInt(b.getAttribute("fileSize"),10),w.mediaType=b.getAttribute("mediaType")||"2D",r.mezzanine=w}});const l=j.childByName(i,"Icons");return l&&j.childrenByName(l,"Icon").forEach(u=>{r.icons.push(function(p){const g={program:null,height:0,width:0,xPosition:0,yPosition:0,apiFramework:null,offset:null,duration:0,type:null,staticResource:null,htmlResource:null,iframeResource:null,pxratio:"1",iconClickThroughURLTemplate:null,iconClickTrackingURLTemplates:[],iconViewTrackingURLTemplate:null,iconClickFallbackImages:[]};g.program=p.getAttribute("program"),g.height=parseInt(p.getAttribute("height")||0),g.width=parseInt(p.getAttribute("width")||0),g.xPosition=function(S){return["left","right"].indexOf(S)!==-1?S:parseInt(S||0)}(p.getAttribute("xPosition")),g.yPosition=function(S){return["top","bottom"].indexOf(S)!==-1?S:parseInt(S||0)}(p.getAttribute("yPosition")),g.apiFramework=p.getAttribute("apiFramework"),g.pxratio=p.getAttribute("pxratio")||"1",g.offset=j.parseDuration(p.getAttribute("offset")),g.duration=j.parseDuration(p.getAttribute("duration")),j.childrenByName(p,"HTMLResource").forEach(S=>{g.type=S.getAttribute("creativeType")||"text/html",g.htmlResource=j.parseNodeText(S)}),j.childrenByName(p,"IFrameResource").forEach(S=>{g.type=S.getAttribute("creativeType")||0,g.iframeResource=j.parseNodeText(S)}),j.childrenByName(p,"StaticResource").forEach(S=>{g.type=S.getAttribute("creativeType")||0,g.staticResource=j.parseNodeText(S)});const b=j.childByName(p,"IconClicks");if(b){g.iconClickThroughURLTemplate=j.parseNodeText(j.childByName(b,"IconClickThrough")),j.childrenByName(b,"IconClickTracking").forEach(w=>{g.iconClickTrackingURLTemplates.push({id:w.getAttribute("id")||null,url:j.parseNodeText(w)})});const S=j.childByName(b,"IconClickFallbackImages");S&&j.childrenByName(S,"IconClickFallbackImage").forEach(w=>{g.iconClickFallbackImages.push({url:j.parseNodeText(w)||null,width:w.getAttribute("width")||null,height:w.getAttribute("height")||null})})}return g.iconViewTrackingURLTemplate=j.parseNodeText(j.childByName(p,"IconViewTracking")),g}(u))}),r}function F0(i,e){const t=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:n,adId:s,sequence:a,apiFramework:l}=Tl(r);return{id:n,adId:s,sequence:a,apiFramework:l,type:"nonlinear",variations:[],trackingEvents:{}}}(e);return j.childrenByName(i,"TrackingEvents").forEach(r=>{let n,s;j.childrenByName(r,"Tracking").forEach(a=>{n=a.getAttribute("event"),s=j.parseNodeText(a),n&&s&&(Array.isArray(t.trackingEvents[n])||(t.trackingEvents[n]=[]),t.trackingEvents[n].push(s))})}),j.childrenByName(i,"NonLinear").forEach(r=>{const n={id:null,width:0,height:0,expandedWidth:0,expandedHeight:0,scalable:!0,maintainAspectRatio:!0,minSuggestedDuration:0,apiFramework:"static",adType:"nonLinearAd",type:null,staticResource:null,htmlResource:null,iframeResource:null,nonlinearClickThroughURLTemplate:null,nonlinearClickTrackingURLTemplates:[],adParameters:null};n.id=r.getAttribute("id")||null,n.width=r.getAttribute("width"),n.height=r.getAttribute("height"),n.expandedWidth=r.getAttribute("expandedWidth"),n.expandedHeight=r.getAttribute("expandedHeight"),n.scalable=j.parseBoolean(r.getAttribute("scalable")),n.maintainAspectRatio=j.parseBoolean(r.getAttribute("maintainAspectRatio")),n.minSuggestedDuration=j.parseDuration(r.getAttribute("minSuggestedDuration")),n.apiFramework=r.getAttribute("apiFramework"),j.childrenByName(r,"HTMLResource").forEach(a=>{n.type=a.getAttribute("creativeType")||"text/html",n.htmlResource=j.parseNodeText(a)}),j.childrenByName(r,"IFrameResource").forEach(a=>{n.type=a.getAttribute("creativeType")||0,n.iframeResource=j.parseNodeText(a)}),j.childrenByName(r,"StaticResource").forEach(a=>{n.type=a.getAttribute("creativeType")||0,n.staticResource=j.parseNodeText(a)});const s=j.childByName(r,"AdParameters");s&&(n.adParameters={value:j.parseNodeText(s),xmlEncoded:s.getAttribute("xmlEncoded")||null}),n.nonlinearClickThroughURLTemplate=j.parseNodeText(j.childByName(r,"NonLinearClickThrough")),j.childrenByName(r,"NonLinearClickTracking").forEach(a=>{n.nonlinearClickTrackingURLTemplates.push({id:a.getAttribute("id")||null,url:j.parseNodeText(a)})}),t.variations.push(n)}),t}function Ac(i){const e=[];return i.forEach(t=>{const r=Lh(t);r&&e.push(r)}),e}function Lh(i){if(i.nodeName==="#comment")return null;const e={name:null,value:null,attributes:{},children:[]},t=i.attributes,r=i.childNodes;if(e.name=i.nodeName,i.attributes){for(const s in t)if(t.hasOwnProperty(s)){const a=t[s];a.nodeName&&a.nodeValue&&(e.attributes[a.nodeName]=a.nodeValue)}}for(const s in r)if(r.hasOwnProperty(s)){const a=Lh(r[s]);a&&e.children.push(a)}if(e.children.length===0||e.children.length===1&&["#cdata-section","#text"].indexOf(e.children[0].name)>=0){const s=j.parseNodeText(i);s!==""&&(e.value=s),e.children=[]}return(n=e).value===null&&Object.keys(n.attributes).length===0&&n.children.length===0?null:e;var n}function j0(i){return i.getAttribute("AdID")||i.getAttribute("adID")||i.getAttribute("adId")||null}const js={Wrapper:{subElements:["VASTAdTagURI","Impression"]},BlockedAdCategories:{attributes:["authority"]},InLine:{subElements:["AdSystem","AdTitle","Impression","AdServingId","Creatives"]},Category:{attributes:["authority"]},Pricing:{attributes:["model","currency"]},Verification:{oneOfinLineResources:["JavaScriptResource","ExecutableResource"],attributes:["vendor"]},UniversalAdId:{attributes:["idRegistry"]},JavaScriptResource:{attributes:["apiFramework","browserOptional"]},ExecutableResource:{attributes:["apiFramework","type"]},Tracking:{attributes:["event"]},Creatives:{subElements:["Creative"]},Creative:{subElements:["UniversalAdId"]},Linear:{subElements:["MediaFiles","Duration"]},MediaFiles:{subElements:["MediaFile"]},MediaFile:{attributes:["delivery","type","width","height"]},Mezzanine:{attributes:["delivery","type","width","height"]},NonLinear:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},Companion:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},StaticResource:{attributes:["creativeType"]},Icons:{subElements:["Icon"]},Icon:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"]}};function xc(i,e){if(!js[i.nodeName]||!js[i.nodeName].attributes)return;const t=js[i.nodeName].attributes.filter(r=>!i.getAttribute(r));t.length>0&&Mn({name:i.nodeName,parentName:i.parentNode.nodeName,attributes:t},e)}function Lc(i,e,t){const r=js[i.nodeName],n=!t&&i.nodeName!=="Wrapper";if(!(!r||n)){if(r.subElements){const s=r.subElements.filter(a=>!j.childByName(i,a));s.length>0&&Mn({name:i.nodeName,parentName:i.parentNode.nodeName,subElements:s},e)}!t||!r.oneOfinLineResources||r.oneOfinLineResources.some(s=>j.childByName(i,s))||Mn({name:i.nodeName,parentName:i.parentNode.nodeName,oneOfResources:r.oneOfinLineResources},e)}}function Dc(i){return i.children&&i.children.length!==0}function Mn(i,e){let{name:t,parentName:r,attributes:n,subElements:s,oneOfResources:a}=i,l="Element '".concat(t,"'");l+=n?" missing required attribute(s) '".concat(n.join(", "),"' "):s?" missing required sub element(s) '".concat(s.join(", "),"' "):a?" must provide one of the following '".concat(a.join(", "),"' "):" is empty",e("VAST-warning",{message:l,parentElement:r,specVersion:4.1})}const q0={verifyRequiredValues:function i(e,t,r){if(e&&e.nodeName)if(e.nodeName==="InLine"&&(r=!0),xc(e,t),Dc(e)){Lc(e,t,r);for(let n=0;n<e.children.length;n++)i(e.children[n],t,r)}else j.parseNodeText(e).length===0&&Mn({name:e.nodeName,parentName:e.parentNode.nodeName},t)},hasSubElements:Dc,emitMissingValueWarning:Mn,verifyRequiredAttributes:xc,verifyRequiredSubElements:Lc};function $0(i,e){let{allowMultipleAds:t,followAdditionalWrappers:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Array.from(i.childNodes).filter(s=>{const a=s.nodeName.toLowerCase();return a==="inline"||r!==!1&&a==="wrapper"});for(const s of n){if(j.copyNodeAttribute("id",i,s),j.copyNodeAttribute("sequence",i,s),j.copyNodeAttribute("adType",i,s),s.nodeName==="Wrapper")return{ad:H0(s,e),type:"WRAPPER"};if(s.nodeName==="InLine")return{ad:V0(s,e,{allowMultipleAds:t}),type:"INLINE"};const a=s.nodeName.toLowerCase();e("VAST-warning",{message:"<".concat(s.nodeName,a==="inline"?"> must be written <InLine>":"> must be written <Wrapper>"),wrongNode:s})}}function V0(i,e){let{allowMultipleAds:t}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t===!1&&i.getAttribute("sequence")?null:Dh(i,e)}function Dh(i,e){let t=[];e&&q0.verifyRequiredValues(i,e);const r=Array.from(i.childNodes),n=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:s.id||null,sequence:s.sequence||null,adType:s.adType||null,adServingId:null,categories:[],expires:null,viewableImpression:[],system:null,title:null,description:null,advertiser:null,pricing:null,survey:null,errorURLTemplates:[],impressionURLTemplates:[],creatives:[],extensions:[],adVerifications:[],blockedAdCategories:[],followAdditionalWrappers:!0,allowMultipleAds:!1,fallbackOnNoAd:null}}(j.parseAttributes(i));return r.forEach(s=>{switch(s.nodeName){case"Error":n.errorURLTemplates.push(j.parseNodeText(s));break;case"Impression":n.impressionURLTemplates.push({id:s.getAttribute("id")||null,url:j.parseNodeText(s)});break;case"Creatives":n.creatives=function(a){const l=[];return a.forEach(u=>{const p={id:u.getAttribute("id")||null,adId:j0(u),sequence:u.getAttribute("sequence")||null,apiFramework:u.getAttribute("apiFramework")||null},g=[];let b;j.childrenByName(u,"UniversalAdId").forEach(w=>{const C={idRegistry:w.getAttribute("idRegistry")||"unknown",value:j.parseNodeText(w)};g.push(C)});const S=j.childByName(u,"CreativeExtensions");S&&(b=Ac(j.childrenByName(S,"CreativeExtension")));for(const w in u.childNodes){const C=u.childNodes[w];let v;switch(C.nodeName){case"Linear":v=B0(C,p);break;case"NonLinearAds":v=F0(C,p);break;case"CompanionAds":v=M0(C,p)}v&&(g&&(v.universalAdIds=g),b&&(v.creativeExtensions=b),l.push(v))}}),l}(j.childrenByName(s,"Creative"));break;case"Extensions":{const a=j.childrenByName(s,"Extension");n.extensions=Ac(a),n.adVerifications.length||(t=function(l){let u=null,p=[];return l.some(g=>u=j.childByName(g,"AdVerifications")),u&&(p=Pc(j.childrenByName(u,"Verification"))),p}(a));break}case"AdVerifications":n.adVerifications=Pc(j.childrenByName(s,"Verification"));break;case"AdSystem":n.system={value:j.parseNodeText(s),version:s.getAttribute("version")||null};break;case"AdTitle":n.title=j.parseNodeText(s);break;case"AdServingId":n.adServingId=j.parseNodeText(s);break;case"Category":n.categories.push({authority:s.getAttribute("authority")||null,value:j.parseNodeText(s)});break;case"Expires":n.expires=parseInt(j.parseNodeText(s),10);break;case"ViewableImpression":n.viewableImpression.push(function(a){const l=(u,p)=>{const g=j.parseNodeText(p);return g&&u.push(g),u};return{id:a.getAttribute("id")||null,viewable:j.childrenByName(a,"Viewable").reduce(l,[]),notViewable:j.childrenByName(a,"NotViewable").reduce(l,[]),viewUndetermined:j.childrenByName(a,"ViewUndetermined").reduce(l,[])}}(s));break;case"Description":n.description=j.parseNodeText(s);break;case"Advertiser":n.advertiser={id:s.getAttribute("id")||null,value:j.parseNodeText(s)};break;case"Pricing":n.pricing={value:j.parseNodeText(s),model:s.getAttribute("model")||null,currency:s.getAttribute("currency")||null};break;case"Survey":n.survey={value:j.parseNodeText(s),type:s.getAttribute("type")||null};break;case"BlockedAdCategories":n.blockedAdCategories.push({authority:s.getAttribute("authority")||null,value:j.parseNodeText(s)})}}),t.length&&(n.adVerifications=n.adVerifications.concat(t)),n}function H0(i,e){const t=Dh(i,e),r=i.getAttribute("followAdditionalWrappers"),n=i.getAttribute("allowMultipleAds"),s=i.getAttribute("fallbackOnNoAd");t.followAdditionalWrappers=!r||j.parseBoolean(r),t.allowMultipleAds=!!n&&j.parseBoolean(n),t.fallbackOnNoAd=s?j.parseBoolean(s):null;let a=j.childByName(i,"VASTAdTagURI");if(a?t.nextWrapperURL=j.parseNodeText(a):(a=j.childByName(i,"VASTAdTagURL"),a&&(t.nextWrapperURL=j.parseNodeText(j.childByName(a,"URL")))),t.creatives.forEach(l=>{if(["linear","nonlinear"].includes(l.type)){if(l.trackingEvents){t.trackingEvents||(t.trackingEvents={}),t.trackingEvents[l.type]||(t.trackingEvents[l.type]={});for(const u in l.trackingEvents){const p=l.trackingEvents[u];Array.isArray(t.trackingEvents[l.type][u])||(t.trackingEvents[l.type][u]=[]),p.forEach(g=>{t.trackingEvents[l.type][u].push(g)})}}l.videoClickTrackingURLTemplates&&(Array.isArray(t.videoClickTrackingURLTemplates)||(t.videoClickTrackingURLTemplates=[]),l.videoClickTrackingURLTemplates.forEach(u=>{t.videoClickTrackingURLTemplates.push(u)})),l.videoClickThroughURLTemplate&&(t.videoClickThroughURLTemplate=l.videoClickThroughURLTemplate),l.videoCustomClickURLTemplates&&(Array.isArray(t.videoCustomClickURLTemplates)||(t.videoCustomClickURLTemplates=[]),l.videoCustomClickURLTemplates.forEach(u=>{t.videoCustomClickURLTemplates.push(u)}))}}),t.nextWrapperURL)return t}function Pc(i){const e=[];return i.forEach(t=>{const r={resource:null,vendor:null,browserOptional:!1,apiFramework:null,type:null,parameters:null,trackingEvents:{}},n=Array.from(t.childNodes);j.assignAttributes(t.attributes,r),n.forEach(a=>{let{nodeName:l,textContent:u,attributes:p}=a;switch(l){case"JavaScriptResource":case"ExecutableResource":r.resource=u.trim(),j.assignAttributes(p,r);break;case"VerificationParameters":r.parameters=u.trim()}});const s=j.childByName(t,"TrackingEvents");s&&j.childrenByName(s,"Tracking").forEach(a=>{const l=a.getAttribute("event"),u=j.parseNodeText(a);l&&u&&(Array.isArray(r.trackingEvents[l])||(r.trackingEvents[l]=[]),r.trackingEvents[l].push(u))}),e.push(r)}),e}let Ph=class{constructor(){this._handlers=[]}on(e,t){if(typeof t!="function")throw new TypeError("The handler argument must be of type Function. Received type ".concat(typeof t));if(!e)throw new TypeError("The event argument must be of type String. Received type ".concat(typeof e));return this._handlers.push({event:e,handler:t}),this}once(e,t){return this.on(e,function(r,n,s){const a={fired:!1,wrapFn:void 0};function l(){a.fired||(r.off(n,a.wrapFn),a.fired=!0,s.bind(r)(...arguments))}return a.wrapFn=l,l}(this,e,t))}off(e,t){return this._handlers=this._handlers.filter(r=>r.event!==e||r.handler!==t),this}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];let s=!1;return this._handlers.forEach(a=>{a.event==="*"&&(s=!0,a.handler(e,...r)),a.event===e&&(s=!0,a.handler(...r))}),s}removeAllListeners(e){return e?(this._handlers=this._handlers.filter(t=>t.event!==e),this):(this._handlers=[],this)}listenerCount(e){return this._handlers.filter(t=>t.event===e).length}listeners(e){return this._handlers.reduce((t,r)=>(r.event===e&&t.push(r.handler),t),[])}eventNames(){return this._handlers.map(e=>e.event)}},Rc=0,$o=0;const Rh=(i,e)=>{!i||!e||i<=0||e<=0||($o=($o*Rc+8*i/e)/++Rc)},z0={ERRORCODE:900,extensions:[]},Nc="VAST response version not supported";let W0=class extends Ph{constructor(){let{fetcher:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this.maxWrapperDepth=null,this.rootErrorURLTemplates=[],this.errorURLTemplates=[],this.remainingAds=[],this.parsingOptions={},this.fetcher=e||null}trackVastError(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];this.emit("VAST-error",Object.assign({},z0,t,...n)),Ee.track(e,t)}getErrorURLTemplates(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)}getEstimatedBitrate(){return $o}initParsingStatus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.maxWrapperDepth=e.wrapperLimit||10,this.parsingOptions={allowMultipleAds:e.allowMultipleAds},this.rootURL="",this.resetParsingStatus(),Rh(e.byteLength,e.requestDuration)}resetParsingStatus(){this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.vastVersion=null}getRemainingAds(e){if(this.remainingAds.length===0)return Promise.reject(new Error("No more ads are available for the given VAST"));const t=e?this.remainingAds:[this.remainingAds.shift()];return this.errorURLTemplates=[],this.resolveAds(t,{wrapperDepth:0,url:this.rootURL}).then(r=>this.buildVASTResponse(r))}parseVAST(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.initParsingStatus(t),t.isRootVAST=!0,this.parse(e,t).then(r=>this.buildVASTResponse(r))}buildVASTResponse(e){const t=function(r){let{ads:n,errorURLTemplates:s,version:a}=r;return{ads:n||[],errorURLTemplates:s||[],version:a||null}}({ads:e,errorURLTemplates:this.getErrorURLTemplates(),version:this.vastVersion});return this.completeWrapperResolving(t),t}parseVastXml(e,t){let{isRootVAST:r=!1,url:n=null,wrapperDepth:s=0,allowMultipleAds:a,followAdditionalWrappers:l}=t;if(!e||!e.documentElement||e.documentElement.nodeName!=="VAST"){var u;this.emit("VAST-ad-parsed",{type:"ERROR",url:n,wrapperDepth:s});const S=(e==null||(u=e.documentElement)===null||u===void 0?void 0:u.nodeName)==="VideoAdServingTemplate";throw new Error(S?Nc:"Invalid VAST XMLDocument")}const p=[],g=e.documentElement.childNodes,b=e.documentElement.getAttribute("version");r&&b&&(this.vastVersion=b);for(const S in g){const w=g[S];if(w.nodeName==="Error"){const C=j.parseNodeText(w);r?this.rootErrorURLTemplates.push(C):this.errorURLTemplates.push(C)}else if(w.nodeName==="Ad"){if(this.vastVersion&&parseFloat(this.vastVersion)<3)a=!0;else if(a===!1&&p.length>1)break;const C=$0(w,this.emit.bind(this),{allowMultipleAds:a,followAdditionalWrappers:l});C.ad?(p.push(C.ad),this.emit("VAST-ad-parsed",{type:C.type,url:n,wrapperDepth:s,adIndex:p.length-1,vastVersion:b})):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return p}parse(e){let{url:t=null,resolveAll:r=!0,wrapperSequence:n=null,previousUrl:s=null,wrapperDepth:a=0,isRootVAST:l=!1,followAdditionalWrappers:u,allowMultipleAds:p}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=[];this.vastVersion&&parseFloat(this.vastVersion)<3&&l&&(p=!0);try{g=this.parseVastXml(e,{isRootVAST:l,url:t,wrapperDepth:a,allowMultipleAds:p,followAdditionalWrappers:u})}catch(b){return Promise.reject(b)}if(g.length===1&&n!=null&&(g[0].sequence=n),r===!1){const b=j.getSortedAdPods(g),S=j.getStandAloneAds(g);b.length?g=b:S.length&&(g=[S.shift()]),this.remainingAds=S}return this.resolveAds(g,{wrapperDepth:a,previousUrl:s,url:t})}resolveAds(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{wrapperDepth:t,previousUrl:r,url:n}=arguments.length>1?arguments[1]:void 0;const s=[];return r=n,e.forEach(a=>{const l=this.resolveWrappers(a,t,r);s.push(l)}),Promise.all(s).then(a=>Ee.flatten(a))}resolveWrappers(e,t,r){const n={...e};return new Promise(s=>{var a;if(t++,!n.nextWrapperURL)return delete n.nextWrapperURL,s(n);if(!this.fetcher)return n.VASTAdTagURI=n.nextWrapperURL,delete n.nextWrapperURL,s(n);if(t>=this.maxWrapperDepth)return n.errorCode=302,delete n.nextWrapperURL,s(n);n.nextWrapperURL=j.resolveVastAdTagURI(n.nextWrapperURL,r);const l=(a=this.parsingOptions.allowMultipleAds)!==null&&a!==void 0?a:n.allowMultipleAds,u=n.sequence;this.fetcher.fetchVAST({url:n.nextWrapperURL,emitter:this.emit.bind(this),maxWrapperDepth:this.maxWrapperDepth}).then(p=>this.parse(p,{url:n.nextWrapperURL,previousUrl:r,wrapperSequence:u,wrapperDepth:t,followAdditionalWrappers:n.followAdditionalWrappers,allowMultipleAds:l}).then(g=>{if(delete n.nextWrapperURL,g.length===0)return n.creatives=[],s(n);g.forEach(b=>{b&&j.mergeWrapperAdData(b,n)}),s(g)})).catch(p=>{n.errorCode=p.message===Nc?102:301,n.errorMessage=p.message,s(n)})})}completeWrapperResolving(e){if(e.ads.length===0)this.trackVastError(e.errorURLTemplates,{ERRORCODE:303});else for(let t=e.ads.length-1;t>=0;t--){const r=e.ads[t],n=!r.creatives.some(s=>{var a;return((a=s.mediaFiles)===null||a===void 0?void 0:a.length)>0});!r.errorCode&&!n||r.VASTAdTagURI||(this.trackVastError(r.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:r.errorCode||303},{ERRORMESSAGE:r.errorMessage||""},{extensions:r.extensions},{system:r.system}),e.ads.splice(t,1))}}},di=null;const G0={data:{},length:0,getItem(i){return this.data[i]},setItem(i,e){this.data[i]=e,this.length=Object.keys(this.data).length},removeItem(i){delete this.data[i],this.length=Object.keys(this.data).length},clear(){this.data={},this.length=0}};class X0{constructor(){this.storage=this.initStorage()}initStorage(){if(di)return di;try{di=typeof window<"u"&&window!==null?window.localStorage||window.sessionStorage:null}catch{di=null}return di&&!this.isStorageDisabled(di)||(di=G0,di.clear()),di}isStorageDisabled(e){const t="__VASTStorage__";try{if(e.setItem(t,t),e.getItem(t)!==t)return e.removeItem(t),!0}catch{return!0}return e.removeItem(t),!1}getItem(e){return this.storage.getItem(e)}setItem(e,t){return this.storage.setItem(e,t)}removeItem(e){return this.storage.removeItem(e)}clear(){return this.storage.clear()}}const Vo=12e4,K0={get:async function(i,e){try{const t=new AbortController,r=setTimeout(()=>{throw t.abort(),new Error("URLHandler: Request timed out after ".concat(e.timeout||Vo," ms (408)"))},e.timeout||Vo),n=await fetch(i,{...e,signal:t.signal,credentials:e.withCredentials?"include":"omit"}).finally(()=>{clearTimeout(r)}),s=function(a){return Ee.isBrowserEnvironment()&&window.location.protocol==="https:"&&a.url.includes("http://")?"URLHandler: Cannot go from HTTPS to HTTP.":a.status===200&&a.ok?null:"URLHandler: ".concat(a.statusText," (").concat(a.status,")")}(n);return s?{error:new Error(s),statusCode:n.status}:async function(a){const l=await a.text();let u;return u=Ee.isBrowserEnvironment()?new DOMParser:new(await Promise.resolve().then(()=>Ub).then(p=>p.i)).DOMParser,{xml:u.parseFromString(l,"text/xml"),details:{byteLength:l.length,statusCode:a.status,rawXml:l}}}(n)}catch(t){return{error:t,statusCode:t.name==="AbortError"?408:null}}}};let Y0=class{constructor(){this.URLTemplateFilters=[]}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.urlHandler=e.urlHandler||e.urlhandler||K0,this.fetchingOptions={timeout:e.timeout||Vo,withCredentials:!!e.withCredentials}}addURLTemplateFilter(e){typeof e=="function"&&this.URLTemplateFilters.push(e)}removeLastURLTemplateFilter(){this.URLTemplateFilters.pop()}countURLTemplateFilters(){return this.URLTemplateFilters.length}clearURLTemplateFilters(){this.URLTemplateFilters=[]}async fetchVAST(e){var t;let{url:r,maxWrapperDepth:n,emitter:s,wrapperDepth:a=0,previousUrl:l=null,wrapperAd:u=null}=e;const p=Date.now();this.URLTemplateFilters.forEach(S=>{r=S(r)}),s("VAST-resolving",{url:r,previousUrl:l,wrapperDepth:a,maxWrapperDepth:n,timeout:this.fetchingOptions.timeout,wrapperAd:u});const g=await this.urlHandler.get(r,this.fetchingOptions),b=Math.round(Date.now()-p);if(s("VAST-resolved",{url:r,previousUrl:l,wrapperDepth:a,error:(g==null?void 0:g.error)||null,duration:b,statusCode:(g==null?void 0:g.statusCode)||null,...g==null?void 0:g.details}),Rh(g==null||(t=g.details)===null||t===void 0?void 0:t.byteLength,b),g.error)throw new Error(g.error);return g.xml}},Q0=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new X0;this.cappingFreeLunch=e,this.cappingMinimumTimeInterval=t,this.fetcher=new Y0,this.vastParser=new W0({fetcher:this.fetcher}),this.storage=r,this.lastSuccessfulAd===void 0&&(this.lastSuccessfulAd=0),this.totalCalls===void 0&&(this.totalCalls=0),this.totalCallsTimeout===void 0&&(this.totalCallsTimeout=0)}addURLTemplateFilter(e){this.fetcher.addURLTemplateFilter(e)}removeLastURLTemplateFilter(){this.fetcher.removeLastURLTemplateFilter()}countURLTemplateFilters(){return this.fetcher.countURLTemplateFilters()}clearURLTemplateFilters(){this.fetcher.clearURLTemplateFilters()}getParser(){return this.vastParser}get lastSuccessfulAd(){return this.storage.getItem("vast-client-last-successful-ad")}set lastSuccessfulAd(e){this.storage.setItem("vast-client-last-successful-ad",e)}get totalCalls(){return this.storage.getItem("vast-client-total-calls")}set totalCalls(e){this.storage.setItem("vast-client-total-calls",e)}get totalCallsTimeout(){return this.storage.getItem("vast-client-total-calls-timeout")}set totalCallsTimeout(e){this.storage.setItem("vast-client-total-calls-timeout",e)}hasRemainingAds(){return this.vastParser.remainingAds.length>0}getNextAds(e){return this.vastParser.getRemainingAds(e)}parseVAST(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.fetcher.setOptions(t),this.vastParser.parseVAST(e,t)}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Date.now();return t.hasOwnProperty("resolveAll")||(t.resolveAll=!1),this.totalCallsTimeout<r?(this.totalCalls=1,this.totalCallsTimeout=r+36e5):this.totalCalls++,new Promise((n,s)=>{if(this.cappingFreeLunch>=this.totalCalls)return s(new Error("VAST call canceled – FreeLunch capping not reached yet ".concat(this.totalCalls,"/").concat(this.cappingFreeLunch)));const a=r-this.lastSuccessfulAd;if(a<0)this.lastSuccessfulAd=0;else if(a<this.cappingMinimumTimeInterval)return s(new Error("VAST call canceled – (".concat(this.cappingMinimumTimeInterval,")ms minimum interval reached")));this.vastParser.initParsingStatus(t),this.fetcher.setOptions(t),this.vastParser.rootURL=e,this.fetcher.fetchVAST({url:e,emitter:this.vastParser.emit.bind(this.vastParser),maxWrapperDepth:this.vastParser.maxWrapperDepth}).then(l=>(t.previousUrl=e,t.isRootVAST=!0,t.url=e,this.vastParser.parse(l,t).then(u=>{const p=this.vastParser.buildVASTResponse(u);n(p)}))).catch(l=>s(l))})}},J0=class extends Ph{constructor(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=arguments.length>4&&arguments[4]!==void 0&&arguments[4];super(),this.ad=t,this.creative=r,this.variation=n,this.muted=s,this.impressed=!1,this.skippable=!1,this.trackingEvents={},this.trackedProgressEvents=[],this.lastPercentage=0,this._alreadyTriggeredQuartiles={},this.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","resume","pause","rewind","skip","closeLinear","close"];for(const a in this.creative.trackingEvents){const l=this.creative.trackingEvents[a];this.trackingEvents[a]=l.slice(0)}(function(a){return a.type==="linear"})(this.creative)?this._initLinearTracking():this._initVariationTracking(),e&&this.on("start",()=>{e.lastSuccessfulAd=Date.now()})}_initLinearTracking(){this.linear=!0,this.skipDelay=this.creative.skipDelay,this.setDuration(this.creative.duration),this.clickThroughURLTemplate=this.creative.videoClickThroughURLTemplate,this.clickTrackingURLTemplates=this.creative.videoClickTrackingURLTemplates}_initVariationTracking(){if(this.linear=!1,this.skipDelay=-1,this.variation){for(const e in this.variation.trackingEvents){const t=this.variation.trackingEvents[e];this.trackingEvents[e]?this.trackingEvents[e]=this.trackingEvents[e].concat(t.slice(0)):this.trackingEvents[e]=t.slice(0)}this.variation.adType==="nonLinearAd"?(this.clickThroughURLTemplate=this.variation.nonlinearClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.nonlinearClickTrackingURLTemplates,this.setDuration(this.variation.minSuggestedDuration)):function(e){return e.adType==="companionAd"}(this.variation)&&(this.clickThroughURLTemplate=this.variation.companionClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.companionClickTrackingURLTemplates)}}setDuration(e){Ee.isValidTimeValue(e)?(this.assetDuration=e,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100}):this.emit("TRACKER-error",{message:"the duration provided is not valid. duration: ".concat(e)})}setProgress(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(!Ee.isValidTimeValue(e)||typeof t!="object")return void this.emit("TRACKER-error",{message:"One given setProgress parameter has the wrong type. progress: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))});const n=this.skipDelay||-1;if(n===-1||this.skippable||(n>e?this.emit("skip-countdown",n-e):(this.skippable=!0,this.emit("skip-countdown",0))),this.assetDuration>0){const s=Math.round(e/this.assetDuration*100),a=[];if(e>0){a.push("start");for(let l=this.lastPercentage;l<s;l++)a.push("progress-".concat(l+1,"%"));a.push("progress-".concat(e));for(const l in this.quartiles)this.isQuartileReached(l,this.quartiles[l],e)&&(a.push(l),this._alreadyTriggeredQuartiles[l]=!0);this.lastPercentage=s}a.forEach(l=>{this.track(l,{macros:t,once:r})}),e<this.progress&&(this.track("rewind",{macros:t}),this.trackedProgressEvents&&this.trackedProgressEvents.splice(0))}this.progress=e}isQuartileReached(e,t,r){let n=!1;return t<=r&&!this._alreadyTriggeredQuartiles[e]&&(n=!0),n}setMuted(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="boolean"&&typeof t=="object"?(this.muted!==e&&this.track(e?"mute":"unmute",{macros:t}),this.muted=e):this.emit("TRACKER-error",{message:"One given setMuted parameter has the wrong type. muted: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}setPaused(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="boolean"&&typeof t=="object"?(this.paused!==e&&this.track(e?"pause":"resume",{macros:t}),this.paused=e):this.emit("TRACKER-error",{message:"One given setPaused parameter has the wrong type. paused: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}setFullscreen(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="boolean"&&typeof t=="object"?(this.fullscreen!==e&&this.track(e?"fullscreen":"exitFullscreen",{macros:t}),this.fullscreen=e):this.emit("TRACKER-error",{message:"One given setFullScreen parameter has the wrong type. fullscreen: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}setExpand(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="boolean"&&typeof t=="object"?(this.expanded!==e&&(this.track(e?"expand":"collapse",{macros:t}),this.track(e?"playerExpand":"playerCollapse",{macros:t})),this.expanded=e):this.emit("TRACKER-error",{message:"One given setExpand parameter has the wrong type. expanded: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}setSkipDelay(e){Ee.isValidTimeValue(e)?this.skipDelay=e:this.emit("TRACKER-error",{message:"setSkipDelay parameter does not have a valid value. duration: ".concat(e)})}trackImpression(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.impressed||(this.impressed=!0,this.trackURLs(this.ad.impressionURLTemplates,e),this.track("creativeView",{macros:e})):this.emit("TRACKER-error",{message:"trackImpression parameter has the wrong type. macros: ".concat(e)})}trackViewableImpression(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.ad.viewableImpression.forEach(t=>{this.trackURLs(t.viewable,e)}):this.emit("TRACKER-error",{message:"trackViewableImpression given macros has the wrong type. macros: ".concat(e)})}trackNotViewableImpression(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.ad.viewableImpression.forEach(t=>{this.trackURLs(t.notViewable,e)}):this.emit("TRACKER-error",{message:"trackNotViewableImpression given macros has the wrong type. macros: ".concat(e)})}trackUndeterminedImpression(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.ad.viewableImpression.forEach(t=>{this.trackURLs(t.viewUndetermined,e)}):this.emit("TRACKER-error",{message:"trackUndeterminedImpression given macros has the wrong type. macros: ".concat(e)})}error(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];typeof e=="object"&&typeof t=="boolean"?this.trackURLs(this.ad.errorURLTemplates,e,{isCustomCode:t}):this.emit("TRACKER-error",{message:"One given error parameter has the wrong type. macros: ".concat(Ee.formatMacrosValues(e),", isCustomCode: ").concat(t)})}errorWithCode(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];typeof e=="string"&&typeof t=="boolean"?(this.error({ERRORCODE:e},t),console.log("The method errorWithCode is deprecated, please use vast tracker error method instead")):this.emit("TRACKER-error",{message:"One given errorWithCode parameter has the wrong type. errorCode: ".concat(e,", isCustomCode: ").concat(t)})}complete(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("complete",{macros:e}):this.emit("TRACKER-error",{message:"complete given macros has the wrong type. macros: ".concat(e)})}notUsed(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?(this.track("notUsed",{macros:e}),this.trackingEvents=[]):this.emit("TRACKER-error",{message:"notUsed given macros has the wrong type. macros: ".concat(e)})}otherAdInteraction(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("otherAdInteraction",{macros:e}):this.emit("TRACKER-error",{message:"otherAdInteraction given macros has the wrong type. macros: ".concat(e)})}acceptInvitation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("acceptInvitation",{macros:e}):this.emit("TRACKER-error",{message:"acceptInvitation given macros has the wrong type. macros: ".concat(e)})}adExpand(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("adExpand",{macros:e}):this.emit("TRACKER-error",{message:"adExpand given macros has the wrong type. macros: ".concat(e)})}adCollapse(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("adCollapse",{macros:e}):this.emit("TRACKER-error",{message:"adCollapse given macros has the wrong type. macros: ".concat(e)})}minimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("minimize",{macros:e}):this.emit("TRACKER-error",{message:"minimize given macros has the wrong type. macros: ".concat(e)})}verificationNotExecuted(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e!="string"||typeof t!="object")return void this.emit("TRACKER-error",{message:"One given verificationNotExecuted parameter has to wrong type. vendor: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))});if(!this.ad||!this.ad.adVerifications||!this.ad.adVerifications.length)throw new Error("No adVerifications provided");if(!e)throw new Error("No vendor provided, unable to find associated verificationNotExecuted");const r=this.ad.adVerifications.find(s=>s.vendor===e);if(!r)throw new Error("No associated verification element found for vendor: ".concat(e));const n=r.trackingEvents;if(n&&n.verificationNotExecuted){const s=n.verificationNotExecuted;this.trackURLs(s,t),this.emit("verificationNotExecuted",{trackingURLTemplates:s})}}overlayViewDuration(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="string"&&typeof t=="object"?(t.ADPLAYHEAD=e,this.track("overlayViewDuration",{macros:t})):this.emit("TRACKER-error",{message:"One given overlayViewDuration parameters has the wrong type. formattedDuration: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}close(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track(this.linear?"closeLinear":"close",{macros:e}):this.emit("TRACKER-error",{message:"close given macros has the wrong type. macros: ".concat(e)})}skip(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("skip",{macros:e}):this.emit("TRACKER-error",{message:"skip given macros has the wrong type. macros: ".concat(e)})}load(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("loaded",{macros:e}):this.emit("TRACKER-error",{message:"load given macros has the wrong type. macros: ".concat(e)})}click(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e!==null&&typeof e!="string"||typeof t!="object")return void this.emit("TRACKER-error",{message:"One given click parameter has the wrong type. fallbackClickThroughURL: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))});this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates,t);const r=this.clickThroughURLTemplate||e,n={...t};if(r){this.progress&&(n.ADPLAYHEAD=this.progressFormatted());const s=Ee.resolveURLTemplates([r],n)[0];this.emit("clickthrough",s)}}trackProgressEvents(e,t,r){const n=parseFloat(e.split("-")[1]);Object.entries(this.trackingEvents).filter(s=>{let[a]=s;return a.startsWith("progress-")}).map(s=>{let[a,l]=s;return{name:a,time:parseFloat(a.split("-")[1]),urls:l}}).filter(s=>{let{time:a}=s;return a<=n&&a>this.progress}).forEach(s=>{let{name:a,urls:l}=s;!r&&this.trackedProgressEvents.includes(a)||(this.emit(a,{trackingURLTemplates:l}),this.trackURLs(l,t),r?delete this.trackingEvents[a]:this.trackedProgressEvents.push(a))})}track(e){let{macros:t={},once:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t!="object")return void this.emit("TRACKER-error",{message:"track given macros has the wrong type. macros: ".concat(t)});e==="closeLinear"&&!this.trackingEvents[e]&&this.trackingEvents.close&&(e="close"),e.startsWith("progress-")&&!e.endsWith("%")&&this.trackProgressEvents(e,t,r);const n=this.trackingEvents[e],s=this.emitAlwaysEvents.indexOf(e)>-1;n?(this.emit(e,{trackingURLTemplates:n}),this.trackURLs(n,t)):s&&this.emit(e,null),r&&(delete this.trackingEvents[e],s&&this.emitAlwaysEvents.splice(this.emitAlwaysEvents.indexOf(e),1))}trackURLs(e){var t;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{validUrls:s,invalidUrls:a}=Ee.filterUrlTemplates(e);a.length&&this.emit("TRACKER-error",{message:"Provided urls are malformed. url: ".concat(a)});const l={...r};this.linear&&(this.creative&&this.creative.mediaFiles&&this.creative.mediaFiles[0]&&this.creative.mediaFiles[0].fileURL&&(l.ASSETURI=this.creative.mediaFiles[0].fileURL),this.progress&&(l.ADPLAYHEAD=this.progressFormatted())),(t=this.creative)!==null&&t!==void 0&&(t=t.universalAdIds)!==null&&t!==void 0&&t.length&&(l.UNIVERSALADID=this.creative.universalAdIds.map(u=>u.idRegistry.concat(" ",u.value)).join(",")),this.ad&&(this.ad.sequence&&(l.PODSEQUENCE=this.ad.sequence),this.ad.adType&&(l.ADTYPE=this.ad.adType),this.ad.adServingId&&(l.ADSERVINGID=this.ad.adServingId),this.ad.categories&&this.ad.categories.length&&(l.ADCATEGORIES=this.ad.categories.map(u=>u.value).join(",")),this.ad.blockedAdCategories&&this.ad.blockedAdCategories.length&&(l.BLOCKEDADCATEGORIES=this.ad.blockedAdCategories.map(u=>u.value).join(","))),Ee.track(s,l,n)}convertToTimecode(e){if(!Ee.isValidTimeValue(e))return"";const t=1e3*e,r=Math.floor(t/36e5),n=Math.floor(t/6e4%60),s=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return"".concat(Ee.addLeadingZeros(r,2),":").concat(Ee.addLeadingZeros(n,2),":").concat(Ee.addLeadingZeros(s,2),".").concat(Ee.addLeadingZeros(a,3))}progressFormatted(){return this.convertToTimecode(this.progress)}},Z0=class{constructor(e){this.id=e.getAttribute("id"),this.allowMultipleAds=e.getAttribute("allowMultipleAds"),this.followRedirects=e.getAttribute("followRedirects"),this.vastAdData=null,this.adTagURI=null,this.customData=null;for(const t in e.childNodes){const r=e.childNodes[t];switch(r.localName){case"AdTagURI":this.adTagURI={templateType:r.getAttribute("templateType"),uri:(r.textContent||r.text||"").trim()};break;case"VASTAdData":for(this.vastAdData=r.firstChild;this.vastAdData&&this.vastAdData.nodeType!==1;)this.vastAdData=this.vastAdData.nextSibling;break;case"CustomAdData":this.customData=r;break}}}};function Nh(i,e){const t=[];for(const r in i.childNodes){const n=i.childNodes[r];(n.nodeName===e||e===`vmap:${n.nodeName}`||n.nodeName===`vmap:${e}`)&&t.push(n)}return t}function eb(i){if(!i||!i.childNodes)return{};const e=i.childNodes,t=[];for(const n in e){const s=e[n];s.nodeName==="#cdata-section"&&t.push(s)}if(t&&t.length>0)try{return JSON.parse(t[0].data)}catch{}let r="";for(const n in e){const s=e[n];switch(s.nodeName){case"#text":r+=s.textContent.trim();break;case"#cdata-section":r+=s.data;break}}return r}function Sl(i){const e={attributes:{},children:{},value:{}};e.value=eb(i);const t=i.attributes;if(t)for(const n in t){const s=t[n];s.nodeName&&s.nodeValue!==void 0&&s.nodeValue!==null&&(e.attributes[s.nodeName]=s.nodeValue)}const r=i.childNodes;if(r)for(const n in r){const s=r[n];s.nodeName&&s.nodeName.substring(0,1)!=="#"&&(e.children[s.nodeName]=Sl(s))}return e}let tb=class{constructor(e){this.timeOffset=e.getAttribute("timeOffset"),this.breakType=e.getAttribute("breakType"),this.breakId=e.getAttribute("breakId"),this.repeatAfter=e.getAttribute("repeatAfter"),this.adSource=null,this.trackingEvents=[],this.extensions=[];for(const t in e.childNodes){const r=e.childNodes[t];switch(r.localName){case"AdSource":this.adSource=new Z0(r);break;case"TrackingEvents":for(const n in r.childNodes){const s=r.childNodes[n];s.localName==="Tracking"&&this.trackingEvents.push({event:s.getAttribute("event"),uri:(s.textContent||s.text||"").trim()})}break;case"Extensions":this.extensions=Nh(r,"Extension").map(n=>Sl(n));break}}}track(e,t){for(const r in this.trackingEvents){const n=this.trackingEvents[r];if(n.event===e){let{uri:s}=n;n.event==="error"&&(s=s.replace("[ERRORCODE]",t)),this.tracker(s)}}}tracker(e){if(typeof window<"u"&&window!==null){const t=new Image;t.src=e}}};class ib{constructor(e){if(!e||!e.documentElement||e.documentElement.localName!=="VMAP")throw new Error("Not a VMAP document");this.version=e.documentElement.getAttribute("version"),this.adBreaks=[],this.extensions=[];for(const t in e.documentElement.childNodes){const r=e.documentElement.childNodes[t];switch(r.localName){case"AdBreak":this.adBreaks.push(new tb(r));break;case"Extensions":this.extensions=Nh(r,"Extension").map(n=>Sl(n));break}}}}const rb=(i,e)=>{const t=goog.pal,r=new t.ConsentSettings;r.allowStorage=!1;const n=new t.NonceLoader(r);return async()=>{try{const s=new URL(e),a=new t.NonceRequest;let l=localStorage.getItem("sl-device-id")||ge.v4(),u=sessionStorage.getItem("sl-ad-session-id");u||(u=ge.v4(),sessionStorage.setItem("sl-ad-session-id",u)),mh(l)||(l=Hs(`https://${l}`,Hs.URL)),a.adWillAutoPlay=s.searchParams.get("vpa")==="auto",a.adWillPlayMuted=s.searchParams.get("vpmute")==="1",a.continuousPlayback=!0,a.descriptionUrl=s.searchParams.get("description_url")||"",a.iconsSupported=!0,a.sessionId=l,a.supportedApiFrameworks="2,7,9",a.videoHeight=i.clientHeight,a.videoWidth=i.clientWidth;const p=await n.loadNonceManager(a);return s.searchParams.set("givn",p.getNonce()),s.searchParams.get("is_lat")==="[placeholder]"&&s.searchParams.set("is_lat","1"),s.searchParams.get("rdid")==="[placeholder]"&&s.searchParams.set("rdid",l),s.searchParams.get("correlator")==="[placeholder]"&&s.searchParams.set("correlator",u),s}catch(s){console.log("AdsManager could not be started",s);return}}},nb=new Q0,sb=i=>i.creatives.find(e=>e.mediaFiles),ab=i=>{var e;const t=i==null?void 0:i.mediaFiles;return t!=null&&t.length&&((e=t.find(r=>r.fileURL))==null?void 0:e.fileURL)||""},Oc=X.a$1({ads:[],autoplay:!0,muted:!1}),ob=(i,e)=>{const[t,r]=qe.useState(),n=qe.useRef(Date.now()),s=qe.useRef(Date.now());return qe.useEffect(()=>{if(!e||!(i!=null&&i.current))return;const a=rb(i.current,e),l=Date.now();n.current=l,a().then(u=>{n.current===l&&r(u)}).catch(u=>{console.error(u)})},[i,e]),qe.useEffect(()=>{const a=async(l,u)=>{let p=[];if(l.searchParams.get("output")==="vmap"){const w=await fetch(l.toString()),C=new DOMParser,v=await w.text(),D=C.parseFromString(v,"text/xml");p=new ib(D).adBreaks.map(L=>L.adSource.adTagURI.uri)}else p=[l.toString()];const g=await Promise.all(p.map((w,C)=>nb.get(w).then(v=>{if(s.current===u){const D=v.ads.find(U=>U.creatives.length>0);if(!D)return;const L=sb(D),O=ab(L);return{creative:L,order:C,mediaFileUrl:O,ad:D,raw:v}}}))),b=l.searchParams.get("vpa")!=="click",S=l.searchParams.get("vpmute")==="1";Oc.set({ads:g.filter(w=>!!w),autoplay:b,muted:S})};if(t){const l=Date.now();s.current=l,a(t,l)}return()=>{s.current=0}},[t]),Oc};var Mi={},vi={};function lb(i,e,t){if(t===void 0&&(t=Array.prototype),i&&typeof t.find=="function")return t.find.call(i,e);for(var r=0;r<i.length;r++)if(Object.prototype.hasOwnProperty.call(i,r)){var n=i[r];if(e.call(void 0,n,r,i))return n}}function El(i,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(i):i}function ub(i,e){if(i===null||typeof i!="object")throw new TypeError("target is not an object");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}var Oh=El({HTML:"text/html",isHTML:function(i){return i===Oh.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Uh=El({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(i){return i===Uh.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});vi.assign=ub;vi.find=lb;vi.freeze=El;vi.MIME_TYPE=Oh;vi.NAMESPACE=Uh;var Mh=vi,ii=Mh.find,Bn=Mh.NAMESPACE;function cb(i){return i!==""}function db(i){return i?i.split(/[\t\n\f\r ]+/).filter(cb):[]}function hb(i,e){return i.hasOwnProperty(e)||(i[e]=!0),i}function Uc(i){if(!i)return[];var e=db(i);return Object.keys(e.reduce(hb,{}))}function pb(i){return function(e){return i&&i.indexOf(e)!==-1}}function zn(i,e){for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}function vt(i,e){var t=i.prototype;if(!(t instanceof e)){let r=function(){};r.prototype=e.prototype,r=new r,zn(t,r),i.prototype=t=r}t.constructor!=i&&(typeof i!="function"&&console.error("unknown Class:"+i),t.constructor=i)}var Tt={},Ft=Tt.ELEMENT_NODE=1,Pr=Tt.ATTRIBUTE_NODE=2,zs=Tt.TEXT_NODE=3,Bh=Tt.CDATA_SECTION_NODE=4,Fh=Tt.ENTITY_REFERENCE_NODE=5,gb=Tt.ENTITY_NODE=6,jh=Tt.PROCESSING_INSTRUCTION_NODE=7,qh=Tt.COMMENT_NODE=8,$h=Tt.DOCUMENT_NODE=9,Vh=Tt.DOCUMENT_TYPE_NODE=10,fi=Tt.DOCUMENT_FRAGMENT_NODE=11,mb=Tt.NOTATION_NODE=12,rt={},Ye={};rt.INDEX_SIZE_ERR=(Ye[1]="Index size error",1);rt.DOMSTRING_SIZE_ERR=(Ye[2]="DOMString size error",2);var ft=rt.HIERARCHY_REQUEST_ERR=(Ye[3]="Hierarchy request error",3);rt.WRONG_DOCUMENT_ERR=(Ye[4]="Wrong document",4);rt.INVALID_CHARACTER_ERR=(Ye[5]="Invalid character",5);rt.NO_DATA_ALLOWED_ERR=(Ye[6]="No data allowed",6);rt.NO_MODIFICATION_ALLOWED_ERR=(Ye[7]="No modification allowed",7);var Hh=rt.NOT_FOUND_ERR=(Ye[8]="Not found",8);rt.NOT_SUPPORTED_ERR=(Ye[9]="Not supported",9);var Mc=rt.INUSE_ATTRIBUTE_ERR=(Ye[10]="Attribute in use",10);rt.INVALID_STATE_ERR=(Ye[11]="Invalid state",11);rt.SYNTAX_ERR=(Ye[12]="Syntax error",12);rt.INVALID_MODIFICATION_ERR=(Ye[13]="Invalid modification",13);rt.NAMESPACE_ERR=(Ye[14]="Invalid namespace",14);rt.INVALID_ACCESS_ERR=(Ye[15]="Invalid access",15);function $e(i,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Ye[i]),this.message=Ye[i],Error.captureStackTrace&&Error.captureStackTrace(this,$e);return t.code=i,e&&(this.message=this.message+": "+e),t}$e.prototype=Error.prototype;zn(rt,$e);function gi(){}gi.prototype={length:0,item:function(i){return i>=0&&i<this.length?this[i]:null},toString:function(i,e){for(var t=[],r=0;r<this.length;r++)vr(this[r],t,i,e);return t.join("")},filter:function(i){return Array.prototype.filter.call(this,i)},indexOf:function(i){return Array.prototype.indexOf.call(this,i)}};function Rr(i,e){this._node=i,this._refresh=e,wl(this)}function wl(i){var e=i._node._inc||i._node.ownerDocument._inc;if(i._inc!==e){var t=i._refresh(i._node);if(ip(i,"length",t.length),!i.$$length||t.length<i.$$length)for(var r=t.length;r in i;r++)Object.prototype.hasOwnProperty.call(i,r)&&delete i[r];zn(t,i),i._inc=e}}Rr.prototype.item=function(i){return wl(this),this[i]||null};vt(Rr,gi);function Ws(){}function zh(i,e){for(var t=i.length;t--;)if(i[t]===e)return t}function Bc(i,e,t,r){if(r?e[zh(e,r)]=t:e[e.length++]=t,i){t.ownerElement=i;var n=i.ownerDocument;n&&(r&&Xh(n,i,r),fb(n,i,t))}}function Fc(i,e,t){var r=zh(e,t);if(r>=0){for(var n=e.length-1;r<n;)e[r]=e[++r];if(e.length=n,i){var s=i.ownerDocument;s&&(Xh(s,i,t),t.ownerElement=null)}}else throw new $e(Hh,new Error(i.tagName+"@"+t))}Ws.prototype={length:0,item:gi.prototype.item,getNamedItem:function(i){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==i)return t}},setNamedItem:function(i){var e=i.ownerElement;if(e&&e!=this._ownerElement)throw new $e(Mc);var t=this.getNamedItem(i.nodeName);return Bc(this._ownerElement,this,i,t),t},setNamedItemNS:function(i){var e=i.ownerElement,t;if(e&&e!=this._ownerElement)throw new $e(Mc);return t=this.getNamedItemNS(i.namespaceURI,i.localName),Bc(this._ownerElement,this,i,t),t},removeNamedItem:function(i){var e=this.getNamedItem(i);return Fc(this._ownerElement,this,e),e},removeNamedItemNS:function(i,e){var t=this.getNamedItemNS(i,e);return Fc(this._ownerElement,this,t),t},getNamedItemNS:function(i,e){for(var t=this.length;t--;){var r=this[t];if(r.localName==e&&r.namespaceURI==i)return r}return null}};function Wh(){}Wh.prototype={hasFeature:function(i,e){return!0},createDocument:function(i,e,t){var r=new Wn;if(r.implementation=this,r.childNodes=new gi,r.doctype=t||null,t&&r.appendChild(t),e){var n=r.createElementNS(i,e);r.appendChild(n)}return r},createDocumentType:function(i,e,t){var r=new Ta;return r.name=i,r.nodeName=i,r.publicId=e||"",r.systemId=t||"",r}};function _e(){}_e.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(i,e){return Gs(this,i,e)},replaceChild:function(i,e){Gs(this,i,e,Yh),e&&this.removeChild(e)},removeChild:function(i){return Kh(this,i)},appendChild:function(i){return this.insertBefore(i,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(i){return Ho(this.ownerDocument||this,this,i)},normalize:function(){for(var i=this.firstChild;i;){var e=i.nextSibling;e&&e.nodeType==zs&&i.nodeType==zs?(this.removeChild(e),i.appendData(e.data)):(i.normalize(),i=e)}},isSupported:function(i,e){return this.ownerDocument.implementation.hasFeature(i,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(i){for(var e=this;e;){var t=e._nsMap;if(t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&t[r]===i)return r}e=e.nodeType==Pr?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(i){for(var e=this;e;){var t=e._nsMap;if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i];e=e.nodeType==Pr?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(i){var e=this.lookupPrefix(i);return e==null}};function Gh(i){return i=="<"&&"&lt;"||i==">"&&"&gt;"||i=="&"&&"&amp;"||i=='"'&&"&quot;"||"&#"+i.charCodeAt()+";"}zn(Tt,_e);zn(Tt,_e.prototype);function Fn(i,e){if(e(i))return!0;if(i=i.firstChild)do if(Fn(i,e))return!0;while(i=i.nextSibling)}function Wn(){this.ownerDocument=this}function fb(i,e,t){i&&i._inc++;var r=t.namespaceURI;r===Bn.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Xh(i,e,t,r){i&&i._inc++;var n=t.namespaceURI;n===Bn.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function kl(i,e,t){if(i&&i._inc){i._inc++;var r=e.childNodes;if(t)r[r.length++]=t;else{for(var n=e.firstChild,s=0;n;)r[s++]=n,n=n.nextSibling;r.length=s,delete r[r.length]}}}function Kh(i,e){var t=e.previousSibling,r=e.nextSibling;return t?t.nextSibling=r:i.firstChild=r,r?r.previousSibling=t:i.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,kl(i.ownerDocument,i),e}function yb(i){return i&&(i.nodeType===_e.DOCUMENT_NODE||i.nodeType===_e.DOCUMENT_FRAGMENT_NODE||i.nodeType===_e.ELEMENT_NODE)}function _b(i){return i&&(ri(i)||Cl(i)||yi(i)||i.nodeType===_e.DOCUMENT_FRAGMENT_NODE||i.nodeType===_e.COMMENT_NODE||i.nodeType===_e.PROCESSING_INSTRUCTION_NODE)}function yi(i){return i&&i.nodeType===_e.DOCUMENT_TYPE_NODE}function ri(i){return i&&i.nodeType===_e.ELEMENT_NODE}function Cl(i){return i&&i.nodeType===_e.TEXT_NODE}function jc(i,e){var t=i.childNodes||[];if(ii(t,ri)||yi(e))return!1;var r=ii(t,yi);return!(e&&r&&t.indexOf(r)>t.indexOf(e))}function qc(i,e){var t=i.childNodes||[];function r(s){return ri(s)&&s!==e}if(ii(t,r))return!1;var n=ii(t,yi);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}function bb(i,e,t){if(!yb(i))throw new $e(ft,"Unexpected parent node type "+i.nodeType);if(t&&t.parentNode!==i)throw new $e(Hh,"child not in parent");if(!_b(e)||yi(e)&&i.nodeType!==_e.DOCUMENT_NODE)throw new $e(ft,"Unexpected node type "+e.nodeType+" for parent node type "+i.nodeType)}function vb(i,e,t){var r=i.childNodes||[],n=e.childNodes||[];if(e.nodeType===_e.DOCUMENT_FRAGMENT_NODE){var s=n.filter(ri);if(s.length>1||ii(n,Cl))throw new $e(ft,"More than one element or text in fragment");if(s.length===1&&!jc(i,t))throw new $e(ft,"Element in fragment can not be inserted before doctype")}if(ri(e)&&!jc(i,t))throw new $e(ft,"Only one element can be added and only after doctype");if(yi(e)){if(ii(r,yi))throw new $e(ft,"Only one doctype is allowed");var a=ii(r,ri);if(t&&r.indexOf(a)<r.indexOf(t))throw new $e(ft,"Doctype can only be inserted before an element");if(!t&&a)throw new $e(ft,"Doctype can not be appended since element is present")}}function Yh(i,e,t){var r=i.childNodes||[],n=e.childNodes||[];if(e.nodeType===_e.DOCUMENT_FRAGMENT_NODE){var s=n.filter(ri);if(s.length>1||ii(n,Cl))throw new $e(ft,"More than one element or text in fragment");if(s.length===1&&!qc(i,t))throw new $e(ft,"Element in fragment can not be inserted before doctype")}if(ri(e)&&!qc(i,t))throw new $e(ft,"Only one element can be added and only after doctype");if(yi(e)){if(ii(r,function(l){return yi(l)&&l!==t}))throw new $e(ft,"Only one doctype is allowed");var a=ii(r,ri);if(t&&r.indexOf(a)<r.indexOf(t))throw new $e(ft,"Doctype can only be inserted before an element")}}function Gs(i,e,t,r){bb(i,e,t),i.nodeType===_e.DOCUMENT_NODE&&(r||vb)(i,e,t);var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===fi){var s=e.firstChild;if(s==null)return e;var a=e.lastChild}else s=a=e;var l=t?t.previousSibling:i.lastChild;s.previousSibling=l,a.nextSibling=t,l?l.nextSibling=s:i.firstChild=s,t==null?i.lastChild=a:t.previousSibling=a;do s.parentNode=i;while(s!==a&&(s=s.nextSibling));return kl(i.ownerDocument||i,i),e.nodeType==fi&&(e.firstChild=e.lastChild=null),e}function Tb(i,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=i,e.previousSibling=i.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,i.lastChild=e,kl(i.ownerDocument,i,e),e}Wn.prototype={nodeName:"#document",nodeType:$h,doctype:null,documentElement:null,_inc:1,insertBefore:function(i,e){if(i.nodeType==fi){for(var t=i.firstChild;t;){var r=t.nextSibling;this.insertBefore(t,e),t=r}return i}return Gs(this,i,e),i.ownerDocument=this,this.documentElement===null&&i.nodeType===Ft&&(this.documentElement=i),i},removeChild:function(i){return this.documentElement==i&&(this.documentElement=null),Kh(this,i)},replaceChild:function(i,e){Gs(this,i,e,Yh),i.ownerDocument=this,e&&this.removeChild(e),ri(i)&&(this.documentElement=i)},importNode:function(i,e){return tp(this,i,e)},getElementById:function(i){var e=null;return Fn(this.documentElement,function(t){if(t.nodeType==Ft&&t.getAttribute("id")==i)return e=t,!0}),e},getElementsByClassName:function(i){var e=Uc(i);return new Rr(this,function(t){var r=[];return e.length>0&&Fn(t.documentElement,function(n){if(n!==t&&n.nodeType===Ft){var s=n.getAttribute("class");if(s){var a=i===s;if(!a){var l=Uc(s);a=e.every(pb(l))}a&&r.push(n)}}}),r})},createElement:function(i){var e=new rr;e.ownerDocument=this,e.nodeName=i,e.tagName=i,e.localName=i,e.childNodes=new gi;var t=e.attributes=new Ws;return t._ownerElement=e,e},createDocumentFragment:function(){var i=new Sa;return i.ownerDocument=this,i.childNodes=new gi,i},createTextNode:function(i){var e=new Il;return e.ownerDocument=this,e.appendData(i),e},createComment:function(i){var e=new Al;return e.ownerDocument=this,e.appendData(i),e},createCDATASection:function(i){var e=new xl;return e.ownerDocument=this,e.appendData(i),e},createProcessingInstruction:function(i,e){var t=new Dl;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=i,t.nodeValue=t.data=e,t},createAttribute:function(i){var e=new Xs;return e.ownerDocument=this,e.name=i,e.nodeName=i,e.localName=i,e.specified=!0,e},createEntityReference:function(i){var e=new Ll;return e.ownerDocument=this,e.nodeName=i,e},createElementNS:function(i,e){var t=new rr,r=e.split(":"),n=t.attributes=new Ws;return t.childNodes=new gi,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=i,r.length==2?(t.prefix=r[0],t.localName=r[1]):t.localName=e,n._ownerElement=t,t},createAttributeNS:function(i,e){var t=new Xs,r=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=i,t.specified=!0,r.length==2?(t.prefix=r[0],t.localName=r[1]):t.localName=e,t}};vt(Wn,_e);function rr(){this._nsMap={}}rr.prototype={nodeType:Ft,hasAttribute:function(i){return this.getAttributeNode(i)!=null},getAttribute:function(i){var e=this.getAttributeNode(i);return e&&e.value||""},getAttributeNode:function(i){return this.attributes.getNamedItem(i)},setAttribute:function(i,e){var t=this.ownerDocument.createAttribute(i);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},removeAttribute:function(i){var e=this.getAttributeNode(i);e&&this.removeAttributeNode(e)},appendChild:function(i){return i.nodeType===fi?this.insertBefore(i,null):Tb(this,i)},setAttributeNode:function(i){return this.attributes.setNamedItem(i)},setAttributeNodeNS:function(i){return this.attributes.setNamedItemNS(i)},removeAttributeNode:function(i){return this.attributes.removeNamedItem(i.nodeName)},removeAttributeNS:function(i,e){var t=this.getAttributeNodeNS(i,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(i,e){return this.getAttributeNodeNS(i,e)!=null},getAttributeNS:function(i,e){var t=this.getAttributeNodeNS(i,e);return t&&t.value||""},setAttributeNS:function(i,e,t){var r=this.ownerDocument.createAttributeNS(i,e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},getAttributeNodeNS:function(i,e){return this.attributes.getNamedItemNS(i,e)},getElementsByTagName:function(i){return new Rr(this,function(e){var t=[];return Fn(e,function(r){r!==e&&r.nodeType==Ft&&(i==="*"||r.tagName==i)&&t.push(r)}),t})},getElementsByTagNameNS:function(i,e){return new Rr(this,function(t){var r=[];return Fn(t,function(n){n!==t&&n.nodeType===Ft&&(i==="*"||n.namespaceURI===i)&&(e==="*"||n.localName==e)&&r.push(n)}),r})}};Wn.prototype.getElementsByTagName=rr.prototype.getElementsByTagName;Wn.prototype.getElementsByTagNameNS=rr.prototype.getElementsByTagNameNS;vt(rr,_e);function Xs(){}Xs.prototype.nodeType=Pr;vt(Xs,_e);function Gn(){}Gn.prototype={data:"",substringData:function(i,e){return this.data.substring(i,i+e)},appendData:function(i){i=this.data+i,this.nodeValue=this.data=i,this.length=i.length},insertData:function(i,e){this.replaceData(i,0,e)},appendChild:function(i){throw new Error(Ye[ft])},deleteData:function(i,e){this.replaceData(i,e,"")},replaceData:function(i,e,t){var r=this.data.substring(0,i),n=this.data.substring(i+e);t=r+t+n,this.nodeValue=this.data=t,this.length=t.length}};vt(Gn,_e);function Il(){}Il.prototype={nodeName:"#text",nodeType:zs,splitText:function(i){var e=this.data,t=e.substring(i);e=e.substring(0,i),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};vt(Il,Gn);function Al(){}Al.prototype={nodeName:"#comment",nodeType:qh};vt(Al,Gn);function xl(){}xl.prototype={nodeName:"#cdata-section",nodeType:Bh};vt(xl,Gn);function Ta(){}Ta.prototype.nodeType=Vh;vt(Ta,_e);function Qh(){}Qh.prototype.nodeType=mb;vt(Qh,_e);function Jh(){}Jh.prototype.nodeType=gb;vt(Jh,_e);function Ll(){}Ll.prototype.nodeType=Fh;vt(Ll,_e);function Sa(){}Sa.prototype.nodeName="#document-fragment";Sa.prototype.nodeType=fi;vt(Sa,_e);function Dl(){}Dl.prototype.nodeType=jh;vt(Dl,_e);function Zh(){}Zh.prototype.serializeToString=function(i,e,t){return ep.call(i,e,t)};_e.prototype.toString=ep;function ep(i,e){var t=[],r=this.nodeType==9&&this.documentElement||this,n=r.prefix,s=r.namespaceURI;if(s&&n==null){var n=r.lookupPrefix(s);if(n==null)var a=[{namespace:s,prefix:null}]}return vr(this,t,i,e,a),t.join("")}function $c(i,e,t){var r=i.prefix||"",n=i.namespaceURI;if(!n||r==="xml"&&n===Bn.XML||n===Bn.XMLNS)return!1;for(var s=t.length;s--;){var a=t[s];if(a.prefix===r)return a.namespace!==n}return!0}function bo(i,e,t){i.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,Gh),'"')}function vr(i,e,t,r,n){if(n||(n=[]),r)if(i=r(i),i){if(typeof i=="string"){e.push(i);return}}else return;switch(i.nodeType){case Ft:var s=i.attributes,a=s.length,l=i.firstChild,u=i.tagName;t=Bn.isHTML(i.namespaceURI)||t;var p=u;if(!t&&!i.prefix&&i.namespaceURI){for(var g,b=0;b<s.length;b++)if(s.item(b).name==="xmlns"){g=s.item(b).value;break}if(!g)for(var S=n.length-1;S>=0;S--){var w=n[S];if(w.prefix===""&&w.namespace===i.namespaceURI){g=w.namespace;break}}if(g!==i.namespaceURI)for(var S=n.length-1;S>=0;S--){var w=n[S];if(w.namespace===i.namespaceURI){w.prefix&&(p=w.prefix+":"+u);break}}}e.push("<",p);for(var C=0;C<a;C++){var v=s.item(C);v.prefix=="xmlns"?n.push({prefix:v.localName,namespace:v.value}):v.nodeName=="xmlns"&&n.push({prefix:"",namespace:v.value})}for(var C=0;C<a;C++){var v=s.item(C);if($c(v,t,n)){var D=v.prefix||"",L=v.namespaceURI;bo(e,D?"xmlns:"+D:"xmlns",L),n.push({prefix:D,namespace:L})}vr(v,e,t,r,n)}if(u===p&&$c(i,t,n)){var D=i.prefix||"",L=i.namespaceURI;bo(e,D?"xmlns:"+D:"xmlns",L),n.push({prefix:D,namespace:L})}if(l||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(e.push(">"),t&&/^script$/i.test(u))for(;l;)l.data?e.push(l.data):vr(l,e,t,r,n.slice()),l=l.nextSibling;else for(;l;)vr(l,e,t,r,n.slice()),l=l.nextSibling;e.push("</",p,">")}else e.push("/>");return;case $h:case fi:for(var l=i.firstChild;l;)vr(l,e,t,r,n.slice()),l=l.nextSibling;return;case Pr:return bo(e,i.name,i.value);case zs:return e.push(i.data.replace(/[<&>]/g,Gh));case Bh:return e.push("<![CDATA[",i.data,"]]>");case qh:return e.push("<!--",i.data,"-->");case Vh:var O=i.publicId,U=i.systemId;if(e.push("<!DOCTYPE ",i.name),O)e.push(" PUBLIC ",O),U&&U!="."&&e.push(" ",U),e.push(">");else if(U&&U!=".")e.push(" SYSTEM ",U,">");else{var F=i.internalSubset;F&&e.push(" [",F,"]"),e.push(">")}return;case jh:return e.push("<?",i.target," ",i.data,"?>");case Fh:return e.push("&",i.nodeName,";");default:e.push("??",i.nodeName)}}function tp(i,e,t){var r;switch(e.nodeType){case Ft:r=e.cloneNode(!1),r.ownerDocument=i;case fi:break;case Pr:t=!0;break}if(r||(r=e.cloneNode(!1)),r.ownerDocument=i,r.parentNode=null,t)for(var n=e.firstChild;n;)r.appendChild(tp(i,n,t)),n=n.nextSibling;return r}function Ho(i,e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=e[n];typeof s!="object"&&s!=r[n]&&(r[n]=s)}switch(e.childNodes&&(r.childNodes=new gi),r.ownerDocument=i,r.nodeType){case Ft:var a=e.attributes,l=r.attributes=new Ws,u=a.length;l._ownerElement=r;for(var p=0;p<u;p++)r.setAttributeNode(Ho(i,a.item(p),!0));break;case Pr:t=!0}if(t)for(var g=e.firstChild;g;)r.appendChild(Ho(i,g,t)),g=g.nextSibling;return r}function ip(i,e,t){i[e]=t}try{if(Object.defineProperty){let i=function(e){switch(e.nodeType){case Ft:case fi:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(i(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};Object.defineProperty(Rr.prototype,"length",{get:function(){return wl(this),this.$$length}}),Object.defineProperty(_e.prototype,"textContent",{get:function(){return i(this)},set:function(e){switch(this.nodeType){case Ft:case fi:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ip=function(e,t,r){e["$$"+t]=r}}}catch{}Mi.DocumentType=Ta;Mi.DOMException=$e;Mi.DOMImplementation=Wh;Mi.Element=rr;Mi.Node=_e;Mi.NodeList=gi;Mi.XMLSerializer=Zh;var Ea={},rp={};(function(i){var e=vi.freeze;i.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),i.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react/jsx-runtime"),qe=require("react"),X=require("./provider.js"),ge=require("./useStreamLayerApp2.js"),p_=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function mh(i){return typeof i=="string"&&p_.test(i)}function gc(i){if(!mh(i))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(i.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(i.slice(9,13),16))>>>8,e&255,(e=parseInt(i.slice(14,18),16))>>>8,e&255,(e=parseInt(i.slice(19,23),16))>>>8,e&255,(e=parseInt(i.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}function g_(i){i=unescape(encodeURIComponent(i));const e=new Uint8Array(i.length);for(let t=0;t<i.length;++t)e[t]=i.charCodeAt(t);return e}const m_="6ba7b810-9dad-11d1-80b4-00c04fd430c8",f_="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function y_(i,e,t,r,n,s){const a=typeof t=="string"?g_(t):t,l=typeof r=="string"?gc(r):r;if(typeof r=="string"&&(r=gc(r)),(r==null?void 0:r.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+a.length);if(u.set(l),u.set(a,l.length),u=e(u),u[6]=u[6]&15|i,u[8]=u[8]&63|128,n){s=s||0;for(let p=0;p<16;++p)n[s+p]=u[p];return n}return ge.unsafeStringify(u)}function __(i,e,t,r){switch(i){case 0:return e&t^~e&r;case 1:return e^t^r;case 2:return e&t^e&r^t&r;case 3:return e^t^r}}function _o(i,e){return i<<e|i>>>32-e}function b_(i){const e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520],r=new Uint8Array(i.length+1);r.set(i),r[i.length]=128,i=r;const n=i.length/4+2,s=Math.ceil(n/16),a=new Array(s);for(let l=0;l<s;++l){const u=new Uint32Array(16);for(let p=0;p<16;++p)u[p]=i[l*64+p*4]<<24|i[l*64+p*4+1]<<16|i[l*64+p*4+2]<<8|i[l*64+p*4+3];a[l]=u}a[s-1][14]=(i.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(i.length-1)*8&4294967295;for(let l=0;l<s;++l){const u=new Uint32Array(80);for(let C=0;C<16;++C)u[C]=a[l][C];for(let C=16;C<80;++C)u[C]=_o(u[C-3]^u[C-8]^u[C-14]^u[C-16],1);let p=t[0],g=t[1],b=t[2],S=t[3],w=t[4];for(let C=0;C<80;++C){const v=Math.floor(C/20),D=_o(p,5)+__(v,g,b,S)+w+e[v]+u[C]>>>0;w=S,S=b,b=_o(g,30)>>>0,g=p,p=D}t[0]=t[0]+p>>>0,t[1]=t[1]+g>>>0,t[2]=t[2]+b>>>0,t[3]=t[3]+S>>>0,t[4]=t[4]+w>>>0}return Uint8Array.of(t[0]>>24,t[0]>>16,t[0]>>8,t[0],t[1]>>24,t[1]>>16,t[1]>>8,t[1],t[2]>>24,t[2]>>16,t[2]>>8,t[2],t[3]>>24,t[3]>>16,t[3]>>8,t[3],t[4]>>24,t[4]>>16,t[4]>>8,t[4])}function Hs(i,e,t,r){return y_(80,b_,i,e,t,r)}Hs.DNS=m_;Hs.URL=f_;const v_=X.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),T_="a1rlj479",S_="s35f1di",E_="sj4471g",w_="b12050d8",k_="b1d5ybek",C_=i=>i==="left"||i==="right"?S_:w_,I_=i=>i==="left"||i==="right"?E_:k_,A_=i=>i==="left"?"avdxyl3":i==="right"?"a1bisd08":i==="top"?"a1u9y2aj":"a1qqaks",bl=({children:i,style:e,className:t,enabled:r=!0,hiding:n,direction:s="left",onAnimationEnd:a})=>W.jsx(v_,{style:e,className:X.cx_default(t,T_,A_(s),r&&!n&&C_(s),r&&n&&I_(s)),onAnimationEnd:a,children:i}),x_=X.styled_default("a")({name:"Link",class:"l1sgte8c",propsAsIs:!1}),L_=X.styled_default("div")({name:"BannerContainer",class:"b7yfc72",propsAsIs:!1}),D_=()=>x_,P_=X.styled_default(D_())({name:"BannerLink",class:"bejjq94",propsAsIs:!0}),R_=({promotion:i,promotionId:e,hiding:t,direction:r="bottom"})=>{var n,s;if(!((n=i.additionalBanner)!=null&&n.imageUrl))return null;let a=(s=i.additionalBanner)==null?void 0:s.url;return a&&a.indexOf("http")!==0&&(a=`https://${a}`),W.jsx(bl,{direction:r,hiding:t,children:W.jsx(L_,{className:"BannerContainer",children:W.jsx(P_,{as:a?"a":"span",className:"BannerLink",href:a,style:{backgroundImage:`url(${i.additionalBanner.imageUrl})`,cursor:a?"pointer":"default"},"data-promo-id":e,"data-promo-type":i.type,"data-analytics":"banner",target:"_blank"})})})},N_=X.styled_default("div")({name:"NotificationContent",class:"n18wsqoo",propsAsIs:!1}),O_=X.styled_default("div")({name:"Body",class:"b1ia90c2",propsAsIs:!1}),U_=X.styled_default("div")({name:"Title",class:"tg2z08v",propsAsIs:!1}),M_=X.styled_default("div")({name:"Text",class:"t59zdk1",propsAsIs:!1}),vl=X.styled_default("div")({name:"MediaImgBottom",class:"m1ab9fq",propsAsIs:!1}),B_=()=>vl,F_=X.styled_default(B_())({name:"MediaImgMiddle",class:"m9fsr0y",propsAsIs:!0}),j_=X.styled_default("img")({name:"CtaIcon",class:"cvi9y5q",propsAsIs:!1}),q_=X.styled_default("button")({name:"Button",class:"bgl6boa",propsAsIs:!1}),$_=X.styled_default("div")({name:"Logo",class:"l5mq0z",propsAsIs:!1}),V_=X.styled_default("div")({name:"Footer",class:"f1mse0ft",propsAsIs:!1}),H_=X.styled_default("div")({name:"Vector",class:"v1hcloah",propsAsIs:!1}),z_=X.styled_default("div")({name:"NotificationContainer",class:"n3n65jf",propsAsIs:!1}),W_={[ge.NotificationPromotionImagePosition.BOTTOM]:vl,[ge.NotificationPromotionImagePosition.MIDDLE]:F_},G_=({src:i,imagePosition:e})=>{const t=W_[e]||vl;return W.jsx(t,{children:W.jsx("img",{src:i,alt:""})})},X_=({notification:i,open:e})=>{if(!i||!i.promotion||i.enabled!==ge.NotificationEnabled.NOTIFICATION_ENABLED)return null;const{title:t,body:r,image:n,promotion:s}=i,{sponsorLogo:a,sponsorLogoMode:l,imagePosition:u,ctaButton:p}=s;return W.jsxs(z_,{className:"SL_Lower_Third_Notification",onClick:e,children:[W.jsxs(N_,{children:[W.jsx(G_,{src:n,imagePosition:u}),W.jsxs(O_,{children:[t&&W.jsx(U_,{children:t}),r&&W.jsx(M_,{children:r})]})]}),W.jsxs(V_,{children:[l!==ge.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&W.jsxs(W.Fragment,{children:[W.jsx($_,{children:W.jsx("img",{src:a,alt:t})}),W.jsx(H_,{})]}),W.jsxs(q_,{name:"promo-button",style:{color:p==null?void 0:p.textColor,backgroundColor:p==null?void 0:p.color},children:[(p==null?void 0:p.ctaIcon)&&(p==null?void 0:p.ctaIconMode)===ge.CtaIconMode.CTA_ICON_TRANSPARENT&&W.jsx(j_,{src:p==null?void 0:p.ctaIcon,alt:"cta-icon"}),(p==null?void 0:p.label)||"Open"]})]})]})},K_=X.styled_default("div")({name:"NotificationContent",class:"n1ku6hz",propsAsIs:!1}),Y_=X.styled_default("div")({name:"NotificationContainer",class:"nbxqmol",propsAsIs:!1}),Q_=X.styled_default("div")({name:"Body",class:"b1gu3eml",propsAsIs:!1}),J_=X.styled_default("div")({name:"Title",class:"t1u17zva",propsAsIs:!1}),Z_=X.styled_default("div")({name:"Text",class:"t10ko1g",propsAsIs:!1}),va=X.styled_default("div")({name:"Media",class:"mntc42e",propsAsIs:!1}),e0=()=>va,mc=X.styled_default(e0())({name:"MediaImgFit",class:"ml060eo",propsAsIs:!0}),t0=()=>va,fh=X.styled_default(t0())({name:"MediaImgCentered",class:"m1vqlvig",propsAsIs:!0}),i0=()=>fh,r0=X.styled_default(i0())({name:"MediaImgBottom",class:"m1e7tvi5",propsAsIs:!0}),n0=()=>va,s0=X.styled_default(n0())({name:"MediaImgSolid",class:"mqvntt2",propsAsIs:!0}),a0=()=>va,o0=X.styled_default(a0())({name:"MediaImgMiddle",class:"m12jtj3u",propsAsIs:!0}),l0=X.styled_default("img")({name:"CtaIcon",class:"ckq1frv",propsAsIs:!1}),u0=X.styled_default("button")({name:"Button",class:"bis90pl",propsAsIs:!1}),c0=()=>X.k1,d0=X.styled_default(c0())({name:"StyledChevronRight",class:"s9mjmz3",propsAsIs:!0}),h0=X.styled_default("div")({name:"Logo",class:"l1cf50a7",propsAsIs:!1}),p0={[ge.NotificationPromotionImagePosition.UNSET]:mc,[ge.NotificationPromotionImagePosition.FIT]:mc,[ge.NotificationPromotionImagePosition.CENTERED]:fh,[ge.NotificationPromotionImagePosition.BOTTOM]:r0,[ge.NotificationPromotionImagePosition.SOLID]:s0,[ge.NotificationPromotionImagePosition.MIDDLE]:o0},g0=({src:i,imagePosition:e})=>{const t=p0[e];return W.jsx(t,{children:W.jsx("img",{src:i,alt:""})})},m0=({notification:i,open:e,promotionId:t,hiding:r,direction:n="left"})=>{if(!i||!i.promotion||i.enabled!==ge.NotificationEnabled.NOTIFICATION_ENABLED)return null;if(i.promotion.mode===ge.NotificationPromotionMode.LOWER_THIRD)return W.jsx(X_,{notification:i,open:e});const{title:s,body:a,image:l,promotion:u}=i,{sponsorLogo:p,sponsorLogoMode:g,imagePosition:b,ctaButton:S}=u;return W.jsx(bl,{className:"SL_Rich_Notification",direction:n,hiding:r,children:W.jsxs(Y_,{onClick:e,children:[g!==ge.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&p&&W.jsx(h0,{children:W.jsx("img",{src:p,alt:s})}),W.jsxs(K_,{children:[W.jsx(g0,{src:l,imagePosition:b}),W.jsxs(Q_,{children:[s&&W.jsx(J_,{children:s}),a&&W.jsx(Z_,{children:a})]}),W.jsxs(u0,{name:"promo-button",style:{color:S==null?void 0:S.textColor,backgroundColor:S==null?void 0:S.color},children:[(S==null?void 0:S.ctaIcon)&&(S==null?void 0:S.ctaIconMode)===ge.CtaIconMode.CTA_ICON_TRANSPARENT&&W.jsx(l0,{src:S==null?void 0:S.ctaIcon,alt:"cta-icon"}),(S==null?void 0:S.label)||"Open"]}),W.jsx(d0,{name:"chevronRight"})]})]})})},f0=X.styled_default("div")({name:"OverlayContainer",class:"okzhq2w",propsAsIs:!1}),yh=X.styled_default("div")({name:"PromoOverlay",class:"pmgz5i",propsAsIs:!1}),_h=X.styled_default("div")({name:"Header",class:"hyxi3jt",propsAsIs:!1}),bh=X.styled_default("div")({name:"HeaderContent",class:"h149e3gp",propsAsIs:!1}),vh="h10toh7",fc=X.styled_default("img")({name:"SponsorLogo",class:"s1jyea6t",propsAsIs:!1}),y0=X.styled_default("div")({name:"SponsorName",class:"szpfa3h",propsAsIs:!1}),Th=X.styled_default("div")({name:"Media",class:"m1crmu01",propsAsIs:!1}),_0=X.styled_default("img")({name:"PromoImg",class:"p1l37r8s",propsAsIs:!1}),b0="s1nmch9k",yc=X.styled_default("div")({name:"Content",class:"c1er0ljd",propsAsIs:!1}),v0=X.styled_default("div")({name:"Description",class:"dydopmr",propsAsIs:!1}),T0=X.styled_default("div")({name:"Sponsor",class:"s1w6nt04",propsAsIs:!1}),S0=X.styled_default("div")({name:"SponsorText",class:"s1evcmtq",propsAsIs:!1}),Sh=X.styled_default("div")({name:"ADLogo",class:"awodx0x",propsAsIs:!1}),E0=X.styled_default("span")({name:"SponsoredText",class:"s1q3n6oi",propsAsIs:!1}),Eh=X.styled_default("div")({name:"ActionBtnWrap",class:"a8d4xfk",propsAsIs:!1}),wh=X.styled_default("a")({name:"ActionButton",class:"at6oobh",propsAsIs:!1}),w0=X.styled_default("div")({name:"Title",class:"t1gyg7tt",propsAsIs:!1}),k0="h17rwbtk",C0=X.styled_default("div")({name:"Container",class:"c10m2bce",propsAsIs:!1}),_c=X.styled_default("div")({name:"Item",class:"ig23yq5",propsAsIs:!1}),I0=X.styled_default("div")({name:"Dot",class:"d1f6aqua",propsAsIs:!1}),A0=({time:i,adCount:e,adPosition:t})=>{const r=Math.floor(i/60),n=i-r*60;return r===0&&n===0&&e===t?null:W.jsxs(C0,{children:[e>1&&W.jsxs(W.Fragment,{children:[W.jsxs(_c,{children:[t," of ",e]}),W.jsx(I0,{})]}),W.jsxs(_c,{children:[r,":",n<10?`0${n}`:n]})]})},x0=X.styled_default("a")({name:"WhyThisAdLink",class:"w13o8uld",propsAsIs:!1}),L0=({whyThisAd:i})=>!i.iconClickThroughURLTemplate||!i.staticResource?null:W.jsx(x0,{style:{width:i.width,height:i.height,[i.xPosition]:1,[i.yPosition]:1},href:i.iconClickThroughURLTemplate,target:"_blank",rel:"noreferrer",children:W.jsx("img",{alt:"GoogleWhyThisAd",src:i.staticResource})}),D0=X.styled_default("button")({name:"MuteIcon",class:"m1xzooj9",propsAsIs:!1}),P0=X.styled_default("button")({name:"PlayIcon",class:"p1bo41vr",propsAsIs:!1}),R0=X.styled_default("div")({name:"Container",class:"c13efyu8",propsAsIs:!1}),N0=X.styled_default("div")({name:"ControlsContainer",class:"cladkgh",propsAsIs:!1}),bc="mjnga56",vc="m7qs1am",Tc="m12n261r",Sc=globalThis||void 0||self;function Tl(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:i.id||null,adId:i.adId||null,sequence:i.sequence||null,apiFramework:i.apiFramework||null,universalAdIds:[],creativeExtensions:[]}}const O0=["ADCATEGORIES","ADCOUNT","ADPLAYHEAD","ADSERVINGID","ADTYPE","APIFRAMEWORKS","APPBUNDLE","ASSETURI","BLOCKEDADCATEGORIES","BREAKMAXADLENGTH","BREAKMAXADS","BREAKMAXDURATION","BREAKMINADLENGTH","BREAKMINDURATION","BREAKPOSITION","CLICKPOS","CLICKTYPE","CLIENTUA","CONTENTID","CONTENTPLAYHEAD","CONTENTURI","DEVICEIP","DEVICEUA","DOMAIN","EXTENSIONS","GDPRCONSENT","IFA","IFATYPE","INVENTORYSTATE","LATLONG","LIMITADTRACKING","MEDIAMIME","MEDIAPLAYHEAD","OMIDPARTNER","PAGEURL","PLACEMENTTYPE","PLAYERCAPABILITIES","PLAYERSIZE","PLAYERSTATE","PODSEQUENCE","REGULATIONS","SERVERSIDE","SERVERUA","TRANSACTIONID","UNIVERSALADID","VASTVERSIONS","VERIFICATIONVENDORS"];function Ec(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=[],n=Ch(i);!e.ERRORCODE||t.isCustomCode||/^[0-9]{3}$/.test(e.ERRORCODE)||(e.ERRORCODE=900),e.CACHEBUSTING=xh(Math.round(1e8*Math.random())),e.TIMESTAMP=new Date().toISOString(),e.RANDOM=e.random=e.CACHEBUSTING;for(const s in e)e[s]=Ah(e[s]);for(const s in n){const a=n[s];typeof a=="string"&&r.push(kh(a,e))}return r}function kh(i,e){const t=(i=wc(i,e)).match(/[^[\]]+(?=])/g);if(!t)return i;let r=t.filter(n=>O0.indexOf(n)>-1);return r.length===0?i:(r=r.reduce((n,s)=>(n[s]=-1,n),{}),wc(i,r))}function wc(i,e){let t=i;for(const r in e){const n=e[r];t=t.replace(new RegExp("(?:\\[|%%)(".concat(r,")(?:\\]|%%)"),"g"),n)}return t}function Ch(i){return Array.isArray(i)?i.map(e=>e&&e.hasOwnProperty("url")?e.url:e):i}function kc(i){return/^(https?:\/\/|\/\/)/.test(i)}function Cc(i,e){for(let t=0;t<e.length;t++)if(Ih(e[t],i))return!0;return!1}function Ih(i,e){if(i&&e){const t=Object.getOwnPropertyNames(i),r=Object.getOwnPropertyNames(e);return t.length===r.length&&i.id===e.id&&i.url===e.url}return!1}function Ah(i){return encodeURIComponent(i).replace(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16)))}function xh(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8;return i.toString().padStart(e,"0")}const Ee={track:function(i,e,t){Ec(i,e,t).forEach(r=>{typeof window<"u"&&window!==null&&(new Image().src=r)})},resolveURLTemplates:Ec,extractURLsFromTemplates:Ch,filterUrlTemplates:function(i){return i.reduce((e,t)=>{const r=t.url||t;return kc(r)?e.validUrls.push(r):e.invalidUrls.push(r),e},{validUrls:[],invalidUrls:[]})},containsTemplateObject:Cc,isTemplateObjectEqual:Ih,encodeURIComponentRFC3986:Ah,replaceUrlMacros:kh,isNumeric:function(i){return!isNaN(parseFloat(i))&&isFinite(i)},flatten:function i(e){return e.reduce((t,r)=>t.concat(Array.isArray(r)?i(r):r),[])},joinArrayOfUniqueTemplateObjs:function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const t=Array.isArray(i)?i:[],r=Array.isArray(e)?e:[];return t.concat(r).reduce((n,s)=>(Cc(s,n)||n.push(s),n),[])},isValidTimeValue:function(i){return Number.isFinite(i)&&i>=-2},addLeadingZeros:xh,isValidUrl:kc,isBrowserEnvironment:function(){return typeof window<"u"},formatMacrosValues:function(i){return typeof i!="object"?i:JSON.stringify(i)}};function Ic(i){return["true","TRUE","True","1"].includes(i)}function U0(i){if(i==null)return-1;if(Ee.isNumeric(i))return parseInt(i);const e=i.split(":");if(e.length!==3)return-1;const t=e[2].split(".");let r=parseInt(t[0]);t.length===2&&(r+=parseFloat("0.".concat(t[1])));const n=parseInt(60*e[1]),s=parseInt(60*e[0]*60);return isNaN(s)||isNaN(n)||isNaN(r)||n>3600||r>60?-1:s+n+r}const j={childByName:function(i,e){return Array.from(i.childNodes).find(t=>t.nodeName===e)},childrenByName:function(i,e){return Array.from(i.childNodes).filter(t=>t.nodeName===e)},resolveVastAdTagURI:function(i,e){if(!e)return i;if(i.startsWith("//")){const{protocol:t}=location;return"".concat(t).concat(i)}if(!i.includes("://")){const t=e.slice(0,e.lastIndexOf("/"));return"".concat(t,"/").concat(i)}return i},parseBoolean:Ic,parseNodeText:function(i){return i&&(i.textContent||i.text||"").trim()},copyNodeAttribute:function(i,e,t){const r=e.getAttribute(i);r&&t.setAttribute(i,r)},parseAttributes:function(i){return Array.from(i.attributes).reduce((e,t)=>(e[t.nodeName]=t.nodeValue,e),{})},parseDuration:U0,getStandAloneAds:function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter(i=>!parseInt(i.sequence,10))},getSortedAdPods:function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter(i=>parseInt(i.sequence,10)).sort((i,e)=>i.sequence-e.sequence)},assignAttributes:function(i,e){i&&Array.from(i).forEach(t=>{let{nodeName:r,nodeValue:n}=t;if(r&&n&&e.hasOwnProperty(r)){let s=n;typeof e[r]=="boolean"&&(s=Ic(s)),e[r]=s}})},mergeWrapperAdData:function(i,e){var t;i.errorURLTemplates=e.errorURLTemplates.concat(i.errorURLTemplates),i.impressionURLTemplates=e.impressionURLTemplates.concat(i.impressionURLTemplates),i.extensions=e.extensions.concat(i.extensions),e.viewableImpression.length>0&&(i.viewableImpression=[...i.viewableImpression,...e.viewableImpression]),i.followAdditionalWrappers=e.followAdditionalWrappers,i.allowMultipleAds=e.allowMultipleAds,i.fallbackOnNoAd=e.fallbackOnNoAd;const r=(e.creatives||[]).filter(l=>l&&l.type==="companion"),n=r.reduce((l,u)=>((u.variations||[]).forEach(p=>{(p.companionClickTrackingURLTemplates||[]).forEach(g=>{Ee.containsTemplateObject(g,l)||l.push(g)})}),l),[]);i.creatives=r.concat(i.creatives);const s=e.videoClickTrackingURLTemplates&&e.videoClickTrackingURLTemplates.length,a=e.videoCustomClickURLTemplates&&e.videoCustomClickURLTemplates.length;if(i.creatives.forEach(l=>{if(e.trackingEvents&&e.trackingEvents[l.type])for(const u in e.trackingEvents[l.type]){const p=e.trackingEvents[l.type][u];Array.isArray(l.trackingEvents[u])||(l.trackingEvents[u]=[]),l.trackingEvents[u]=l.trackingEvents[u].concat(p)}l.type==="linear"&&(s&&(l.videoClickTrackingURLTemplates=l.videoClickTrackingURLTemplates.concat(e.videoClickTrackingURLTemplates)),a&&(l.videoCustomClickURLTemplates=l.videoCustomClickURLTemplates.concat(e.videoCustomClickURLTemplates)),!e.videoClickThroughURLTemplate||l.videoClickThroughURLTemplate!==null&&l.videoClickThroughURLTemplate!==void 0||(l.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate)),l.type==="companion"&&n.length&&(l.variations||[]).forEach(u=>{u.companionClickTrackingURLTemplates=Ee.joinArrayOfUniqueTemplateObjs(u.companionClickTrackingURLTemplates,n)})}),e.adVerifications&&(i.adVerifications=i.adVerifications.concat(e.adVerifications)),e.blockedAdCategories&&(i.blockedAdCategories=i.blockedAdCategories.concat(e.blockedAdCategories)),(t=e.creatives)!==null&&t!==void 0&&t.length){const l=e.creatives.filter(u=>{var p;return((p=u.icons)===null||p===void 0?void 0:p.length)&&!u.mediaFiles.length});l.length&&(i.creatives=i.creatives.concat(l))}}};function M0(i,e){const t=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:n,adId:s,sequence:a,apiFramework:l}=Tl(r);return{id:n,adId:s,sequence:a,apiFramework:l,type:"companion",required:null,variations:[]}}(e);return t.required=i.getAttribute("required")||null,t.variations=j.childrenByName(i,"Companion").map(r=>{const n=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:l.id||null,adType:"companionAd",width:l.width||0,height:l.height||0,assetWidth:l.assetWidth||null,assetHeight:l.assetHeight||null,expandedWidth:l.expandedWidth||null,expandedHeight:l.expandedHeight||null,apiFramework:l.apiFramework||null,adSlotId:l.adSlotId||null,pxratio:l.pxratio||"1",renderingMode:l.renderingMode||"default",staticResources:[],htmlResources:[],iframeResources:[],adParameters:null,altText:null,companionClickThroughURLTemplate:null,companionClickTrackingURLTemplates:[],trackingEvents:{}}}(j.parseAttributes(r));n.htmlResources=j.childrenByName(r,"HTMLResource").reduce((l,u)=>{const p=j.parseNodeText(u);return p?l.concat(p):l},[]),n.iframeResources=j.childrenByName(r,"IFrameResource").reduce((l,u)=>{const p=j.parseNodeText(u);return p?l.concat(p):l},[]),n.staticResources=j.childrenByName(r,"StaticResource").reduce((l,u)=>{const p=j.parseNodeText(u);return p?l.concat({url:p,creativeType:u.getAttribute("creativeType")||null}):l},[]),n.altText=j.parseNodeText(j.childByName(r,"AltText"))||null;const s=j.childByName(r,"TrackingEvents");s&&j.childrenByName(s,"Tracking").forEach(l=>{const u=l.getAttribute("event"),p=j.parseNodeText(l);u&&p&&(Array.isArray(n.trackingEvents[u])||(n.trackingEvents[u]=[]),n.trackingEvents[u].push(p))}),n.companionClickTrackingURLTemplates=j.childrenByName(r,"CompanionClickTracking").map(l=>({id:l.getAttribute("id")||null,url:j.parseNodeText(l)})),n.companionClickThroughURLTemplate=j.parseNodeText(j.childByName(r,"CompanionClickThrough"))||null;const a=j.childByName(r,"AdParameters");return a&&(n.adParameters={value:j.parseNodeText(a),xmlEncoded:a.getAttribute("xmlEncoded")||null}),n}),t}function B0(i,e){let t;const r=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:p,adId:g,sequence:b,apiFramework:S}=Tl(u);return{id:p,adId:g,sequence:b,apiFramework:S,type:"linear",duration:0,skipDelay:null,mediaFiles:[],mezzanine:null,interactiveCreativeFile:null,closedCaptionFiles:[],videoClickThroughURLTemplate:null,videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[],adParameters:null,icons:[],trackingEvents:{}}}(e);r.duration=j.parseDuration(j.parseNodeText(j.childByName(i,"Duration")));const n=i.getAttribute("skipoffset");if(n==null)r.skipDelay=null;else if(n.charAt(n.length-1)==="%"&&r.duration!==-1){const u=parseInt(n,10);r.skipDelay=r.duration*(u/100)}else r.skipDelay=j.parseDuration(n);const s=j.childByName(i,"VideoClicks");if(s){const u=j.childByName(s,"ClickThrough");r.videoClickThroughURLTemplate=u?{id:u.getAttribute("id")||null,url:j.parseNodeText(u)}:null,j.childrenByName(s,"ClickTracking").forEach(p=>{r.videoClickTrackingURLTemplates.push({id:p.getAttribute("id")||null,url:j.parseNodeText(p)})}),j.childrenByName(s,"CustomClick").forEach(p=>{r.videoCustomClickURLTemplates.push({id:p.getAttribute("id")||null,url:j.parseNodeText(p)})})}const a=j.childByName(i,"AdParameters");a&&(r.adParameters={value:j.parseNodeText(a),xmlEncoded:a.getAttribute("xmlEncoded")||null}),j.childrenByName(i,"TrackingEvents").forEach(u=>{j.childrenByName(u,"Tracking").forEach(p=>{let g=p.getAttribute("event");const b=j.parseNodeText(p);if(g&&b){if(g==="progress"){if(t=p.getAttribute("offset"),!t)return;g=t.charAt(t.length-1)==="%"?"progress-".concat(t):"progress-".concat(j.parseDuration(t))}Array.isArray(r.trackingEvents[g])||(r.trackingEvents[g]=[]),r.trackingEvents[g].push(b)}})}),j.childrenByName(i,"MediaFiles").forEach(u=>{j.childrenByName(u,"MediaFile").forEach(w=>{r.mediaFiles.push(function(C){const v={id:null,fileURL:null,fileSize:0,deliveryType:"progressive",mimeType:null,mediaType:null,codec:null,bitrate:0,minBitrate:0,maxBitrate:0,width:0,height:0,apiFramework:null,scalable:null,maintainAspectRatio:null};v.id=C.getAttribute("id"),v.fileURL=j.parseNodeText(C),v.deliveryType=C.getAttribute("delivery"),v.codec=C.getAttribute("codec"),v.mimeType=C.getAttribute("type"),v.mediaType=C.getAttribute("mediaType")||"2D",v.apiFramework=C.getAttribute("apiFramework"),v.fileSize=parseInt(C.getAttribute("fileSize")||0),v.bitrate=parseInt(C.getAttribute("bitrate")||0),v.minBitrate=parseInt(C.getAttribute("minBitrate")||0),v.maxBitrate=parseInt(C.getAttribute("maxBitrate")||0),v.width=parseInt(C.getAttribute("width")||0),v.height=parseInt(C.getAttribute("height")||0);const D=C.getAttribute("scalable");D&&typeof D=="string"&&(v.scalable=j.parseBoolean(D));const L=C.getAttribute("maintainAspectRatio");return L&&typeof L=="string"&&(v.maintainAspectRatio=j.parseBoolean(L)),v}(w))});const p=j.childByName(u,"InteractiveCreativeFile");p&&(r.interactiveCreativeFile=function(w){const C=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:v.type||null,apiFramework:v.apiFramework||null,variableDuration:j.parseBoolean(v.variableDuration),fileURL:null}}(j.parseAttributes(w));return C.fileURL=j.parseNodeText(w),C}(p));const g=j.childByName(u,"ClosedCaptionFiles");g&&j.childrenByName(g,"ClosedCaptionFile").forEach(w=>{const C=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:v.type||null,language:v.language||null,fileURL:null}}(j.parseAttributes(w));C.fileURL=j.parseNodeText(w),r.closedCaptionFiles.push(C)});const b=j.childByName(u,"Mezzanine"),S=function(w,C){const v={};let D=!1;return C.forEach(L=>{w&&w.getAttribute(L)?v[L]=w.getAttribute(L):D=!0}),D?null:v}(b,["delivery","type","width","height"]);if(S){const w={id:null,fileURL:null,delivery:null,codec:null,type:null,width:0,height:0,fileSize:0,mediaType:"2D"};w.id=b.getAttribute("id"),w.fileURL=j.parseNodeText(b),w.delivery=S.delivery,w.codec=b.getAttribute("codec"),w.type=S.type,w.width=parseInt(S.width,10),w.height=parseInt(S.height,10),w.fileSize=parseInt(b.getAttribute("fileSize"),10),w.mediaType=b.getAttribute("mediaType")||"2D",r.mezzanine=w}});const l=j.childByName(i,"Icons");return l&&j.childrenByName(l,"Icon").forEach(u=>{r.icons.push(function(p){const g={program:null,height:0,width:0,xPosition:0,yPosition:0,apiFramework:null,offset:null,duration:0,type:null,staticResource:null,htmlResource:null,iframeResource:null,pxratio:"1",iconClickThroughURLTemplate:null,iconClickTrackingURLTemplates:[],iconViewTrackingURLTemplate:null,iconClickFallbackImages:[]};g.program=p.getAttribute("program"),g.height=parseInt(p.getAttribute("height")||0),g.width=parseInt(p.getAttribute("width")||0),g.xPosition=function(S){return["left","right"].indexOf(S)!==-1?S:parseInt(S||0)}(p.getAttribute("xPosition")),g.yPosition=function(S){return["top","bottom"].indexOf(S)!==-1?S:parseInt(S||0)}(p.getAttribute("yPosition")),g.apiFramework=p.getAttribute("apiFramework"),g.pxratio=p.getAttribute("pxratio")||"1",g.offset=j.parseDuration(p.getAttribute("offset")),g.duration=j.parseDuration(p.getAttribute("duration")),j.childrenByName(p,"HTMLResource").forEach(S=>{g.type=S.getAttribute("creativeType")||"text/html",g.htmlResource=j.parseNodeText(S)}),j.childrenByName(p,"IFrameResource").forEach(S=>{g.type=S.getAttribute("creativeType")||0,g.iframeResource=j.parseNodeText(S)}),j.childrenByName(p,"StaticResource").forEach(S=>{g.type=S.getAttribute("creativeType")||0,g.staticResource=j.parseNodeText(S)});const b=j.childByName(p,"IconClicks");if(b){g.iconClickThroughURLTemplate=j.parseNodeText(j.childByName(b,"IconClickThrough")),j.childrenByName(b,"IconClickTracking").forEach(w=>{g.iconClickTrackingURLTemplates.push({id:w.getAttribute("id")||null,url:j.parseNodeText(w)})});const S=j.childByName(b,"IconClickFallbackImages");S&&j.childrenByName(S,"IconClickFallbackImage").forEach(w=>{g.iconClickFallbackImages.push({url:j.parseNodeText(w)||null,width:w.getAttribute("width")||null,height:w.getAttribute("height")||null})})}return g.iconViewTrackingURLTemplate=j.parseNodeText(j.childByName(p,"IconViewTracking")),g}(u))}),r}function F0(i,e){const t=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:n,adId:s,sequence:a,apiFramework:l}=Tl(r);return{id:n,adId:s,sequence:a,apiFramework:l,type:"nonlinear",variations:[],trackingEvents:{}}}(e);return j.childrenByName(i,"TrackingEvents").forEach(r=>{let n,s;j.childrenByName(r,"Tracking").forEach(a=>{n=a.getAttribute("event"),s=j.parseNodeText(a),n&&s&&(Array.isArray(t.trackingEvents[n])||(t.trackingEvents[n]=[]),t.trackingEvents[n].push(s))})}),j.childrenByName(i,"NonLinear").forEach(r=>{const n={id:null,width:0,height:0,expandedWidth:0,expandedHeight:0,scalable:!0,maintainAspectRatio:!0,minSuggestedDuration:0,apiFramework:"static",adType:"nonLinearAd",type:null,staticResource:null,htmlResource:null,iframeResource:null,nonlinearClickThroughURLTemplate:null,nonlinearClickTrackingURLTemplates:[],adParameters:null};n.id=r.getAttribute("id")||null,n.width=r.getAttribute("width"),n.height=r.getAttribute("height"),n.expandedWidth=r.getAttribute("expandedWidth"),n.expandedHeight=r.getAttribute("expandedHeight"),n.scalable=j.parseBoolean(r.getAttribute("scalable")),n.maintainAspectRatio=j.parseBoolean(r.getAttribute("maintainAspectRatio")),n.minSuggestedDuration=j.parseDuration(r.getAttribute("minSuggestedDuration")),n.apiFramework=r.getAttribute("apiFramework"),j.childrenByName(r,"HTMLResource").forEach(a=>{n.type=a.getAttribute("creativeType")||"text/html",n.htmlResource=j.parseNodeText(a)}),j.childrenByName(r,"IFrameResource").forEach(a=>{n.type=a.getAttribute("creativeType")||0,n.iframeResource=j.parseNodeText(a)}),j.childrenByName(r,"StaticResource").forEach(a=>{n.type=a.getAttribute("creativeType")||0,n.staticResource=j.parseNodeText(a)});const s=j.childByName(r,"AdParameters");s&&(n.adParameters={value:j.parseNodeText(s),xmlEncoded:s.getAttribute("xmlEncoded")||null}),n.nonlinearClickThroughURLTemplate=j.parseNodeText(j.childByName(r,"NonLinearClickThrough")),j.childrenByName(r,"NonLinearClickTracking").forEach(a=>{n.nonlinearClickTrackingURLTemplates.push({id:a.getAttribute("id")||null,url:j.parseNodeText(a)})}),t.variations.push(n)}),t}function Ac(i){const e=[];return i.forEach(t=>{const r=Lh(t);r&&e.push(r)}),e}function Lh(i){if(i.nodeName==="#comment")return null;const e={name:null,value:null,attributes:{},children:[]},t=i.attributes,r=i.childNodes;if(e.name=i.nodeName,i.attributes){for(const s in t)if(t.hasOwnProperty(s)){const a=t[s];a.nodeName&&a.nodeValue&&(e.attributes[a.nodeName]=a.nodeValue)}}for(const s in r)if(r.hasOwnProperty(s)){const a=Lh(r[s]);a&&e.children.push(a)}if(e.children.length===0||e.children.length===1&&["#cdata-section","#text"].indexOf(e.children[0].name)>=0){const s=j.parseNodeText(i);s!==""&&(e.value=s),e.children=[]}return(n=e).value===null&&Object.keys(n.attributes).length===0&&n.children.length===0?null:e;var n}function j0(i){return i.getAttribute("AdID")||i.getAttribute("adID")||i.getAttribute("adId")||null}const js={Wrapper:{subElements:["VASTAdTagURI","Impression"]},BlockedAdCategories:{attributes:["authority"]},InLine:{subElements:["AdSystem","AdTitle","Impression","AdServingId","Creatives"]},Category:{attributes:["authority"]},Pricing:{attributes:["model","currency"]},Verification:{oneOfinLineResources:["JavaScriptResource","ExecutableResource"],attributes:["vendor"]},UniversalAdId:{attributes:["idRegistry"]},JavaScriptResource:{attributes:["apiFramework","browserOptional"]},ExecutableResource:{attributes:["apiFramework","type"]},Tracking:{attributes:["event"]},Creatives:{subElements:["Creative"]},Creative:{subElements:["UniversalAdId"]},Linear:{subElements:["MediaFiles","Duration"]},MediaFiles:{subElements:["MediaFile"]},MediaFile:{attributes:["delivery","type","width","height"]},Mezzanine:{attributes:["delivery","type","width","height"]},NonLinear:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},Companion:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},StaticResource:{attributes:["creativeType"]},Icons:{subElements:["Icon"]},Icon:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"]}};function xc(i,e){if(!js[i.nodeName]||!js[i.nodeName].attributes)return;const t=js[i.nodeName].attributes.filter(r=>!i.getAttribute(r));t.length>0&&Mn({name:i.nodeName,parentName:i.parentNode.nodeName,attributes:t},e)}function Lc(i,e,t){const r=js[i.nodeName],n=!t&&i.nodeName!=="Wrapper";if(!(!r||n)){if(r.subElements){const s=r.subElements.filter(a=>!j.childByName(i,a));s.length>0&&Mn({name:i.nodeName,parentName:i.parentNode.nodeName,subElements:s},e)}!t||!r.oneOfinLineResources||r.oneOfinLineResources.some(s=>j.childByName(i,s))||Mn({name:i.nodeName,parentName:i.parentNode.nodeName,oneOfResources:r.oneOfinLineResources},e)}}function Dc(i){return i.children&&i.children.length!==0}function Mn(i,e){let{name:t,parentName:r,attributes:n,subElements:s,oneOfResources:a}=i,l="Element '".concat(t,"'");l+=n?" missing required attribute(s) '".concat(n.join(", "),"' "):s?" missing required sub element(s) '".concat(s.join(", "),"' "):a?" must provide one of the following '".concat(a.join(", "),"' "):" is empty",e("VAST-warning",{message:l,parentElement:r,specVersion:4.1})}const q0={verifyRequiredValues:function i(e,t,r){if(e&&e.nodeName)if(e.nodeName==="InLine"&&(r=!0),xc(e,t),Dc(e)){Lc(e,t,r);for(let n=0;n<e.children.length;n++)i(e.children[n],t,r)}else j.parseNodeText(e).length===0&&Mn({name:e.nodeName,parentName:e.parentNode.nodeName},t)},hasSubElements:Dc,emitMissingValueWarning:Mn,verifyRequiredAttributes:xc,verifyRequiredSubElements:Lc};function $0(i,e){let{allowMultipleAds:t,followAdditionalWrappers:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=Array.from(i.childNodes).filter(s=>{const a=s.nodeName.toLowerCase();return a==="inline"||r!==!1&&a==="wrapper"});for(const s of n){if(j.copyNodeAttribute("id",i,s),j.copyNodeAttribute("sequence",i,s),j.copyNodeAttribute("adType",i,s),s.nodeName==="Wrapper")return{ad:H0(s,e),type:"WRAPPER"};if(s.nodeName==="InLine")return{ad:V0(s,e,{allowMultipleAds:t}),type:"INLINE"};const a=s.nodeName.toLowerCase();e("VAST-warning",{message:"<".concat(s.nodeName,a==="inline"?"> must be written <InLine>":"> must be written <Wrapper>"),wrongNode:s})}}function V0(i,e){let{allowMultipleAds:t}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t===!1&&i.getAttribute("sequence")?null:Dh(i,e)}function Dh(i,e){let t=[];e&&q0.verifyRequiredValues(i,e);const r=Array.from(i.childNodes),n=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:s.id||null,sequence:s.sequence||null,adType:s.adType||null,adServingId:null,categories:[],expires:null,viewableImpression:[],system:null,title:null,description:null,advertiser:null,pricing:null,survey:null,errorURLTemplates:[],impressionURLTemplates:[],creatives:[],extensions:[],adVerifications:[],blockedAdCategories:[],followAdditionalWrappers:!0,allowMultipleAds:!1,fallbackOnNoAd:null}}(j.parseAttributes(i));return r.forEach(s=>{switch(s.nodeName){case"Error":n.errorURLTemplates.push(j.parseNodeText(s));break;case"Impression":n.impressionURLTemplates.push({id:s.getAttribute("id")||null,url:j.parseNodeText(s)});break;case"Creatives":n.creatives=function(a){const l=[];return a.forEach(u=>{const p={id:u.getAttribute("id")||null,adId:j0(u),sequence:u.getAttribute("sequence")||null,apiFramework:u.getAttribute("apiFramework")||null},g=[];let b;j.childrenByName(u,"UniversalAdId").forEach(w=>{const C={idRegistry:w.getAttribute("idRegistry")||"unknown",value:j.parseNodeText(w)};g.push(C)});const S=j.childByName(u,"CreativeExtensions");S&&(b=Ac(j.childrenByName(S,"CreativeExtension")));for(const w in u.childNodes){const C=u.childNodes[w];let v;switch(C.nodeName){case"Linear":v=B0(C,p);break;case"NonLinearAds":v=F0(C,p);break;case"CompanionAds":v=M0(C,p)}v&&(g&&(v.universalAdIds=g),b&&(v.creativeExtensions=b),l.push(v))}}),l}(j.childrenByName(s,"Creative"));break;case"Extensions":{const a=j.childrenByName(s,"Extension");n.extensions=Ac(a),n.adVerifications.length||(t=function(l){let u=null,p=[];return l.some(g=>u=j.childByName(g,"AdVerifications")),u&&(p=Pc(j.childrenByName(u,"Verification"))),p}(a));break}case"AdVerifications":n.adVerifications=Pc(j.childrenByName(s,"Verification"));break;case"AdSystem":n.system={value:j.parseNodeText(s),version:s.getAttribute("version")||null};break;case"AdTitle":n.title=j.parseNodeText(s);break;case"AdServingId":n.adServingId=j.parseNodeText(s);break;case"Category":n.categories.push({authority:s.getAttribute("authority")||null,value:j.parseNodeText(s)});break;case"Expires":n.expires=parseInt(j.parseNodeText(s),10);break;case"ViewableImpression":n.viewableImpression.push(function(a){const l=(u,p)=>{const g=j.parseNodeText(p);return g&&u.push(g),u};return{id:a.getAttribute("id")||null,viewable:j.childrenByName(a,"Viewable").reduce(l,[]),notViewable:j.childrenByName(a,"NotViewable").reduce(l,[]),viewUndetermined:j.childrenByName(a,"ViewUndetermined").reduce(l,[])}}(s));break;case"Description":n.description=j.parseNodeText(s);break;case"Advertiser":n.advertiser={id:s.getAttribute("id")||null,value:j.parseNodeText(s)};break;case"Pricing":n.pricing={value:j.parseNodeText(s),model:s.getAttribute("model")||null,currency:s.getAttribute("currency")||null};break;case"Survey":n.survey={value:j.parseNodeText(s),type:s.getAttribute("type")||null};break;case"BlockedAdCategories":n.blockedAdCategories.push({authority:s.getAttribute("authority")||null,value:j.parseNodeText(s)})}}),t.length&&(n.adVerifications=n.adVerifications.concat(t)),n}function H0(i,e){const t=Dh(i,e),r=i.getAttribute("followAdditionalWrappers"),n=i.getAttribute("allowMultipleAds"),s=i.getAttribute("fallbackOnNoAd");t.followAdditionalWrappers=!r||j.parseBoolean(r),t.allowMultipleAds=!!n&&j.parseBoolean(n),t.fallbackOnNoAd=s?j.parseBoolean(s):null;let a=j.childByName(i,"VASTAdTagURI");if(a?t.nextWrapperURL=j.parseNodeText(a):(a=j.childByName(i,"VASTAdTagURL"),a&&(t.nextWrapperURL=j.parseNodeText(j.childByName(a,"URL")))),t.creatives.forEach(l=>{if(["linear","nonlinear"].includes(l.type)){if(l.trackingEvents){t.trackingEvents||(t.trackingEvents={}),t.trackingEvents[l.type]||(t.trackingEvents[l.type]={});for(const u in l.trackingEvents){const p=l.trackingEvents[u];Array.isArray(t.trackingEvents[l.type][u])||(t.trackingEvents[l.type][u]=[]),p.forEach(g=>{t.trackingEvents[l.type][u].push(g)})}}l.videoClickTrackingURLTemplates&&(Array.isArray(t.videoClickTrackingURLTemplates)||(t.videoClickTrackingURLTemplates=[]),l.videoClickTrackingURLTemplates.forEach(u=>{t.videoClickTrackingURLTemplates.push(u)})),l.videoClickThroughURLTemplate&&(t.videoClickThroughURLTemplate=l.videoClickThroughURLTemplate),l.videoCustomClickURLTemplates&&(Array.isArray(t.videoCustomClickURLTemplates)||(t.videoCustomClickURLTemplates=[]),l.videoCustomClickURLTemplates.forEach(u=>{t.videoCustomClickURLTemplates.push(u)}))}}),t.nextWrapperURL)return t}function Pc(i){const e=[];return i.forEach(t=>{const r={resource:null,vendor:null,browserOptional:!1,apiFramework:null,type:null,parameters:null,trackingEvents:{}},n=Array.from(t.childNodes);j.assignAttributes(t.attributes,r),n.forEach(a=>{let{nodeName:l,textContent:u,attributes:p}=a;switch(l){case"JavaScriptResource":case"ExecutableResource":r.resource=u.trim(),j.assignAttributes(p,r);break;case"VerificationParameters":r.parameters=u.trim()}});const s=j.childByName(t,"TrackingEvents");s&&j.childrenByName(s,"Tracking").forEach(a=>{const l=a.getAttribute("event"),u=j.parseNodeText(a);l&&u&&(Array.isArray(r.trackingEvents[l])||(r.trackingEvents[l]=[]),r.trackingEvents[l].push(u))}),e.push(r)}),e}let Ph=class{constructor(){this._handlers=[]}on(e,t){if(typeof t!="function")throw new TypeError("The handler argument must be of type Function. Received type ".concat(typeof t));if(!e)throw new TypeError("The event argument must be of type String. Received type ".concat(typeof e));return this._handlers.push({event:e,handler:t}),this}once(e,t){return this.on(e,function(r,n,s){const a={fired:!1,wrapFn:void 0};function l(){a.fired||(r.off(n,a.wrapFn),a.fired=!0,s.bind(r)(...arguments))}return a.wrapFn=l,l}(this,e,t))}off(e,t){return this._handlers=this._handlers.filter(r=>r.event!==e||r.handler!==t),this}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];let s=!1;return this._handlers.forEach(a=>{a.event==="*"&&(s=!0,a.handler(e,...r)),a.event===e&&(s=!0,a.handler(...r))}),s}removeAllListeners(e){return e?(this._handlers=this._handlers.filter(t=>t.event!==e),this):(this._handlers=[],this)}listenerCount(e){return this._handlers.filter(t=>t.event===e).length}listeners(e){return this._handlers.reduce((t,r)=>(r.event===e&&t.push(r.handler),t),[])}eventNames(){return this._handlers.map(e=>e.event)}},Rc=0,$o=0;const Rh=(i,e)=>{!i||!e||i<=0||e<=0||($o=($o*Rc+8*i/e)/++Rc)},z0={ERRORCODE:900,extensions:[]},Nc="VAST response version not supported";let W0=class extends Ph{constructor(){let{fetcher:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this.maxWrapperDepth=null,this.rootErrorURLTemplates=[],this.errorURLTemplates=[],this.remainingAds=[],this.parsingOptions={},this.fetcher=e||null}trackVastError(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];this.emit("VAST-error",Object.assign({},z0,t,...n)),Ee.track(e,t)}getErrorURLTemplates(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)}getEstimatedBitrate(){return $o}initParsingStatus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.maxWrapperDepth=e.wrapperLimit||10,this.parsingOptions={allowMultipleAds:e.allowMultipleAds},this.rootURL="",this.resetParsingStatus(),Rh(e.byteLength,e.requestDuration)}resetParsingStatus(){this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.vastVersion=null}getRemainingAds(e){if(this.remainingAds.length===0)return Promise.reject(new Error("No more ads are available for the given VAST"));const t=e?this.remainingAds:[this.remainingAds.shift()];return this.errorURLTemplates=[],this.resolveAds(t,{wrapperDepth:0,url:this.rootURL}).then(r=>this.buildVASTResponse(r))}parseVAST(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.initParsingStatus(t),t.isRootVAST=!0,this.parse(e,t).then(r=>this.buildVASTResponse(r))}buildVASTResponse(e){const t=function(r){let{ads:n,errorURLTemplates:s,version:a}=r;return{ads:n||[],errorURLTemplates:s||[],version:a||null}}({ads:e,errorURLTemplates:this.getErrorURLTemplates(),version:this.vastVersion});return this.completeWrapperResolving(t),t}parseVastXml(e,t){let{isRootVAST:r=!1,url:n=null,wrapperDepth:s=0,allowMultipleAds:a,followAdditionalWrappers:l}=t;if(!e||!e.documentElement||e.documentElement.nodeName!=="VAST"){var u;this.emit("VAST-ad-parsed",{type:"ERROR",url:n,wrapperDepth:s});const S=(e==null||(u=e.documentElement)===null||u===void 0?void 0:u.nodeName)==="VideoAdServingTemplate";throw new Error(S?Nc:"Invalid VAST XMLDocument")}const p=[],g=e.documentElement.childNodes,b=e.documentElement.getAttribute("version");r&&b&&(this.vastVersion=b);for(const S in g){const w=g[S];if(w.nodeName==="Error"){const C=j.parseNodeText(w);r?this.rootErrorURLTemplates.push(C):this.errorURLTemplates.push(C)}else if(w.nodeName==="Ad"){if(this.vastVersion&&parseFloat(this.vastVersion)<3)a=!0;else if(a===!1&&p.length>1)break;const C=$0(w,this.emit.bind(this),{allowMultipleAds:a,followAdditionalWrappers:l});C.ad?(p.push(C.ad),this.emit("VAST-ad-parsed",{type:C.type,url:n,wrapperDepth:s,adIndex:p.length-1,vastVersion:b})):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return p}parse(e){let{url:t=null,resolveAll:r=!0,wrapperSequence:n=null,previousUrl:s=null,wrapperDepth:a=0,isRootVAST:l=!1,followAdditionalWrappers:u,allowMultipleAds:p}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=[];this.vastVersion&&parseFloat(this.vastVersion)<3&&l&&(p=!0);try{g=this.parseVastXml(e,{isRootVAST:l,url:t,wrapperDepth:a,allowMultipleAds:p,followAdditionalWrappers:u})}catch(b){return Promise.reject(b)}if(g.length===1&&n!=null&&(g[0].sequence=n),r===!1){const b=j.getSortedAdPods(g),S=j.getStandAloneAds(g);b.length?g=b:S.length&&(g=[S.shift()]),this.remainingAds=S}return this.resolveAds(g,{wrapperDepth:a,previousUrl:s,url:t})}resolveAds(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{wrapperDepth:t,previousUrl:r,url:n}=arguments.length>1?arguments[1]:void 0;const s=[];return r=n,e.forEach(a=>{const l=this.resolveWrappers(a,t,r);s.push(l)}),Promise.all(s).then(a=>Ee.flatten(a))}resolveWrappers(e,t,r){const n={...e};return new Promise(s=>{var a;if(t++,!n.nextWrapperURL)return delete n.nextWrapperURL,s(n);if(!this.fetcher)return n.VASTAdTagURI=n.nextWrapperURL,delete n.nextWrapperURL,s(n);if(t>=this.maxWrapperDepth)return n.errorCode=302,delete n.nextWrapperURL,s(n);n.nextWrapperURL=j.resolveVastAdTagURI(n.nextWrapperURL,r);const l=(a=this.parsingOptions.allowMultipleAds)!==null&&a!==void 0?a:n.allowMultipleAds,u=n.sequence;this.fetcher.fetchVAST({url:n.nextWrapperURL,emitter:this.emit.bind(this),maxWrapperDepth:this.maxWrapperDepth}).then(p=>this.parse(p,{url:n.nextWrapperURL,previousUrl:r,wrapperSequence:u,wrapperDepth:t,followAdditionalWrappers:n.followAdditionalWrappers,allowMultipleAds:l}).then(g=>{if(delete n.nextWrapperURL,g.length===0)return n.creatives=[],s(n);g.forEach(b=>{b&&j.mergeWrapperAdData(b,n)}),s(g)})).catch(p=>{n.errorCode=p.message===Nc?102:301,n.errorMessage=p.message,s(n)})})}completeWrapperResolving(e){if(e.ads.length===0)this.trackVastError(e.errorURLTemplates,{ERRORCODE:303});else for(let t=e.ads.length-1;t>=0;t--){const r=e.ads[t],n=!r.creatives.some(s=>{var a;return((a=s.mediaFiles)===null||a===void 0?void 0:a.length)>0});!r.errorCode&&!n||r.VASTAdTagURI||(this.trackVastError(r.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:r.errorCode||303},{ERRORMESSAGE:r.errorMessage||""},{extensions:r.extensions},{system:r.system}),e.ads.splice(t,1))}}},di=null;const G0={data:{},length:0,getItem(i){return this.data[i]},setItem(i,e){this.data[i]=e,this.length=Object.keys(this.data).length},removeItem(i){delete this.data[i],this.length=Object.keys(this.data).length},clear(){this.data={},this.length=0}};class X0{constructor(){this.storage=this.initStorage()}initStorage(){if(di)return di;try{di=typeof window<"u"&&window!==null?window.localStorage||window.sessionStorage:null}catch{di=null}return di&&!this.isStorageDisabled(di)||(di=G0,di.clear()),di}isStorageDisabled(e){const t="__VASTStorage__";try{if(e.setItem(t,t),e.getItem(t)!==t)return e.removeItem(t),!0}catch{return!0}return e.removeItem(t),!1}getItem(e){return this.storage.getItem(e)}setItem(e,t){return this.storage.setItem(e,t)}removeItem(e){return this.storage.removeItem(e)}clear(){return this.storage.clear()}}const Vo=12e4,K0={get:async function(i,e){try{const t=new AbortController,r=setTimeout(()=>{throw t.abort(),new Error("URLHandler: Request timed out after ".concat(e.timeout||Vo," ms (408)"))},e.timeout||Vo),n=await fetch(i,{...e,signal:t.signal,credentials:e.withCredentials?"include":"omit"}).finally(()=>{clearTimeout(r)}),s=function(a){return Ee.isBrowserEnvironment()&&window.location.protocol==="https:"&&a.url.includes("http://")?"URLHandler: Cannot go from HTTPS to HTTP.":a.status===200&&a.ok?null:"URLHandler: ".concat(a.statusText," (").concat(a.status,")")}(n);return s?{error:new Error(s),statusCode:n.status}:async function(a){const l=await a.text();let u;return u=Ee.isBrowserEnvironment()?new DOMParser:new(await Promise.resolve().then(()=>Ub).then(p=>p.i)).DOMParser,{xml:u.parseFromString(l,"text/xml"),details:{byteLength:l.length,statusCode:a.status,rawXml:l}}}(n)}catch(t){return{error:t,statusCode:t.name==="AbortError"?408:null}}}};let Y0=class{constructor(){this.URLTemplateFilters=[]}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.urlHandler=e.urlHandler||e.urlhandler||K0,this.fetchingOptions={timeout:e.timeout||Vo,withCredentials:!!e.withCredentials}}addURLTemplateFilter(e){typeof e=="function"&&this.URLTemplateFilters.push(e)}removeLastURLTemplateFilter(){this.URLTemplateFilters.pop()}countURLTemplateFilters(){return this.URLTemplateFilters.length}clearURLTemplateFilters(){this.URLTemplateFilters=[]}async fetchVAST(e){var t;let{url:r,maxWrapperDepth:n,emitter:s,wrapperDepth:a=0,previousUrl:l=null,wrapperAd:u=null}=e;const p=Date.now();this.URLTemplateFilters.forEach(S=>{r=S(r)}),s("VAST-resolving",{url:r,previousUrl:l,wrapperDepth:a,maxWrapperDepth:n,timeout:this.fetchingOptions.timeout,wrapperAd:u});const g=await this.urlHandler.get(r,this.fetchingOptions),b=Math.round(Date.now()-p);if(s("VAST-resolved",{url:r,previousUrl:l,wrapperDepth:a,error:(g==null?void 0:g.error)||null,duration:b,statusCode:(g==null?void 0:g.statusCode)||null,...g==null?void 0:g.details}),Rh(g==null||(t=g.details)===null||t===void 0?void 0:t.byteLength,b),g.error)throw new Error(g.error);return g.xml}},Q0=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new X0;this.cappingFreeLunch=e,this.cappingMinimumTimeInterval=t,this.fetcher=new Y0,this.vastParser=new W0({fetcher:this.fetcher}),this.storage=r,this.lastSuccessfulAd===void 0&&(this.lastSuccessfulAd=0),this.totalCalls===void 0&&(this.totalCalls=0),this.totalCallsTimeout===void 0&&(this.totalCallsTimeout=0)}addURLTemplateFilter(e){this.fetcher.addURLTemplateFilter(e)}removeLastURLTemplateFilter(){this.fetcher.removeLastURLTemplateFilter()}countURLTemplateFilters(){return this.fetcher.countURLTemplateFilters()}clearURLTemplateFilters(){this.fetcher.clearURLTemplateFilters()}getParser(){return this.vastParser}get lastSuccessfulAd(){return this.storage.getItem("vast-client-last-successful-ad")}set lastSuccessfulAd(e){this.storage.setItem("vast-client-last-successful-ad",e)}get totalCalls(){return this.storage.getItem("vast-client-total-calls")}set totalCalls(e){this.storage.setItem("vast-client-total-calls",e)}get totalCallsTimeout(){return this.storage.getItem("vast-client-total-calls-timeout")}set totalCallsTimeout(e){this.storage.setItem("vast-client-total-calls-timeout",e)}hasRemainingAds(){return this.vastParser.remainingAds.length>0}getNextAds(e){return this.vastParser.getRemainingAds(e)}parseVAST(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.fetcher.setOptions(t),this.vastParser.parseVAST(e,t)}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Date.now();return t.hasOwnProperty("resolveAll")||(t.resolveAll=!1),this.totalCallsTimeout<r?(this.totalCalls=1,this.totalCallsTimeout=r+36e5):this.totalCalls++,new Promise((n,s)=>{if(this.cappingFreeLunch>=this.totalCalls)return s(new Error("VAST call canceled – FreeLunch capping not reached yet ".concat(this.totalCalls,"/").concat(this.cappingFreeLunch)));const a=r-this.lastSuccessfulAd;if(a<0)this.lastSuccessfulAd=0;else if(a<this.cappingMinimumTimeInterval)return s(new Error("VAST call canceled – (".concat(this.cappingMinimumTimeInterval,")ms minimum interval reached")));this.vastParser.initParsingStatus(t),this.fetcher.setOptions(t),this.vastParser.rootURL=e,this.fetcher.fetchVAST({url:e,emitter:this.vastParser.emit.bind(this.vastParser),maxWrapperDepth:this.vastParser.maxWrapperDepth}).then(l=>(t.previousUrl=e,t.isRootVAST=!0,t.url=e,this.vastParser.parse(l,t).then(u=>{const p=this.vastParser.buildVASTResponse(u);n(p)}))).catch(l=>s(l))})}},J0=class extends Ph{constructor(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=arguments.length>4&&arguments[4]!==void 0&&arguments[4];super(),this.ad=t,this.creative=r,this.variation=n,this.muted=s,this.impressed=!1,this.skippable=!1,this.trackingEvents={},this.trackedProgressEvents=[],this.lastPercentage=0,this._alreadyTriggeredQuartiles={},this.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","resume","pause","rewind","skip","closeLinear","close"];for(const a in this.creative.trackingEvents){const l=this.creative.trackingEvents[a];this.trackingEvents[a]=l.slice(0)}(function(a){return a.type==="linear"})(this.creative)?this._initLinearTracking():this._initVariationTracking(),e&&this.on("start",()=>{e.lastSuccessfulAd=Date.now()})}_initLinearTracking(){this.linear=!0,this.skipDelay=this.creative.skipDelay,this.setDuration(this.creative.duration),this.clickThroughURLTemplate=this.creative.videoClickThroughURLTemplate,this.clickTrackingURLTemplates=this.creative.videoClickTrackingURLTemplates}_initVariationTracking(){if(this.linear=!1,this.skipDelay=-1,this.variation){for(const e in this.variation.trackingEvents){const t=this.variation.trackingEvents[e];this.trackingEvents[e]?this.trackingEvents[e]=this.trackingEvents[e].concat(t.slice(0)):this.trackingEvents[e]=t.slice(0)}this.variation.adType==="nonLinearAd"?(this.clickThroughURLTemplate=this.variation.nonlinearClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.nonlinearClickTrackingURLTemplates,this.setDuration(this.variation.minSuggestedDuration)):function(e){return e.adType==="companionAd"}(this.variation)&&(this.clickThroughURLTemplate=this.variation.companionClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.companionClickTrackingURLTemplates)}}setDuration(e){Ee.isValidTimeValue(e)?(this.assetDuration=e,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100}):this.emit("TRACKER-error",{message:"the duration provided is not valid. duration: ".concat(e)})}setProgress(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(!Ee.isValidTimeValue(e)||typeof t!="object")return void this.emit("TRACKER-error",{message:"One given setProgress parameter has the wrong type. progress: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))});const n=this.skipDelay||-1;if(n===-1||this.skippable||(n>e?this.emit("skip-countdown",n-e):(this.skippable=!0,this.emit("skip-countdown",0))),this.assetDuration>0){const s=Math.round(e/this.assetDuration*100),a=[];if(e>0){a.push("start");for(let l=this.lastPercentage;l<s;l++)a.push("progress-".concat(l+1,"%"));a.push("progress-".concat(e));for(const l in this.quartiles)this.isQuartileReached(l,this.quartiles[l],e)&&(a.push(l),this._alreadyTriggeredQuartiles[l]=!0);this.lastPercentage=s}a.forEach(l=>{this.track(l,{macros:t,once:r})}),e<this.progress&&(this.track("rewind",{macros:t}),this.trackedProgressEvents&&this.trackedProgressEvents.splice(0))}this.progress=e}isQuartileReached(e,t,r){let n=!1;return t<=r&&!this._alreadyTriggeredQuartiles[e]&&(n=!0),n}setMuted(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="boolean"&&typeof t=="object"?(this.muted!==e&&this.track(e?"mute":"unmute",{macros:t}),this.muted=e):this.emit("TRACKER-error",{message:"One given setMuted parameter has the wrong type. muted: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}setPaused(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="boolean"&&typeof t=="object"?(this.paused!==e&&this.track(e?"pause":"resume",{macros:t}),this.paused=e):this.emit("TRACKER-error",{message:"One given setPaused parameter has the wrong type. paused: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}setFullscreen(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="boolean"&&typeof t=="object"?(this.fullscreen!==e&&this.track(e?"fullscreen":"exitFullscreen",{macros:t}),this.fullscreen=e):this.emit("TRACKER-error",{message:"One given setFullScreen parameter has the wrong type. fullscreen: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}setExpand(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="boolean"&&typeof t=="object"?(this.expanded!==e&&(this.track(e?"expand":"collapse",{macros:t}),this.track(e?"playerExpand":"playerCollapse",{macros:t})),this.expanded=e):this.emit("TRACKER-error",{message:"One given setExpand parameter has the wrong type. expanded: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}setSkipDelay(e){Ee.isValidTimeValue(e)?this.skipDelay=e:this.emit("TRACKER-error",{message:"setSkipDelay parameter does not have a valid value. duration: ".concat(e)})}trackImpression(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.impressed||(this.impressed=!0,this.trackURLs(this.ad.impressionURLTemplates,e),this.track("creativeView",{macros:e})):this.emit("TRACKER-error",{message:"trackImpression parameter has the wrong type. macros: ".concat(e)})}trackViewableImpression(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.ad.viewableImpression.forEach(t=>{this.trackURLs(t.viewable,e)}):this.emit("TRACKER-error",{message:"trackViewableImpression given macros has the wrong type. macros: ".concat(e)})}trackNotViewableImpression(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.ad.viewableImpression.forEach(t=>{this.trackURLs(t.notViewable,e)}):this.emit("TRACKER-error",{message:"trackNotViewableImpression given macros has the wrong type. macros: ".concat(e)})}trackUndeterminedImpression(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.ad.viewableImpression.forEach(t=>{this.trackURLs(t.viewUndetermined,e)}):this.emit("TRACKER-error",{message:"trackUndeterminedImpression given macros has the wrong type. macros: ".concat(e)})}error(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];typeof e=="object"&&typeof t=="boolean"?this.trackURLs(this.ad.errorURLTemplates,e,{isCustomCode:t}):this.emit("TRACKER-error",{message:"One given error parameter has the wrong type. macros: ".concat(Ee.formatMacrosValues(e),", isCustomCode: ").concat(t)})}errorWithCode(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];typeof e=="string"&&typeof t=="boolean"?(this.error({ERRORCODE:e},t),console.log("The method errorWithCode is deprecated, please use vast tracker error method instead")):this.emit("TRACKER-error",{message:"One given errorWithCode parameter has the wrong type. errorCode: ".concat(e,", isCustomCode: ").concat(t)})}complete(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("complete",{macros:e}):this.emit("TRACKER-error",{message:"complete given macros has the wrong type. macros: ".concat(e)})}notUsed(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?(this.track("notUsed",{macros:e}),this.trackingEvents=[]):this.emit("TRACKER-error",{message:"notUsed given macros has the wrong type. macros: ".concat(e)})}otherAdInteraction(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("otherAdInteraction",{macros:e}):this.emit("TRACKER-error",{message:"otherAdInteraction given macros has the wrong type. macros: ".concat(e)})}acceptInvitation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("acceptInvitation",{macros:e}):this.emit("TRACKER-error",{message:"acceptInvitation given macros has the wrong type. macros: ".concat(e)})}adExpand(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("adExpand",{macros:e}):this.emit("TRACKER-error",{message:"adExpand given macros has the wrong type. macros: ".concat(e)})}adCollapse(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("adCollapse",{macros:e}):this.emit("TRACKER-error",{message:"adCollapse given macros has the wrong type. macros: ".concat(e)})}minimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("minimize",{macros:e}):this.emit("TRACKER-error",{message:"minimize given macros has the wrong type. macros: ".concat(e)})}verificationNotExecuted(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e!="string"||typeof t!="object")return void this.emit("TRACKER-error",{message:"One given verificationNotExecuted parameter has to wrong type. vendor: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))});if(!this.ad||!this.ad.adVerifications||!this.ad.adVerifications.length)throw new Error("No adVerifications provided");if(!e)throw new Error("No vendor provided, unable to find associated verificationNotExecuted");const r=this.ad.adVerifications.find(s=>s.vendor===e);if(!r)throw new Error("No associated verification element found for vendor: ".concat(e));const n=r.trackingEvents;if(n&&n.verificationNotExecuted){const s=n.verificationNotExecuted;this.trackURLs(s,t),this.emit("verificationNotExecuted",{trackingURLTemplates:s})}}overlayViewDuration(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="string"&&typeof t=="object"?(t.ADPLAYHEAD=e,this.track("overlayViewDuration",{macros:t})):this.emit("TRACKER-error",{message:"One given overlayViewDuration parameters has the wrong type. formattedDuration: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))})}close(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track(this.linear?"closeLinear":"close",{macros:e}):this.emit("TRACKER-error",{message:"close given macros has the wrong type. macros: ".concat(e)})}skip(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("skip",{macros:e}):this.emit("TRACKER-error",{message:"skip given macros has the wrong type. macros: ".concat(e)})}load(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};typeof e=="object"?this.track("loaded",{macros:e}):this.emit("TRACKER-error",{message:"load given macros has the wrong type. macros: ".concat(e)})}click(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e!==null&&typeof e!="string"||typeof t!="object")return void this.emit("TRACKER-error",{message:"One given click parameter has the wrong type. fallbackClickThroughURL: ".concat(e,", macros: ").concat(Ee.formatMacrosValues(t))});this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates,t);const r=this.clickThroughURLTemplate||e,n={...t};if(r){this.progress&&(n.ADPLAYHEAD=this.progressFormatted());const s=Ee.resolveURLTemplates([r],n)[0];this.emit("clickthrough",s)}}trackProgressEvents(e,t,r){const n=parseFloat(e.split("-")[1]);Object.entries(this.trackingEvents).filter(s=>{let[a]=s;return a.startsWith("progress-")}).map(s=>{let[a,l]=s;return{name:a,time:parseFloat(a.split("-")[1]),urls:l}}).filter(s=>{let{time:a}=s;return a<=n&&a>this.progress}).forEach(s=>{let{name:a,urls:l}=s;!r&&this.trackedProgressEvents.includes(a)||(this.emit(a,{trackingURLTemplates:l}),this.trackURLs(l,t),r?delete this.trackingEvents[a]:this.trackedProgressEvents.push(a))})}track(e){let{macros:t={},once:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t!="object")return void this.emit("TRACKER-error",{message:"track given macros has the wrong type. macros: ".concat(t)});e==="closeLinear"&&!this.trackingEvents[e]&&this.trackingEvents.close&&(e="close"),e.startsWith("progress-")&&!e.endsWith("%")&&this.trackProgressEvents(e,t,r);const n=this.trackingEvents[e],s=this.emitAlwaysEvents.indexOf(e)>-1;n?(this.emit(e,{trackingURLTemplates:n}),this.trackURLs(n,t)):s&&this.emit(e,null),r&&(delete this.trackingEvents[e],s&&this.emitAlwaysEvents.splice(this.emitAlwaysEvents.indexOf(e),1))}trackURLs(e){var t;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{validUrls:s,invalidUrls:a}=Ee.filterUrlTemplates(e);a.length&&this.emit("TRACKER-error",{message:"Provided urls are malformed. url: ".concat(a)});const l={...r};this.linear&&(this.creative&&this.creative.mediaFiles&&this.creative.mediaFiles[0]&&this.creative.mediaFiles[0].fileURL&&(l.ASSETURI=this.creative.mediaFiles[0].fileURL),this.progress&&(l.ADPLAYHEAD=this.progressFormatted())),(t=this.creative)!==null&&t!==void 0&&(t=t.universalAdIds)!==null&&t!==void 0&&t.length&&(l.UNIVERSALADID=this.creative.universalAdIds.map(u=>u.idRegistry.concat(" ",u.value)).join(",")),this.ad&&(this.ad.sequence&&(l.PODSEQUENCE=this.ad.sequence),this.ad.adType&&(l.ADTYPE=this.ad.adType),this.ad.adServingId&&(l.ADSERVINGID=this.ad.adServingId),this.ad.categories&&this.ad.categories.length&&(l.ADCATEGORIES=this.ad.categories.map(u=>u.value).join(",")),this.ad.blockedAdCategories&&this.ad.blockedAdCategories.length&&(l.BLOCKEDADCATEGORIES=this.ad.blockedAdCategories.map(u=>u.value).join(","))),Ee.track(s,l,n)}convertToTimecode(e){if(!Ee.isValidTimeValue(e))return"";const t=1e3*e,r=Math.floor(t/36e5),n=Math.floor(t/6e4%60),s=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return"".concat(Ee.addLeadingZeros(r,2),":").concat(Ee.addLeadingZeros(n,2),":").concat(Ee.addLeadingZeros(s,2),".").concat(Ee.addLeadingZeros(a,3))}progressFormatted(){return this.convertToTimecode(this.progress)}},Z0=class{constructor(e){this.id=e.getAttribute("id"),this.allowMultipleAds=e.getAttribute("allowMultipleAds"),this.followRedirects=e.getAttribute("followRedirects"),this.vastAdData=null,this.adTagURI=null,this.customData=null;for(const t in e.childNodes){const r=e.childNodes[t];switch(r.localName){case"AdTagURI":this.adTagURI={templateType:r.getAttribute("templateType"),uri:(r.textContent||r.text||"").trim()};break;case"VASTAdData":for(this.vastAdData=r.firstChild;this.vastAdData&&this.vastAdData.nodeType!==1;)this.vastAdData=this.vastAdData.nextSibling;break;case"CustomAdData":this.customData=r;break}}}};function Nh(i,e){const t=[];for(const r in i.childNodes){const n=i.childNodes[r];(n.nodeName===e||e===`vmap:${n.nodeName}`||n.nodeName===`vmap:${e}`)&&t.push(n)}return t}function eb(i){if(!i||!i.childNodes)return{};const e=i.childNodes,t=[];for(const n in e){const s=e[n];s.nodeName==="#cdata-section"&&t.push(s)}if(t&&t.length>0)try{return JSON.parse(t[0].data)}catch{}let r="";for(const n in e){const s=e[n];switch(s.nodeName){case"#text":r+=s.textContent.trim();break;case"#cdata-section":r+=s.data;break}}return r}function Sl(i){const e={attributes:{},children:{},value:{}};e.value=eb(i);const t=i.attributes;if(t)for(const n in t){const s=t[n];s.nodeName&&s.nodeValue!==void 0&&s.nodeValue!==null&&(e.attributes[s.nodeName]=s.nodeValue)}const r=i.childNodes;if(r)for(const n in r){const s=r[n];s.nodeName&&s.nodeName.substring(0,1)!=="#"&&(e.children[s.nodeName]=Sl(s))}return e}let tb=class{constructor(e){this.timeOffset=e.getAttribute("timeOffset"),this.breakType=e.getAttribute("breakType"),this.breakId=e.getAttribute("breakId"),this.repeatAfter=e.getAttribute("repeatAfter"),this.adSource=null,this.trackingEvents=[],this.extensions=[];for(const t in e.childNodes){const r=e.childNodes[t];switch(r.localName){case"AdSource":this.adSource=new Z0(r);break;case"TrackingEvents":for(const n in r.childNodes){const s=r.childNodes[n];s.localName==="Tracking"&&this.trackingEvents.push({event:s.getAttribute("event"),uri:(s.textContent||s.text||"").trim()})}break;case"Extensions":this.extensions=Nh(r,"Extension").map(n=>Sl(n));break}}}track(e,t){for(const r in this.trackingEvents){const n=this.trackingEvents[r];if(n.event===e){let{uri:s}=n;n.event==="error"&&(s=s.replace("[ERRORCODE]",t)),this.tracker(s)}}}tracker(e){if(typeof window<"u"&&window!==null){const t=new Image;t.src=e}}};class ib{constructor(e){if(!e||!e.documentElement||e.documentElement.localName!=="VMAP")throw new Error("Not a VMAP document");this.version=e.documentElement.getAttribute("version"),this.adBreaks=[],this.extensions=[];for(const t in e.documentElement.childNodes){const r=e.documentElement.childNodes[t];switch(r.localName){case"AdBreak":this.adBreaks.push(new tb(r));break;case"Extensions":this.extensions=Nh(r,"Extension").map(n=>Sl(n));break}}}}const rb=(i,e)=>{const t=goog.pal,r=new t.ConsentSettings;r.allowStorage=!1;const n=new t.NonceLoader(r);return async()=>{try{const s=new URL(e),a=new t.NonceRequest;let l=localStorage.getItem("sl-device-id")||ge.v4(),u=sessionStorage.getItem("sl-ad-session-id");u||(u=ge.v4(),sessionStorage.setItem("sl-ad-session-id",u)),mh(l)||(l=Hs(`https://${l}`,Hs.URL)),s.searchParams.get("url")||s.searchParams.set("url","https://streamlayer.io"),s.searchParams.get("description_url")||s.searchParams.set("description_url","https://streamlayer.io"),a.adWillAutoPlay=s.searchParams.get("vpa")==="auto",a.adWillPlayMuted=s.searchParams.get("vpmute")==="1",a.continuousPlayback=!0,a.descriptionUrl=s.searchParams.get("description_url"),a.iconsSupported=!0,a.sessionId=l,a.supportedApiFrameworks="2,7,9",a.videoHeight=i.clientHeight,a.videoWidth=i.clientWidth;const p=await n.loadNonceManager(a);return s.searchParams.get("is_lat")==="[placeholder]"&&s.searchParams.set("is_lat","1"),s.searchParams.get("rdid")==="[placeholder]"&&s.searchParams.set("rdid",l),s.searchParams.get("correlator")==="[placeholder]"&&s.searchParams.set("correlator",u),s.searchParams.set("wta","1"),s.searchParams.set("givn",p.getNonce()),s}catch(s){console.log("AdsManager could not be started",s);return}}},nb=new Q0,sb=i=>i.creatives.find(e=>e.mediaFiles),ab=i=>{var e;const t=i==null?void 0:i.mediaFiles;return t!=null&&t.length&&((e=t.find(r=>r.fileURL))==null?void 0:e.fileURL)||""},Oc=X.a$1({ads:[],autoplay:!0,muted:!1}),ob=(i,e)=>{const[t,r]=qe.useState(),n=qe.useRef(Date.now()),s=qe.useRef(Date.now());return qe.useEffect(()=>{if(!e||!(i!=null&&i.current))return;const a=rb(i.current,e),l=Date.now();n.current=l,a().then(u=>{n.current===l&&r(u)}).catch(u=>{console.error(u)})},[i,e]),qe.useEffect(()=>{const a=async(l,u)=>{let p=[];if(l.searchParams.get("output")==="vmap"){const w=await fetch(l.toString()),C=new DOMParser,v=await w.text(),D=C.parseFromString(v,"text/xml");p=new ib(D).adBreaks.map(L=>L.adSource.adTagURI.uri)}else p=[l.toString()];const g=await Promise.all(p.map((w,C)=>nb.get(w).then(v=>{if(s.current===u){const D=v.ads.find(U=>U.creatives.length>0);if(!D)return;const L=sb(D),O=ab(L);return{creative:L,order:C,mediaFileUrl:O,ad:D,raw:v}}}))),b=l.searchParams.get("vpa")!=="click",S=l.searchParams.get("vpmute")==="1";Oc.set({ads:g.filter(w=>!!w),autoplay:b,muted:S})};if(t){const l=Date.now();s.current=l,a(t,l)}return()=>{s.current=0}},[t]),Oc};var Mi={},vi={};function lb(i,e,t){if(t===void 0&&(t=Array.prototype),i&&typeof t.find=="function")return t.find.call(i,e);for(var r=0;r<i.length;r++)if(Object.prototype.hasOwnProperty.call(i,r)){var n=i[r];if(e.call(void 0,n,r,i))return n}}function El(i,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(i):i}function ub(i,e){if(i===null||typeof i!="object")throw new TypeError("target is not an object");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}var Oh=El({HTML:"text/html",isHTML:function(i){return i===Oh.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Uh=El({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(i){return i===Uh.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});vi.assign=ub;vi.find=lb;vi.freeze=El;vi.MIME_TYPE=Oh;vi.NAMESPACE=Uh;var Mh=vi,ii=Mh.find,Bn=Mh.NAMESPACE;function cb(i){return i!==""}function db(i){return i?i.split(/[\t\n\f\r ]+/).filter(cb):[]}function hb(i,e){return i.hasOwnProperty(e)||(i[e]=!0),i}function Uc(i){if(!i)return[];var e=db(i);return Object.keys(e.reduce(hb,{}))}function pb(i){return function(e){return i&&i.indexOf(e)!==-1}}function zn(i,e){for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}function vt(i,e){var t=i.prototype;if(!(t instanceof e)){let r=function(){};r.prototype=e.prototype,r=new r,zn(t,r),i.prototype=t=r}t.constructor!=i&&(typeof i!="function"&&console.error("unknown Class:"+i),t.constructor=i)}var Tt={},Ft=Tt.ELEMENT_NODE=1,Pr=Tt.ATTRIBUTE_NODE=2,zs=Tt.TEXT_NODE=3,Bh=Tt.CDATA_SECTION_NODE=4,Fh=Tt.ENTITY_REFERENCE_NODE=5,gb=Tt.ENTITY_NODE=6,jh=Tt.PROCESSING_INSTRUCTION_NODE=7,qh=Tt.COMMENT_NODE=8,$h=Tt.DOCUMENT_NODE=9,Vh=Tt.DOCUMENT_TYPE_NODE=10,fi=Tt.DOCUMENT_FRAGMENT_NODE=11,mb=Tt.NOTATION_NODE=12,rt={},Ye={};rt.INDEX_SIZE_ERR=(Ye[1]="Index size error",1);rt.DOMSTRING_SIZE_ERR=(Ye[2]="DOMString size error",2);var ft=rt.HIERARCHY_REQUEST_ERR=(Ye[3]="Hierarchy request error",3);rt.WRONG_DOCUMENT_ERR=(Ye[4]="Wrong document",4);rt.INVALID_CHARACTER_ERR=(Ye[5]="Invalid character",5);rt.NO_DATA_ALLOWED_ERR=(Ye[6]="No data allowed",6);rt.NO_MODIFICATION_ALLOWED_ERR=(Ye[7]="No modification allowed",7);var Hh=rt.NOT_FOUND_ERR=(Ye[8]="Not found",8);rt.NOT_SUPPORTED_ERR=(Ye[9]="Not supported",9);var Mc=rt.INUSE_ATTRIBUTE_ERR=(Ye[10]="Attribute in use",10);rt.INVALID_STATE_ERR=(Ye[11]="Invalid state",11);rt.SYNTAX_ERR=(Ye[12]="Syntax error",12);rt.INVALID_MODIFICATION_ERR=(Ye[13]="Invalid modification",13);rt.NAMESPACE_ERR=(Ye[14]="Invalid namespace",14);rt.INVALID_ACCESS_ERR=(Ye[15]="Invalid access",15);function $e(i,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Ye[i]),this.message=Ye[i],Error.captureStackTrace&&Error.captureStackTrace(this,$e);return t.code=i,e&&(this.message=this.message+": "+e),t}$e.prototype=Error.prototype;zn(rt,$e);function gi(){}gi.prototype={length:0,item:function(i){return i>=0&&i<this.length?this[i]:null},toString:function(i,e){for(var t=[],r=0;r<this.length;r++)vr(this[r],t,i,e);return t.join("")},filter:function(i){return Array.prototype.filter.call(this,i)},indexOf:function(i){return Array.prototype.indexOf.call(this,i)}};function Rr(i,e){this._node=i,this._refresh=e,wl(this)}function wl(i){var e=i._node._inc||i._node.ownerDocument._inc;if(i._inc!==e){var t=i._refresh(i._node);if(ip(i,"length",t.length),!i.$$length||t.length<i.$$length)for(var r=t.length;r in i;r++)Object.prototype.hasOwnProperty.call(i,r)&&delete i[r];zn(t,i),i._inc=e}}Rr.prototype.item=function(i){return wl(this),this[i]||null};vt(Rr,gi);function Ws(){}function zh(i,e){for(var t=i.length;t--;)if(i[t]===e)return t}function Bc(i,e,t,r){if(r?e[zh(e,r)]=t:e[e.length++]=t,i){t.ownerElement=i;var n=i.ownerDocument;n&&(r&&Xh(n,i,r),fb(n,i,t))}}function Fc(i,e,t){var r=zh(e,t);if(r>=0){for(var n=e.length-1;r<n;)e[r]=e[++r];if(e.length=n,i){var s=i.ownerDocument;s&&(Xh(s,i,t),t.ownerElement=null)}}else throw new $e(Hh,new Error(i.tagName+"@"+t))}Ws.prototype={length:0,item:gi.prototype.item,getNamedItem:function(i){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==i)return t}},setNamedItem:function(i){var e=i.ownerElement;if(e&&e!=this._ownerElement)throw new $e(Mc);var t=this.getNamedItem(i.nodeName);return Bc(this._ownerElement,this,i,t),t},setNamedItemNS:function(i){var e=i.ownerElement,t;if(e&&e!=this._ownerElement)throw new $e(Mc);return t=this.getNamedItemNS(i.namespaceURI,i.localName),Bc(this._ownerElement,this,i,t),t},removeNamedItem:function(i){var e=this.getNamedItem(i);return Fc(this._ownerElement,this,e),e},removeNamedItemNS:function(i,e){var t=this.getNamedItemNS(i,e);return Fc(this._ownerElement,this,t),t},getNamedItemNS:function(i,e){for(var t=this.length;t--;){var r=this[t];if(r.localName==e&&r.namespaceURI==i)return r}return null}};function Wh(){}Wh.prototype={hasFeature:function(i,e){return!0},createDocument:function(i,e,t){var r=new Wn;if(r.implementation=this,r.childNodes=new gi,r.doctype=t||null,t&&r.appendChild(t),e){var n=r.createElementNS(i,e);r.appendChild(n)}return r},createDocumentType:function(i,e,t){var r=new Ta;return r.name=i,r.nodeName=i,r.publicId=e||"",r.systemId=t||"",r}};function _e(){}_e.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(i,e){return Gs(this,i,e)},replaceChild:function(i,e){Gs(this,i,e,Yh),e&&this.removeChild(e)},removeChild:function(i){return Kh(this,i)},appendChild:function(i){return this.insertBefore(i,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(i){return Ho(this.ownerDocument||this,this,i)},normalize:function(){for(var i=this.firstChild;i;){var e=i.nextSibling;e&&e.nodeType==zs&&i.nodeType==zs?(this.removeChild(e),i.appendData(e.data)):(i.normalize(),i=e)}},isSupported:function(i,e){return this.ownerDocument.implementation.hasFeature(i,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(i){for(var e=this;e;){var t=e._nsMap;if(t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&t[r]===i)return r}e=e.nodeType==Pr?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(i){for(var e=this;e;){var t=e._nsMap;if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i];e=e.nodeType==Pr?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(i){var e=this.lookupPrefix(i);return e==null}};function Gh(i){return i=="<"&&"&lt;"||i==">"&&"&gt;"||i=="&"&&"&amp;"||i=='"'&&"&quot;"||"&#"+i.charCodeAt()+";"}zn(Tt,_e);zn(Tt,_e.prototype);function Fn(i,e){if(e(i))return!0;if(i=i.firstChild)do if(Fn(i,e))return!0;while(i=i.nextSibling)}function Wn(){this.ownerDocument=this}function fb(i,e,t){i&&i._inc++;var r=t.namespaceURI;r===Bn.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Xh(i,e,t,r){i&&i._inc++;var n=t.namespaceURI;n===Bn.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function kl(i,e,t){if(i&&i._inc){i._inc++;var r=e.childNodes;if(t)r[r.length++]=t;else{for(var n=e.firstChild,s=0;n;)r[s++]=n,n=n.nextSibling;r.length=s,delete r[r.length]}}}function Kh(i,e){var t=e.previousSibling,r=e.nextSibling;return t?t.nextSibling=r:i.firstChild=r,r?r.previousSibling=t:i.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,kl(i.ownerDocument,i),e}function yb(i){return i&&(i.nodeType===_e.DOCUMENT_NODE||i.nodeType===_e.DOCUMENT_FRAGMENT_NODE||i.nodeType===_e.ELEMENT_NODE)}function _b(i){return i&&(ri(i)||Cl(i)||yi(i)||i.nodeType===_e.DOCUMENT_FRAGMENT_NODE||i.nodeType===_e.COMMENT_NODE||i.nodeType===_e.PROCESSING_INSTRUCTION_NODE)}function yi(i){return i&&i.nodeType===_e.DOCUMENT_TYPE_NODE}function ri(i){return i&&i.nodeType===_e.ELEMENT_NODE}function Cl(i){return i&&i.nodeType===_e.TEXT_NODE}function jc(i,e){var t=i.childNodes||[];if(ii(t,ri)||yi(e))return!1;var r=ii(t,yi);return!(e&&r&&t.indexOf(r)>t.indexOf(e))}function qc(i,e){var t=i.childNodes||[];function r(s){return ri(s)&&s!==e}if(ii(t,r))return!1;var n=ii(t,yi);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}function bb(i,e,t){if(!yb(i))throw new $e(ft,"Unexpected parent node type "+i.nodeType);if(t&&t.parentNode!==i)throw new $e(Hh,"child not in parent");if(!_b(e)||yi(e)&&i.nodeType!==_e.DOCUMENT_NODE)throw new $e(ft,"Unexpected node type "+e.nodeType+" for parent node type "+i.nodeType)}function vb(i,e,t){var r=i.childNodes||[],n=e.childNodes||[];if(e.nodeType===_e.DOCUMENT_FRAGMENT_NODE){var s=n.filter(ri);if(s.length>1||ii(n,Cl))throw new $e(ft,"More than one element or text in fragment");if(s.length===1&&!jc(i,t))throw new $e(ft,"Element in fragment can not be inserted before doctype")}if(ri(e)&&!jc(i,t))throw new $e(ft,"Only one element can be added and only after doctype");if(yi(e)){if(ii(r,yi))throw new $e(ft,"Only one doctype is allowed");var a=ii(r,ri);if(t&&r.indexOf(a)<r.indexOf(t))throw new $e(ft,"Doctype can only be inserted before an element");if(!t&&a)throw new $e(ft,"Doctype can not be appended since element is present")}}function Yh(i,e,t){var r=i.childNodes||[],n=e.childNodes||[];if(e.nodeType===_e.DOCUMENT_FRAGMENT_NODE){var s=n.filter(ri);if(s.length>1||ii(n,Cl))throw new $e(ft,"More than one element or text in fragment");if(s.length===1&&!qc(i,t))throw new $e(ft,"Element in fragment can not be inserted before doctype")}if(ri(e)&&!qc(i,t))throw new $e(ft,"Only one element can be added and only after doctype");if(yi(e)){if(ii(r,function(l){return yi(l)&&l!==t}))throw new $e(ft,"Only one doctype is allowed");var a=ii(r,ri);if(t&&r.indexOf(a)<r.indexOf(t))throw new $e(ft,"Doctype can only be inserted before an element")}}function Gs(i,e,t,r){bb(i,e,t),i.nodeType===_e.DOCUMENT_NODE&&(r||vb)(i,e,t);var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===fi){var s=e.firstChild;if(s==null)return e;var a=e.lastChild}else s=a=e;var l=t?t.previousSibling:i.lastChild;s.previousSibling=l,a.nextSibling=t,l?l.nextSibling=s:i.firstChild=s,t==null?i.lastChild=a:t.previousSibling=a;do s.parentNode=i;while(s!==a&&(s=s.nextSibling));return kl(i.ownerDocument||i,i),e.nodeType==fi&&(e.firstChild=e.lastChild=null),e}function Tb(i,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=i,e.previousSibling=i.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,i.lastChild=e,kl(i.ownerDocument,i,e),e}Wn.prototype={nodeName:"#document",nodeType:$h,doctype:null,documentElement:null,_inc:1,insertBefore:function(i,e){if(i.nodeType==fi){for(var t=i.firstChild;t;){var r=t.nextSibling;this.insertBefore(t,e),t=r}return i}return Gs(this,i,e),i.ownerDocument=this,this.documentElement===null&&i.nodeType===Ft&&(this.documentElement=i),i},removeChild:function(i){return this.documentElement==i&&(this.documentElement=null),Kh(this,i)},replaceChild:function(i,e){Gs(this,i,e,Yh),i.ownerDocument=this,e&&this.removeChild(e),ri(i)&&(this.documentElement=i)},importNode:function(i,e){return tp(this,i,e)},getElementById:function(i){var e=null;return Fn(this.documentElement,function(t){if(t.nodeType==Ft&&t.getAttribute("id")==i)return e=t,!0}),e},getElementsByClassName:function(i){var e=Uc(i);return new Rr(this,function(t){var r=[];return e.length>0&&Fn(t.documentElement,function(n){if(n!==t&&n.nodeType===Ft){var s=n.getAttribute("class");if(s){var a=i===s;if(!a){var l=Uc(s);a=e.every(pb(l))}a&&r.push(n)}}}),r})},createElement:function(i){var e=new rr;e.ownerDocument=this,e.nodeName=i,e.tagName=i,e.localName=i,e.childNodes=new gi;var t=e.attributes=new Ws;return t._ownerElement=e,e},createDocumentFragment:function(){var i=new Sa;return i.ownerDocument=this,i.childNodes=new gi,i},createTextNode:function(i){var e=new Il;return e.ownerDocument=this,e.appendData(i),e},createComment:function(i){var e=new Al;return e.ownerDocument=this,e.appendData(i),e},createCDATASection:function(i){var e=new xl;return e.ownerDocument=this,e.appendData(i),e},createProcessingInstruction:function(i,e){var t=new Dl;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=i,t.nodeValue=t.data=e,t},createAttribute:function(i){var e=new Xs;return e.ownerDocument=this,e.name=i,e.nodeName=i,e.localName=i,e.specified=!0,e},createEntityReference:function(i){var e=new Ll;return e.ownerDocument=this,e.nodeName=i,e},createElementNS:function(i,e){var t=new rr,r=e.split(":"),n=t.attributes=new Ws;return t.childNodes=new gi,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=i,r.length==2?(t.prefix=r[0],t.localName=r[1]):t.localName=e,n._ownerElement=t,t},createAttributeNS:function(i,e){var t=new Xs,r=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=i,t.specified=!0,r.length==2?(t.prefix=r[0],t.localName=r[1]):t.localName=e,t}};vt(Wn,_e);function rr(){this._nsMap={}}rr.prototype={nodeType:Ft,hasAttribute:function(i){return this.getAttributeNode(i)!=null},getAttribute:function(i){var e=this.getAttributeNode(i);return e&&e.value||""},getAttributeNode:function(i){return this.attributes.getNamedItem(i)},setAttribute:function(i,e){var t=this.ownerDocument.createAttribute(i);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},removeAttribute:function(i){var e=this.getAttributeNode(i);e&&this.removeAttributeNode(e)},appendChild:function(i){return i.nodeType===fi?this.insertBefore(i,null):Tb(this,i)},setAttributeNode:function(i){return this.attributes.setNamedItem(i)},setAttributeNodeNS:function(i){return this.attributes.setNamedItemNS(i)},removeAttributeNode:function(i){return this.attributes.removeNamedItem(i.nodeName)},removeAttributeNS:function(i,e){var t=this.getAttributeNodeNS(i,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(i,e){return this.getAttributeNodeNS(i,e)!=null},getAttributeNS:function(i,e){var t=this.getAttributeNodeNS(i,e);return t&&t.value||""},setAttributeNS:function(i,e,t){var r=this.ownerDocument.createAttributeNS(i,e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},getAttributeNodeNS:function(i,e){return this.attributes.getNamedItemNS(i,e)},getElementsByTagName:function(i){return new Rr(this,function(e){var t=[];return Fn(e,function(r){r!==e&&r.nodeType==Ft&&(i==="*"||r.tagName==i)&&t.push(r)}),t})},getElementsByTagNameNS:function(i,e){return new Rr(this,function(t){var r=[];return Fn(t,function(n){n!==t&&n.nodeType===Ft&&(i==="*"||n.namespaceURI===i)&&(e==="*"||n.localName==e)&&r.push(n)}),r})}};Wn.prototype.getElementsByTagName=rr.prototype.getElementsByTagName;Wn.prototype.getElementsByTagNameNS=rr.prototype.getElementsByTagNameNS;vt(rr,_e);function Xs(){}Xs.prototype.nodeType=Pr;vt(Xs,_e);function Gn(){}Gn.prototype={data:"",substringData:function(i,e){return this.data.substring(i,i+e)},appendData:function(i){i=this.data+i,this.nodeValue=this.data=i,this.length=i.length},insertData:function(i,e){this.replaceData(i,0,e)},appendChild:function(i){throw new Error(Ye[ft])},deleteData:function(i,e){this.replaceData(i,e,"")},replaceData:function(i,e,t){var r=this.data.substring(0,i),n=this.data.substring(i+e);t=r+t+n,this.nodeValue=this.data=t,this.length=t.length}};vt(Gn,_e);function Il(){}Il.prototype={nodeName:"#text",nodeType:zs,splitText:function(i){var e=this.data,t=e.substring(i);e=e.substring(0,i),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};vt(Il,Gn);function Al(){}Al.prototype={nodeName:"#comment",nodeType:qh};vt(Al,Gn);function xl(){}xl.prototype={nodeName:"#cdata-section",nodeType:Bh};vt(xl,Gn);function Ta(){}Ta.prototype.nodeType=Vh;vt(Ta,_e);function Qh(){}Qh.prototype.nodeType=mb;vt(Qh,_e);function Jh(){}Jh.prototype.nodeType=gb;vt(Jh,_e);function Ll(){}Ll.prototype.nodeType=Fh;vt(Ll,_e);function Sa(){}Sa.prototype.nodeName="#document-fragment";Sa.prototype.nodeType=fi;vt(Sa,_e);function Dl(){}Dl.prototype.nodeType=jh;vt(Dl,_e);function Zh(){}Zh.prototype.serializeToString=function(i,e,t){return ep.call(i,e,t)};_e.prototype.toString=ep;function ep(i,e){var t=[],r=this.nodeType==9&&this.documentElement||this,n=r.prefix,s=r.namespaceURI;if(s&&n==null){var n=r.lookupPrefix(s);if(n==null)var a=[{namespace:s,prefix:null}]}return vr(this,t,i,e,a),t.join("")}function $c(i,e,t){var r=i.prefix||"",n=i.namespaceURI;if(!n||r==="xml"&&n===Bn.XML||n===Bn.XMLNS)return!1;for(var s=t.length;s--;){var a=t[s];if(a.prefix===r)return a.namespace!==n}return!0}function bo(i,e,t){i.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,Gh),'"')}function vr(i,e,t,r,n){if(n||(n=[]),r)if(i=r(i),i){if(typeof i=="string"){e.push(i);return}}else return;switch(i.nodeType){case Ft:var s=i.attributes,a=s.length,l=i.firstChild,u=i.tagName;t=Bn.isHTML(i.namespaceURI)||t;var p=u;if(!t&&!i.prefix&&i.namespaceURI){for(var g,b=0;b<s.length;b++)if(s.item(b).name==="xmlns"){g=s.item(b).value;break}if(!g)for(var S=n.length-1;S>=0;S--){var w=n[S];if(w.prefix===""&&w.namespace===i.namespaceURI){g=w.namespace;break}}if(g!==i.namespaceURI)for(var S=n.length-1;S>=0;S--){var w=n[S];if(w.namespace===i.namespaceURI){w.prefix&&(p=w.prefix+":"+u);break}}}e.push("<",p);for(var C=0;C<a;C++){var v=s.item(C);v.prefix=="xmlns"?n.push({prefix:v.localName,namespace:v.value}):v.nodeName=="xmlns"&&n.push({prefix:"",namespace:v.value})}for(var C=0;C<a;C++){var v=s.item(C);if($c(v,t,n)){var D=v.prefix||"",L=v.namespaceURI;bo(e,D?"xmlns:"+D:"xmlns",L),n.push({prefix:D,namespace:L})}vr(v,e,t,r,n)}if(u===p&&$c(i,t,n)){var D=i.prefix||"",L=i.namespaceURI;bo(e,D?"xmlns:"+D:"xmlns",L),n.push({prefix:D,namespace:L})}if(l||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(e.push(">"),t&&/^script$/i.test(u))for(;l;)l.data?e.push(l.data):vr(l,e,t,r,n.slice()),l=l.nextSibling;else for(;l;)vr(l,e,t,r,n.slice()),l=l.nextSibling;e.push("</",p,">")}else e.push("/>");return;case $h:case fi:for(var l=i.firstChild;l;)vr(l,e,t,r,n.slice()),l=l.nextSibling;return;case Pr:return bo(e,i.name,i.value);case zs:return e.push(i.data.replace(/[<&>]/g,Gh));case Bh:return e.push("<![CDATA[",i.data,"]]>");case qh:return e.push("<!--",i.data,"-->");case Vh:var O=i.publicId,U=i.systemId;if(e.push("<!DOCTYPE ",i.name),O)e.push(" PUBLIC ",O),U&&U!="."&&e.push(" ",U),e.push(">");else if(U&&U!=".")e.push(" SYSTEM ",U,">");else{var F=i.internalSubset;F&&e.push(" [",F,"]"),e.push(">")}return;case jh:return e.push("<?",i.target," ",i.data,"?>");case Fh:return e.push("&",i.nodeName,";");default:e.push("??",i.nodeName)}}function tp(i,e,t){var r;switch(e.nodeType){case Ft:r=e.cloneNode(!1),r.ownerDocument=i;case fi:break;case Pr:t=!0;break}if(r||(r=e.cloneNode(!1)),r.ownerDocument=i,r.parentNode=null,t)for(var n=e.firstChild;n;)r.appendChild(tp(i,n,t)),n=n.nextSibling;return r}function Ho(i,e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=e[n];typeof s!="object"&&s!=r[n]&&(r[n]=s)}switch(e.childNodes&&(r.childNodes=new gi),r.ownerDocument=i,r.nodeType){case Ft:var a=e.attributes,l=r.attributes=new Ws,u=a.length;l._ownerElement=r;for(var p=0;p<u;p++)r.setAttributeNode(Ho(i,a.item(p),!0));break;case Pr:t=!0}if(t)for(var g=e.firstChild;g;)r.appendChild(Ho(i,g,t)),g=g.nextSibling;return r}function ip(i,e,t){i[e]=t}try{if(Object.defineProperty){let i=function(e){switch(e.nodeType){case Ft:case fi:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(i(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};Object.defineProperty(Rr.prototype,"length",{get:function(){return wl(this),this.$$length}}),Object.defineProperty(_e.prototype,"textContent",{get:function(){return i(this)},set:function(e){switch(this.nodeType){case Ft:case fi:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ip=function(e,t,r){e["$$"+t]=r}}}catch{}Mi.DocumentType=Ta;Mi.DOMException=$e;Mi.DOMImplementation=Wh;Mi.Element=rr;Mi.Node=_e;Mi.NodeList=gi;Mi.XMLSerializer=Zh;var Ea={},rp={};(function(i){var e=vi.freeze;i.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),i.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
2
2
  `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),i.entityMap=i.HTML_ENTITIES})(rp);var Pl={},jn=vi.NAMESPACE,zo=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Vc=new RegExp("[\\-\\.0-9"+zo.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Hc=new RegExp("^"+zo.source+Vc.source+"*(?::"+zo.source+Vc.source+"*)?$"),yn=0,Ai=1,hr=2,_n=3,pr=4,gr=5,bn=6,Ps=7;function Nr(i,e){this.message=i,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Nr)}Nr.prototype=new Error;Nr.prototype.name=Nr.name;function np(){}np.prototype={parse:function(i,e,t){var r=this.domBuilder;r.startDocument(),sp(e,e={}),Sb(i,e,t,r,this.errorHandler),r.endDocument()}};function Sb(i,e,t,r,n){function s(de){if(de>65535){de-=65536;var we=55296+(de>>10),ze=56320+(de&1023);return String.fromCharCode(we,ze)}else return String.fromCharCode(de)}function a(de){var we=de.slice(1,-1);return Object.hasOwnProperty.call(t,we)?t[we]:we.charAt(0)==="#"?s(parseInt(we.substr(1).replace("x","0x"))):(n.error("entity not found:"+de),de)}function l(de){if(de>v){var we=i.substring(v,de).replace(/&#?\w+;/g,a);S&&u(v),r.characters(we,0,de-v),v=de}}function u(de,we){for(;de>=g&&(we=b.exec(i));)p=we.index,g=p+we[0].length,S.lineNumber++;S.columnNumber=de-p+1}for(var p=0,g=0,b=/.*(?:\r\n?|\n)|.*$/g,S=r.locator,w=[{currentNSMap:e}],C={},v=0;;){try{var D=i.indexOf("<",v);if(D<0){if(!i.substr(v).match(/^\s*$/)){var L=r.doc,O=L.createTextNode(i.substr(v));L.appendChild(O),r.currentElement=O}return}switch(D>v&&l(D),i.charAt(D+1)){case"/":var le=i.indexOf(">",D+3),U=i.substring(D+2,le).replace(/[ \t\n\r]+$/g,""),F=w.pop();le<0?(U=i.substring(D+2).replace(/[\s<].*/,""),n.error("end tag name: "+U+" is not complete:"+F.tagName),le=D+1+U.length):U.match(/\s</)&&(U=U.replace(/[\s<].*/,""),n.error("end tag name: "+U+" maybe not complete"),le=D+1+U.length);var N=F.localNSMap,V=F.tagName==U,J=V||F.tagName&&F.tagName.toLowerCase()==U.toLowerCase();if(J){if(r.endElement(F.uri,F.localName,U),N)for(var Y in N)Object.prototype.hasOwnProperty.call(N,Y)&&r.endPrefixMapping(Y);V||n.fatalError("end tag name: "+U+" is not match the current start tagName:"+F.tagName)}else w.push(F);le++;break;case"?":S&&u(D),le=Ib(i,D,r);break;case"!":S&&u(D),le=Cb(i,D,r,n);break;default:S&&u(D);var re=new ap,he=w[w.length-1].currentNSMap,le=Eb(i,D,re,he,a,n),pe=re.length;if(!re.closed&&kb(i,le,re.tagName,C)&&(re.closed=!0,t.nbsp||n.warning("unclosed xml attribute")),S&&pe){for(var ee=zc(S,{}),ce=0;ce<pe;ce++){var ne=re[ce];u(ne.offset),ne.locator=zc(S,{})}r.locator=ee,Wc(re,r,he)&&w.push(re),r.locator=S}else Wc(re,r,he)&&w.push(re);jn.isHTML(re.uri)&&!re.closed?le=wb(i,le,re.tagName,a,r):le++}}catch(de){if(de instanceof Nr)throw de;n.error("element parse error: "+de),le=-1}le>v?v=le:l(Math.max(D,v)+1)}}function zc(i,e){return e.lineNumber=i.lineNumber,e.columnNumber=i.columnNumber,e}function Eb(i,e,t,r,n,s){function a(S,w,C){t.attributeNames.hasOwnProperty(S)&&s.fatalError("Attribute "+S+" redefined"),t.addValue(S,w.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,n),C)}for(var l,u,p=++e,g=yn;;){var b=i.charAt(p);switch(b){case"=":if(g===Ai)l=i.slice(e,p),g=_n;else if(g===hr)g=_n;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(g===_n||g===Ai)if(g===Ai&&(s.warning('attribute value must after "="'),l=i.slice(e,p)),e=p+1,p=i.indexOf(b,e),p>0)u=i.slice(e,p),a(l,u,e-1),g=gr;else throw new Error("attribute value no end '"+b+"' match");else if(g==pr)u=i.slice(e,p),a(l,u,e),s.warning('attribute "'+l+'" missed start quot('+b+")!!"),e=p+1,g=gr;else throw new Error('attribute value must after "="');break;case"/":switch(g){case yn:t.setTagName(i.slice(e,p));case gr:case bn:case Ps:g=Ps,t.closed=!0;case pr:case Ai:break;case hr:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),g==yn&&t.setTagName(i.slice(e,p)),p;case">":switch(g){case yn:t.setTagName(i.slice(e,p));case gr:case bn:case Ps:break;case pr:case Ai:u=i.slice(e,p),u.slice(-1)==="/"&&(t.closed=!0,u=u.slice(0,-1));case hr:g===hr&&(u=l),g==pr?(s.warning('attribute "'+u+'" missed quot(")!'),a(l,u,e)):((!jn.isHTML(r[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),a(u,u,e));break;case _n:throw new Error("attribute value missed!!")}return p;case"€":b=" ";default:if(b<=" ")switch(g){case yn:t.setTagName(i.slice(e,p)),g=bn;break;case Ai:l=i.slice(e,p),g=hr;break;case pr:var u=i.slice(e,p);s.warning('attribute "'+u+'" missed quot(")!!'),a(l,u,e);case gr:g=bn;break}else switch(g){case hr:t.tagName,(!jn.isHTML(r[""])||!l.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),a(l,l,e),e=p,g=Ai;break;case gr:s.warning('attribute space is required"'+l+'"!!');case bn:g=Ai,e=p;break;case _n:g=pr,e=p;break;case Ps:throw new Error("elements closed character '/' and '>' must be connected to")}}p++}}function Wc(i,e,t){for(var r=i.tagName,n=null,s=i.length;s--;){var a=i[s],l=a.qName,u=a.value,S=l.indexOf(":");if(S>0)var p=a.prefix=l.slice(0,S),g=l.slice(S+1),b=p==="xmlns"&&g;else g=l,p=null,b=l==="xmlns"&&"";a.localName=g,b!==!1&&(n==null&&(n={},sp(t,t={})),t[b]=n[b]=u,a.uri=jn.XMLNS,e.startPrefixMapping(b,u))}for(var s=i.length;s--;){a=i[s];var p=a.prefix;p&&(p==="xml"&&(a.uri=jn.XML),p!=="xmlns"&&(a.uri=t[p||""]))}var S=r.indexOf(":");S>0?(p=i.prefix=r.slice(0,S),g=i.localName=r.slice(S+1)):(p=null,g=i.localName=r);var w=i.uri=t[p||""];if(e.startElement(w,g,r,i),i.closed){if(e.endElement(w,g,r),n)for(p in n)Object.prototype.hasOwnProperty.call(n,p)&&e.endPrefixMapping(p)}else return i.currentNSMap=t,i.localNSMap=n,!0}function wb(i,e,t,r,n){if(/^(?:script|textarea)$/i.test(t)){var s=i.indexOf("</"+t+">",e),a=i.substring(e+1,s);if(/[&<]/.test(a))return/^script$/i.test(t)?(n.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,r),n.characters(a,0,a.length),s)}return e+1}function kb(i,e,t,r){var n=r[t];return n==null&&(n=i.lastIndexOf("</"+t+">"),n<e&&(n=i.lastIndexOf("</"+t)),r[t]=n),n<e}function sp(i,e){for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}function Cb(i,e,t,r){var n=i.charAt(e+2);switch(n){case"-":if(i.charAt(e+3)==="-"){var s=i.indexOf("-->",e+4);return s>e?(t.comment(i,e+4,s-e-4),s+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(i.substr(e+3,6)=="CDATA["){var s=i.indexOf("]]>",e+9);return t.startCDATA(),t.characters(i,e+9,s-e-9),t.endCDATA(),s+3}var a=Ab(i,e),l=a.length;if(l>1&&/!doctype/i.test(a[0][0])){var u=a[1][0],p=!1,g=!1;l>3&&(/^public$/i.test(a[2][0])?(p=a[3][0],g=l>4&&a[4][0]):/^system$/i.test(a[2][0])&&(g=a[3][0]));var b=a[l-1];return t.startDTD(u,p,g),t.endDTD(),b.index+b[0].length}}return-1}function Ib(i,e,t){var r=i.indexOf("?>",e);if(r){var n=i.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return n?(n[0].length,t.processingInstruction(n[1],n[2]),r+2):-1}return-1}function ap(){this.attributeNames={}}ap.prototype={setTagName:function(i){if(!Hc.test(i))throw new Error("invalid tagName:"+i);this.tagName=i},addValue:function(i,e,t){if(!Hc.test(i))throw new Error("invalid attribute:"+i);this.attributeNames[i]=this.length,this[this.length++]={qName:i,value:e,offset:t}},length:0,getLocalName:function(i){return this[i].localName},getLocator:function(i){return this[i].locator},getQName:function(i){return this[i].qName},getURI:function(i){return this[i].uri},getValue:function(i){return this[i].value}};function Ab(i,e){var t,r=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=e,n.exec(i);t=n.exec(i);)if(r.push(t),t[1])return r}Pl.XMLReader=np;Pl.ParseError=Nr;var xb=vi,Lb=Mi,Gc=rp,op=Pl,Db=Lb.DOMImplementation,Xc=xb.NAMESPACE,Pb=op.ParseError,Rb=op.XMLReader;function lp(i){return i.replace(/\r[\n\u0085]/g,`
3
3
  `).replace(/[\r\u0085\u2028]/g,`
4
4
  `)}function up(i){this.options=i||{locator:{}}}up.prototype.parseFromString=function(i,e){var t=this.options,r=new Rb,n=t.domBuilder||new Xn,s=t.errorHandler,a=t.locator,l=t.xmlns||{},u=/\/x?html?$/.test(e),p=u?Gc.HTML_ENTITIES:Gc.XML_ENTITIES;a&&n.setDocumentLocator(a),r.errorHandler=Nb(s,n,a),r.domBuilder=t.domBuilder||n,u&&(l[""]=Xc.HTML),l.xml=l.xml||Xc.XML;var g=t.normalizeLineEndings||lp;return i&&typeof i=="string"?r.parse(g(i),l,p):r.errorHandler.error("invalid doc source"),n.doc};function Nb(i,e,t){if(!i){if(e instanceof Xn)return e;i=e}var r={},n=i instanceof Function;t=t||{};function s(a){var l=i[a];!l&&n&&(l=i.length==2?function(u){i(a,u)}:i),r[a]=l&&function(u){l("[xmldom "+a+"] "+u+Wo(t))}||function(){}}return s("warning"),s("error"),s("fatalError"),r}function Xn(){this.cdata=!1}function mr(i,e){e.lineNumber=i.lineNumber,e.columnNumber=i.columnNumber}Xn.prototype={startDocument:function(){this.doc=new Db().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(i,e,t,r){var n=this.doc,s=n.createElementNS(i,t||e),a=r.length;Rs(this,s),this.currentElement=s,this.locator&&mr(this.locator,s);for(var l=0;l<a;l++){var i=r.getURI(l),u=r.getValue(l),t=r.getQName(l),p=n.createAttributeNS(i,t);this.locator&&mr(r.getLocator(l),p),p.value=p.nodeValue=u,s.setAttributeNode(p)}},endElement:function(i,e,t){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(i,e){},endPrefixMapping:function(i){},processingInstruction:function(i,e){var t=this.doc.createProcessingInstruction(i,e);this.locator&&mr(this.locator,t),Rs(this,t)},ignorableWhitespace:function(i,e,t){},characters:function(i,e,t){if(i=Kc.apply(this,arguments),i){if(this.cdata)var r=this.doc.createCDATASection(i);else var r=this.doc.createTextNode(i);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(i)&&this.doc.appendChild(r),this.locator&&mr(this.locator,r)}},skippedEntity:function(i){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(i){(this.locator=i)&&(i.lineNumber=0)},comment:function(i,e,t){i=Kc.apply(this,arguments);var r=this.doc.createComment(i);this.locator&&mr(this.locator,r),Rs(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(i,e,t){var r=this.doc.implementation;if(r&&r.createDocumentType){var n=r.createDocumentType(i,e,t);this.locator&&mr(this.locator,n),Rs(this,n),this.doc.doctype=n}},warning:function(i){console.warn("[xmldom warning] "+i,Wo(this.locator))},error:function(i){console.error("[xmldom error] "+i,Wo(this.locator))},fatalError:function(i){throw new Pb(i,this.locator)}};function Wo(i){if(i)return`