@streamlayer/react 1.21.4 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/masters.d.ts +2 -5
- package/lib/app/pause-ad.d.ts +1 -10
- package/lib/app/useStreamLayerApp.d.ts +1 -23
- package/lib/cjs/Question.js +1 -0
- package/lib/cjs/advertisement.js +40 -40
- package/lib/cjs/analytics.js +1 -0
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/hooks-B0Qttldg.js +1 -0
- package/lib/cjs/index-DSi8Qgfs.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -0
- package/lib/cjs/index11.js +4 -0
- package/lib/cjs/index12.js +1 -0
- package/lib/cjs/index13.js +1 -0
- package/lib/cjs/index14.js +1 -0
- package/lib/cjs/index15.js +1 -0
- package/lib/cjs/index16.js +5 -0
- package/lib/cjs/index2.js +1 -5
- package/lib/cjs/index3.js +1 -0
- package/lib/cjs/index4.js +5 -0
- package/lib/cjs/index5.js +1 -0
- package/lib/cjs/index6.js +1 -0
- package/lib/cjs/index7.js +5 -0
- package/lib/cjs/index8.js +1 -0
- package/lib/cjs/index9.js +1 -0
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +6 -6
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/sl-types.js +15 -0
- package/lib/cjs/storage.js +1 -0
- package/lib/cjs/theme.js +17 -0
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +9 -9
- package/lib/cjs/utils.js +47 -0
- package/lib/cjs/vast-client.min.js +1 -0
- package/lib/classic/app/masters.d.ts +2 -5
- package/lib/classic/app/pause-ad.d.ts +1 -10
- package/lib/classic/app/useStreamLayerApp.d.ts +1 -23
- package/lib/classic/cjs/Question.js +1 -0
- package/lib/classic/cjs/advertisement.js +40 -40
- package/lib/classic/cjs/analytics.js +1 -0
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +4 -4
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/hooks-B0Qttldg.js +1 -0
- package/lib/classic/cjs/index-DSi8Qgfs.js +1 -0
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -0
- package/lib/classic/cjs/index11.js +1 -0
- package/lib/classic/cjs/index12.js +1 -0
- package/lib/classic/cjs/index13.js +4 -0
- package/lib/classic/cjs/index2.js +5 -0
- package/lib/classic/cjs/index3.js +1 -0
- package/lib/classic/cjs/index4.js +1 -0
- package/lib/classic/cjs/index5.js +1 -0
- package/lib/classic/cjs/index6.js +5 -0
- package/lib/classic/cjs/index7.js +1 -0
- package/lib/classic/cjs/index8.js +1 -0
- package/lib/classic/cjs/index9.js +1 -0
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -0
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/sl-types.js +15 -0
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
- package/lib/classic/cjs/utils.js +47 -0
- package/lib/classic/cjs/vast-client.min.js +1 -0
- package/lib/classic/es/Question.js +392 -0
- package/lib/classic/es/advertisement.js +10375 -10374
- package/lib/classic/es/analytics.js +28 -0
- package/lib/classic/es/auth.js +4 -4
- package/lib/classic/es/bet-pack.js +56 -51
- package/lib/classic/es/gamification-feature.js +1 -1
- package/lib/classic/es/hooks-B0Qttldg.js +98 -0
- package/lib/classic/es/index-DSi8Qgfs.js +65 -0
- package/lib/classic/es/index.js +14 -15
- package/lib/classic/es/index10.js +87 -0
- package/lib/classic/es/index11.js +2355 -0
- package/lib/classic/es/index12.js +183 -0
- package/lib/classic/es/index13.js +835 -0
- package/lib/classic/es/index2.js +2621 -0
- package/lib/classic/es/index3.js +64 -0
- package/lib/classic/es/index4.js +19 -0
- package/lib/classic/es/index5.js +285 -0
- package/lib/classic/es/{index-l-eyvmpL.js → index6.js} +937 -937
- package/lib/classic/es/index7.js +7 -0
- package/lib/classic/es/index8.js +11 -0
- package/lib/classic/es/index9.js +319 -0
- package/lib/classic/es/insight.js +31 -32
- package/lib/classic/es/notification.js +7 -1006
- package/lib/classic/es/notification2.js +1117 -0
- package/lib/classic/es/pause-ad.js +139 -138
- package/lib/classic/es/points.js +39 -38
- package/lib/classic/es/sl-types.js +258 -0
- package/lib/classic/es/useStreamLayerApp.js +1 -2
- package/lib/classic/es/useStreamLayerApp2.js +2400 -2283
- package/lib/classic/es/utils.js +76 -0
- package/lib/{es/vast-client.min-B0NUra1B.js → classic/es/vast-client.min.js} +338 -338
- package/lib/classic/index.d.ts +5 -13
- package/lib/classic/masters.d.ts +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +30 -30
- package/lib/dist/es/index.js +2 -2
- package/lib/dist/es/masters.js +5813 -6063
- package/lib/dist/index.d.ts +1332 -0
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +136 -0
- package/lib/es/advertisement.js +10375 -10374
- package/lib/es/analytics.js +28 -0
- package/lib/es/auth.js +4 -4
- package/lib/es/bet-pack.js +7 -6
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/hooks-B0Qttldg.js +98 -0
- package/lib/es/index-DSi8Qgfs.js +65 -0
- package/lib/es/index.js +13 -14
- package/lib/es/index10.js +267 -0
- package/lib/es/index11.js +835 -0
- package/lib/es/index12.js +183 -0
- package/lib/es/index13.js +319 -0
- package/lib/es/index14.js +87 -0
- package/lib/es/index15.js +2355 -0
- package/lib/es/index16.js +1254 -0
- package/lib/es/index2.js +1349 -3363
- package/lib/es/index3.js +64 -0
- package/lib/es/index4.js +3418 -0
- package/lib/es/index5.js +19 -0
- package/lib/es/index6.js +285 -0
- package/lib/es/{index-l-eyvmpL.js → index7.js} +937 -937
- package/lib/es/index8.js +7 -0
- package/lib/es/index9.js +11 -0
- package/lib/es/insight.js +31 -32
- package/lib/es/masters.js +6 -5
- package/lib/es/masters2.js +189 -176
- package/lib/es/notification.js +124 -119
- package/lib/es/pause-ad.js +140 -139
- package/lib/es/points.js +40 -38
- package/lib/es/sl-types.js +277 -0
- package/lib/es/storage.js +113 -0
- package/lib/es/theme.js +47 -0
- package/lib/es/useStreamLayerApp.js +1 -2
- package/lib/es/useStreamLayerApp2.js +2399 -2282
- package/lib/es/utils.js +76 -0
- package/lib/{classic/es/vast-client.min-B0NUra1B.js → es/vast-client.min.js} +338 -338
- package/lib/index.d.ts +5 -13
- package/lib/masters.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +13 -48
- package/lib/app/event.d.ts +0 -6
- package/lib/app/provider.d.ts +0 -49
- package/lib/cjs/index-l-eyvmpL.js +0 -5
- package/lib/cjs/provider.js +0 -84
- package/lib/cjs/vast-client.min-B0NUra1B.js +0 -1
- package/lib/classic/app/event.d.ts +0 -6
- package/lib/classic/app/provider.d.ts +0 -49
- package/lib/classic/cjs/index-l-eyvmpL.js +0 -5
- package/lib/classic/cjs/provider.js +0 -68
- package/lib/classic/cjs/vast-client.min-B0NUra1B.js +0 -1
- package/lib/classic/es/provider.js +0 -7617
- package/lib/dist/cjs/gamification-feature2.js +0 -1
- package/lib/dist/es/gamification-feature2.js +0 -285
- package/lib/es/provider.js +0 -7693
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";const d=require("react/jsx-runtime"),r=require("react"),s=`
|
|
2
|
+
.sl-hide-on-modal {
|
|
3
|
+
height: 0 !important;
|
|
4
|
+
opacity: 0 !important;
|
|
5
|
+
overflow: hidden !important;
|
|
6
|
+
transition: none;
|
|
7
|
+
}
|
|
8
|
+
`,l=({containerId:n="SlLayoutContainer",url:o})=>`
|
|
9
|
+
#${n||"SlLayoutContainer"},
|
|
10
|
+
#${n||"SlLayoutContainer"} .StreamLayerSDK>.StreamLayerSDKTheme > * {
|
|
11
|
+
--color-sdk-container-bg: transparent !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
#${n||"SlLayoutContainer"}::before {
|
|
15
|
+
content: '';
|
|
16
|
+
display: block;
|
|
17
|
+
position: absolute;
|
|
18
|
+
inset: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
background-color: #1a1a1a;
|
|
22
|
+
background-size: cover !important;
|
|
23
|
+
background-position: center !important;
|
|
24
|
+
background-repeat: no-repeat !important;
|
|
25
|
+
background-image: ${o} !important;
|
|
26
|
+
z-index: 0;
|
|
27
|
+
|
|
28
|
+
opacity: 0;
|
|
29
|
+
animation: fade-sl-bg-in 0.3s linear forwards;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#${n||"SlLayoutContainer"} > div {
|
|
33
|
+
position: relative;
|
|
34
|
+
z-index: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@keyframes fade-sl-bg-in {
|
|
38
|
+
from {
|
|
39
|
+
opacity: 0;
|
|
40
|
+
}
|
|
41
|
+
to {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
${s}
|
|
47
|
+
`,p=({containerId:n,landscapeUrl:o,portraitUrl:a})=>{const[i,c]=r.useState(!1),e=r.useMemo(()=>{const t=window.innerWidth,u=window.innerHeight;return c(!1),t>u?o:a},[o,a]);return r.useEffect(()=>{if(e){const t=new Image;t.src=e,t.onload=function(){c(!0)}}},[e]),r.useMemo(()=>{const t=e?`url("${e}")`:void 0;return t&&i?d.jsx("style",{children:l({containerId:n,url:t})}):null},[n,e,i])};exports.u=s;exports.y=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function N(){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 G=["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 w(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=[],a=M(i);!e.ERRORCODE||t.isCustomCode||/^[0-9]{3}$/.test(e.ERRORCODE)||(e.ERRORCODE=900),e.CACHEBUSTING=q(Math.round(1e8*Math.random())),e.TIMESTAMP=new Date().toISOString(),e.RANDOM=e.random=e.CACHEBUSTING;for(const s in e)e[s]=j(e[s]);for(const s in a){const o=a[s];typeof o=="string"&&r.push(B(o,e))}return r}function B(i,e){const t=(i=L(i,e)).match(/[^[\]]+(?=])/g);if(!t)return i;let r=t.filter(a=>G.indexOf(a)>-1);return r.length===0?i:(r=r.reduce((a,s)=>(a[s]=-1,a),{}),L(i,r))}function L(i,e){let t=i;for(const r in e){const a=e[r];t=t.replace(new RegExp("(?:\\[|%%)(".concat(r,")(?:\\]|%%)"),"g"),a)}return t}function M(i){return Array.isArray(i)?i.map(e=>e&&e.hasOwnProperty("url")?e.url:e):i}function C(i){return/^(https?:\/\/|\/\/)/.test(i)}function U(i,e){for(let t=0;t<e.length;t++)if(W(e[t],i))return!0;return!1}function W(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 j(i){return encodeURIComponent(i).replace(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16)))}function q(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8;return i.toString().padStart(e,"0")}const f={track:function(i,e,t){w(i,e,t).forEach(r=>{typeof window<"u"&&window!==null&&(new Image().src=r)})},resolveURLTemplates:w,extractURLsFromTemplates:M,filterUrlTemplates:function(i){return i.reduce((e,t)=>{const r=t.url||t;return C(r)?e.validUrls.push(r):e.invalidUrls.push(r),e},{validUrls:[],invalidUrls:[]})},containsTemplateObject:U,isTemplateObjectEqual:W,encodeURIComponentRFC3986:j,replaceUrlMacros:B,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((a,s)=>(U(s,a)||a.push(s),a),[])},isValidTimeValue:function(i){return Number.isFinite(i)&&i>=-2},addLeadingZeros:q,isValidUrl:C,isBrowserEnvironment:function(){return typeof window<"u"},formatMacrosValues:function(i){return typeof i!="object"?i:JSON.stringify(i)}};function I(i){return["true","TRUE","True","1"].includes(i)}function Y(i){if(i==null)return-1;if(f.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 a=parseInt(60*e[1]),s=parseInt(60*e[0]*60);return isNaN(s)||isNaN(a)||isNaN(r)||a>3600||r>60?-1:s+a+r}const l={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:I,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:Y,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:a}=t;if(r&&a&&e.hasOwnProperty(r)){let s=a;typeof e[r]=="boolean"&&(s=I(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(n=>n&&n.type==="companion"),a=r.reduce((n,c)=>((c.variations||[]).forEach(u=>{(u.companionClickTrackingURLTemplates||[]).forEach(d=>{f.containsTemplateObject(d,n)||n.push(d)})}),n),[]);i.creatives=r.concat(i.creatives);const s=e.videoClickTrackingURLTemplates&&e.videoClickTrackingURLTemplates.length,o=e.videoCustomClickURLTemplates&&e.videoCustomClickURLTemplates.length;if(i.creatives.forEach(n=>{if(e.trackingEvents&&e.trackingEvents[n.type])for(const c in e.trackingEvents[n.type]){const u=e.trackingEvents[n.type][c];Array.isArray(n.trackingEvents[c])||(n.trackingEvents[c]=[]),n.trackingEvents[c]=n.trackingEvents[c].concat(u)}n.type==="linear"&&(s&&(n.videoClickTrackingURLTemplates=n.videoClickTrackingURLTemplates.concat(e.videoClickTrackingURLTemplates)),o&&(n.videoCustomClickURLTemplates=n.videoCustomClickURLTemplates.concat(e.videoCustomClickURLTemplates)),!e.videoClickThroughURLTemplate||n.videoClickThroughURLTemplate!==null&&n.videoClickThroughURLTemplate!==void 0||(n.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate)),n.type==="companion"&&a.length&&(n.variations||[]).forEach(c=>{c.companionClickTrackingURLTemplates=f.joinArrayOfUniqueTemplateObjs(c.companionClickTrackingURLTemplates,a)})}),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 n=e.creatives.filter(c=>{var u;return((u=c.icons)===null||u===void 0?void 0:u.length)&&!c.mediaFiles.length});n.length&&(i.creatives=i.creatives.concat(n))}}};function Q(i,e){const t=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:a,adId:s,sequence:o,apiFramework:n}=N(r);return{id:a,adId:s,sequence:o,apiFramework:n,type:"companion",required:null,variations:[]}}(e);return t.required=i.getAttribute("required")||null,t.variations=l.childrenByName(i,"Companion").map(r=>{const a=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:n.id||null,adType:"companionAd",width:n.width||0,height:n.height||0,assetWidth:n.assetWidth||null,assetHeight:n.assetHeight||null,expandedWidth:n.expandedWidth||null,expandedHeight:n.expandedHeight||null,apiFramework:n.apiFramework||null,adSlotId:n.adSlotId||null,pxratio:n.pxratio||"1",renderingMode:n.renderingMode||"default",staticResources:[],htmlResources:[],iframeResources:[],adParameters:null,altText:null,companionClickThroughURLTemplate:null,companionClickTrackingURLTemplates:[],trackingEvents:{}}}(l.parseAttributes(r));a.htmlResources=l.childrenByName(r,"HTMLResource").reduce((n,c)=>{const u=l.parseNodeText(c);return u?n.concat(u):n},[]),a.iframeResources=l.childrenByName(r,"IFrameResource").reduce((n,c)=>{const u=l.parseNodeText(c);return u?n.concat(u):n},[]),a.staticResources=l.childrenByName(r,"StaticResource").reduce((n,c)=>{const u=l.parseNodeText(c);return u?n.concat({url:u,creativeType:c.getAttribute("creativeType")||null}):n},[]),a.altText=l.parseNodeText(l.childByName(r,"AltText"))||null;const s=l.childByName(r,"TrackingEvents");s&&l.childrenByName(s,"Tracking").forEach(n=>{const c=n.getAttribute("event"),u=l.parseNodeText(n);c&&u&&(Array.isArray(a.trackingEvents[c])||(a.trackingEvents[c]=[]),a.trackingEvents[c].push(u))}),a.companionClickTrackingURLTemplates=l.childrenByName(r,"CompanionClickTracking").map(n=>({id:n.getAttribute("id")||null,url:l.parseNodeText(n)})),a.companionClickThroughURLTemplate=l.parseNodeText(l.childByName(r,"CompanionClickThrough"))||null;const o=l.childByName(r,"AdParameters");return o&&(a.adParameters={value:l.parseNodeText(o),xmlEncoded:o.getAttribute("xmlEncoded")||null}),a}),t}function X(i,e){let t;const r=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:u,adId:d,sequence:g,apiFramework:m}=N(c);return{id:u,adId:d,sequence:g,apiFramework:m,type:"linear",duration:0,skipDelay:null,mediaFiles:[],mezzanine:null,interactiveCreativeFile:null,closedCaptionFiles:[],videoClickThroughURLTemplate:null,videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[],adParameters:null,icons:[],trackingEvents:{}}}(e);r.duration=l.parseDuration(l.parseNodeText(l.childByName(i,"Duration")));const a=i.getAttribute("skipoffset");if(a==null)r.skipDelay=null;else if(a.charAt(a.length-1)==="%"&&r.duration!==-1){const c=parseInt(a,10);r.skipDelay=r.duration*(c/100)}else r.skipDelay=l.parseDuration(a);const s=l.childByName(i,"VideoClicks");if(s){const c=l.childByName(s,"ClickThrough");r.videoClickThroughURLTemplate=c?{id:c.getAttribute("id")||null,url:l.parseNodeText(c)}:null,l.childrenByName(s,"ClickTracking").forEach(u=>{r.videoClickTrackingURLTemplates.push({id:u.getAttribute("id")||null,url:l.parseNodeText(u)})}),l.childrenByName(s,"CustomClick").forEach(u=>{r.videoCustomClickURLTemplates.push({id:u.getAttribute("id")||null,url:l.parseNodeText(u)})})}const o=l.childByName(i,"AdParameters");o&&(r.adParameters={value:l.parseNodeText(o),xmlEncoded:o.getAttribute("xmlEncoded")||null}),l.childrenByName(i,"TrackingEvents").forEach(c=>{l.childrenByName(c,"Tracking").forEach(u=>{let d=u.getAttribute("event");const g=l.parseNodeText(u);if(d&&g){if(d==="progress"){if(t=u.getAttribute("offset"),!t)return;d=t.charAt(t.length-1)==="%"?"progress-".concat(t):"progress-".concat(l.parseDuration(t))}Array.isArray(r.trackingEvents[d])||(r.trackingEvents[d]=[]),r.trackingEvents[d].push(g)}})}),l.childrenByName(i,"MediaFiles").forEach(c=>{l.childrenByName(c,"MediaFile").forEach(h=>{r.mediaFiles.push(function(p){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=p.getAttribute("id"),v.fileURL=l.parseNodeText(p),v.deliveryType=p.getAttribute("delivery"),v.codec=p.getAttribute("codec"),v.mimeType=p.getAttribute("type"),v.mediaType=p.getAttribute("mediaType")||"2D",v.apiFramework=p.getAttribute("apiFramework"),v.fileSize=parseInt(p.getAttribute("fileSize")||0),v.bitrate=parseInt(p.getAttribute("bitrate")||0),v.minBitrate=parseInt(p.getAttribute("minBitrate")||0),v.maxBitrate=parseInt(p.getAttribute("maxBitrate")||0),v.width=parseInt(p.getAttribute("width")||0),v.height=parseInt(p.getAttribute("height")||0);const R=p.getAttribute("scalable");R&&typeof R=="string"&&(v.scalable=l.parseBoolean(R));const A=p.getAttribute("maintainAspectRatio");return A&&typeof A=="string"&&(v.maintainAspectRatio=l.parseBoolean(A)),v}(h))});const u=l.childByName(c,"InteractiveCreativeFile");u&&(r.interactiveCreativeFile=function(h){const p=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:v.type||null,apiFramework:v.apiFramework||null,variableDuration:l.parseBoolean(v.variableDuration),fileURL:null}}(l.parseAttributes(h));return p.fileURL=l.parseNodeText(h),p}(u));const d=l.childByName(c,"ClosedCaptionFiles");d&&l.childrenByName(d,"ClosedCaptionFile").forEach(h=>{const p=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:v.type||null,language:v.language||null,fileURL:null}}(l.parseAttributes(h));p.fileURL=l.parseNodeText(h),r.closedCaptionFiles.push(p)});const g=l.childByName(c,"Mezzanine"),m=function(h,p){const v={};let R=!1;return p.forEach(A=>{h&&h.getAttribute(A)?v[A]=h.getAttribute(A):R=!0}),R?null:v}(g,["delivery","type","width","height"]);if(m){const h={id:null,fileURL:null,delivery:null,codec:null,type:null,width:0,height:0,fileSize:0,mediaType:"2D"};h.id=g.getAttribute("id"),h.fileURL=l.parseNodeText(g),h.delivery=m.delivery,h.codec=g.getAttribute("codec"),h.type=m.type,h.width=parseInt(m.width,10),h.height=parseInt(m.height,10),h.fileSize=parseInt(g.getAttribute("fileSize"),10),h.mediaType=g.getAttribute("mediaType")||"2D",r.mezzanine=h}});const n=l.childByName(i,"Icons");return n&&l.childrenByName(n,"Icon").forEach(c=>{r.icons.push(function(u){const d={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:[],altText:null,hoverText:null};d.program=u.getAttribute("program"),d.height=parseInt(u.getAttribute("height")||0),d.width=parseInt(u.getAttribute("width")||0),d.xPosition=function(m){return["left","right"].indexOf(m)!==-1?m:parseInt(m||0)}(u.getAttribute("xPosition")),d.yPosition=function(m){return["top","bottom"].indexOf(m)!==-1?m:parseInt(m||0)}(u.getAttribute("yPosition")),d.apiFramework=u.getAttribute("apiFramework"),d.pxratio=u.getAttribute("pxratio")||"1",d.offset=l.parseDuration(u.getAttribute("offset")),d.duration=l.parseDuration(u.getAttribute("duration")),d.altText=u.getAttribute("altText"),d.hoverText=u.getAttribute("hoverText"),l.childrenByName(u,"HTMLResource").forEach(m=>{d.type=m.getAttribute("creativeType")||"text/html",d.htmlResource=l.parseNodeText(m)}),l.childrenByName(u,"IFrameResource").forEach(m=>{d.type=m.getAttribute("creativeType")||0,d.iframeResource=l.parseNodeText(m)}),l.childrenByName(u,"StaticResource").forEach(m=>{d.type=m.getAttribute("creativeType")||0,d.staticResource=l.parseNodeText(m)});const g=l.childByName(u,"IconClicks");if(g){d.iconClickThroughURLTemplate=l.parseNodeText(l.childByName(g,"IconClickThrough")),l.childrenByName(g,"IconClickTracking").forEach(h=>{d.iconClickTrackingURLTemplates.push({id:h.getAttribute("id")||null,url:l.parseNodeText(h)})});const m=l.childByName(g,"IconClickFallbackImages");m&&l.childrenByName(m,"IconClickFallbackImage").forEach(h=>{d.iconClickFallbackImages.push({url:l.parseNodeText(h)||null,width:h.getAttribute("width")||null,height:h.getAttribute("height")||null})})}return d.iconViewTrackingURLTemplate=l.parseNodeText(l.childByName(u,"IconViewTracking")),d}(c))}),r}function Z(i,e){const t=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:a,adId:s,sequence:o,apiFramework:n}=N(r);return{id:a,adId:s,sequence:o,apiFramework:n,type:"nonlinear",variations:[],trackingEvents:{}}}(e);return l.childrenByName(i,"TrackingEvents").forEach(r=>{let a,s;l.childrenByName(r,"Tracking").forEach(o=>{a=o.getAttribute("event"),s=l.parseNodeText(o),a&&s&&(Array.isArray(t.trackingEvents[a])||(t.trackingEvents[a]=[]),t.trackingEvents[a].push(s))})}),l.childrenByName(i,"NonLinear").forEach(r=>{const a={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};a.id=r.getAttribute("id")||null,a.width=r.getAttribute("width"),a.height=r.getAttribute("height"),a.expandedWidth=r.getAttribute("expandedWidth"),a.expandedHeight=r.getAttribute("expandedHeight"),a.scalable=l.parseBoolean(r.getAttribute("scalable")),a.maintainAspectRatio=l.parseBoolean(r.getAttribute("maintainAspectRatio")),a.minSuggestedDuration=l.parseDuration(r.getAttribute("minSuggestedDuration")),a.apiFramework=r.getAttribute("apiFramework"),l.childrenByName(r,"HTMLResource").forEach(o=>{a.type=o.getAttribute("creativeType")||"text/html",a.htmlResource=l.parseNodeText(o)}),l.childrenByName(r,"IFrameResource").forEach(o=>{a.type=o.getAttribute("creativeType")||0,a.iframeResource=l.parseNodeText(o)}),l.childrenByName(r,"StaticResource").forEach(o=>{a.type=o.getAttribute("creativeType")||0,a.staticResource=l.parseNodeText(o)});const s=l.childByName(r,"AdParameters");s&&(a.adParameters={value:l.parseNodeText(s),xmlEncoded:s.getAttribute("xmlEncoded")||null}),a.nonlinearClickThroughURLTemplate=l.parseNodeText(l.childByName(r,"NonLinearClickThrough")),l.childrenByName(r,"NonLinearClickTracking").forEach(o=>{a.nonlinearClickTrackingURLTemplates.push({id:o.getAttribute("id")||null,url:l.parseNodeText(o)})}),t.variations.push(a)}),t}function x(i){const e=[];return i.forEach(t=>{const r=K(t);r&&e.push(r)}),e}function K(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 o=t[s];o.nodeName&&o.nodeValue&&(e.attributes[o.nodeName]=o.nodeValue)}}for(const s in r)if(r.hasOwnProperty(s)){const o=K(r[s]);o&&e.children.push(o)}if(e.children.length===0||e.children.length===1&&["#cdata-section","#text"].indexOf(e.children[0].name)>=0){const s=l.parseNodeText(i);s!==""&&(e.value=s),e.children=[]}return(a=e).value===null&&Object.keys(a.attributes).length===0&&a.children.length===0?null:e;var a}function J(i){return i.getAttribute("AdID")||i.getAttribute("adID")||i.getAttribute("adId")||null}const y={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 S(i,e){if(!y[i.nodeName]||!y[i.nodeName].attributes)return;const t=y[i.nodeName].attributes.filter(r=>!i.getAttribute(r));t.length>0&&k({name:i.nodeName,parentName:i.parentNode.nodeName,attributes:t},e)}function V(i,e,t){const r=y[i.nodeName],a=!t&&i.nodeName!=="Wrapper";if(!(!r||a)){if(r.subElements){const s=r.subElements.filter(o=>!l.childByName(i,o));s.length>0&&k({name:i.nodeName,parentName:i.parentNode.nodeName,subElements:s},e)}!t||!r.oneOfinLineResources||r.oneOfinLineResources.some(s=>l.childByName(i,s))||k({name:i.nodeName,parentName:i.parentNode.nodeName,oneOfResources:r.oneOfinLineResources},e)}}function D(i){return i.children&&i.children.length!==0}function k(i,e){let{name:t,parentName:r,attributes:a,subElements:s,oneOfResources:o}=i,n="Element '".concat(t,"'");n+=a?" missing required attribute(s) '".concat(a.join(", "),"' "):s?" missing required sub element(s) '".concat(s.join(", "),"' "):o?" must provide one of the following '".concat(o.join(", "),"' "):" is empty",e("VAST-warning",{message:n,parentElement:r,specVersion:4.1})}const $={verifyRequiredValues:function i(e,t,r){if(e&&e.nodeName)if(e.nodeName==="InLine"&&(r=!0),S(e,t),D(e)){V(e,t,r);for(let a=0;a<e.children.length;a++)i(e.children[a],t,r)}else l.parseNodeText(e).length===0&&k({name:e.nodeName,parentName:e.parentNode.nodeName},t)},hasSubElements:D,emitMissingValueWarning:k,verifyRequiredAttributes:S,verifyRequiredSubElements:V};function ee(i,e){let{allowMultipleAds:t,followAdditionalWrappers:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=Array.from(i.childNodes).filter(s=>{const o=s.nodeName.toLowerCase();return o==="inline"||r!==!1&&o==="wrapper"});for(const s of a){if(l.copyNodeAttribute("id",i,s),l.copyNodeAttribute("sequence",i,s),l.copyNodeAttribute("adType",i,s),s.nodeName==="Wrapper")return{ad:re(s,e),type:"WRAPPER"};if(s.nodeName==="InLine")return{ad:te(s,e,{allowMultipleAds:t}),type:"INLINE"};const o=s.nodeName.toLowerCase();e("VAST-warning",{message:"<".concat(s.nodeName,o==="inline"?"> must be written <InLine>":"> must be written <Wrapper>"),wrongNode:s})}}function te(i,e){let{allowMultipleAds:t}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t===!1&&i.getAttribute("sequence")?null:H(i,e)}function H(i,e){let t=[];e&&$.verifyRequiredValues(i,e);const r=Array.from(i.childNodes),a=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}}(l.parseAttributes(i));return r.forEach(s=>{switch(s.nodeName){case"Error":a.errorURLTemplates.push(l.parseNodeText(s));break;case"Impression":a.impressionURLTemplates.push({id:s.getAttribute("id")||null,url:l.parseNodeText(s)});break;case"Creatives":a.creatives=function(o){const n=[];return o.forEach(c=>{const u={id:c.getAttribute("id")||null,adId:J(c),sequence:c.getAttribute("sequence")||null,apiFramework:c.getAttribute("apiFramework")||null},d=[];let g;l.childrenByName(c,"UniversalAdId").forEach(h=>{const p={idRegistry:h.getAttribute("idRegistry")||"unknown",value:l.parseNodeText(h)};d.push(p)});const m=l.childByName(c,"CreativeExtensions");m&&(g=x(l.childrenByName(m,"CreativeExtension")));for(const h in c.childNodes){const p=c.childNodes[h];let v;switch(p.nodeName){case"Linear":v=X(p,u);break;case"NonLinearAds":v=Z(p,u);break;case"CompanionAds":v=Q(p,u)}v&&(d&&(v.universalAdIds=d),g&&(v.creativeExtensions=g),n.push(v))}}),n}(l.childrenByName(s,"Creative"));break;case"Extensions":{const o=l.childrenByName(s,"Extension");a.extensions=x(o),a.adVerifications.length||(t=function(n){let c=null,u=[];return n.some(d=>c=l.childByName(d,"AdVerifications")),c&&(u=O(l.childrenByName(c,"Verification"))),u}(o));break}case"AdVerifications":a.adVerifications=O(l.childrenByName(s,"Verification"));break;case"AdSystem":a.system={value:l.parseNodeText(s),version:s.getAttribute("version")||null};break;case"AdTitle":a.title=l.parseNodeText(s);break;case"AdServingId":a.adServingId=l.parseNodeText(s);break;case"Category":a.categories.push({authority:s.getAttribute("authority")||null,value:l.parseNodeText(s)});break;case"Expires":a.expires=parseInt(l.parseNodeText(s),10);break;case"ViewableImpression":a.viewableImpression.push(function(o){const n=(c,u)=>{const d=l.parseNodeText(u);return d&&c.push(d),c};return{id:o.getAttribute("id")||null,viewable:l.childrenByName(o,"Viewable").reduce(n,[]),notViewable:l.childrenByName(o,"NotViewable").reduce(n,[]),viewUndetermined:l.childrenByName(o,"ViewUndetermined").reduce(n,[])}}(s));break;case"Description":a.description=l.parseNodeText(s);break;case"Advertiser":a.advertiser={id:s.getAttribute("id")||null,value:l.parseNodeText(s)};break;case"Pricing":a.pricing={value:l.parseNodeText(s),model:s.getAttribute("model")||null,currency:s.getAttribute("currency")||null};break;case"Survey":a.survey={value:l.parseNodeText(s),type:s.getAttribute("type")||null};break;case"BlockedAdCategories":a.blockedAdCategories.push({authority:s.getAttribute("authority")||null,value:l.parseNodeText(s)})}}),t.length&&(a.adVerifications=a.adVerifications.concat(t)),a}function re(i,e){const t=H(i,e),r=i.getAttribute("followAdditionalWrappers"),a=i.getAttribute("allowMultipleAds"),s=i.getAttribute("fallbackOnNoAd");t.followAdditionalWrappers=!r||l.parseBoolean(r),t.allowMultipleAds=!!a&&l.parseBoolean(a),t.fallbackOnNoAd=s?l.parseBoolean(s):null;let o=l.childByName(i,"VASTAdTagURI");if(o?t.nextWrapperURL=l.parseNodeText(o):(o=l.childByName(i,"VASTAdTagURL"),o&&(t.nextWrapperURL=l.parseNodeText(l.childByName(o,"URL")))),t.creatives.forEach(n=>{if(["linear","nonlinear"].includes(n.type)){if(n.trackingEvents){t.trackingEvents||(t.trackingEvents={}),t.trackingEvents[n.type]||(t.trackingEvents[n.type]={});for(const c in n.trackingEvents){const u=n.trackingEvents[c];Array.isArray(t.trackingEvents[n.type][c])||(t.trackingEvents[n.type][c]=[]),u.forEach(d=>{t.trackingEvents[n.type][c].push(d)})}}n.videoClickTrackingURLTemplates&&(Array.isArray(t.videoClickTrackingURLTemplates)||(t.videoClickTrackingURLTemplates=[]),n.videoClickTrackingURLTemplates.forEach(c=>{t.videoClickTrackingURLTemplates.push(c)})),n.videoClickThroughURLTemplate&&(t.videoClickThroughURLTemplate=n.videoClickThroughURLTemplate),n.videoCustomClickURLTemplates&&(Array.isArray(t.videoCustomClickURLTemplates)||(t.videoCustomClickURLTemplates=[]),n.videoCustomClickURLTemplates.forEach(c=>{t.videoCustomClickURLTemplates.push(c)}))}}),t.nextWrapperURL)return t}function O(i){const e=[];return i.forEach(t=>{const r={resource:null,vendor:null,browserOptional:!1,apiFramework:null,type:null,parameters:null,trackingEvents:{}},a=Array.from(t.childNodes);l.assignAttributes(t.attributes,r),a.forEach(o=>{let{nodeName:n,textContent:c,attributes:u}=o;switch(n){case"JavaScriptResource":case"ExecutableResource":r.resource=c.trim(),l.assignAttributes(u,r);break;case"VerificationParameters":r.parameters=c.trim()}});const s=l.childByName(t,"TrackingEvents");s&&l.childrenByName(s,"Tracking").forEach(o=>{const n=o.getAttribute("event"),c=l.parseNodeText(o);n&&c&&(Array.isArray(r.trackingEvents[n])||(r.trackingEvents[n]=[]),r.trackingEvents[n].push(c))}),e.push(r)}),e}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,a,s){const o={fired:!1,wrapFn:void 0};function n(){o.fired||(r.off(a,o.wrapFn),o.fired=!0,s.bind(r)(...arguments))}return o.wrapFn=n,n}(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),a=1;a<t;a++)r[a-1]=arguments[a];let s=!1;return this._handlers.forEach(o=>{o.event==="*"&&(s=!0,o.handler(e,...r)),o.event===e&&(s=!0,o.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)}}let F=0,E=0;const z=(i,e)=>{!i||!e||i<=0||e<=0||(E=(E*F+8*i/e)/++F)},ie={ERRORCODE:900,extensions:[]},P="VAST response version not supported";class ae extends _{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,this.keepFailedAdPod=!1}trackVastError(e,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),s=2;s<r;s++)a[s-2]=arguments[s];this.emit("VAST-error",Object.assign({},ie,t,...a)),f.track(e,t)}getErrorURLTemplates(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)}getEstimatedBitrate(){return E}initParsingStatus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.maxWrapperDepth=e.wrapperLimit||10,this.parsingOptions={allowMultipleAds:e.allowMultipleAds},this.keepFailedAdPod=e.keepFailedAdPod||!1,this.rootURL="",this.resetParsingStatus(),z(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:a,errorURLTemplates:s,version:o}=r;return{ads:a||[],errorURLTemplates:s||[],version:o||null}}({ads:e,errorURLTemplates:this.getErrorURLTemplates(),version:this.vastVersion});return this.completeWrapperResolving(t),t}parseVastXml(e,t){let{isRootVAST:r=!1,url:a=null,wrapperDepth:s=0,allowMultipleAds:o,followAdditionalWrappers:n}=t;if(!e||!e.documentElement||e.documentElement.nodeName!=="VAST"){var c;this.emit("VAST-ad-parsed",{type:"ERROR",url:a,wrapperDepth:s});const m=(e==null||(c=e.documentElement)===null||c===void 0?void 0:c.nodeName)==="VideoAdServingTemplate";throw new Error(m?P:"Invalid VAST XMLDocument")}const u=[],d=e.documentElement.childNodes,g=e.documentElement.getAttribute("version");r&&g&&(this.vastVersion=g);for(const m in d){const h=d[m];if(h.nodeName==="Error"){const p=l.parseNodeText(h);r?this.rootErrorURLTemplates.push(p):this.errorURLTemplates.push(p)}else if(h.nodeName==="Ad"){if(this.vastVersion&&parseFloat(this.vastVersion)<3)o=!0;else if(o===!1&&u.length>1)break;const p=ee(h,this.emit.bind(this),{allowMultipleAds:o,followAdditionalWrappers:n});p.ad?(u.push(p.ad),this.emit("VAST-ad-parsed",{type:p.type,url:a,wrapperDepth:s,adIndex:u.length-1,vastVersion:g})):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return u}parse(e){let{url:t=null,resolveAll:r=!0,wrapperSequence:a=null,previousUrl:s=null,wrapperDepth:o=0,isRootVAST:n=!1,followAdditionalWrappers:c,allowMultipleAds:u}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=[];this.vastVersion&&parseFloat(this.vastVersion)<3&&n&&(u=!0);try{d=this.parseVastXml(e,{isRootVAST:n,url:t,wrapperDepth:o,allowMultipleAds:u,followAdditionalWrappers:c})}catch(g){return Promise.reject(g)}if(d.length===1&&a!=null&&(d[0].sequence=a),r===!1){const g=l.getSortedAdPods(d),m=l.getStandAloneAds(d);g.length?d=g:m.length&&(d=[m.shift()]),this.remainingAds=m}return this.resolveAds(d,{wrapperDepth:o,previousUrl:s,url:t})}resolveAds(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{wrapperDepth:t,previousUrl:r,url:a}=arguments.length>1?arguments[1]:void 0;const s=[];return r=a,e.forEach(o=>{const n=this.resolveWrappers(o,t,r);s.push(n)}),Promise.all(s).then(o=>f.flatten(o))}resolveWrappers(e,t,r){const a={...e};return new Promise(s=>{var o;if(t++,!a.nextWrapperURL)return delete a.nextWrapperURL,s(a);if(!this.fetcher)return a.VASTAdTagURI=a.nextWrapperURL,delete a.nextWrapperURL,s(a);if(t>=this.maxWrapperDepth)return a.errorCode=302,delete a.nextWrapperURL,s(a);a.nextWrapperURL=l.resolveVastAdTagURI(a.nextWrapperURL,r);const n=(o=this.parsingOptions.allowMultipleAds)!==null&&o!==void 0?o:a.allowMultipleAds,c=a.sequence;this.fetcher.fetchVAST({url:a.nextWrapperURL,emitter:this.emit.bind(this),maxWrapperDepth:this.maxWrapperDepth}).then(u=>this.parse(u,{url:a.nextWrapperURL,previousUrl:r,wrapperSequence:c,wrapperDepth:t,followAdditionalWrappers:a.followAdditionalWrappers,allowMultipleAds:n}).then(d=>{if(delete a.nextWrapperURL,d.length===0)return a.creatives=[],s(a);d.forEach(g=>{g&&l.mergeWrapperAdData(g,a)}),s(d)})).catch(u=>{a.errorCode=u.message===P?102:301,a.errorMessage=u.message,s(a)})})}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],a=!r.creatives.some(s=>{var o,n;return((o=s.mediaFiles)===null||o===void 0?void 0:o.length)>0||((n=s.variations)===null||n===void 0?void 0:n.length)>0});!r.errorCode&&!a||r.VASTAdTagURI||(this.trackVastError(r.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:r.errorCode||303},{ERRORMESSAGE:r.errorMessage||""},{extensions:r.extensions},{system:r.system}),this.keepFailedAdPod&&r.sequence?r.hasFailed=!0:e.ads.splice(t,1))}}}let T=null;const se={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 ne{constructor(){this.storage=this.initStorage()}initStorage(){if(T)return T;try{T=typeof window<"u"&&window!==null?window.localStorage||window.sessionStorage:null}catch{T=null}return T&&!this.isStorageDisabled(T)||(T=se,T.clear()),T}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 b=12e4,oe={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||b," ms (408)"))},e.timeout||b),a=await fetch(i,{...e,signal:t.signal,credentials:e.withCredentials?"include":"omit"}).finally(()=>{clearTimeout(r)}),s=function(o){return f.isBrowserEnvironment()&&window.location.protocol==="https:"&&o.url.includes("http://")?"URLHandler: Cannot go from HTTPS to HTTP.":o.status===200&&o.ok?null:"URLHandler: ".concat(o.statusText," (").concat(o.status,")")}(a);return s?{error:new Error(s),statusCode:a.status}:async function(o){const n=await o.text();let c;return c=f.isBrowserEnvironment()?new DOMParser:new(await Promise.resolve().then(()=>require("./index6.js")).then(u=>u.index)).DOMParser,{xml:c.parseFromString(n,"text/xml"),details:{byteLength:n.length,statusCode:o.status,rawXml:n}}}(a)}catch(t){return{error:t,statusCode:t.name==="AbortError"?408:null}}}};class le{constructor(){this.URLTemplateFilters=[]}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.urlHandler=e.urlHandler||e.urlhandler||oe,this.fetchingOptions={...e.fetchOptions,timeout:e.timeout||b,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:a,emitter:s,wrapperDepth:o=0,previousUrl:n=null,wrapperAd:c=null}=e;const u=Date.now();this.URLTemplateFilters.forEach(m=>{r=m(r)}),s("VAST-resolving",{url:r,previousUrl:n,wrapperDepth:o,maxWrapperDepth:a,timeout:this.fetchingOptions.timeout,wrapperAd:c});const d=await this.urlHandler.get(r,this.fetchingOptions),g=Math.round(Date.now()-u);if(s("VAST-resolved",{url:r,previousUrl:n,wrapperDepth:o,error:(d==null?void 0:d.error)||null,duration:g,statusCode:(d==null?void 0:d.statusCode)||null,...d==null?void 0:d.details}),z(d==null||(t=d.details)===null||t===void 0?void 0:t.byteLength,g),d.error)throw new Error(d.error);return d.xml}}class ce{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 ne;this.cappingFreeLunch=e,this.cappingMinimumTimeInterval=t,this.fetcher=new le,this.vastParser=new ae({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((a,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 o=r-this.lastSuccessfulAd;if(o<0)this.lastSuccessfulAd=0;else if(o<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(n=>(t.previousUrl=e,t.isRootVAST=!0,t.url=e,this.vastParser.parse(n,t).then(c=>{const u=this.vastParser.buildVASTResponse(c);a(u)}))).catch(n=>s(n))})}}class ue extends _{constructor(e,t,r){var a;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=arguments.length>4&&arguments[4]!==void 0&&arguments[4];super(),this.ad=t,this.creative=r,this.variation=s,this.muted=o,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 n in this.creative.trackingEvents){const c=this.creative.trackingEvents[n];this.trackingEvents[n]=c.slice(0)}this.viewableImpressionTrackers=((a=this.ad.viewableImpression)===null||a===void 0?void 0:a.reduce((n,c)=>(n.notViewable.push(...c.notViewable),n.viewUndetermined.push(...c.viewUndetermined),n.viewable.push(...c.viewable),n),{notViewable:[],viewUndetermined:[],viewable:[]}))||{},Object.entries(this.viewableImpressionTrackers).forEach(n=>{let[c,u]=n;u.length&&(this.trackingEvents[c]=u)}),function(n){return n.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){f.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(!f.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(f.formatMacrosValues(t))});const a=this.skipDelay||-1;if(a===-1||this.skippable||(a>e?this.emit("skip-countdown",a-e):(this.skippable=!0,this.emit("skip-countdown",0))),this.assetDuration>0){const s=Math.round(e/this.assetDuration*100),o=[];if(e>0){o.push("start");for(let n=this.lastPercentage;n<s;n++)o.push("progress-".concat(n+1,"%"));o.push("progress-".concat(e));for(const n in this.quartiles)this.isQuartileReached(n,this.quartiles[n],e)&&(o.push(n),this._alreadyTriggeredQuartiles[n]=!0);this.lastPercentage=s}o.forEach(n=>{this.track(n,{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 a=!1;return t<=r&&!this._alreadyTriggeredQuartiles[e]&&(a=!0),a}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(f.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(f.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(f.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(f.formatMacrosValues(t))})}setSkipDelay(e){f.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]:{},t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];typeof e=="object"?this.track("viewable",{macros:e,once:t}):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]:{},t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];typeof e=="object"?this.track("notViewable",{macros:e,once:t}):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]:{},t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];typeof e=="object"?this.track("viewUndetermined",{macros:e,once:t}):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(f.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(f.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 a=r.trackingEvents;if(a&&a.verificationNotExecuted){const s=a.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(f.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(f.formatMacrosValues(t))});this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates,t);const r=this.clickThroughURLTemplate||e,a={...t};if(r){this.progress&&(a.ADPLAYHEAD=this.progressFormatted());const s=f.resolveURLTemplates([r],a)[0];this.emit("clickthrough",s)}}trackProgressEvents(e,t,r){const a=parseFloat(e.split("-")[1]);Object.entries(this.trackingEvents).filter(s=>{let[o]=s;return o.startsWith("progress-")}).map(s=>{let[o,n]=s;return{name:o,time:parseFloat(o.split("-")[1]),urls:n}}).filter(s=>{let{time:o}=s;return o<=a&&o>this.progress}).forEach(s=>{let{name:o,urls:n}=s;!r&&this.trackedProgressEvents.includes(o)||(this.emit(o,{trackingURLTemplates:n}),this.trackURLs(n,t),r?delete this.trackingEvents[o]:this.trackedProgressEvents.push(o))})}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 a=this.trackingEvents[e],s=this.emitAlwaysEvents.indexOf(e)>-1;a?(this.emit(e,{trackingURLTemplates:a}),this.trackURLs(a,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]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{validUrls:s,invalidUrls:o}=f.filterUrlTemplates(e);o.length&&this.emit("TRACKER-error",{message:"Provided urls are malformed. url: ".concat(o)});const n={...r};this.linear&&(this.creative&&this.creative.mediaFiles&&this.creative.mediaFiles[0]&&this.creative.mediaFiles[0].fileURL&&(n.ASSETURI=this.creative.mediaFiles[0].fileURL),this.progress&&(n.ADPLAYHEAD=this.progressFormatted())),(t=this.creative)!==null&&t!==void 0&&(t=t.universalAdIds)!==null&&t!==void 0&&t.length&&(n.UNIVERSALADID=this.creative.universalAdIds.map(c=>c.idRegistry.concat(" ",c.value)).join(",")),this.ad&&(this.ad.sequence&&(n.PODSEQUENCE=this.ad.sequence),this.ad.adType&&(n.ADTYPE=this.ad.adType),this.ad.adServingId&&(n.ADSERVINGID=this.ad.adServingId),this.ad.categories&&this.ad.categories.length&&(n.ADCATEGORIES=this.ad.categories.map(c=>c.value).join(",")),this.ad.blockedAdCategories&&this.ad.blockedAdCategories.length&&(n.BLOCKEDADCATEGORIES=this.ad.blockedAdCategories.map(c=>c.value).join(","))),f.track(s,n,a)}convertToTimecode(e){if(!f.isValidTimeValue(e))return"";const t=1e3*e,r=Math.floor(t/36e5),a=Math.floor(t/6e4%60),s=Math.floor(t/1e3%60),o=Math.floor(t%1e3);return"".concat(f.addLeadingZeros(r,2),":").concat(f.addLeadingZeros(a,2),":").concat(f.addLeadingZeros(s,2),".").concat(f.addLeadingZeros(o,3))}progressFormatted(){return this.convertToTimecode(this.progress)}}exports._=ce;exports.z=ue;
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { jsxs as C, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { s as o, u as T } from "./sl-types.js";
|
|
3
|
+
import { createContext as X, useContext as l0, useRef as O, useState as x, useEffect as e0 } from "react";
|
|
4
|
+
import { O as o0 } from "./index10.js";
|
|
5
|
+
import { y as s0, E as R } from "./index9.js";
|
|
6
|
+
import { e as i0, b as t0 } from "./index12.js";
|
|
7
|
+
import { B as f } from "./index5.js";
|
|
8
|
+
import { Q as b, P as a0, A as Z, a as F, b as n0 } from "./useStreamLayerApp2.js";
|
|
9
|
+
import { e as C0, t as d0 } from "./index13.js";
|
|
10
|
+
import { y as c0 } from "./utils.js";
|
|
11
|
+
const r0 = X({
|
|
12
|
+
sdk: null,
|
|
13
|
+
topNavigation: !1
|
|
14
|
+
}), p0 = () => l0(r0), u0 = /* @__PURE__ */ o("div")({
|
|
15
|
+
name: "Container",
|
|
16
|
+
class: "c1vwopgc",
|
|
17
|
+
propsAsIs: !1
|
|
18
|
+
}), m0 = /* @__PURE__ */ o("div")({
|
|
19
|
+
name: "QuestionTypeWrap",
|
|
20
|
+
class: "qyktpt0",
|
|
21
|
+
propsAsIs: !1
|
|
22
|
+
}), v0 = () => f, y0 = /* @__PURE__ */ o(v0())({
|
|
23
|
+
name: "QuestionTypeIcon",
|
|
24
|
+
class: "q951jdx",
|
|
25
|
+
propsAsIs: !0
|
|
26
|
+
}), f0 = /* @__PURE__ */ o("span")({
|
|
27
|
+
name: "QuestionTypeTitle",
|
|
28
|
+
class: "qss5f0e",
|
|
29
|
+
propsAsIs: !1
|
|
30
|
+
}), h0 = /* @__PURE__ */ o("button")({
|
|
31
|
+
name: "CloseIconWrap",
|
|
32
|
+
class: "c1ao1jtv",
|
|
33
|
+
propsAsIs: !1
|
|
34
|
+
}), g0 = () => f, L0 = /* @__PURE__ */ o(g0())({
|
|
35
|
+
name: "CloseIcon",
|
|
36
|
+
class: "cvsl7l3",
|
|
37
|
+
propsAsIs: !0
|
|
38
|
+
}), A0 = o0(h0, {}), V0 = ({ webos: l, type: s, closeTimer: i, close: a, label: n, mastersApp: t }) => {
|
|
39
|
+
const d = s ? i0[s] : { label: n, iconName: void 0 };
|
|
40
|
+
return /* @__PURE__ */ C(u0, { children: [
|
|
41
|
+
/* @__PURE__ */ C(m0, { children: [
|
|
42
|
+
(d == null ? void 0 : d.iconName) && /* @__PURE__ */ e(
|
|
43
|
+
y0,
|
|
44
|
+
{
|
|
45
|
+
"data-type-trivia": s === b.TRIVIA,
|
|
46
|
+
"data-type-poll": s === b.POLL,
|
|
47
|
+
"data-type-prediction": s === b.PREDICTION,
|
|
48
|
+
"data-masters-app": !!t,
|
|
49
|
+
name: d.iconName
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
(d == null ? void 0 : d.label) && /* @__PURE__ */ e(f0, { children: d.label })
|
|
53
|
+
] }),
|
|
54
|
+
i != null && i.seconds ? /* @__PURE__ */ e(s0, { close: a, autoClose: i.auto, duration: i.seconds }) : /* @__PURE__ */ e(A0, { webos: l, "data-a": "intr", onClick: a, type: "button", "data-close-btn": "true", children: /* @__PURE__ */ e(L0, { "data-a": "intr", name: "icon-cross" }) })
|
|
55
|
+
] });
|
|
56
|
+
}, b0 = "data:image/svg+xml,%3csvg%20width='103'%20height='18'%20viewBox='0%200%20103%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6919_104497)'%3e%3cpath%20d='M9.89618%203.45801C9.91951%203.45801%209.94451%203.46134%209.96784%203.46134C9.97618%203.46134%209.98284%203.46134%209.99118%203.46467H9.99784C10.0095%203.46467%2010.0212%203.46801%2010.0312%203.46801C10.0412%203.46801%2010.0462%203.46801%2010.0545%203.47134C10.0762%203.47467%2010.0962%203.47467%2010.1178%203.47634C10.1412%203.47967%2010.1662%203.48134%2010.1895%203.48467H10.2012C10.2462%203.48967%2010.2945%203.49634%2010.3395%203.50467C10.4512%203.52467%2010.5595%203.54801%2010.6662%203.57801C10.6928%203.58301%2010.7178%203.59301%2010.7445%203.60134H10.7478C10.7745%203.60967%2010.7995%203.61801%2010.8262%203.62467C10.8528%203.63301%2010.8778%203.64134%2010.9045%203.65134C10.9312%203.65967%2010.9562%203.66801%2010.9795%203.67967C11.0012%203.68801%2011.0212%203.69634%2011.0428%203.70634C11.0495%203.70967%2011.0578%203.71134%2011.0645%203.71467C11.0828%203.72301%2011.1012%203.72967%2011.1195%203.73801C11.1262%203.74134%2011.1312%203.74301%2011.1378%203.74634C11.1562%203.75467%2011.1712%203.76134%2011.1895%203.76967C11.1962%203.77301%2011.2045%203.77467%2011.2128%203.78134C11.2345%203.78967%2011.2528%203.79801%2011.2728%203.80967C11.2762%203.80967%2011.2795%203.81301%2011.2812%203.81301C11.3045%203.82467%2011.3295%203.83634%2011.3512%203.84801C11.3695%203.85634%2011.3878%203.86801%2011.4062%203.87634C11.4212%203.88134%2011.4328%203.89134%2011.4462%203.89967C11.4645%203.91134%2011.4828%203.91967%2011.5012%203.93134C11.5045%203.93467%2011.5078%203.93467%2011.5095%203.93634L11.5728%203.97467H11.5762L15.2178%206.18801L15.4412%206.32467C16.3228%206.90801%2016.9028%207.88467%2016.9028%208.99301C16.9028%2010.1013%2016.3262%2011.0763%2015.4445%2011.6613L15.2095%2011.803L11.5745%2014.0113H11.5712L11.5078%2014.0497C11.5078%2014.0497%2011.5012%2014.053%2011.4995%2014.0547C11.4812%2014.0663%2011.4628%2014.0747%2011.4445%2014.0863C11.4595%2014.078%2011.4745%2014.0697%2011.4895%2014.0597L5.94951%2017.433C5.94951%2017.433%205.94618%2017.433%205.94618%2017.4363L5.74451%2017.558H5.74118C5.19784%2017.863%204.55784%2018.0247%203.87784%2017.993C2.73618%2017.938%201.75784%2017.3463%201.19284%2016.4847C0.837844%2015.9413%200.64451%2015.2913%200.681177%2014.6013C0.71451%2013.983%200.922844%2013.4147%201.26118%2012.9397L1.26951%2012.9247L4.04451%208.99634L6.77784%205.12634C6.81118%205.07967%206.84784%205.03301%206.87784%204.98467C6.87451%204.98967%206.86951%204.99967%206.86284%205.00467C6.87118%204.98967%206.88118%204.97634%206.88951%204.96134C6.88951%204.95801%206.89284%204.95801%206.89284%204.95634C6.89618%204.95301%206.89951%204.94801%206.90118%204.94467C6.90118%204.94467%206.90118%204.94134%206.90451%204.94134C6.91951%204.92134%206.93451%204.90134%206.94618%204.87801C6.96118%204.85801%206.97618%204.83801%206.99118%204.81634C7.00618%204.79634%207.02118%204.77634%207.03618%204.75467C7.03951%204.75134%207.03951%204.74967%207.04284%204.74634C7.04618%204.74301%207.04618%204.74134%207.04951%204.74134C7.06451%204.72134%207.07951%204.70134%207.09784%204.67967C7.10951%204.66467%207.12118%204.65134%207.13451%204.63634C7.16784%204.59801%207.20118%204.56134%207.23784%204.52301C7.25284%204.50801%207.26451%204.49467%207.27951%204.47967C7.30118%204.45634%207.32118%204.43634%207.34618%204.41634C7.36451%204.39967%207.38284%204.38134%207.40118%204.36467C7.41951%204.34801%207.43451%204.33301%207.45284%204.31801C7.45618%204.31467%207.45951%204.31301%207.45951%204.31301C7.47118%204.30134%207.48118%204.29301%207.49284%204.28467C7.50451%204.27301%207.51951%204.26134%207.53284%204.25301C7.53618%204.24967%207.53951%204.24801%207.54118%204.24801C7.55951%204.23301%207.57451%204.21967%207.59284%204.20467C7.60784%204.18967%207.62618%204.17801%207.64118%204.16634C7.65618%204.15467%207.66784%204.14634%207.68284%204.13467C7.70118%204.11967%207.71951%204.10801%207.73784%204.09467C7.75284%204.08634%207.76451%204.07467%207.77951%204.06634C7.78618%204.06134%207.79451%204.05467%207.80284%204.05134C7.81784%204.03967%207.83284%204.03134%207.84784%204.02301C7.85118%204.01967%207.85618%204.01801%207.85951%204.01467C7.87784%204.00301%207.89618%203.99134%207.91118%203.98301C7.91784%203.97801%207.92618%203.97467%207.93284%203.96801C7.94784%203.95967%207.95951%203.95134%207.97451%203.94134C7.98284%203.93634%207.99284%203.92967%208.00118%203.92467C8.01618%203.91634%208.03451%203.90801%208.04951%203.89634C8.05284%203.89301%208.05784%203.89134%208.06451%203.88801C8.08618%203.87634%208.10451%203.86467%208.12451%203.85634C8.12784%203.85301%208.13118%203.85301%208.13618%203.85134C8.15784%203.83967%208.17784%203.82801%208.19951%203.81967C8.19951%203.81967%208.20284%203.81967%208.20284%203.81634C8.22618%203.80467%208.24784%203.79301%208.27284%203.78134C8.27284%203.78134%208.27618%203.78134%208.27618%203.77801C8.29451%203.76967%208.31284%203.76134%208.33284%203.75134C8.34118%203.74801%208.35118%203.74301%208.35951%203.73967C8.37118%203.73467%208.38284%203.72801%208.39618%203.72467C8.41118%203.71967%208.42284%203.71301%208.43784%203.70801C8.46118%203.69967%208.48284%203.69134%208.50784%203.68134C8.52284%203.67634%208.53451%203.66967%208.54951%203.66634C8.57118%203.65801%208.59118%203.65134%208.61284%203.64301C8.63118%203.63801%208.65284%203.63134%208.66951%203.62301C8.75451%203.59634%208.83784%203.57134%208.92284%203.54967C8.94118%203.54467%208.96284%203.54134%208.97951%203.53801C9.08451%203.51467%209.19451%203.49467%209.30284%203.48301C9.32951%203.47967%209.35784%203.47801%209.38451%203.47467C9.42118%203.47134%209.45951%203.46967%209.49618%203.46634C9.51118%203.46634%209.52284%203.46301%209.53784%203.46301H9.55951C9.58951%203.46301%209.61618%203.45967%209.64784%203.45967H9.73784C9.79451%203.45967%209.84284%203.45967%209.89451%203.46301L9.89618%203.45801ZM10.6662%2014.413C10.5612%2014.4413%2010.4512%2014.4647%2010.3395%2014.4863C10.4512%2014.4663%2010.5595%2014.443%2010.6662%2014.413ZM9.56118%2014.5313H9.56951C9.56118%2014.5313%209.54784%2014.5313%209.53951%2014.528C9.54618%2014.528%209.55451%2014.5313%209.56118%2014.5313ZM7.08784%2013.293C7.05451%2013.253%207.02451%2013.2147%206.99451%2013.1747C7.02451%2013.2147%207.05784%2013.253%207.08784%2013.293ZM6.90284%2013.043C6.90284%2013.043%206.90618%2013.0463%206.90618%2013.048C6.90284%2013.0447%206.90284%2013.043%206.89951%2013.0363C6.89618%2013.033%206.89618%2013.0297%206.89284%2013.0247C6.86951%2012.9897%206.84784%2012.953%206.82284%2012.918C6.84451%2012.953%206.86784%2012.9913%206.88951%2013.0247C6.89618%2013.0297%206.89784%2013.0363%206.90118%2013.0413L6.90284%2013.043ZM6.89451%2013.0263C6.85784%2012.968%206.81951%2012.913%206.77618%2012.858L6.89451%2013.0263Z'%20fill='%231652A8'%20style='fill:%231652A8;fill:color(display-p3%200.0863%200.3216%200.6588);fill-opacity:1;'/%3e%3cg%20opacity='0.85'%3e%3cpath%20d='M5.77088%200.453306L5.97588%200.578306L5.97921%200.581639L11.5225%203.94997C11.5075%203.94164%2011.4925%203.93331%2011.4775%203.92331C11.4959%203.93497%2011.5142%203.94331%2011.5325%203.95497C11.5359%203.95831%2011.5392%203.95831%2011.5409%203.95997L11.6042%203.99831H11.6075L15.2492%206.21164L15.4725%206.34831C16.3542%206.93164%2016.9342%207.9083%2016.9342%209.01664C16.9342%2010.125%2016.3575%2011.1%2015.4759%2011.685L15.2409%2011.8266L11.6059%2014.035H11.6025L11.5392%2014.0733C11.5392%2014.0733%2011.5325%2014.0766%2011.5309%2014.0783C11.5125%2014.09%2011.4942%2014.0983%2011.4759%2014.11C11.4642%2014.1183%2011.4492%2014.125%2011.4359%2014.1333C11.4175%2014.145%2011.3992%2014.1533%2011.3809%2014.1616C11.3575%2014.1733%2011.3359%2014.185%2011.3109%2014.1966C11.3075%2014.2%2011.3042%2014.2%2011.3025%2014.2C11.2842%2014.2116%2011.2625%2014.22%2011.2425%2014.2283C11.2359%2014.2316%2011.2275%2014.2333%2011.2192%2014.24C11.2009%2014.2483%2011.1859%2014.255%2011.1675%2014.2633C11.1609%2014.2666%2011.1592%2014.2683%2011.1525%2014.2683C11.1309%2014.2766%2011.1109%2014.285%2011.0859%2014.2966C11.0625%2014.3083%2011.0342%2014.3166%2011.0109%2014.325C10.9875%2014.3333%2010.9592%2014.345%2010.9359%2014.3533C10.9092%2014.3616%2010.8842%2014.37%2010.8575%2014.38C10.8309%2014.3883%2010.8059%2014.3966%2010.7792%2014.4033H10.7759C10.7492%2014.4116%2010.7242%2014.4183%2010.6975%2014.4266C10.5925%2014.455%2010.4825%2014.4783%2010.3709%2014.4983C10.3259%2014.5066%2010.2775%2014.5133%2010.2325%2014.5183C10.2259%2014.5183%2010.2242%2014.5183%2010.2209%2014.5216C10.1975%2014.525%2010.1725%2014.5283%2010.1492%2014.53C10.1009%2014.5366%2010.0525%2014.5383%2010.0042%2014.5416C9.92921%2014.5483%209.85254%2014.5483%209.77754%2014.5483H9.68088C9.65421%2014.5483%209.62921%2014.545%209.60254%2014.545C9.59421%2014.545%209.58088%2014.545%209.57254%2014.5416C9.53254%2014.5383%209.49088%2014.5366%209.45254%2014.5333C9.27421%2014.5166%209.09588%2014.4866%208.92754%2014.4466C8.90421%2014.44%208.87921%2014.435%208.85254%2014.4266C8.81921%2014.4183%208.78588%2014.41%208.74921%2014.3983C8.73088%2014.3933%208.70921%2014.3866%208.69254%2014.3816C8.66588%2014.3733%208.64088%2014.365%208.61421%2014.355C8.58754%2014.3466%208.56254%2014.3383%208.53921%2014.3266C8.51588%2014.3183%208.48754%2014.3066%208.46421%2014.2983C8.44088%2014.29%208.41921%2014.2816%208.39754%2014.27C8.38921%2014.2666%208.38254%2014.265%208.37421%2014.2583C8.35588%2014.25%208.33754%2014.2416%208.31754%2014.2316C8.31754%2014.2316%208.31421%2014.2316%208.31421%2014.2283C8.29088%2014.2166%208.26588%2014.205%208.24254%2014.1933C8.21921%2014.1816%208.19421%2014.17%208.17088%2014.155C8.14754%2014.1433%208.12254%2014.1283%208.10088%2014.1166C8.07754%2014.105%208.05254%2014.09%208.03088%2014.0766C8.00754%2014.0616%207.98588%2014.0483%207.96088%2014.0366C7.93754%2014.0216%207.91588%2014.0083%207.89421%2013.9933C7.87254%2013.9783%207.85254%2013.965%207.83088%2013.95C7.82754%2013.95%207.82754%2013.9466%207.82421%2013.945C7.80588%2013.9333%207.78754%2013.9183%207.76754%2013.905C7.76421%2013.9016%207.76088%2013.9016%207.75921%2013.9C7.74088%2013.885%207.72254%2013.8733%207.70421%2013.86C7.70088%2013.8566%207.69588%2013.855%207.69254%2013.8483C7.67421%2013.8333%207.65588%2013.82%207.63754%2013.805C7.63754%2013.805%207.63421%2013.805%207.63421%2013.8016C7.61588%2013.7866%207.59754%2013.7733%207.57754%2013.755C7.57421%2013.7516%207.57088%2013.7516%207.56921%2013.7483C7.55421%2013.7366%207.53921%2013.7216%207.52421%2013.71C7.51754%2013.705%207.51254%2013.6983%207.50588%2013.695C7.49421%2013.6833%207.47921%2013.6716%207.46588%2013.66C7.43921%2013.6366%207.41421%2013.6133%207.39088%2013.5866C7.37254%2013.57%207.35754%2013.5516%207.33921%2013.535C7.32754%2013.5233%207.31754%2013.5116%207.30588%2013.5C7.29421%2013.4883%207.28421%2013.48%207.27588%2013.4683C7.25754%2013.4516%207.24254%2013.43%207.22421%2013.4133C7.19088%2013.375%207.15754%2013.3383%207.12421%2013.2966C7.09088%2013.2566%207.06088%2013.2183%207.03088%2013.1783C7.01588%2013.1583%207.00088%2013.1383%206.98588%2013.1166C6.97088%2013.0966%206.95588%2013.0766%206.94421%2013.0533C6.94088%2013.05%206.94088%2013.0483%206.93754%2013.0416C6.93421%2013.0383%206.93421%2013.0366%206.93088%2013.03C6.90754%2012.995%206.88588%2012.9583%206.86088%2012.9233C6.88254%2012.9583%206.90588%2012.995%206.92754%2013.03C6.89088%2012.9716%206.85254%2012.9166%206.80921%2012.8616L4.07921%208.99664L1.34088%205.12997L1.23254%204.97664L1.22921%204.97164C0.92421%204.51164%200.737543%203.97497%200.707543%203.39497C0.670877%202.70497%200.86421%202.05164%201.22088%201.50997C1.78588%200.648306%202.76588%200.0566391%203.90421%20-2.75556e-05C4.58421%20-0.0150276%205.22421%200.148306%205.77088%200.453306Z'%20fill='url(%23paint0_linear_6919_104497)'%20style=''/%3e%3c/g%3e%3cpath%20d='M32.4132%2012.862C31.2015%2012.862%2030.4482%2012.0503%2030.4482%2010.7203V8.4453H32.6632V7.02697H30.4482V4.72363L28.8548%205.9053V7.0253H27.9648V8.44363H28.8548V10.7053C28.8548%2012.9953%2030.1982%2014.412%2032.4282%2014.412H32.7682V12.862H32.4132Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M19.9812%2012.5767L21.4028%2011.4651C22.0395%2012.4867%2022.8995%2013.0351%2023.9962%2013.0351C25.1962%2013.0351%2025.9512%2012.2651%2025.9512%2011.3017C25.9512%2010.1901%2024.7662%209.83506%2023.5212%209.43506C22.0545%208.96172%2020.4695%208.36839%2020.4695%206.38339C20.4695%204.73839%2021.9362%203.43506%2023.9362%203.43506C25.5812%203.43506%2026.6028%204.07172%2027.4328%205.03506L26.1145%206.01339C25.6262%205.25839%2024.8995%204.85839%2023.9362%204.85839C22.8395%204.85839%2022.1278%205.51006%2022.1278%206.35506C22.1278%207.39172%2023.2695%207.73339%2024.5128%208.14839C25.9945%208.65172%2027.6095%209.29006%2027.6095%2011.3051C27.6095%2012.9651%2026.2462%2014.5501%2024.0095%2014.5501C22.1578%2014.5501%2020.8978%2013.7651%2019.9795%2012.5801L19.9812%2012.5767Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M38.2695%2010.7367C38.2695%208.56503%2039.9379%206.8667%2042.1095%206.8667C44.2812%206.8667%2045.9062%208.4467%2045.9062%2010.6334V11.2534H39.7912C39.9979%2012.39%2040.8845%2013.1434%2042.1695%2013.1434C43.1745%2013.1434%2043.9429%2012.6117%2044.3262%2011.8134L45.6262%2012.5367C44.9762%2013.7484%2043.8095%2014.545%2042.1695%2014.545C39.8362%2014.545%2038.2695%2012.8767%2038.2695%2010.735V10.7367ZM39.8645%209.91003H44.2962C44.0595%208.8467%2043.2479%208.25503%2042.1095%208.25503C40.9712%208.25503%2040.1595%208.93503%2039.8645%209.91003Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M33.7549%2010.72C33.7549%208.42999%2035.0982%207.02832%2037.3282%207.02832H38.0366V8.56499H37.3132C36.1016%208.56499%2035.3199%209.40665%2035.3349%2010.7367V14.415H33.7549V10.7233V10.72Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M46.6882%2010.7218C46.6882%208.56517%2048.3865%206.88184%2050.5132%206.88184C52.6399%206.88184%2054.3082%208.56517%2054.3082%2010.7218V14.4135H52.7582V13.4535C52.2415%2014.1468%2051.4432%2014.5468%2050.4682%2014.5468C48.3565%2014.5468%2046.6865%2012.8935%2046.6865%2010.7218H46.6882ZM52.7882%2010.7218C52.7882%209.40684%2051.7832%208.3585%2050.5132%208.3585C49.2432%208.3585%2048.2382%209.40684%2048.2382%2010.7218C48.2382%2012.0368%2049.2282%2013.0852%2050.5132%2013.0852C51.7982%2013.0852%2052.7882%2012.0218%2052.7882%2010.7218Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M55.3027%2010.2717C55.3027%208.30667%2056.6461%206.875%2058.6411%206.875C59.7777%206.875%2060.6944%207.33333%2061.2694%208.10167C61.8161%207.33333%2062.7027%206.875%2063.8394%206.875C65.8477%206.875%2067.2511%208.27833%2067.2511%2010.2717V14.4067H65.6711V10.2867C65.6711%209.165%2064.9177%208.38167%2063.8394%208.38167C62.7611%208.38167%2062.0527%209.18%2062.0677%2010.2433V14.4083H60.4877V10.2883C60.4877%209.16667%2059.7194%208.38333%2058.6411%208.38333C57.5627%208.38333%2056.8694%209.18167%2056.8827%2010.245V14.41H55.3027V10.275V10.2717Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M68.2646%203.62695H69.8746V12.872H74.2313V14.4086H68.2646V3.62695Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M89.418%2010.7367C89.418%208.56503%2091.0863%206.8667%2093.258%206.8667C95.4296%206.8667%2097.0546%208.4467%2097.0546%2010.6334V11.2534H90.9396C91.1463%2012.39%2092.033%2013.1434%2093.318%2013.1434C94.323%2013.1434%2095.0913%2012.6117%2095.4746%2011.8134L96.7746%2012.5367C96.1246%2013.7484%2094.958%2014.545%2093.318%2014.545C90.9846%2014.545%2089.418%2012.8767%2089.418%2010.735V10.7367ZM91.013%209.91003H95.4446C95.208%208.8467%2094.3963%208.25503%2093.258%208.25503C92.1196%208.25503%2091.308%208.93503%2091.013%209.91003Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M74.4948%2010.7218C74.4948%208.56517%2076.1932%206.88184%2078.3198%206.88184C80.4465%206.88184%2082.1148%208.56517%2082.1148%2010.7218V14.4135H80.5648V13.4535C80.0482%2014.1468%2079.2498%2014.5468%2078.2748%2014.5468C76.1632%2014.5468%2074.4932%2012.8935%2074.4932%2010.7218H74.4948ZM80.5948%2010.7218C80.5948%209.40684%2079.5898%208.3585%2078.3198%208.3585C77.0498%208.3585%2076.0448%209.40684%2076.0448%2010.7218C76.0448%2012.0368%2077.0348%2013.0852%2078.3198%2013.0852C79.6048%2013.0852%2080.5948%2012.0218%2080.5948%2010.7218Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M85.0381%2014.0498L81.9814%207.0498H83.6798L85.8364%2012.1748L87.8748%207.0498H89.5431L85.0831%2017.8465H83.4581L85.0381%2014.0515V14.0498Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3cpath%20d='M98.041%2010.7151C98.041%208.4251%2099.3843%207.02344%20101.614%207.02344H102.323V8.5601H101.599C100.388%208.5601%2099.606%209.40177%2099.621%2010.7318V14.4101H98.041V10.7184V10.7151Z'%20fill='%23687C8B'%20style='fill:%23687C8B;fill:color(display-p3%200.4078%200.4863%200.5451);fill-opacity:1;'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_6919_104497'%20x1='4.31754'%20y1='8.70664'%20x2='13.6359'%20y2='3.59497'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.2'%20stop-color='%231589EE'%20style='stop-color:%231589EE;stop-color:color(display-p3%200.0824%200.5373%200.9333);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%235EB4FF'%20style='stop-color:%235EB4FF;stop-color:color(display-p3%200.3686%200.7059%201.0000);stop-opacity:1;'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_6919_104497'%3e%3crect%20width='101.648'%20height='18'%20fill='white'%20style='fill:white;fill-opacity:1;'%20transform='translate(0.675781)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", D = /* @__PURE__ */ o("div")({
|
|
57
|
+
name: "SponsorLogoWrap",
|
|
58
|
+
class: "s8p5v5z",
|
|
59
|
+
propsAsIs: !1
|
|
60
|
+
}), I0 = () => f, H0 = /* @__PURE__ */ o(I0())({
|
|
61
|
+
name: "SponsorLogo",
|
|
62
|
+
class: "s755yti",
|
|
63
|
+
propsAsIs: !0
|
|
64
|
+
}), w0 = /* @__PURE__ */ o("img")({
|
|
65
|
+
name: "AdSponsorLogo",
|
|
66
|
+
class: "a1dflj8e",
|
|
67
|
+
propsAsIs: !1
|
|
68
|
+
}), B0 = ({
|
|
69
|
+
mastersApp: l,
|
|
70
|
+
sponsorLogo: s
|
|
71
|
+
}) => l ? /* @__PURE__ */ e(D, {
|
|
72
|
+
children: /* @__PURE__ */ e(H0, {
|
|
73
|
+
name: "mastersLogo"
|
|
74
|
+
})
|
|
75
|
+
}) : s ? /* @__PURE__ */ e(D, {
|
|
76
|
+
children: /* @__PURE__ */ e(w0, {
|
|
77
|
+
src: s,
|
|
78
|
+
alt: "ad-sponsor-logo"
|
|
79
|
+
})
|
|
80
|
+
}) : /* @__PURE__ */ e(D, {
|
|
81
|
+
children: /* @__PURE__ */ e("img", {
|
|
82
|
+
src: b0,
|
|
83
|
+
alt: "stream-layer-logo"
|
|
84
|
+
})
|
|
85
|
+
}), $0 = /* @__PURE__ */ o("div")({
|
|
86
|
+
name: "Container",
|
|
87
|
+
class: "cq8qxhy",
|
|
88
|
+
propsAsIs: !1
|
|
89
|
+
}), M0 = /* @__PURE__ */ o("div")({
|
|
90
|
+
name: "VideoWrapper",
|
|
91
|
+
class: "v18kj6dc",
|
|
92
|
+
propsAsIs: !1
|
|
93
|
+
}), E0 = () => R, N0 = /* @__PURE__ */ o(E0())({
|
|
94
|
+
name: "FocusableVideo",
|
|
95
|
+
class: "fv2nwib",
|
|
96
|
+
propsAsIs: !0
|
|
97
|
+
}), S = /* @__PURE__ */ o("div")({
|
|
98
|
+
name: "VideoStatus",
|
|
99
|
+
class: "v8ptucg",
|
|
100
|
+
propsAsIs: !1
|
|
101
|
+
}), q = "caip8y5", x0 = /* @__PURE__ */ o("div")({
|
|
102
|
+
name: "Content",
|
|
103
|
+
class: "ccgc65e",
|
|
104
|
+
propsAsIs: !1
|
|
105
|
+
}), T0 = /* @__PURE__ */ o("h3")({
|
|
106
|
+
name: "Title",
|
|
107
|
+
class: "t1q3iml2",
|
|
108
|
+
propsAsIs: !1
|
|
109
|
+
}), D0 = /* @__PURE__ */ o("div")({
|
|
110
|
+
name: "Description",
|
|
111
|
+
class: "d1y2pxs8",
|
|
112
|
+
propsAsIs: !1
|
|
113
|
+
}), Z0 = /* @__PURE__ */ o("img")({
|
|
114
|
+
name: "Image",
|
|
115
|
+
class: "ig2j4fc",
|
|
116
|
+
propsAsIs: !1
|
|
117
|
+
}), k0 = /* @__PURE__ */ o("div")({
|
|
118
|
+
name: "ImageContainer",
|
|
119
|
+
class: "i3dd6iy",
|
|
120
|
+
propsAsIs: !1
|
|
121
|
+
}), Q0 = ({
|
|
122
|
+
instantView: l,
|
|
123
|
+
isDetail: s,
|
|
124
|
+
notification: i,
|
|
125
|
+
controlVideo: a,
|
|
126
|
+
muted: n
|
|
127
|
+
}) => {
|
|
128
|
+
var t, d;
|
|
129
|
+
const p = O(null), [m, r] = x(!1), [v, y] = x(void 0), h = (l == null ? void 0 : l.playVideoMuted) === a0.ENABLED, I = s && (l == null ? void 0 : l.autoPlayVideo) === Z.ENABLED, H = h && I, g = l == null ? void 0 : l.heading, L = l == null ? void 0 : l.body, A = g || L, [V, w] = x(!0), B = i == null ? void 0 : i.title, $ = i == null ? void 0 : i.body;
|
|
130
|
+
return /* @__PURE__ */ C($0, { children: [
|
|
131
|
+
((t = l == null ? void 0 : l.video) == null ? void 0 : t.url) && /* @__PURE__ */ C(M0, { children: [
|
|
132
|
+
/* @__PURE__ */ e(
|
|
133
|
+
N0,
|
|
134
|
+
{
|
|
135
|
+
className: q,
|
|
136
|
+
source: l.video.url,
|
|
137
|
+
poster: l.video.thumbnailUrl,
|
|
138
|
+
controlVideo: a,
|
|
139
|
+
muted: n,
|
|
140
|
+
autoPlay: s && l.autoPlayVideo === Z.ENABLED,
|
|
141
|
+
ref: p,
|
|
142
|
+
onPause: () => {
|
|
143
|
+
r == null || r(!0), w(!1);
|
|
144
|
+
},
|
|
145
|
+
onMute: (M) => {
|
|
146
|
+
y(M);
|
|
147
|
+
},
|
|
148
|
+
onPlay: () => {
|
|
149
|
+
r == null || r(!1);
|
|
150
|
+
},
|
|
151
|
+
playMuted: h,
|
|
152
|
+
hasNotPausedVideo: V,
|
|
153
|
+
webos: !0
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
m && !V && /* @__PURE__ */ C(S, { children: [
|
|
157
|
+
/* @__PURE__ */ e(f, { name: "icon-pause" }),
|
|
158
|
+
"PAUSED"
|
|
159
|
+
] }),
|
|
160
|
+
v && H && /* @__PURE__ */ C(S, { children: [
|
|
161
|
+
/* @__PURE__ */ e(f, { name: "iconMute" }),
|
|
162
|
+
"MUTED"
|
|
163
|
+
] })
|
|
164
|
+
] }),
|
|
165
|
+
(l == null ? void 0 : l.image) && !((d = l == null ? void 0 : l.video) != null && d.url) && /* @__PURE__ */ e(
|
|
166
|
+
k0,
|
|
167
|
+
{
|
|
168
|
+
className: q,
|
|
169
|
+
"data-rounded": l.imageMode === F.ROUNDED,
|
|
170
|
+
children: /* @__PURE__ */ e(Z0, { src: l == null ? void 0 : l.image })
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ C(x0, { children: [
|
|
174
|
+
/* @__PURE__ */ e(T0, { children: s && A ? g : B }),
|
|
175
|
+
/* @__PURE__ */ e(D0, { children: s && A ? L : $ })
|
|
176
|
+
] })
|
|
177
|
+
] });
|
|
178
|
+
}, U0 = /* @__PURE__ */ o("div")({
|
|
179
|
+
name: "Container",
|
|
180
|
+
class: "cgn5uen",
|
|
181
|
+
propsAsIs: !1
|
|
182
|
+
}), _ = "c1px8nt6", P0 = /* @__PURE__ */ o("div")({
|
|
183
|
+
name: "Content",
|
|
184
|
+
class: "c5et2jt",
|
|
185
|
+
propsAsIs: !1
|
|
186
|
+
}), S0 = /* @__PURE__ */ o("h3")({
|
|
187
|
+
name: "Title",
|
|
188
|
+
class: "t1i2kpk2",
|
|
189
|
+
propsAsIs: !1
|
|
190
|
+
}), q0 = /* @__PURE__ */ o("div")({
|
|
191
|
+
name: "Description",
|
|
192
|
+
class: "dd3lh3p",
|
|
193
|
+
propsAsIs: !1
|
|
194
|
+
}), _0 = /* @__PURE__ */ o("img")({
|
|
195
|
+
name: "Image",
|
|
196
|
+
class: "i1gfjeu5",
|
|
197
|
+
propsAsIs: !1
|
|
198
|
+
}), j0 = /* @__PURE__ */ o("div")({
|
|
199
|
+
name: "ImageContainer",
|
|
200
|
+
class: "i58y999",
|
|
201
|
+
propsAsIs: !1
|
|
202
|
+
}), O0 = ({
|
|
203
|
+
instantView: l,
|
|
204
|
+
isDetail: s,
|
|
205
|
+
notification: i,
|
|
206
|
+
controlVideo: a,
|
|
207
|
+
muted: n
|
|
208
|
+
}) => {
|
|
209
|
+
var t, d;
|
|
210
|
+
const p = l == null ? void 0 : l.heading, m = l == null ? void 0 : l.body, r = p || m, v = i == null ? void 0 : i.title, y = i == null ? void 0 : i.body;
|
|
211
|
+
return /* @__PURE__ */ C(U0, { children: [
|
|
212
|
+
((t = l == null ? void 0 : l.video) == null ? void 0 : t.url) && /* @__PURE__ */ e(
|
|
213
|
+
R,
|
|
214
|
+
{
|
|
215
|
+
className: _,
|
|
216
|
+
source: l.video.url,
|
|
217
|
+
poster: l.video.thumbnailUrl,
|
|
218
|
+
controlVideo: a,
|
|
219
|
+
muted: n,
|
|
220
|
+
autoPlay: s && l.autoPlayVideo === Z.ENABLED
|
|
221
|
+
}
|
|
222
|
+
),
|
|
223
|
+
(l == null ? void 0 : l.image) && !((d = l == null ? void 0 : l.video) != null && d.url) && /* @__PURE__ */ e(
|
|
224
|
+
j0,
|
|
225
|
+
{
|
|
226
|
+
className: _,
|
|
227
|
+
"data-rounded": l.imageMode === F.ROUNDED,
|
|
228
|
+
children: /* @__PURE__ */ e(_0, { src: l == null ? void 0 : l.image })
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
/* @__PURE__ */ C(P0, { children: [
|
|
232
|
+
/* @__PURE__ */ e(S0, { children: s && r ? p : v }),
|
|
233
|
+
/* @__PURE__ */ e(q0, { children: s && r ? m : y })
|
|
234
|
+
] })
|
|
235
|
+
] });
|
|
236
|
+
}, R0 = /* @__PURE__ */ o("div")({
|
|
237
|
+
name: "Container",
|
|
238
|
+
class: "c1euiow",
|
|
239
|
+
propsAsIs: !1
|
|
240
|
+
}), F0 = /* @__PURE__ */ o("a")({
|
|
241
|
+
name: "WebLinkBtn",
|
|
242
|
+
class: "w19zie3h",
|
|
243
|
+
propsAsIs: !1
|
|
244
|
+
}), W0 = () => f, z0 = /* @__PURE__ */ o(W0())({
|
|
245
|
+
name: "WebLinkIcon",
|
|
246
|
+
class: "wyg5v7z",
|
|
247
|
+
propsAsIs: !0
|
|
248
|
+
}), G0 = ({ instantView: l, ...s }) => /* @__PURE__ */ C(R0, { children: [
|
|
249
|
+
s.webos ? /* @__PURE__ */ e(Q0, { instantView: l, ...s, isDetail: !0 }) : /* @__PURE__ */ e(O0, { instantView: l, ...s, isDetail: !0 }),
|
|
250
|
+
(l == null ? void 0 : l.webLink) && /* @__PURE__ */ C(F0, { href: l == null ? void 0 : l.webLink.url, target: "_blank", "data-a": "web-link", children: [
|
|
251
|
+
l == null ? void 0 : l.webLink.label,
|
|
252
|
+
/* @__PURE__ */ e(z0, { name: "icon-external-link" })
|
|
253
|
+
] })
|
|
254
|
+
] }), Y0 = /* @__PURE__ */ o("div")({
|
|
255
|
+
name: "Container",
|
|
256
|
+
class: "c1dcxmvf",
|
|
257
|
+
propsAsIs: !1
|
|
258
|
+
}), J0 = /* @__PURE__ */ o("blockquote")({
|
|
259
|
+
name: "Quote",
|
|
260
|
+
class: "qb4q22c",
|
|
261
|
+
propsAsIs: !1
|
|
262
|
+
}), K0 = (l) => /* @__PURE__ */ C(Y0, { children: [
|
|
263
|
+
l.title && /* @__PURE__ */ e(J0, { children: l.title }),
|
|
264
|
+
/* @__PURE__ */ e(t0, { ...l, isDetail: !0 })
|
|
265
|
+
] }), X0 = /* @__PURE__ */ o("div")({
|
|
266
|
+
name: "QuestionAdvertisementContainer",
|
|
267
|
+
class: "qwludgs",
|
|
268
|
+
propsAsIs: !1
|
|
269
|
+
}), l2 = /* @__PURE__ */ o("div")({
|
|
270
|
+
name: "QuestionAdvertisementText",
|
|
271
|
+
class: "qvce6pv",
|
|
272
|
+
propsAsIs: !1
|
|
273
|
+
}), e2 = /* @__PURE__ */ o("div")({
|
|
274
|
+
name: "QuestionAdvertisementImage",
|
|
275
|
+
class: "qsid7hx",
|
|
276
|
+
propsAsIs: !1
|
|
277
|
+
}), o2 = ({
|
|
278
|
+
sponsorLogo: l,
|
|
279
|
+
id: s,
|
|
280
|
+
hasBanner: i,
|
|
281
|
+
setAdShowed: a
|
|
282
|
+
}) => {
|
|
283
|
+
const n = O();
|
|
284
|
+
return e0(() => (n.current = setTimeout(() => {
|
|
285
|
+
a(!0);
|
|
286
|
+
}, 5e3), () => {
|
|
287
|
+
clearTimeout(n.current);
|
|
288
|
+
}), [a, s, i]), /* @__PURE__ */ C(X0, {
|
|
289
|
+
children: [/* @__PURE__ */ e(l2, {
|
|
290
|
+
children: "PRESENTED BY"
|
|
291
|
+
}), /* @__PURE__ */ e(e2, {
|
|
292
|
+
children: /* @__PURE__ */ e("img", {
|
|
293
|
+
src: l,
|
|
294
|
+
alt: "ad-sponsor-logo"
|
|
295
|
+
})
|
|
296
|
+
})]
|
|
297
|
+
});
|
|
298
|
+
}, j = /* @__PURE__ */ o("div")({
|
|
299
|
+
name: "QuestionContainer",
|
|
300
|
+
class: "q14ckf9e",
|
|
301
|
+
propsAsIs: !1
|
|
302
|
+
}), s2 = ({
|
|
303
|
+
openedQuestion: l,
|
|
304
|
+
muted: s,
|
|
305
|
+
webos: i
|
|
306
|
+
}) => {
|
|
307
|
+
var a, n;
|
|
308
|
+
const {
|
|
309
|
+
sdk: t
|
|
310
|
+
} = p0();
|
|
311
|
+
return ((a = l == null ? void 0 : l.attributes) == null ? void 0 : a.attributes.case) === "insight" ? /* @__PURE__ */ e(G0, {
|
|
312
|
+
...l.attributes.attributes.value,
|
|
313
|
+
muted: s,
|
|
314
|
+
controlVideo: t == null ? void 0 : t.controlVideoPlayer,
|
|
315
|
+
webos: i
|
|
316
|
+
}) : ((n = l == null ? void 0 : l.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ e(K0, {
|
|
317
|
+
...l.attributes.attributes.value,
|
|
318
|
+
muted: s,
|
|
319
|
+
controlVideo: t == null ? void 0 : t.controlVideoPlayer
|
|
320
|
+
}) : null;
|
|
321
|
+
}, i2 = ({
|
|
322
|
+
extendedQuestion: l,
|
|
323
|
+
vote: s,
|
|
324
|
+
close: i,
|
|
325
|
+
webos: a
|
|
326
|
+
}) => {
|
|
327
|
+
const {
|
|
328
|
+
loading: n,
|
|
329
|
+
data: t
|
|
330
|
+
} = l;
|
|
331
|
+
return t ? /* @__PURE__ */ e(C0, {
|
|
332
|
+
webos: a,
|
|
333
|
+
vote: s,
|
|
334
|
+
close: i,
|
|
335
|
+
openedQuestion: t,
|
|
336
|
+
isLoading: !!n
|
|
337
|
+
}) : /* @__PURE__ */ e(d0, {});
|
|
338
|
+
}, v2 = ({
|
|
339
|
+
gamification: l,
|
|
340
|
+
sdk: s,
|
|
341
|
+
muted: i,
|
|
342
|
+
skipAutoClose: a,
|
|
343
|
+
hideSponsor: n,
|
|
344
|
+
className: t,
|
|
345
|
+
hideHeader: d,
|
|
346
|
+
webos: p
|
|
347
|
+
}) => {
|
|
348
|
+
var m, r, v, y, h, I, H, g, L, A, V, w, B, $, M, k;
|
|
349
|
+
const u = T(l.openedQuestion.$store), c = T(l.openedQuestion.$extendedStore), [W, z] = x(!1), G = T(s.options), Q = ((m = u == null ? void 0 : u.attributes) == null ? void 0 : m.type) === b.FACTOID, E = (r = u == null ? void 0 : u.attributes) == null ? void 0 : r.backgroundImage, N = (v = c.data) == null ? void 0 : v.backgroundImage, Y = Q ? E == null ? void 0 : E.landscapeUrl : N == null ? void 0 : N.landscapeUrl, J = Q ? E == null ? void 0 : E.portraitUrl : N == null ? void 0 : N.portraitUrl, U = c0({
|
|
350
|
+
containerId: G.containerId,
|
|
351
|
+
landscapeUrl: Y,
|
|
352
|
+
portraitUrl: J
|
|
353
|
+
});
|
|
354
|
+
if (!u)
|
|
355
|
+
return null;
|
|
356
|
+
const P = u.type, K = ((h = (y = c.data) == null ? void 0 : y.options) == null ? void 0 : h.options.case) === "factoid" ? c.data.options.options.value.closeTimer : void 0;
|
|
357
|
+
return c.data && c.data.adUnit === n0.STANDART && !W ? /* @__PURE__ */ C(j, {
|
|
358
|
+
className: t,
|
|
359
|
+
children: [U, /* @__PURE__ */ e(o2, {
|
|
360
|
+
id: c.data.id,
|
|
361
|
+
hasBanner: !!((H = (I = c.data.promotion) == null ? void 0 : I.banner) != null && H.imageUrl),
|
|
362
|
+
setAdShowed: z,
|
|
363
|
+
sponsorLogo: ((L = (g = c.data.promotion) == null ? void 0 : g.sponsor) == null ? void 0 : L.logo) || ((A = c.data.sponsorship) == null ? void 0 : A.logo) || ""
|
|
364
|
+
})]
|
|
365
|
+
}) : /* @__PURE__ */ C(j, {
|
|
366
|
+
className: t,
|
|
367
|
+
children: [U, !d && /* @__PURE__ */ e(V0, {
|
|
368
|
+
closeTimer: a ? void 0 : K,
|
|
369
|
+
close: l.closeQuestion,
|
|
370
|
+
type: ((V = u.attributes) == null ? void 0 : V.type) || b.UNSET,
|
|
371
|
+
webos: p
|
|
372
|
+
}), P === "question" && /* @__PURE__ */ e(i2, {
|
|
373
|
+
webos: p,
|
|
374
|
+
vote: l.submitAnswer,
|
|
375
|
+
close: l.closeQuestion,
|
|
376
|
+
extendedQuestion: c
|
|
377
|
+
}), P !== "question" && /* @__PURE__ */ e(s2, {
|
|
378
|
+
muted: i,
|
|
379
|
+
openedQuestion: u,
|
|
380
|
+
webos: p
|
|
381
|
+
}), !n && /* @__PURE__ */ e(B0, {
|
|
382
|
+
sponsorLogo: (($ = (B = (w = c.data) == null ? void 0 : w.promotion) == null ? void 0 : B.sponsor) == null ? void 0 : $.logo) || ((k = (M = c.data) == null ? void 0 : M.sponsorship) == null ? void 0 : k.logo)
|
|
383
|
+
})]
|
|
384
|
+
});
|
|
385
|
+
};
|
|
386
|
+
export {
|
|
387
|
+
O0 as O,
|
|
388
|
+
r0 as e,
|
|
389
|
+
v2 as h,
|
|
390
|
+
p0 as p,
|
|
391
|
+
V0 as y
|
|
392
|
+
};
|