cds.connatix.com Open in urlscan Pro
151.101.130.137  Public Scan

URL: https://cds.connatix.com/p/209100/connatix.player.js
Submission: On December 28 via manual from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

(()=>{var t={5186:function(t,i){"use strict";var e=this&&this.R||function(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(i,"U",{value:!0});var s=function(){function t(){}return t.prototype.clone=function(){var t=this,i=new this.constructor;return Object.keys(this).forEach((function(e){var s=t.deepClone(t[e]);void 0!==s&&(i[e]=s)})),i},t.prototype.deepClone=function(t){var i,s,n=typeof t;if("number"===n||"string"===n||"boolean"===n)return t;if(null!==t&&"object"===n){if("function"==typeof t.clone)return t.clone();if(t instanceof Date)return new Date(t.getTime());if(void 0!==t[Symbol.iterator]){var r=[];try{for(var o=e(t),h=o.next();!h.done;h=o.next()){var a=h.value;r.push(this.deepClone(a))}}catch(t){i={error:t}}finally{try{h&&!h.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}return t instanceof Array?r:new t.constructor(r)}var c={};for(var d in t)t.hasOwnProperty(d)&&(c[d]=this.deepClone(t[d]));return c}},t}();i.Cloneable=s},7061:function(t,i,e){"use strict";var s,n=this&&this.W||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}),r=this&&this.G||function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))},o=this&&this.tt||function(t,i){var e,s,n,r,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:h(0),throw:h(1),return:h(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function h(r){return function(h){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,s=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!(n=(n=o.trys).length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){o=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){o.label=r[1];break}if(6===r[0]&&o.label<n[1]){o.label=n[1],n=r;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(r);break}n[2]&&o.ops.pop(),o.trys.pop();continue}r=i.call(t,o)}catch(t){r=[6,t],s=0}finally{e=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,h])}}};Object.defineProperty(i,"U",{value:!0});var h=e(5186),a=e(5458),c=e(6056),d=e(250),l=function(t){function i(e){var s=t.call(this)||this;s.isReady_=!1,s.isLatest=!1;var n=i.baseUrl;if(s.lang_=i.DEFAULT_LANGUAGE,s.isVendorList(e))s.populate(e),s.readyPromise=Promise.resolve();else{if(!n)throw new a.GVLError("must specify GVL.baseUrl before loading GVL json");if(e>0){var r=e;i.CACHE.has(r)?(s.populate(i.CACHE.get(r)),s.readyPromise=Promise.resolve()):(n+=i.versionedFilename.replace("[VERSION]",r+""),s.readyPromise=s.fetchJson(n))}else i.CACHE.has(i.LATEST_CACHE_KEY)?(s.populate(i.CACHE.get(i.LATEST_CACHE_KEY)),s.readyPromise=Promise.resolve()):(s.isLatest=!0,s.readyPromise=s.fetchJson(n+i.latestFilename))}return s}return n(i,t),Object.defineProperty(i,"baseUrl",{get:function(){return this.baseUrl_},set:function(t){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new a.GVLError("Invalid baseUrl!  You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&"/"!==t[t.length-1]&&(t+="/"),this.baseUrl_=t},enumerable:!0,configurable:!0}),i.emptyLanguageCache=function(t){var e=!1;return void 0===t&&i.LANGUAGE_CACHE.size>0?(i.LANGUAGE_CACHE=new Map,e=!0):"string"==typeof t&&this.consentLanguages.has(t.toUpperCase())&&(i.LANGUAGE_CACHE.delete(t.toUpperCase()),e=!0),e},i.emptyCache=function(t){var e=!1;return Number.isInteger(t)&&t>=0?(i.CACHE.delete(t),e=!0):void 0===t&&(i.CACHE=new Map,e=!0),e},i.prototype.cacheLanguage=function(){i.LANGUAGE_CACHE.has(this.lang_)||i.LANGUAGE_CACHE.set(this.lang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks})},i.prototype.fetchJson=function(t){return r(this,void 0,void 0,(function(){var i,e;return o(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),i=this.populate,[4,c.Json.fetch(t)];case 1:return i.apply(this,[s.sent()]),[3,3];case 2:throw e=s.sent(),new a.GVLError(e.message);case 3:return[2]}}))}))},i.prototype.getJson=function(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,vendors:this.fullVendorList}))},i.prototype.changeLanguage=function(t){return r(this,void 0,void 0,(function(){var e,s,n,r,h;return o(this,(function(o){switch(o.label){case 0:if(e=t.toUpperCase(),!i.consentLanguages.has(e))return[3,6];if(e===this.lang_)return[3,5];if(this.lang_=e,!i.LANGUAGE_CACHE.has(e))return[3,1];for(n in s=i.LANGUAGE_CACHE.get(e))s.hasOwnProperty(n)&&(this[n]=s[n]);return[3,5];case 1:r=i.baseUrl+i.languageFilename.replace("[LANG]",t),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.fetchJson(r)];case 3:return o.sent(),this.cacheLanguage(),[3,5];case 4:throw h=o.sent(),new a.GVLError("unable to load language: "+h.message);case 5:return[3,7];case 6:throw new a.GVLError("unsupported language "+t);case 7:return[2]}}))}))},Object.defineProperty(i.prototype,"language",{get:function(){return this.lang_},enumerable:!0,configurable:!0}),i.prototype.isVendorList=function(t){return void 0!==t&&void 0!==t.vendors},i.prototype.populate=function(t){this.purposes=t.purposes,this.specialPurposes=t.specialPurposes,this.features=t.features,this.specialFeatures=t.specialFeatures,this.stacks=t.stacks,this.isVendorList(t)&&(this.gvlSpecificationVersion=t.gvlSpecificationVersion,this.tcfPolicyVersion=t.tcfPolicyVersion,this.vendorListVersion=t.vendorListVersion,this.lastUpdated=t.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=t.vendors,this.fullVendorList=t.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&i.CACHE.set(i.LATEST_CACHE_KEY,this.getJson()),i.CACHE.has(this.vendorListVersion)||i.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()},i.prototype.mapVendors=function(t){var i=this;this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((function(t){i.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}})),Object.keys(this.specialPurposes).forEach((function(t){i.bySpecialPurposeVendorMap[t]=new Set})),Object.keys(this.features).forEach((function(t){i.byFeatureVendorMap[t]=new Set})),Object.keys(this.specialFeatures).forEach((function(t){i.bySpecialFeatureVendorMap[t]=new Set})),Array.isArray(t)||(t=Object.keys(this.fullVendorList).map((function(t){return+t}))),this.vendorIds=new Set(t),this.vendors_=t.reduce((function(t,e){var s=i.vendors_[""+e];return s&&void 0===s.deletedDate&&(s.purposes.forEach((function(t){i.byPurposeVendorMap[t+""].consent.add(e)})),s.specialPurposes.forEach((function(t){i.bySpecialPurposeVendorMap[t+""].add(e)})),s.legIntPurposes.forEach((function(t){i.byPurposeVendorMap[t+""].legInt.add(e)})),s.flexiblePurposes&&s.flexiblePurposes.forEach((function(t){i.byPurposeVendorMap[t+""].flexible.add(e)})),s.features.forEach((function(t){i.byFeatureVendorMap[t+""].add(e)})),s.specialFeatures.forEach((function(t){i.bySpecialFeatureVendorMap[t+""].add(e)})),t[e]=s),t}),{})},i.prototype.getFilteredVendors=function(t,i,e,s){var n=this,r=t.charAt(0).toUpperCase()+t.slice(1),o={};return("purpose"===t&&e?this["by"+r+"VendorMap"][i+""][e]:this["by"+(s?"Special":"")+r+"VendorMap"][i+""]).forEach((function(t){o[t+""]=n.vendors[t+""]})),o},i.prototype.getVendorsWithConsentPurpose=function(t){return this.getFilteredVendors("purpose",t,"consent")},i.prototype.getVendorsWithLegIntPurpose=function(t){return this.getFilteredVendors("purpose",t,"legInt")},i.prototype.getVendorsWithFlexiblePurpose=function(t){return this.getFilteredVendors("purpose",t,"flexible")},i.prototype.getVendorsWithSpecialPurpose=function(t){return this.getFilteredVendors("purpose",t,void 0,!0)},i.prototype.getVendorsWithFeature=function(t){return this.getFilteredVendors("feature",t)},i.prototype.getVendorsWithSpecialFeature=function(t){return this.getFilteredVendors("feature",t,void 0,!0)},Object.defineProperty(i.prototype,"vendors",{get:function(){return this.vendors_},enumerable:!0,configurable:!0}),i.prototype.narrowVendorsTo=function(t){this.mapVendors(t)},Object.defineProperty(i.prototype,"isReady",{get:function(){return this.isReady_},enumerable:!0,configurable:!0}),i.prototype.clone=function(){var t=new i(this.getJson());return this.lang_!==i.DEFAULT_LANGUAGE&&t.changeLanguage(this.lang_),t},i.isInstanceOf=function(t){return"object"==typeof t&&"function"==typeof t.narrowVendorsTo},i.LANGUAGE_CACHE=new Map,i.CACHE=new Map,i.LATEST_CACHE_KEY=0,i.DEFAULT_LANGUAGE="EN",i.consentLanguages=new d.ConsentLanguages,i.latestFilename="vendor-list.json",i.versionedFilename="archives/vendor-list-v[VERSION].json",i.languageFilename="purposes-[LANG].json",i}(h.Cloneable);i.GVL=l},6056:(t,i)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var e=function(){function t(){}return t.absCall=function(t,i,e,s){return new Promise((function(n,r){var o=new XMLHttpRequest;o.withCredentials=e,o.addEventListener("load",(function(){if(o.readyState==XMLHttpRequest.DONE)if(o.status>=200&&o.status<300){var t=o.response;if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}n(t)}else r(new Error("HTTP Status: "+o.status+" response type: "+o.responseType))})),o.addEventListener("error",(function(){r(new Error("error"))})),o.addEventListener("abort",(function(){r(new Error("aborted"))})),null===i?o.open("GET",t,!0):o.open("POST",t,!0),o.responseType="json",o.timeout=s,o.ontimeout=function(){r(new Error("Timeout "+s+"ms "+t))},o.send(i)}))},t.post=function(t,i,e,s){return void 0===e&&(e=!1),void 0===s&&(s=0),this.absCall(t,JSON.stringify(i),e,s)},t.fetch=function(t,i,e){return void 0===i&&(i=!1),void 0===e&&(e=0),this.absCall(t,null,i,e)},t}();i.Json=e},6382:function(t,i,e){"use strict";var s,n=this&&this.W||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)});Object.defineProperty(i,"U",{value:!0});var r=e(5186),o=e(5458),h=e(7061),a=e(250),c=function(t){function i(i){var e=t.call(this)||this;return e.isServiceSpecific_=!1,e.supportOOB_=!0,e.useNonStandardStacks_=!1,e.purposeOneTreatment_=!1,e.publisherCountryCode_="AA",e.version_=2,e.consentScreen_=0,e.policyVersion_=2,e.consentLanguage_="EN",e.cmpId_=0,e.cmpVersion_=0,e.vendorListVersion_=0,e.numCustomPurposes_=0,e.specialFeatureOptins=new a.Vector,e.purposeConsents=new a.Vector,e.purposeLegitimateInterests=new a.Vector,e.publisherConsents=new a.Vector,e.publisherLegitimateInterests=new a.Vector,e.publisherCustomConsents=new a.Vector,e.publisherCustomLegitimateInterests=new a.Vector,e.vendorConsents=new a.Vector,e.vendorLegitimateInterests=new a.Vector,e.vendorsDisclosed=new a.Vector,e.vendorsAllowed=new a.Vector,e.publisherRestrictions=new a.PurposeRestrictionVector,i&&(e.gvl=i),e.created=new Date,e.updated(),e}return n(i,t),Object.defineProperty(i.prototype,"gvl",{get:function(){return this.gvl_},set:function(t){h.GVL.isInstanceOf(t)||(t=new h.GVL(t)),this.gvl_=t,this.publisherRestrictions.gvl=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cmpId",{get:function(){return this.cmpId_},set:function(t){if(!(Number.isInteger(+t)&&t>1))throw new o.TCModelError("cmpId",t);this.cmpId_=+t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cmpVersion",{get:function(){return this.cmpVersion_},set:function(t){if(!(Number.isInteger(+t)&&t>-1))throw new o.TCModelError("cmpVersion",t);this.cmpVersion_=+t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"consentScreen",{get:function(){return this.consentScreen_},set:function(t){if(!(Number.isInteger(+t)&&t>-1))throw new o.TCModelError("consentScreen",t);this.consentScreen_=+t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"consentLanguage",{get:function(){return this.consentLanguage_},set:function(t){this.consentLanguage_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"publisherCountryCode",{get:function(){return this.publisherCountryCode_},set:function(t){if(!/^([A-z]){2}$/.test(t))throw new o.TCModelError("publisherCountryCode",t);this.publisherCountryCode_=t.toUpperCase()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"vendorListVersion",{get:function(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_},set:function(t){if((t=+t>>0)<0)throw new o.TCModelError("vendorListVersion",t);this.vendorListVersion_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"policyVersion",{get:function(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_},set:function(t){if(this.policyVersion_=parseInt(t,10),this.policyVersion_<0)throw new o.TCModelError("policyVersion",t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"version",{get:function(){return this.version_},set:function(t){this.version_=parseInt(t,10)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isServiceSpecific",{get:function(){return this.isServiceSpecific_},set:function(t){this.isServiceSpecific_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useNonStandardStacks",{get:function(){return this.useNonStandardStacks_},set:function(t){this.useNonStandardStacks_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"supportOOB",{get:function(){return this.supportOOB_},set:function(t){this.supportOOB_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"purposeOneTreatment",{get:function(){return this.purposeOneTreatment_},set:function(t){this.purposeOneTreatment_=t},enumerable:!0,configurable:!0}),i.prototype.setAllVendorConsents=function(){this.vendorConsents.set(this.gvl.vendors)},i.prototype.unsetAllVendorConsents=function(){this.vendorConsents.empty()},i.prototype.setAllVendorsDisclosed=function(){this.vendorsDisclosed.set(this.gvl.vendors)},i.prototype.unsetAllVendorsDisclosed=function(){this.vendorsDisclosed.empty()},i.prototype.setAllVendorsAllowed=function(){this.vendorsAllowed.set(this.gvl.vendors)},i.prototype.unsetAllVendorsAllowed=function(){this.vendorsAllowed.empty()},i.prototype.setAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.set(this.gvl.vendors)},i.prototype.unsetAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.empty()},i.prototype.setAllPurposeConsents=function(){this.purposeConsents.set(this.gvl.purposes)},i.prototype.unsetAllPurposeConsents=function(){this.purposeConsents.empty()},i.prototype.setAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.set(this.gvl.purposes)},i.prototype.unsetAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.empty()},i.prototype.setAllSpecialFeatureOptins=function(){this.specialFeatureOptins.set(this.gvl.specialFeatures)},i.prototype.unsetAllSpecialFeatureOptins=function(){this.specialFeatureOptins.empty()},i.prototype.setAll=function(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()},i.prototype.unsetAll=function(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()},Object.defineProperty(i.prototype,"numCustomPurposes",{get:function(){var t=this.numCustomPurposes_;if("object"==typeof this.customPurposes){var i=Object.keys(this.customPurposes).sort((function(t,i){return+t-+i}));t=parseInt(i.pop(),10)}return t},set:function(t){if(this.numCustomPurposes_=parseInt(t,10),this.numCustomPurposes_<0)throw new o.TCModelError("numCustomPurposes",t)},enumerable:!0,configurable:!0}),i.prototype.updated=function(){this.lastUpdated=new Date},i.consentLanguages=h.GVL.consentLanguages,i}(r.Cloneable);i.TCModel=c},2381:(t,i,e)=>{"use strict";var s=e(7170),n=e(250),r=e(2082),o=e(6382),h=function(){function t(){}return t.encode=function(t,i){var e,n,r="";return t=s.SemanticPreEncoder.process(t,i),(n=Array.isArray(null===(e=i)||void 0===e?void 0:e.segments)?i.segments:new s.SegmentSequence(t,i)[""+t.version]).forEach((function(i,e){var o="";e<n.length-1&&(o="."),r+=s.SegmentEncoder.encode(t,i)+o})),r},t.decode=function(t,i){var e=t.split("."),h=e.length;i||(i=new o.TCModel);for(var a=0;a<h;a++){var c=e[a],d=s.Base64Url.decode(c.charAt(0)).substr(0,s.BitLength.segmentType),l=n.SegmentIDs.ID_TO_KEY[r.IntEncoder.decode(d,s.BitLength.segmentType).toString()];s.SegmentEncoder.decode(c,i,l)}return i},t}();i.E=h},4479:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(5458),n=function(){function t(){}return t.encode=function(t){if(!/^[0-1]+$/.test(t))throw new s.EncodingError("Invalid bitField");var i=t.length%this.LCM;t+=i?"0".repeat(this.LCM-i):"";for(var e="",n=0;n<t.length;n+=this.BASIS)e+=this.DICT[parseInt(t.substr(n,this.BASIS),2)];return e},t.decode=function(t){if(!/^[A-Za-z0-9\-_]+$/.test(t))throw new s.DecodingError("Invalidly encoded Base64URL string");for(var i="",e=0;e<t.length;e++){var n=this.REVERSE_DICT.get(t[e]).toString(2);i+="0".repeat(this.BASIS-n.length)+n}return i},t.DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",t.REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]),t.BASIS=6,t.LCM=24,t}();i.Base64Url=n},2219:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(250),n=function(){function t(){}var i,e,n,r,o,h,a,c,d,l,u,p,f,m,v,g,y,b;return i=s.Fields.cmpId,e=s.Fields.cmpVersion,n=s.Fields.consentLanguage,r=s.Fields.consentScreen,o=s.Fields.created,h=s.Fields.isServiceSpecific,a=s.Fields.lastUpdated,c=s.Fields.policyVersion,d=s.Fields.publisherCountryCode,l=s.Fields.publisherLegitimateInterests,u=s.Fields.publisherConsents,p=s.Fields.purposeConsents,f=s.Fields.purposeLegitimateInterests,m=s.Fields.purposeOneTreatment,v=s.Fields.specialFeatureOptins,g=s.Fields.useNonStandardStacks,y=s.Fields.vendorListVersion,b=s.Fields.version,t[i]=12,t[e]=12,t[n]=12,t[r]=6,t[o]=36,t[h]=1,t[a]=36,t[c]=6,t[d]=12,t[l]=24,t[u]=24,t[p]=24,t[f]=24,t[m]=1,t[v]=12,t[g]=1,t[y]=12,t[b]=6,t.anyBoolean=1,t.encodingType=1,t.maxId=16,t.numCustomPurposes=6,t.numEntries=12,t.numRestrictions=12,t.purposeId=6,t.restrictionType=2,t.segmentType=3,t.singleOrRange=1,t.vendorId=16,t}();i.BitLength=n},3858:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(4479),n=e(2219),r=e(9836),o=e(8780),h=e(5458),a=e(4731),c=e(250),d=function(){function t(){}return t.encode=function(t,i){var e,o=this;try{e=this.fieldSequence[""+t.version][i]}catch(e){throw new h.EncodingError("Unable to encode version: "+t.version+", segment: "+i)}var d="";return i!==c.Segment.CORE&&(d=r.IntEncoder.encode(c.SegmentIDs.KEY_TO_ID[i],n.BitLength.segmentType)),e.forEach((function(e){var s=t[e],c=r.FieldEncoderMap[e],l=n.BitLength[e];void 0===l&&o.isPublisherCustom(e)&&(l=+t[a.Fields.numCustomPurposes]);try{d+=c.encode(s,l)}catch(t){throw new h.EncodingError("Error encoding "+i+"->"+e+": "+t.message)}})),s.Base64Url.encode(d)},t.decode=function(t,i,e){var o=this,d=s.Base64Url.decode(t),l=0;return e===c.Segment.CORE&&(i.version=r.IntEncoder.decode(d.substr(l,n.BitLength[a.Fields.version]),n.BitLength[a.Fields.version])),e!==c.Segment.CORE&&(l+=n.BitLength.segmentType),this.fieldSequence[""+i.version][e].forEach((function(t){var e=r.FieldEncoderMap[t],s=n.BitLength[t];if(void 0===s&&o.isPublisherCustom(t)&&(s=+i[a.Fields.numCustomPurposes]),0!==s){var c=d.substr(l,s);if(e===r.VendorVectorEncoder?i[t]=e.decode(c,i.version):i[t]=e.decode(c,s),Number.isInteger(s))l+=s;else{if(!Number.isInteger(i[t].bitLength))throw new h.DecodingError(t);l+=i[t].bitLength}}})),i},t.isPublisherCustom=function(t){return 0===t.indexOf("publisherCustom")},t.fieldSequence=new o.FieldSequence,t}();i.SegmentEncoder=d},818:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(5458),n=e(250),r=function(){function t(){}return t.process=function(t,i){var e,n,r=t.gvl;if(!r)throw new s.EncodingError("Unable to encode TCModel without a GVL");if(!r.isReady)throw new s.EncodingError("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(t=t.clone()).consentLanguage=r.language.toUpperCase(),(null===(e=i)||void 0===e?void 0:e.version)>0&&(null===(n=i)||void 0===n?void 0:n.version)<=this.processor.length?t.version=i.version:t.version=this.processor.length;var o=t.version-1;if(!this.processor[o])throw new s.EncodingError("Invalid version: "+t.version);return this.processor[o](t,r)},t.processor=[function(t){return t},function(t,i){t.publisherRestrictions.gvl=i,t.purposeLegitimateInterests.unset(1);var e=new Map;return e.set("legIntPurposes",t.vendorLegitimateInterests),e.set("purposes",t.vendorConsents),e.forEach((function(e,s){e.forEach((function(r,o){if(r){var h=i.vendors[o];if(!h||h.deletedDate)e.unset(o);else if(0===h[s].length)if("legIntPurposes"===s&&0===h.purposes.length&&0===h.legIntPurposes.length&&h.specialPurposes.length>0);else if(t.isServiceSpecific)if(0===h.flexiblePurposes.length)e.unset(o);else{for(var a=t.publisherRestrictions.getRestrictions(o),c=!1,d=0,l=a.length;d<l&&!c;d++)c=a[d].restrictionType===n.RestrictionType.REQUIRE_CONSENT&&"purposes"===s||a[d].restrictionType===n.RestrictionType.REQUIRE_LI&&"legIntPurposes"===s;c||e.unset(o)}else e.unset(o)}}))})),t.vendorsDisclosed.set(i.vendors),t}],t}();i.SemanticPreEncoder=r},632:(t,i)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var e=function(){function t(){}return t.encode=function(t){return+t+""},t.decode=function(t){return"1"===t},t}();i.BooleanEncoder=e},3101:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(2082),n=e(5458),r=function(){function t(){}return t.encode=function(t,i){return s.IntEncoder.encode(Math.round(t.getTime()/100),i)},t.decode=function(t,i){if(i!==t.length)throw new n.DecodingError("invalid bit length");var e=new Date;return e.setTime(100*s.IntEncoder.decode(t,i)),e},t}();i.DateEncoder=r},286:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(250),n=e(632),r=e(3101),o=e(8937),h=e(2082),a=e(835),c=e(5889),d=e(3283),l=function(){function t(){}var i,e,l,u,p,f,m,v,g,y,b,I,w,_,S,P,A,x,k,T,C,E,M,L,B,O;return i=s.Fields.version,e=s.Fields.created,l=s.Fields.lastUpdated,u=s.Fields.cmpId,p=s.Fields.cmpVersion,f=s.Fields.consentScreen,m=s.Fields.consentLanguage,v=s.Fields.vendorListVersion,g=s.Fields.policyVersion,y=s.Fields.isServiceSpecific,b=s.Fields.useNonStandardStacks,I=s.Fields.specialFeatureOptins,w=s.Fields.purposeConsents,_=s.Fields.purposeLegitimateInterests,S=s.Fields.purposeOneTreatment,P=s.Fields.publisherCountryCode,A=s.Fields.vendorConsents,x=s.Fields.vendorLegitimateInterests,k=s.Fields.publisherRestrictions,T=s.Fields.vendorsDisclosed,C=s.Fields.vendorsAllowed,E=s.Fields.publisherConsents,M=s.Fields.publisherLegitimateInterests,L=s.Fields.numCustomPurposes,B=s.Fields.publisherCustomConsents,O=s.Fields.publisherCustomLegitimateInterests,t[i]=h.IntEncoder,t[e]=r.DateEncoder,t[l]=r.DateEncoder,t[u]=h.IntEncoder,t[p]=h.IntEncoder,t[f]=h.IntEncoder,t[m]=a.LangEncoder,t[v]=h.IntEncoder,t[g]=h.IntEncoder,t[y]=n.BooleanEncoder,t[b]=n.BooleanEncoder,t[I]=o.FixedVectorEncoder,t[w]=o.FixedVectorEncoder,t[_]=o.FixedVectorEncoder,t[S]=n.BooleanEncoder,t[P]=a.LangEncoder,t[A]=d.VendorVectorEncoder,t[x]=d.VendorVectorEncoder,t[k]=c.PurposeRestrictionVectorEncoder,t.segmentType=h.IntEncoder,t[T]=d.VendorVectorEncoder,t[C]=d.VendorVectorEncoder,t[E]=o.FixedVectorEncoder,t[M]=o.FixedVectorEncoder,t[L]=h.IntEncoder,t[B]=o.FixedVectorEncoder,t[O]=o.FixedVectorEncoder,t}();i.FieldEncoderMap=l},8937:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(632),n=e(5458),r=e(250),o=function(){function t(){}return t.encode=function(t,i){for(var e="",n=1;n<=i;n++)e+=s.BooleanEncoder.encode(t.has(n));return e},t.decode=function(t,i){if(t.length!==i)throw new n.DecodingError("bitfield encoding length mismatch");for(var e=new r.Vector,o=1;o<=i;o++)s.BooleanEncoder.decode(t[o-1])&&e.set(o);return e.bitLength=t.length,e},t}();i.FixedVectorEncoder=o},2082:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(5458),n=function(){function t(){}return t.encode=function(t,i){var e;if("string"==typeof t&&(t=parseInt(t,10)),(e=t.toString(2)).length>i||t<0)throw new s.EncodingError(t+" too large to encode into "+i);return e.length<i&&(e="0".repeat(i-e.length)+e),e},t.decode=function(t,i){if(i!==t.length)throw new s.DecodingError("invalid bit length");return parseInt(t,2)},t}();i.IntEncoder=n},835:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(2082),n=e(5458),r=function(){function t(){}return t.encode=function(t,i){var e=(t=t.toUpperCase()).charCodeAt(0)-65,r=t.charCodeAt(1)-65;if(e<0||e>25||r<0||r>25)throw new n.EncodingError("invalid language code: "+t);if(i%2==1)throw new n.EncodingError("numBits must be even, "+i+" is not valid");return i/=2,s.IntEncoder.encode(e,i)+s.IntEncoder.encode(r,i)},t.decode=function(t,i){if(i!==t.length||t.length%2)throw new n.DecodingError("invalid bit length for language");var e=t.length/2,r=s.IntEncoder.decode(t.slice(0,e),e)+65,o=s.IntEncoder.decode(t.slice(e),e)+65;return String.fromCharCode(r)+String.fromCharCode(o)},t}();i.LangEncoder=r},5889:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(2219),n=e(632),r=e(5458),o=e(2082),h=e(250),a=function(){function t(){}return t.encode=function(t){var i=o.IntEncoder.encode(t.numRestrictions,s.BitLength.numRestrictions);return t.isEmpty()||t.getRestrictions().forEach((function(e){i+=o.IntEncoder.encode(e.purposeId,s.BitLength.purposeId),i+=o.IntEncoder.encode(e.restrictionType,s.BitLength.restrictionType);for(var r=t.getVendors(e),h=r.length,a=0,c=0,d="",l=function(i){var e=r[i];0===c&&(a++,c=e);var l=r[h-1],u=t.gvl.vendorIds;if(i===h-1||r[i+1]>function(t){for(;++t<=l&&!u.has(t););return t}(e)){var p=!(e===c);d+=n.BooleanEncoder.encode(p),d+=o.IntEncoder.encode(c,s.BitLength.vendorId),p&&(d+=o.IntEncoder.encode(e,s.BitLength.vendorId)),c=0}},u=0;u<h;u++)l(u);i+=o.IntEncoder.encode(a,s.BitLength.numEntries),i+=d})),i},t.decode=function(t){var i=0,e=new h.PurposeRestrictionVector,a=o.IntEncoder.decode(t.substr(i,s.BitLength.numRestrictions),s.BitLength.numRestrictions);i+=s.BitLength.numRestrictions;for(var c=0;c<a;c++){var d=o.IntEncoder.decode(t.substr(i,s.BitLength.purposeId),s.BitLength.purposeId);i+=s.BitLength.purposeId;var l=o.IntEncoder.decode(t.substr(i,s.BitLength.restrictionType),s.BitLength.restrictionType);i+=s.BitLength.restrictionType;var u=new h.PurposeRestriction(d,l),p=o.IntEncoder.decode(t.substr(i,s.BitLength.numEntries),s.BitLength.numEntries);i+=s.BitLength.numEntries;for(var f=0;f<p;f++){var m=n.BooleanEncoder.decode(t.substr(i,s.BitLength.anyBoolean));i+=s.BitLength.anyBoolean;var v=o.IntEncoder.decode(t.substr(i,s.BitLength.vendorId),s.BitLength.vendorId);if(i+=s.BitLength.vendorId,m){var g=o.IntEncoder.decode(t.substr(i,s.BitLength.vendorId),s.BitLength.vendorId);if(i+=s.BitLength.vendorId,g<v)throw new r.DecodingError("Invalid RangeEntry: endVendorId "+g+" is less than "+v);for(var y=v;y<=g;y++)e.add(y,u)}else e.add(v,u)}}return e.bitLength=i,e},t}();i.PurposeRestrictionVectorEncoder=a},1938:(t,i)=>{"use strict";var e;Object.defineProperty(i,"U",{value:!0}),(e=i.VectorEncodingType||(i.VectorEncodingType={}))[e.FIELD=0]="FIELD",e[e.RANGE=1]="RANGE"},3283:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(250),n=e(7170),r=e(2082),o=e(632),h=e(8937),a=e(1938),c=e(5458),d=function(){function t(){}return t.encode=function(t){var i,e=[],s=[],h=r.IntEncoder.encode(t.maxId,n.BitLength.maxId),c="",d=n.BitLength.maxId+n.BitLength.encodingType,l=d+t.maxId,u=2*n.BitLength.vendorId+n.BitLength.singleOrRange+n.BitLength.numEntries,p=d+n.BitLength.numEntries;return t.forEach((function(r,h){c+=o.BooleanEncoder.encode(r),(i=t.maxId>u&&p<l)&&r&&(t.has(h+1)?0===s.length&&(s.push(h),p+=n.BitLength.singleOrRange,p+=n.BitLength.vendorId):(s.push(h),p+=n.BitLength.vendorId,e.push(s),s=[]))})),i?(h+=a.VectorEncodingType.RANGE+"",h+=this.buildRangeEncoding(e)):(h+=a.VectorEncodingType.FIELD+"",h+=c),h},t.decode=function(t,i){var e,d=0,l=r.IntEncoder.decode(t.substr(d,n.BitLength.maxId),n.BitLength.maxId);d+=n.BitLength.maxId;var u=r.IntEncoder.decode(t.charAt(d),n.BitLength.encodingType);if(d+=n.BitLength.encodingType,u===a.VectorEncodingType.RANGE){if(e=new s.Vector,1===i){if("1"===t.substr(d,1))throw new c.DecodingError("Unable to decode default consent=1");d++}var p=r.IntEncoder.decode(t.substr(d,n.BitLength.numEntries),n.BitLength.numEntries);d+=n.BitLength.numEntries;for(var f=0;f<p;f++){var m=o.BooleanEncoder.decode(t.charAt(d));d+=n.BitLength.singleOrRange;var v=r.IntEncoder.decode(t.substr(d,n.BitLength.vendorId),n.BitLength.vendorId);if(d+=n.BitLength.vendorId,m){var g=r.IntEncoder.decode(t.substr(d,n.BitLength.vendorId),n.BitLength.vendorId);d+=n.BitLength.vendorId;for(var y=v;y<=g;y++)e.set(y)}else e.set(v)}}else{var b=t.substr(d,l);d+=l,e=h.FixedVectorEncoder.decode(b,l)}return e.bitLength=d,e},t.buildRangeEncoding=function(t){var i=t.length,e=r.IntEncoder.encode(i,n.BitLength.numEntries);return t.forEach((function(t){var i=1===t.length;e+=o.BooleanEncoder.encode(!i),e+=r.IntEncoder.encode(t[0],n.BitLength.vendorId),i||(e+=r.IntEncoder.encode(t[1],n.BitLength.vendorId))})),e},t}();i.VendorVectorEncoder=d},9836:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"U",{value:!0}),s(e(632)),s(e(3101)),s(e(286)),s(e(8937)),s(e(2082)),s(e(835)),s(e(5889)),s(e(1938)),s(e(3283))},7170:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"U",{value:!0}),s(e(4479)),s(e(2219)),s(e(3858)),s(e(818)),s(e(9836)),s(e(8780))},4014:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(250);i.FieldSequence=function(){var t,i;this[1]=((t={})[s.Segment.CORE]=[s.Fields.version,s.Fields.created,s.Fields.lastUpdated,s.Fields.cmpId,s.Fields.cmpVersion,s.Fields.consentScreen,s.Fields.consentLanguage,s.Fields.vendorListVersion,s.Fields.purposeConsents,s.Fields.vendorConsents],t),this[2]=((i={})[s.Segment.CORE]=[s.Fields.version,s.Fields.created,s.Fields.lastUpdated,s.Fields.cmpId,s.Fields.cmpVersion,s.Fields.consentScreen,s.Fields.consentLanguage,s.Fields.vendorListVersion,s.Fields.policyVersion,s.Fields.isServiceSpecific,s.Fields.useNonStandardStacks,s.Fields.specialFeatureOptins,s.Fields.purposeConsents,s.Fields.purposeLegitimateInterests,s.Fields.purposeOneTreatment,s.Fields.publisherCountryCode,s.Fields.vendorConsents,s.Fields.vendorLegitimateInterests,s.Fields.publisherRestrictions],i[s.Segment.PUBLISHER_TC]=[s.Fields.publisherConsents,s.Fields.publisherLegitimateInterests,s.Fields.numCustomPurposes,s.Fields.publisherCustomConsents,s.Fields.publisherCustomLegitimateInterests],i[s.Segment.VENDORS_ALLOWED]=[s.Fields.vendorsAllowed],i[s.Segment.VENDORS_DISCLOSED]=[s.Fields.vendorsDisclosed],i)}},1333:(t,i,e)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var s=e(250);i.SegmentSequence=function(t,i){if(this[1]=[s.Segment.CORE],this[2]=[s.Segment.CORE],2===t.version)if(t.isServiceSpecific)this[2].push(s.Segment.PUBLISHER_TC);else{var e=!(!i||!i.isForVendors);e&&!0!==t[s.Fields.supportOOB]||this[2].push(s.Segment.VENDORS_DISCLOSED),e&&(t[s.Fields.supportOOB]&&t[s.Fields.vendorsAllowed].size>0&&this[2].push(s.Segment.VENDORS_ALLOWED),this[2].push(s.Segment.PUBLISHER_TC))}}},8780:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"U",{value:!0}),s(e(4014)),s(e(1333))},1265:function(t,i){"use strict";var e,s=this&&this.W||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(i,"U",{value:!0});var n=function(t){function i(i){var e=t.call(this,i)||this;return e.name="DecodingError",e}return s(i,t),i}(Error);i.DecodingError=n},5181:function(t,i){"use strict";var e,s=this&&this.W||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(i,"U",{value:!0});var n=function(t){function i(i){var e=t.call(this,i)||this;return e.name="EncodingError",e}return s(i,t),i}(Error);i.EncodingError=n},9565:function(t,i){"use strict";var e,s=this&&this.W||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(i,"U",{value:!0});var n=function(t){function i(i){var e=t.call(this,i)||this;return e.name="GVLError",e}return s(i,t),i}(Error);i.GVLError=n},9995:function(t,i){"use strict";var e,s=this&&this.W||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(i,"U",{value:!0});var n=function(t){function i(i,e,s){void 0===s&&(s="");var n=t.call(this,"invalid value "+e+" passed for "+i+" "+s)||this;return n.name="TCModelError",n}return s(i,t),i}(Error);i.TCModelError=n},5458:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"U",{value:!0}),s(e(1265)),s(e(5181)),s(e(9565)),s(e(9995))},5995:function(t,i,e){"use strict";var s,n=this&&this.W||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)});Object.defineProperty(i,"U",{value:!0});var r=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.root=null,i}return n(i,t),i.prototype.isEmpty=function(){return!this.root},i.prototype.add=function(t){var i,e={value:t,left:null,right:null};if(this.isEmpty())this.root=e;else for(i=this.root;;)if(t<i.value){if(null===i.left){i.left=e;break}i=i.left}else{if(!(t>i.value))break;if(null===i.right){i.right=e;break}i=i.right}},i.prototype.get=function(){for(var t=[],i=this.root;i;)if(i.left){for(var e=i.left;e.right&&e.right!=i;)e=e.right;e.right==i?(e.right=null,t.push(i.value),i=i.right):(e.right=i,i=i.left)}else t.push(i.value),i=i.right;return t},i.prototype.contains=function(t){for(var i=!1,e=this.root;e;){if(e.value===t){i=!0;break}t>e.value?e=e.right:t<e.value&&(e=e.left)}return i},i.prototype.min=function(t){var i;for(void 0===t&&(t=this.root);t;)t.left?t=t.left:(i=t.value,t=null);return i},i.prototype.max=function(t){var i;for(void 0===t&&(t=this.root);t;)t.right?t=t.right:(i=t.value,t=null);return i},i.prototype.remove=function(t,i){void 0===i&&(i=this.root);for(var e=null,s="left";i;)if(t<i.value)e=i,i=i.left,s="left";else if(t>i.value)e=i,i=i.right,s="right";else{if(i.left||i.right)if(i.left)if(i.right){var n=this.min(i.right);this.remove(n,i.right),i.value=n}else e?e[s]=i.left:this.root=i.left;else e?e[s]=i.right:this.root=i.right;else e?e[s]=null:this.root=null;i=null}},i}(e(5186).Cloneable);i.BinarySearchTree=r},5301:(t,i)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var e=function(){function t(){}return t.prototype.has=function(i){return t.langSet.has(i)},t.prototype.forEach=function(i){t.langSet.forEach(i)},Object.defineProperty(t.prototype,"size",{get:function(){return t.langSet.size},enumerable:!0,configurable:!0}),t.langSet=new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]),t}();i.ConsentLanguages=e},4243:(t,i)=>{"use strict";var e;Object.defineProperty(i,"U",{value:!0}),(e=i.DeviceDisclosureStorageAccessType||(i.DeviceDisclosureStorageAccessType={})).COOKIE="cookie",e.WEB="web",e.APP="app"},4731:(t,i)=>{"use strict";Object.defineProperty(i,"U",{value:!0});var e=function(){function t(){}return t.cmpId="cmpId",t.cmpVersion="cmpVersion",t.consentLanguage="consentLanguage",t.consentScreen="consentScreen",t.created="created",t.supportOOB="supportOOB",t.isServiceSpecific="isServiceSpecific",t.lastUpdated="lastUpdated",t.numCustomPurposes="numCustomPurposes",t.policyVersion="policyVersion",t.publisherCountryCode="publisherCountryCode",t.publisherCustomConsents="publisherCustomConsents",t.publisherCustomLegitimateInterests="publisherCustomLegitimateInterests",t.publisherLegitimateInterests="publisherLegitimateInterests",t.publisherConsents="publisherConsents",t.publisherRestrictions="publisherRestrictions",t.purposeConsents="purposeConsents",t.purposeLegitimateInterests="purposeLegitimateInterests",t.purposeOneTreatment="purposeOneTreatment",t.specialFeatureOptins="specialFeatureOptins",t.useNonStandardStacks="useNonStandardStacks",t.vendorConsents="vendorConsents",t.vendorLegitimateInterests="vendorLegitimateInterests",t.vendorListVersion="vendorListVersion",t.vendorsAllowed="vendorsAllowed",t.vendorsDisclosed="vendorsDisclosed",t.version="version",t}();i.Fields=e},4649:function(t,i,e){"use strict";var s,n=this&&this.W||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)});Object.defineProperty(i,"U",{value:!0});var r=e(5186),o=e(5458),h=e(2473),a=function(t){function i(i,e){var s=t.call(this)||this;return void 0!==i&&(s.purposeId=i),void 0!==e&&(s.restrictionType=e),s}return n(i,t),i.unHash=function(t){var e=t.split(this.hashSeparator),s=new i;if(2!==e.length)throw new o.TCModelError("hash",t);return s.purposeId=parseInt(e[0],10),s.restrictionType=parseInt(e[1],10),s},Object.defineProperty(i.prototype,"hash",{get:function(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return""+this.purposeId+i.hashSeparator+this.restrictionType},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"purposeId",{get:function(){return this.purposeId_},set:function(t){this.purposeId_=t},enumerable:!0,configurable:!0}),i.prototype.isValid=function(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===h.RestrictionType.NOT_ALLOWED||this.restrictionType===h.RestrictionType.REQUIRE_CONSENT||this.restrictionType===h.RestrictionType.REQUIRE_LI)},i.prototype.isSameAs=function(t){return this.purposeId===t.purposeId&&this.restrictionType===t.restrictionType},i.hashSeparator="-",i}(r.Cloneable);i.PurposeRestriction=a},7096:function(t,i,e){"use strict";var s,n=this&&this.W||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}),r=this&&this.R||function(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(i,"U",{value:!0});var o=e(4649),h=e(5995),a=e(2473),c=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.bitLength=0,i.map=new Map,i}return n(i,t),i.prototype.has=function(t){return this.map.has(t)},i.prototype.isOkToHave=function(t,i,e){var s,n=!0;if(null===(s=this.gvl)||void 0===s?void 0:s.vendors){var r=this.gvl.vendors[e];if(r)if(t===a.RestrictionType.NOT_ALLOWED)n=r.legIntPurposes.includes(i)||r.purposes.includes(i);else if(r.flexiblePurposes.length)switch(t){case a.RestrictionType.REQUIRE_CONSENT:n=r.flexiblePurposes.includes(i)&&r.legIntPurposes.includes(i);break;case a.RestrictionType.REQUIRE_LI:n=r.flexiblePurposes.includes(i)&&r.purposes.includes(i)}else n=!1;else n=!1}return n},i.prototype.add=function(t,i){if(this.isOkToHave(i.restrictionType,i.purposeId,t)){var e=i.hash;this.has(e)||(this.map.set(e,new h.BinarySearchTree),this.bitLength=0),this.map.get(e).add(t)}},i.prototype.restrictPurposeToLegalBasis=function(t){for(var i=this.gvl.vendorIds,e=t.hash,s=function(){var t,e,s;try{for(var n=r(i),o=n.next();!o.done;o=n.next())s=o.value}catch(i){t={error:i}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return s}(),n=1;n<=s;n++)this.has(e)||(this.map.set(e,new h.BinarySearchTree),this.bitLength=0),this.map.get(e).add(n)},i.prototype.getVendors=function(t){var i=[];if(t){var e=t.hash;this.has(e)&&(i=this.map.get(e).get())}else{var s=new Set;this.map.forEach((function(t){t.get().forEach((function(t){s.add(t)}))})),i=Array.from(s)}return i},i.prototype.getRestrictionType=function(t,i){var e;return this.getRestrictions(t).forEach((function(t){t.purposeId===i&&(void 0===e||e>t.restrictionType)&&(e=t.restrictionType)})),e},i.prototype.vendorHasRestriction=function(t,i){for(var e=!1,s=this.getRestrictions(t),n=0;n<s.length&&!e;n++)e=i.isSameAs(s[n]);return e},i.prototype.getMaxVendorId=function(){var t=0;return this.map.forEach((function(i){t=Math.max(i.max(),t)})),t},i.prototype.getRestrictions=function(t){var i=[];return this.map.forEach((function(e,s){t?e.contains(t)&&i.push(o.PurposeRestriction.unHash(s)):i.push(o.PurposeRestriction.unHash(s))})),i},i.prototype.getPurposes=function(){var t=new Set;return this.map.forEach((function(i,e){t.add(o.PurposeRestriction.unHash(e).purposeId)})),Array.from(t)},i.prototype.remove=function(t,i){var e=i.hash,s=this.map.get(e);s&&(s.remove(t),s.isEmpty()&&(this.map.delete(e),this.bitLength=0))},Object.defineProperty(i.prototype,"gvl",{get:function(){return this.gvl_},set:function(t){var i=this;this.gvl_||(this.gvl_=t,this.map.forEach((function(t,e){var s=o.PurposeRestriction.unHash(e);t.get().forEach((function(e){i.isOkToHave(s.restrictionType,s.purposeId,e)||t.remove(e)}))})))},enumerable:!0,configurable:!0}),i.prototype.isEmpty=function(){return 0===this.map.size},Object.defineProperty(i.prototype,"numRestrictions",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),i}(e(5186).Cloneable);i.PurposeRestrictionVector=c},2473:(t,i)=>{"use strict";var e;Object.defineProperty(i,"U",{value:!0}),(e=i.RestrictionType||(i.RestrictionType={}))[e.NOT_ALLOWED=0]="NOT_ALLOWED",e[e.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",e[e.REQUIRE_LI=2]="REQUIRE_LI"},4858:(t,i)=>{"use strict";var e;Object.defineProperty(i,"U",{value:!0}),(e=i.Segment||(i.Segment={})).CORE="core",e.VENDORS_DISCLOSED="vendorsDisclosed",e.VENDORS_ALLOWED="vendorsAllowed",e.PUBLISHER_TC="publisherTC"},6130:(t,i,e)=>{"use strict";var s;Object.defineProperty(i,"U",{value:!0});var n=e(4858),r=function(){function t(){}return t.ID_TO_KEY=[n.Segment.CORE,n.Segment.VENDORS_DISCLOSED,n.Segment.VENDORS_ALLOWED,n.Segment.PUBLISHER_TC],t.KEY_TO_ID=((s={})[n.Segment.CORE]=0,s[n.Segment.VENDORS_DISCLOSED]=1,s[n.Segment.VENDORS_ALLOWED]=2,s[n.Segment.PUBLISHER_TC]=3,s),t}();i.SegmentIDs=r},6315:function(t,i,e){"use strict";var s,n=this&&this.W||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}),r=this&&this.tt||function(t,i){var e,s,n,r,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:h(0),throw:h(1),return:h(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function h(r){return function(h){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,s=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!(n=(n=o.trys).length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){o=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){o.label=r[1];break}if(6===r[0]&&o.label<n[1]){o.label=n[1],n=r;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(r);break}n[2]&&o.ops.pop(),o.trys.pop();continue}r=i.call(t,o)}catch(t){r=[6,t],s=0}finally{e=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,h])}}};Object.defineProperty(i,"U",{value:!0});var o=e(5186),h=e(5458),a=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.bitLength=0,i.maxId_=0,i.set_=new Set,i}return n(i,t),i.prototype[Symbol.iterator]=function(){var t;return r(this,(function(i){switch(i.label){case 0:t=1,i.label=1;case 1:return t<=this.maxId?[4,[t,this.has(t)]]:[3,4];case 2:i.sent(),i.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.values=function(){return this.set_.values()},Object.defineProperty(i.prototype,"maxId",{get:function(){return this.maxId_},enumerable:!0,configurable:!0}),i.prototype.has=function(t){return this.set_.has(t)},i.prototype.unset=function(t){var i=this;Array.isArray(t)?t.forEach((function(t){return i.unset(t)})):"object"==typeof t?this.unset(Object.keys(t).map((function(t){return+t}))):(this.set_.delete(t),this.bitLength=0,t===this.maxId&&(this.maxId_=0,this.set_.forEach((function(t){i.maxId_=Math.max(i.maxId,t)}))))},i.prototype.isIntMap=function(t){var i=this,e="object"==typeof t;return e&&Object.keys(t).every((function(e){var s=Number.isInteger(parseInt(e,10));return(s=s&&i.isValidNumber(t[e].id))&&void 0!==t[e].name}))},i.prototype.isValidNumber=function(t){return parseInt(t,10)>0},i.prototype.isSet=function(t){var i=!1;return t instanceof Set&&(i=Array.from(t).every(this.isValidNumber)),i},i.prototype.set=function(t){var i=this;if(Array.isArray(t))t.forEach((function(t){return i.set(t)}));else if(this.isSet(t))this.set(Array.from(t));else if(this.isIntMap(t))this.set(Object.keys(t).map((function(t){return+t})));else{if(!this.isValidNumber(t))throw new h.TCModelError("set()",t,"must be positive integer array, positive integer, Set<number>, or IntMap");this.set_.add(t),this.maxId_=Math.max(this.maxId,t),this.bitLength=0}},i.prototype.empty=function(){this.set_=new Set},i.prototype.forEach=function(t){for(var i=1;i<=this.maxId;i++)t(this.has(i),i)},Object.defineProperty(i.prototype,"size",{get:function(){return this.set_.size},enumerable:!0,configurable:!0}),i.prototype.setAll=function(t){this.set(t)},i}(o.Cloneable);i.Vector=a},250:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"U",{value:!0}),s(e(5995)),s(e(5301)),s(e(4731)),s(e(4649)),s(e(7096)),s(e(4243)),s(e(2473)),s(e(4858)),s(e(6130)),s(e(6315))},4537:t=>{"use strict";t.exports=function(t,i){var e=new Array(arguments.length-1),s=0,n=2,r=!0;for(;n<arguments.length;)e[s++]=arguments[n++];return new Promise((function(n,o){e[s]=function(t){if(r)if(r=!1,t)o(t);else{for(var i=new Array(arguments.length-1),e=0;e<i.length;)i[e++]=arguments[e];n.apply(null,i)}};try{t.apply(i||null,e)}catch(t){r&&(r=!1,o(t))}}))}},7419:(t,i)=>{"use strict";var e=i;e.length=function(t){var i=t.length;if(!i)return 0;for(var e=0;--i%4>1&&"="===t.charAt(i);)++e;return Math.ceil(3*t.length)/4-e};for(var s=new Array(64),n=new Array(123),r=0;r<64;)n[s[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;e.encode=function(t,i,e){for(var n,r=null,o=[],h=0,a=0;i<e;){var c=t[i++];switch(a){case 0:o[h++]=s[c>>2],n=(3&c)<<4,a=1;break;case 1:o[h++]=s[n|c>>4],n=(15&c)<<2,a=2;break;case 2:o[h++]=s[n|c>>6],o[h++]=s[63&c],a=0}h>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),h=0)}return a&&(o[h++]=s[n],o[h++]=61,1===a&&(o[h++]=61)),r?(h&&r.push(String.fromCharCode.apply(String,o.slice(0,h))),r.join("")):String.fromCharCode.apply(String,o.slice(0,h))};var o="invalid encoding";e.decode=function(t,i,e){for(var s,r=e,h=0,a=0;a<t.length;){var c=t.charCodeAt(a++);if(61===c&&h>1)break;if(void 0===(c=n[c]))throw Error(o);switch(h){case 0:s=c,h=1;break;case 1:i[e++]=s<<2|(48&c)>>4,s=c,h=2;break;case 2:i[e++]=(15&s)<<4|(60&c)>>2,s=c,h=3;break;case 3:i[e++]=(3&s)<<6|c,h=0}}if(1===h)throw Error(o);return e-r},e.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},5124:t=>{"use strict";function i(t,e){"string"==typeof t&&(e=t,t=void 0);var s=[];function n(t){if("string"!=typeof t){var e=r();if(i.verbose&&console.log("codegen: "+e),e="return "+e,t){for(var o=Object.keys(t),h=new Array(o.length+1),a=new Array(o.length),c=0;c<o.length;)h[c]=o[c],a[c]=t[o[c++]];return h[c]=e,Function.apply(null,h).apply(null,a)}return Function(e)()}for(var d=new Array(arguments.length-1),l=0;l<d.length;)d[l]=arguments[++l];if(l=0,t=t.replace(/%([%dfijs])/g,(function(t,i){var e=d[l++];switch(i){case"d":case"f":return String(Number(e));case"i":return String(Math.floor(e));case"j":return JSON.stringify(e);case"s":return String(e)}return"%"})),l!==d.length)throw Error("parameter count mismatch");return s.push(t),n}function r(i){return"function "+(i||e||"")+"("+(t&&t.join(",")||"")+"){\n  "+s.join("\n  ")+"\n}"}return n.toString=r,n}t.exports=i,i.verbose=!1},9211:t=>{"use strict";function i(){this.it={}}t.exports=i,i.prototype.on=function(t,i,e){return(this.it[t]||(this.it[t]=[])).push({fn:i,ctx:e||this}),this},i.prototype.off=function(t,i){if(void 0===t)this.it={};else if(void 0===i)this.it[t]=[];else for(var e=this.it[t],s=0;s<e.length;)e[s].fn===i?e.splice(s,1):++s;return this},i.prototype.emit=function(t){var i=this.it[t];if(i){for(var e=[],s=1;s<arguments.length;)e.push(arguments[s++]);for(s=0;s<i.length;)i[s].fn.apply(i[s++].ctx,e)}return this}},9054:(t,i,e)=>{"use strict";t.exports=r;var s=e(4537),n=e(7199)("fs");function r(t,i,e){return"function"==typeof i?(e=i,i={}):i||(i={}),e?!i.xhr&&n&&n.readFile?n.readFile(t,(function(s,n){return s&&"undefined"!=typeof XMLHttpRequest?r.xhr(t,i,e):s?e(s):e(null,i.binary?n:n.toString("utf8"))})):r.xhr(t,i,e):s(r,this,t,i)}r.xhr=function(t,i,e){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState){if(0!==s.status&&200!==s.status)return e(Error("status "+s.status));if(i.binary){var t=s.response;if(!t){t=[];for(var n=0;n<s.responseText.length;++n)t.push(255&s.responseText.charCodeAt(n))}return e(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return e(null,s.responseText)}},i.binary&&("overrideMimeType"in s&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.responseType="arraybuffer"),s.open("GET",t),s.send()}},945:t=>{"use strict";function i(t){return"undefined"!=typeof Float32Array?function(){var i=new Float32Array([-0]),e=new Uint8Array(i.buffer),s=128===e[3];function n(t,s,n){i[0]=t,s[n]=e[0],s[n+1]=e[1],s[n+2]=e[2],s[n+3]=e[3]}function r(t,s,n){i[0]=t,s[n]=e[3],s[n+1]=e[2],s[n+2]=e[1],s[n+3]=e[0]}function o(t,s){return e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],i[0]}function h(t,s){return e[3]=t[s],e[2]=t[s+1],e[1]=t[s+2],e[0]=t[s+3],i[0]}t.writeFloatLE=s?n:r,t.writeFloatBE=s?r:n,t.readFloatLE=s?o:h,t.readFloatBE=s?h:o}():function(){function i(t,i,e,s){var n=i<0?1:0;if(n&&(i=-i),0===i)t(1/i>0?0:2147483648,e,s);else if(isNaN(i))t(2143289344,e,s);else if(i>34028234663852886e22)t((n<<31|2139095040)>>>0,e,s);else if(i<11754943508222875e-54)t((n<<31|Math.round(i/1401298464324817e-60))>>>0,e,s);else{var r=Math.floor(Math.log(i)/Math.LN2);t((n<<31|r+127<<23|8388607&Math.round(i*Math.pow(2,-r)*8388608))>>>0,e,s)}}function o(t,i,e){var s=t(i,e),n=2*(s>>31)+1,r=s>>>23&255,o=8388607&s;return 255===r?o?NaN:n*(1/0):0===r?1401298464324817e-60*n*o:n*Math.pow(2,r-150)*(o+8388608)}t.writeFloatLE=i.bind(null,e),t.writeFloatBE=i.bind(null,s),t.readFloatLE=o.bind(null,n),t.readFloatBE=o.bind(null,r)}(),"undefined"!=typeof Float64Array?function(){var i=new Float64Array([-0]),e=new Uint8Array(i.buffer),s=128===e[7];function n(t,s,n){i[0]=t,s[n]=e[0],s[n+1]=e[1],s[n+2]=e[2],s[n+3]=e[3],s[n+4]=e[4],s[n+5]=e[5],s[n+6]=e[6],s[n+7]=e[7]}function r(t,s,n){i[0]=t,s[n]=e[7],s[n+1]=e[6],s[n+2]=e[5],s[n+3]=e[4],s[n+4]=e[3],s[n+5]=e[2],s[n+6]=e[1],s[n+7]=e[0]}function o(t,s){return e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],e[4]=t[s+4],e[5]=t[s+5],e[6]=t[s+6],e[7]=t[s+7],i[0]}function h(t,s){return e[7]=t[s],e[6]=t[s+1],e[5]=t[s+2],e[4]=t[s+3],e[3]=t[s+4],e[2]=t[s+5],e[1]=t[s+6],e[0]=t[s+7],i[0]}t.writeDoubleLE=s?n:r,t.writeDoubleBE=s?r:n,t.readDoubleLE=s?o:h,t.readDoubleBE=s?h:o}():function(){function i(t,i,e,s,n,r){var o=s<0?1:0;if(o&&(s=-s),0===s)t(0,n,r+i),t(1/s>0?0:2147483648,n,r+e);else if(isNaN(s))t(0,n,r+i),t(2146959360,n,r+e);else if(s>17976931348623157e292)t(0,n,r+i),t((o<<31|2146435072)>>>0,n,r+e);else{var h;if(s<22250738585072014e-324)t((h=s/5e-324)>>>0,n,r+i),t((o<<31|h/4294967296)>>>0,n,r+e);else{var a=Math.floor(Math.log(s)/Math.LN2);1024===a&&(a=1023),t(4503599627370496*(h=s*Math.pow(2,-a))>>>0,n,r+i),t((o<<31|a+1023<<20|1048576*h&1048575)>>>0,n,r+e)}}}function o(t,i,e,s,n){var r=t(s,n+i),o=t(s,n+e),h=2*(o>>31)+1,a=o>>>20&2047,c=4294967296*(1048575&o)+r;return 2047===a?c?NaN:h*(1/0):0===a?5e-324*h*c:h*Math.pow(2,a-1075)*(c+4503599627370496)}t.writeDoubleLE=i.bind(null,e,0,4),t.writeDoubleBE=i.bind(null,s,4,0),t.readDoubleLE=o.bind(null,n,0,4),t.readDoubleBE=o.bind(null,r,4,0)}(),t}function e(t,i,e){i[e]=255&t,i[e+1]=t>>>8&255,i[e+2]=t>>>16&255,i[e+3]=t>>>24}function s(t,i,e){i[e]=t>>>24,i[e+1]=t>>>16&255,i[e+2]=t>>>8&255,i[e+3]=255&t}function n(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function r(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}t.exports=i(i)},7199:t=>{"use strict";function i(t){try{var i=eval("quire".replace(/^/,"re"))(t);if(i&&(i.length||Object.keys(i).length))return i}catch(t){}return null}t.exports=i},8626:(t,i)=>{"use strict";var e=i,s=e.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},n=e.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),e=s(t),n="";e&&(n=i.shift()+"/");for(var r=0;r<i.length;)".."===i[r]?r>0&&".."!==i[r-1]?i.splice(--r,2):e?i.splice(r,1):++r:"."===i[r]?i.splice(r,1):++r;return n+i.join("/")};e.resolve=function(t,i,e){return e||(i=n(i)),s(i)?i:(e||(t=n(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?n(t+"/"+i):i)}},6662:t=>{"use strict";t.exports=function(t,i,e){var s=e||8192,n=s>>>1,r=null,o=s;return function(e){if(e<1||e>n)return t(e);o+e>s&&(r=t(s),o=0);var h=i.call(r,o,o+=e);return 7&o&&(o=1+(7|o)),h}}},4997:(t,i)=>{"use strict";var e=i;e.length=function(t){for(var i=0,e=0,s=0;s<t.length;++s)(e=t.charCodeAt(s))<128?i+=1:e<2048?i+=2:55296==(64512&e)&&56320==(64512&t.charCodeAt(s+1))?(++s,i+=4):i+=3;return i},e.read=function(t,i,e){if(e-i<1)return"";for(var s,n=null,r=[],o=0;i<e;)(s=t[i++])<128?r[o++]=s:s>191&&s<224?r[o++]=(31&s)<<6|63&t[i++]:s>239&&s<365?(s=((7&s)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536,r[o++]=55296+(s>>10),r[o++]=56320+(1023&s)):r[o++]=(15&s)<<12|(63&t[i++])<<6|63&t[i++],o>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,r)),o=0);return n?(o&&n.push(String.fromCharCode.apply(String,r.slice(0,o))),n.join("")):String.fromCharCode.apply(String,r.slice(0,o))},e.write=function(t,i,e){for(var s,n,r=e,o=0;o<t.length;++o)(s=t.charCodeAt(o))<128?i[e++]=s:s<2048?(i[e++]=s>>6|192,i[e++]=63&s|128):55296==(64512&s)&&56320==(64512&(n=t.charCodeAt(o+1)))?(s=65536+((1023&s)<<10)+(1023&n),++o,i[e++]=s>>18|240,i[e++]=s>>12&63|128,i[e++]=s>>6&63|128,i[e++]=63&s|128):(i[e++]=s>>12|224,i[e++]=s>>6&63|128,i[e++]=63&s|128);return e-r}},7501:function(t,i,e){var s;t=e.nmd(t),function(n){var r=i,o=(t&&t.exports,"object"==typeof e.g&&e.g);o.global!==o&&o.window;var h=function(t){this.message=t};(h.prototype=new Error).name="InvalidCharacterError";var a=function(t){throw new h(t)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,l={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var i,e,s,n,r=t.length%3,o="",h=-1,d=t.length-r;++h<d;)i=t.charCodeAt(h)<<16,e=t.charCodeAt(++h)<<8,s=t.charCodeAt(++h),o+=c.charAt((n=i+e+s)>>18&63)+c.charAt(n>>12&63)+c.charAt(n>>6&63)+c.charAt(63&n);return 2==r?(i=t.charCodeAt(h)<<8,e=t.charCodeAt(++h),o+=c.charAt((n=i+e)>>10)+c.charAt(n>>4&63)+c.charAt(n<<2&63)+"="):1==r&&(n=t.charCodeAt(h),o+=c.charAt(n>>2)+c.charAt(n<<4&63)+"=="),o},decode:function(t){var i=(t=String(t).replace(d,"")).length;i%4==0&&(i=(t=t.replace(/==?$/,"")).length),(i%4==1||/[^+a-zA-Z0-9/]/.test(t))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var e,s,n=0,r="",o=-1;++o<i;)s=c.indexOf(t.charAt(o)),e=n%4?64*e+s:s,n++%4&&(r+=String.fromCharCode(255&e>>(-2*n&6)));return r},version:"0.1.0"};void 0===(s=function(){return l}.call(i,e,i,t))||(t.exports=s)}()},6658:(t,i,e)=>{"use strict";var s=e(3090),n=s.decodeBitsToIds,r=s.decodeFromBase64;t.exports={decodeConsentString:function(t){var i=r(t),e=i.version,s=i.cmpId,o=i.vendorListVersion,h=i.purposeIdBitString,a=i.maxVendorId,c=i.created,d=i.lastUpdated,l=i.isRange,u=i.defaultConsent,p=i.vendorIdBitString,f=i.vendorRangeList,m=i.cmpVersion,v=i.consentScreen,g=i.consentLanguage,y={version:e,cmpId:s,vendorListVersion:o,allowedPurposeIds:n(h),maxVendorId:a,created:c,lastUpdated:d,cmpVersion:m,consentScreen:v,consentLanguage:g};if(l){var b=f.reduce((function(t,i){for(var e=i.isRange,s=i.startVendorId,n=i.endVendorId,r=e?n:s,o=s;o<=r;o+=1)t[o]=!0;return t}),{});y.allowedVendorIds=[];for(var I=1;I<=a;I+=1)(u&&!b[I]||!u&&b[I])&&-1===y.allowedVendorIds.indexOf(I)&&y.allowedVendorIds.push(I)}else y.allowedVendorIds=n(p);return y}}},8462:(t,i,e)=>{"use strict";var s=e(6658).decodeConsentString;t.exports={decodeConsentString:s}},3090:(t,i,e)=>{"use strict";var s=e(7501),n=e(3977),r=n.versionNumBits,o=n.vendorVersionMap;function h(t,i,e){return parseInt(t.substr(i,e),2)}function a(t,i,e){return new Date(100*h(t,i,e))}function c(t){var i=h(t);return String.fromCharCode(i+65).toLowerCase()}function d(t,i,e){var s=t.substr(i,e);return c(s.slice(0,e/2))+c(s.slice(e/2))}function l(t){var i=t.input,e=t.output,s=t.startPosition,n=t.field,r=n.type,o=n.numBits,c=n.decoder,l=n.validator,p=n.listCount;if("function"==typeof l&&!l(e))return{newPosition:s};if("function"==typeof c)return c(i,e,s);var f,m,v="function"==typeof o?o(e):o;switch(r){case"int":return{fieldValue:h(i,s,v)};case"bool":return{fieldValue:(f=i,m=s,1===parseInt(f.substr(m,1),2))};case"date":return{fieldValue:a(i,s,v)};case"bits":return{fieldValue:i.substr(s,v)};case"list":return function(t,i,e,s,n){var r=0;"function"==typeof n?r=n(i):"number"==typeof n&&(r=n);for(var o=e,h=[],a=0;a<r;a+=1){var c=u({input:t,fields:s.fields,startPosition:o});o=c.newPosition,h.push(c.decodedObject)}return{fieldValue:h,newPosition:o}}(i,e,s,n,p);case"language":return{fieldValue:d(i,s,v)};default:throw new Error("ConsentString - Unknown field type "+r+" for decoding")}}function u(t){var i=t.input,e=t.fields,s=t.startPosition,n=void 0===s?0:s;return{decodedObject:e.reduce((function(t,e){var s=e.name,r=e.numBits,o=l({input:i,output:t,startPosition:n,field:e}),h=o.fieldValue,a=o.newPosition;return void 0!==h&&(t[s]=h),void 0!==a?n=a:"number"==typeof r&&(n+=r),t}),{}),newPosition:n}}t.exports={decodeBitsToIds:function(t){return t.split("").reduce((function(t,i,e){return"1"===i&&-1===t.indexOf(e+1)&&t.push(e+1),t}),[])},decodeFromBase64:function(t,i){for(var e=t;e.length%4!=0;)e+="=";e=e.replace(/-/g,"+").replace(/_/g,"/");for(var n,a,c=s.decode(e),d="",l=0;l<c.length;l+=1){var p=c.charCodeAt(l).toString(2);d+=(n=p,a=8-p.length,function(t){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0",e="",s=0;s<t;s+=1)e+=i;return e}(Math.max(0,a))+n)}return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,e=h(t,0,r);if("number"!=typeof e)throw new Error("ConsentString - Unknown version number in the string to decode");if(!o[e])throw new Error("ConsentString - Unsupported version "+e+" in the string to decode");var s=i[e].fields;return u({input:t,fields:s}).decodedObject}(d,i)}}},3977:t=>{"use strict";t.exports={versionNumBits:6,vendorVersionMap:{1:{version:1,metadataFields:["version","created","lastUpdated","cmpId","cmpVersion","consentScreen","vendorListVersion"],fields:[{name:"version",type:"int",numBits:6},{name:"created",type:"date",numBits:36},{name:"lastUpdated",type:"date",numBits:36},{name:"cmpId",type:"int",numBits:12},{name:"cmpVersion",type:"int",numBits:12},{name:"consentScreen",type:"int",numBits:6},{name:"consentLanguage",type:"language",numBits:12},{name:"vendorListVersion",type:"int",numBits:12},{name:"purposeIdBitString",type:"bits",numBits:24},{name:"maxVendorId",type:"int",numBits:16},{name:"isRange",type:"bool",numBits:1},{name:"vendorIdBitString",type:"bits",numBits:function(t){return t.maxVendorId},validator:function(t){return!t.isRange}},{name:"defaultConsent",type:"bool",numBits:1,validator:function(t){return t.isRange}},{name:"numEntries",numBits:12,type:"int",validator:function(t){return t.isRange}},{name:"vendorRangeList",type:"list",listCount:function(t){return t.numEntries},validator:function(t){return t.isRange},fields:[{name:"isRange",type:"bool",numBits:1},{name:"startVendorId",type:"int",numBits:16},{name:"endVendorId",type:"int",numBits:16,validator:function(t){return t.isRange}}]}]}}}},3225:(t,i,e)=>{"use strict";e.d(i,{Z:()=>s});const s='<cnx class="cnx-icon-button cnx-ui-btn-hoverable" role="button" tabindex="0"><cnx class="cnx-btn-container"><cnx class="cnx-expand-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.6 3H10v2H5v5H3V4.6A1.58 1.58 0 014.6 3zM5 14v5h5v2H4.6A1.58 1.58 0 013 19.4V14h2zM19.4 3A1.58 1.58 0 0121 4.6V10h-2V5h-5V3h5.4zM19 14h2v5.4a1.58 1.58 0 01-1.6 1.6H14v-2h5v-5z" fill-rule="evenodd"/></svg></cnx><cnx class="cnx-collapse-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill-rule="evenodd"><path d="M16.6 15a1.58 1.58 0 00-1.6 1.6V22h2v-5h5v-2h-5.4zM17 2h-2v5.4A1.58 1.58 0 0016.6 9H22V7h-5V2zM7.4 15A1.58 1.58 0 019 16.6V22H7v-5H2v-2h5.4zM7 2h2v5.4A1.58 1.58 0 017.4 9H2V7h5V2z"/></svg></cnx></cnx></cnx>'},852:(t,i,e)=>{"use strict";e.d(i,{Z:()=>s});const s='<cnx class="cnx-ui-loader" role="presentation"><svg class="cnx-color-accent" version="1.1" viewBox="0 0 79 90" xmlns="http://www.w3.org/2000/svg"><polygon points="21 73.322 11 79 11 12 21 17.678" fill="none" stroke-linecap="round" stroke-linejoin="round"/><polygon points="27 70 27 21 38 27.267 38 63.733" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><polygon points="44 61 44 31 54 36.769 54 55.231" fill="none" stroke-linecap="round" stroke-linejoin="round"/><polygon points="60 51 60 40 70 45.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg></cnx>'},9735:(t,i,e)=>{"use strict";e.d(i,{Z:()=>s});const s='<cnx class="cnx-progress-bar cnx-video-progress"><cnx class="cnx-progress-rail-container"><cnx class="cnx-progress-rail"></cnx><cnx class="cnx-progress-fill cnx-color-accent"></cnx><cnx class="cnx-progress-follow"></cnx></cnx><cnx class="cnx-progress-handle cnx-color-accent"></cnx><cnx class="cnx-progress-hitarea"></cnx></cnx>'},9268:(t,i,e)=>{"use strict";e.d(i,{Z:()=>s});const s='<cnx class="cnx-ui-progress-label"><cnx-span role="timer"></cnx-span></cnx>'},3093:(t,i,e)=>{"use strict";e.d(i,{Z:()=>s});const s='<cnx class="cnx-tooltip-holder cnx-color-tt-bg"><cnx class="cnx-tooltip-text cnx-color-tt-text">TEST</cnx></cnx>'},2390:(t,i,e)=>{"use strict";e.d(i,{Z:()=>s});const s='<cnx class="cnx-icon-button cnx-ui-btn-hoverable" role="button" tabindex="0"><cnx class="cnx-btn-container"><cnx class="cnx-unmute-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 7.913v7.913h4.946l5.935 5.045V1.978L4.946 7.913zm16.815 3.957a5.476 5.476 0 00-2.967-4.946v9.9a5.475 5.475 0 002.967-4.945zM13.848 0v2.077a10.39 10.39 0 010 19.585v2.077a12.05 12.05 0 008.9-11.87A12.05 12.05 0 0013.848 0z"/></svg></cnx><cnx class="cnx-mute-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 2L8.25 4.25 11 7zM0 7v9h5l6 5v-6.5L3.85 7zm17 4.5c0-1.965-1.2-3.735-3-4.5v3l2.8 2.8a3.73 3.73 0 00.2-1.3zm3.4 7.45l-1.85-1.85-2.65-2.6-1.9-1.95-3-3-4.15-4.1-4.95-5L1.45 0 0 1.45 17.15 18.6 19 20.4l3.55 3.6L24 22.55zM14 23a11.83 11.83 0 003.65-1.55l-1.25-1.3c-.747.498-1.553.902-2.4 1.2V23zm9-11.5A11.77 11.77 0 0014 0v1.6A10.53 10.53 0 0120 16l1.45 1.45A11.99 11.99 0 0023 11.5z"/></svg></cnx></cnx></cnx>'},5616:(t,i,e)=>{"use strict";e.d(i,{Z:()=>s});const s='<cnx class="cnx-progress-bar"><cnx class="cnx-progress-rail-container"><cnx class="cnx-progress-rail"></cnx><cnx class="cnx-progress-fill cnx-color-icon"></cnx></cnx><cnx class="cnx-progress-handle cnx-color-icon"></cnx></cnx>'},4492:(t,i,e)=>{"use strict";t.exports=e(8836)},3996:(t,i,e)=>{"use strict";var s=i,n=e(7025),r=e(9935);function o(t,i,e,s){if(i.resolvedType)if(i.resolvedType instanceof n){t("switch(d%s){",s);for(var r=i.resolvedType.values,o=Object.keys(r),h=0;h<o.length;++h)i.repeated&&r[o[h]]===i.typeDefault&&t("default:"),t("case%j:",o[h])("case %i:",r[o[h]])("m%s=%j",s,r[o[h]])("break");t("}")}else t('if(typeof d%s!=="object")',s)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",s,e,s);else{var a=!1;switch(i.type){case"double":case"float":t("m%s=Number(d%s)",s,s);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",s,s);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",s,s);break;case"uint64":a=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",s,s,a)('else if(typeof d%s==="string")',s)("m%s=parseInt(d%s,10)",s,s)('else if(typeof d%s==="number")',s)("m%s=d%s",s,s)('else if(typeof d%s==="object")',s)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",s,s,s,a?"true":"");break;case"bytes":t('if(typeof d%s==="string")',s)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",s,s,s)("else if(d%s.length)",s)("m%s=d%s",s,s);break;case"string":t("m%s=String(d%s)",s,s);break;case"bool":t("m%s=Boolean(d%s)",s,s)}}return t}function h(t,i,e,s){if(i.resolvedType)i.resolvedType instanceof n?t("d%s=o.enums===String?types[%i].values[m%s]:m%s",s,e,s,s):t("d%s=types[%i].toObject(m%s,o)",s,e,s);else{var r=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",s,s,s,s);break;case"uint64":r=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',s)("d%s=o.longs===String?String(m%s):m%s",s,s,s)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",s,s,s,s,r?"true":"",s);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",s,s,s,s,s);break;default:t("d%s=m%s",s,s)}}return t}s.fromObject=function(t){var i=t.fieldsArray,e=r.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!i.length)return e("return new this.ctor");e("var m=new this.ctor");for(var s=0;s<i.length;++s){var h=i[s].resolve(),a=r.safeProp(h.name);h.map?(e("if(d%s){",a)('if(typeof d%s!=="object")',a)("throw TypeError(%j)",h.fullName+": object expected")("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),o(e,h,s,a+"[ks[i]]")("}")("}")):h.repeated?(e("if(d%s){",a)("if(!Array.isArray(d%s))",a)("throw TypeError(%j)",h.fullName+": array expected")("m%s=[]",a)("for(var i=0;i<d%s.length;++i){",a),o(e,h,s,a+"[i]")("}")("}")):(h.resolvedType instanceof n||e("if(d%s!=null){",a),o(e,h,s,a),h.resolvedType instanceof n||e("}"))}return e("return m")},s.toObject=function(t){var i=t.fieldsArray.slice().sort(r.compareFieldsById);if(!i.length)return r.codegen()("return {}");for(var e=r.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),s=[],o=[],a=[],c=0;c<i.length;++c)i[c].partOf||(i[c].resolve().repeated?s:i[c].map?o:a).push(i[c]);if(s.length){for(e("if(o.arrays||o.defaults){"),c=0;c<s.length;++c)e("d%s=[]",r.safeProp(s[c].name));e("}")}if(o.length){for(e("if(o.objects||o.defaults){"),c=0;c<o.length;++c)e("d%s={}",r.safeProp(o[c].name));e("}")}if(a.length){for(e("if(o.defaults){"),c=0;c<a.length;++c){var d=a[c],l=r.safeProp(d.name);if(d.resolvedType instanceof n)e("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)e("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var u="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";e("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,u)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else e("d%s=%j",l,d.typeDefault)}e("}")}var p=!1;for(c=0;c<i.length;++c){d=i[c];var f=t.et.indexOf(d);l=r.safeProp(d.name);d.map?(p||(p=!0,e("var ks2")),e("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),h(e,d,f,l+"[ks2[j]]")("}")):d.repeated?(e("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),h(e,d,f,l+"[j]")("}")):(e("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),h(e,d,f,l),d.partOf&&e("if(o.oneofs)")("d%s=%j",r.safeProp(d.partOf.name),d.name)),e("}")}return e("return d")}},5305:(t,i,e)=>{"use strict";t.exports=function(t){var i=r.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter((function(t){return t.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&i("if((t&7)===4)")("break");i("switch(t>>>3){");for(var e=0;e<t.fieldsArray.length;++e){var h=t.et[e].resolve(),a=h.resolvedType instanceof s?"int32":h.type,c="m"+r.safeProp(h.name);i("case %i:",h.id),h.map?(i("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[h.keyType]?i("k=%j",n.defaults[h.keyType]):i("k=null"),void 0!==n.defaults[a]?i("value=%j",n.defaults[a]):i("value=null"),i("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",h.keyType)("case 2:"),void 0===n.basic[a]?i("value=types[%i].decode(r,r.uint32())",e):i("value=r.%s()",a),i("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[h.keyType]?i('%s[typeof k==="object"?util.longToHash(k):k]=value',c):i("%s[k]=value",c)):h.repeated?(i("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==n.packed[a]&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,a)("}else"),void 0===n.basic[a]?i(h.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,e):i("%s.push(r.%s())",c,a)):void 0===n.basic[a]?i(h.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,e):i("%s=r.%s()",c,a),i("break")}for(i("default:")("r.skipType(t&7)")("break")("}")("}"),e=0;e<t.et.length;++e){var d=t.et[e];d.required&&i("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return i("return m")};var s=e(7025),n=e(7063),r=e(9935);function o(t){return"missing required '"+t.name+"'"}},4928:(t,i,e)=>{"use strict";t.exports=function(t){for(var i,e=r.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),h=t.fieldsArray.slice().sort(r.compareFieldsById),a=0;a<h.length;++a){var c=h[a].resolve(),d=t.et.indexOf(c),l=c.resolvedType instanceof s?"int32":c.type,u=n.basic[l];i="m"+r.safeProp(c.name),c.map?(e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",i,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|n.mapKey[c.keyType],c.keyType),void 0===u?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,i):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|u,l,i),e("}")("}")):c.repeated?(e("if(%s!=null&&%s.length){",i,i),c.packed&&void 0!==n.packed[l]?e("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",l,i)("w.ldelim()"):(e("for(var i=0;i<%s.length;++i)",i),void 0===u?o(e,c,d,i+"[i]"):e("w.uint32(%i).%s(%s[i])",(c.id<<3|u)>>>0,l,i)),e("}")):(c.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,c.name),void 0===u?o(e,c,d,i):e("w.uint32(%i).%s(%s)",(c.id<<3|u)>>>0,l,i))}return e("return w")};var s=e(7025),n=e(7063),r=e(9935);function o(t,i,e,s){return i.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",e,s,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",e,s,(i.id<<3|2)>>>0)}},7025:(t,i,e)=>{"use strict";t.exports=o;var s=e(3243);((o.prototype=Object.create(s.prototype)).constructor=o).className="Enum";var n=e(9313),r=e(9935);function o(t,i,e,n,r){if(s.call(this,t,e),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=r||{},this.reserved=void 0,i)for(var o=Object.keys(i),h=0;h<o.length;++h)"number"==typeof i[o[h]]&&(this.valuesById[this.values[o[h]]=i[o[h]]]=o[h])}o.fromJSON=function(t,i){var e=new o(t,i.values,i.options,i.comment,i.comments);return e.reserved=i.reserved,e},o.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return r.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",i?this.comment:void 0,"comments",i?this.comments:void 0])},o.prototype.add=function(t,i,e){if(!r.isString(t))throw TypeError("name must be a string");if(!r.isInteger(i))throw TypeError("id must be an integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(void 0!==this.valuesById[i]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;return this.comments[t]=e||null,this},o.prototype.remove=function(t){if(!r.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this},o.prototype.isReservedId=function(t){return n.isReservedId(this.reserved,t)},o.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},3548:(t,i,e)=>{"use strict";t.exports=c;var s=e(3243);((c.prototype=Object.create(s.prototype)).constructor=c).className="Field";var n,r=e(7025),o=e(7063),h=e(9935),a=/^required|optional|repeated$/;function c(t,i,e,n,r,c,d){if(h.isObject(n)?(d=r,c=n,n=r=void 0):h.isObject(r)&&(d=c,c=r,r=void 0),s.call(this,t,c),!h.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!h.isString(e))throw TypeError("type must be a string");if(void 0!==n&&!a.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==r&&!h.isString(r))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=e,this.id=i,this.extend=r||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&void 0!==o.long[e],this.bytes="bytes"===e,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.st=null,this.comment=d}c.fromJSON=function(t,i){return new c(t,i.id,i.type,i.rule,i.extend,i.options,i.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this.st&&(this.st=!1!==this.getOption("packed")),this.st}}),c.prototype.setOption=function(t,i,e){return"packed"===t&&(this.st=null),s.prototype.setOption.call(this,t,i,e)},c.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return h.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",i?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof r&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof r)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=h.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,t=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,t=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=h.emptyObject:this.repeated?this.defaultValue=h.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),s.prototype.resolve.call(this)},c.d=function(t,i,e,s){return"function"==typeof i?i=h.decorateType(i).name:i&&"object"==typeof i&&(i=h.decorateEnum(i).name),function(n,r){h.decorateType(n.constructor).add(new c(r,t,i,e,{default:s}))}},c.nt=function(t){n=t}},8836:(t,i,e)=>{"use strict";var s=t.exports=e(9482);s.build="light",s.load=function(t,i,e){return"function"==typeof i?(e=i,i=new s.Root):i||(i=new s.Root),i.load(t,e)},s.loadSync=function(t,i){return i||(i=new s.Root),i.loadSync(t)},s.encoder=e(4928),s.decoder=e(5305),s.verifier=e(4497),s.converter=e(3996),s.ReflectionObject=e(3243),s.Namespace=e(9313),s.Root=e(9424),s.Enum=e(7025),s.Type=e(7645),s.Field=e(3548),s.OneOf=e(7598),s.MapField=e(6039),s.Service=e(7513),s.Method=e(4429),s.Message=e(8368),s.wrappers=e(1667),s.types=e(7063),s.util=e(9935),s.ReflectionObject.nt(s.Root),s.Namespace.nt(s.Type,s.Service,s.Enum),s.Root.nt(s.Type),s.Field.nt(s.Type)},9482:(t,i,e)=>{"use strict";var s=i;function n(){s.util.nt(),s.Writer.nt(s.BufferWriter),s.Reader.nt(s.BufferReader)}s.build="minimal",s.Writer=e(1173),s.BufferWriter=e(3155),s.Reader=e(1408),s.BufferReader=e(593),s.util=e(9693),s.rpc=e(5994),s.roots=e(5054),s.configure=n,n()},6039:(t,i,e)=>{"use strict";t.exports=o;var s=e(3548);((o.prototype=Object.create(s.prototype)).constructor=o).className="MapField";var n=e(7063),r=e(9935);function o(t,i,e,n,o,h){if(s.call(this,t,i,n,void 0,void 0,o,h),!r.isString(e))throw TypeError("keyType must be a string");this.keyType=e,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(t,i){return new o(t,i.id,i.keyType,i.type,i.options,i.comment)},o.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return r.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",i?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.prototype.resolve.call(this)},o.d=function(t,i,e){return"function"==typeof e?e=r.decorateType(e).name:e&&"object"==typeof e&&(e=r.decorateEnum(e).name),function(s,n){r.decorateType(s.constructor).add(new o(n,t,i,e))}}},8368:(t,i,e)=>{"use strict";t.exports=n;var s=e(9693);function n(t){if(t)for(var i=Object.keys(t),e=0;e<i.length;++e)this[i[e]]=t[i[e]]}n.create=function(t){return this.$type.create(t)},n.encode=function(t,i){return this.$type.encode(t,i)},n.encodeDelimited=function(t,i){return this.$type.encodeDelimited(t,i)},n.decode=function(t){return this.$type.decode(t)},n.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},n.verify=function(t){return this.$type.verify(t)},n.fromObject=function(t){return this.$type.fromObject(t)},n.toObject=function(t,i){return this.$type.toObject(t,i)},n.prototype.toJSON=function(){return this.$type.toObject(this,s.toJSONOptions)}},4429:(t,i,e)=>{"use strict";t.exports=r;var s=e(3243);((r.prototype=Object.create(s.prototype)).constructor=r).className="Method";var n=e(9935);function r(t,i,e,r,o,h,a,c,d){if(n.isObject(o)?(a=o,o=h=void 0):n.isObject(h)&&(a=h,h=void 0),void 0!==i&&!n.isString(i))throw TypeError("type must be a string");if(!n.isString(e))throw TypeError("requestType must be a string");if(!n.isString(r))throw TypeError("responseType must be a string");s.call(this,t,a),this.type=i||"rpc",this.requestType=e,this.requestStream=!!o||void 0,this.responseType=r,this.responseStream=!!h||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=d}r.fromJSON=function(t,i){return new r(t,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},r.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",i?this.comment:void 0,"parsedOptions",this.parsedOptions])},r.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),s.prototype.resolve.call(this))}},9313:(t,i,e)=>{"use strict";t.exports=l;var s=e(3243);((l.prototype=Object.create(s.prototype)).constructor=l).className="Namespace";var n,r,o,h=e(3548),a=e(7598),c=e(9935);function d(t,i){if(t&&t.length){for(var e={},s=0;s<t.length;++s)e[t[s].name]=t[s].toJSON(i);return e}}function l(t,i){s.call(this,t,i),this.nested=void 0,this.rt=null}function u(t){return t.rt=null,t}l.fromJSON=function(t,i){return new l(t,i.options).addJSON(i.nested)},l.arrayToJSON=d,l.isReservedId=function(t,i){if(t)for(var e=0;e<t.length;++e)if("string"!=typeof t[e]&&t[e][0]<=i&&t[e][1]>i)return!0;return!1},l.isReservedName=function(t,i){if(t)for(var e=0;e<t.length;++e)if(t[e]===i)return!0;return!1},Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this.rt||(this.rt=c.toArray(this.nested))}}),l.prototype.toJSON=function(t){return c.toObject(["options",this.options,"nested",d(this.nestedArray,t)])},l.prototype.addJSON=function(t){if(t)for(var i,e=Object.keys(t),s=0;s<e.length;++s)i=t[e[s]],this.add((void 0!==i.fields?n.fromJSON:void 0!==i.values?o.fromJSON:void 0!==i.methods?r.fromJSON:void 0!==i.id?h.fromJSON:l.fromJSON)(e[s],i));return this},l.prototype.get=function(t){return this.nested&&this.nested[t]||null},l.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof o)return this.nested[t].values;throw Error("no such enum: "+t)},l.prototype.add=function(t){if(!(t instanceof h&&void 0!==t.extend||t instanceof n||t instanceof o||t instanceof r||t instanceof l||t instanceof a))throw TypeError("object must be a valid nested object");if(this.nested){var i=this.get(t.name);if(i){if(!(i instanceof l&&t instanceof l)||i instanceof n||i instanceof r)throw Error("duplicate name '"+t.name+"' in "+this);for(var e=i.nestedArray,s=0;s<e.length;++s)t.add(e[s]);this.remove(i),this.nested||(this.nested={}),t.setOptions(i.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),u(this)},l.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),u(this)},l.prototype.define=function(t,i){if(c.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var e=this;t.length>0;){var s=t.shift();if(e.nested&&e.nested[s]){if(!((e=e.nested[s])instanceof l))throw Error("path conflicts with non-namespace objects")}else e.add(e=new l(s))}return i&&e.addJSON(i),e},l.prototype.resolveAll=function(){for(var t=this.nestedArray,i=0;i<t.length;)t[i]instanceof l?t[i++].resolveAll():t[i++].resolve();return this.resolve()},l.prototype.lookup=function(t,i,e){if("boolean"==typeof i?(e=i,i=void 0):i&&!Array.isArray(i)&&(i=[i]),c.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),i);var s=this.get(t[0]);if(s){if(1===t.length){if(!i||i.indexOf(s.constructor)>-1)return s}else if(s instanceof l&&(s=s.lookup(t.slice(1),i,!0)))return s}else for(var n=0;n<this.nestedArray.length;++n)if(this.rt[n]instanceof l&&(s=this.rt[n].lookup(t,i,!0)))return s;return null===this.parent||e?null:this.parent.lookup(t,i)},l.prototype.lookupType=function(t){var i=this.lookup(t,[n]);if(!i)throw Error("no such type: "+t);return i},l.prototype.lookupEnum=function(t){var i=this.lookup(t,[o]);if(!i)throw Error("no such Enum '"+t+"' in "+this);return i},l.prototype.lookupTypeOrEnum=function(t){var i=this.lookup(t,[n,o]);if(!i)throw Error("no such Type or Enum '"+t+"' in "+this);return i},l.prototype.lookupService=function(t){var i=this.lookup(t,[r]);if(!i)throw Error("no such Service '"+t+"' in "+this);return i},l.nt=function(t,i,e){n=t,r=i,o=e}},3243:(t,i,e)=>{"use strict";t.exports=r,r.className="ReflectionObject";var s,n=e(9935);function r(t,i){if(!n.isString(t))throw TypeError("name must be a string");if(i&&!n.isObject(i))throw TypeError("options must be an object");this.options=i,this.parsedOptions=null,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(r.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],i=this.parent;i;)t.unshift(i.name),i=i.parent;return t.join(".")}}}),r.prototype.toJSON=function(){throw Error()},r.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var i=t.root;i instanceof s&&i.ot(this)},r.prototype.onRemove=function(t){var i=t.root;i instanceof s&&i.ht(this),this.parent=null,this.resolved=!1},r.prototype.resolve=function(){return this.resolved||this.root instanceof s&&(this.resolved=!0),this},r.prototype.getOption=function(t){if(this.options)return this.options[t]},r.prototype.setOption=function(t,i,e){return e&&this.options&&void 0!==this.options[t]||((this.options||(this.options={}))[t]=i),this},r.prototype.setParsedOption=function(t,i,e){this.parsedOptions||(this.parsedOptions=[]);var s=this.parsedOptions;if(e){var r=s.find((function(i){return Object.prototype.hasOwnProperty.call(i,t)}));if(r){var o=r[t];n.setProperty(o,e,i)}else(r={})[t]=n.setProperty({},e,i),s.push(r)}else{var h={};h[t]=i,s.push(h)}return this},r.prototype.setOptions=function(t,i){if(t)for(var e=Object.keys(t),s=0;s<e.length;++s)this.setOption(e[s],t[e[s]],i);return this},r.prototype.toString=function(){var t=this.constructor.className,i=this.fullName;return i.length?t+" "+i:t},r.nt=function(t){s=t}},7598:(t,i,e)=>{"use strict";t.exports=o;var s=e(3243);((o.prototype=Object.create(s.prototype)).constructor=o).className="OneOf";var n=e(3548),r=e(9935);function o(t,i,e,n){if(Array.isArray(i)||(e=i,i=void 0),s.call(this,t,e),void 0!==i&&!Array.isArray(i))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=n}function h(t){if(t.parent)for(var i=0;i<t.fieldsArray.length;++i)t.fieldsArray[i].parent||t.parent.add(t.fieldsArray[i])}o.fromJSON=function(t,i){return new o(t,i.oneof,i.options,i.comment)},o.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return r.toObject(["options",this.options,"oneof",this.oneof,"comment",i?this.comment:void 0])},o.prototype.add=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,h(this),this},o.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(t);if(i<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(i,1),(i=this.oneof.indexOf(t.name))>-1&&this.oneof.splice(i,1),t.partOf=null,this},o.prototype.onAdd=function(t){s.prototype.onAdd.call(this,t);for(var i=0;i<this.oneof.length;++i){var e=t.get(this.oneof[i]);e&&!e.partOf&&(e.partOf=this,this.fieldsArray.push(e))}h(this)},o.prototype.onRemove=function(t){for(var i,e=0;e<this.fieldsArray.length;++e)(i=this.fieldsArray[e]).parent&&i.parent.remove(i);s.prototype.onRemove.call(this,t)},o.d=function(){for(var t=new Array(arguments.length),i=0;i<arguments.length;)t[i]=arguments[i++];return function(i,e){r.decorateType(i.constructor).add(new o(e,t)),Object.defineProperty(i,e,{get:r.oneOfGetter(t),set:r.oneOfSetter(t)})}}},1408:(t,i,e)=>{"use strict";t.exports=a;var s,n=e(9693),r=n.LongBits,o=n.utf8;function h(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function a(t){this.buf=t,this.pos=0,this.len=t.length}var c,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new a(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new a(t);throw Error("illegal buffer")},l=function(){return n.Buffer?function(t){return(a.create=function(t){return n.Buffer.isBuffer(t)?new s(t):d(t)})(t)}:d};function u(){var t=new r(0,0),i=0;if(!(this.len-this.pos>4)){for(;i<3;++i){if(this.pos>=this.len)throw h(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,this.len-this.pos>4){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw h(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function p(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw h(this,8);return new r(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}a.create=l(),a.prototype.dt=n.Array.prototype.subarray||n.Array.prototype.slice,a.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,h(this,10);return c}),a.prototype.int32=function(){return 0|this.uint32()},a.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},a.prototype.bool=function(){return 0!==this.uint32()},a.prototype.fixed32=function(){if(this.pos+4>this.len)throw h(this,4);return p(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw h(this,4);return 0|p(this.buf,this.pos+=4)},a.prototype.float=function(){if(this.pos+4>this.len)throw h(this,4);var t=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},a.prototype.double=function(){if(this.pos+8>this.len)throw h(this,4);var t=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},a.prototype.bytes=function(){var t=this.uint32(),i=this.pos,e=this.pos+t;if(e>this.len)throw h(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,e):i===e?new this.buf.constructor(0):this.dt.call(this.buf,i,e)},a.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},a.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw h(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw h(this)}while(128&this.buf[this.pos++]);return this},a.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},a.nt=function(t){s=t,a.create=l(),s.nt();var i=n.Long?"toLong":"toNumber";n.merge(a.prototype,{int64:function(){return u.call(this)[i](!1)},uint64:function(){return u.call(this)[i](!0)},sint64:function(){return u.call(this).zzDecode()[i](!1)},fixed64:function(){return f.call(this)[i](!0)},sfixed64:function(){return f.call(this)[i](!1)}})}},593:(t,i,e)=>{"use strict";t.exports=r;var s=e(1408);(r.prototype=Object.create(s.prototype)).constructor=r;var n=e(9693);function r(t){s.call(this,t)}r.nt=function(){n.Buffer&&(r.prototype.dt=n.Buffer.prototype.slice)},r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},r.nt()},9424:(t,i,e)=>{"use strict";t.exports=l;var s=e(9313);((l.prototype=Object.create(s.prototype)).constructor=l).className="Root";var n,r,o,h=e(3548),a=e(7025),c=e(7598),d=e(9935);function l(t){s.call(this,"",t),this.deferred=[],this.files=[]}function u(){}l.fromJSON=function(t,i){return i||(i=new l),t.options&&i.setOptions(t.options),i.addJSON(t.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function t(i,e,s){"function"==typeof e&&(s=e,e=void 0);var n=this;if(!s)return d.asPromise(t,n,i,e);var h=s===u;function a(t,i){if(s){var e=s;if(s=null,h)throw t;e(t,i)}}function c(t){var i=t.lastIndexOf("google/protobuf/");if(i>-1){var e=t.substring(i);if(e in o)return e}return null}function l(t,i){try{if(d.isString(i)&&"{"===i.charAt(0)&&(i=JSON.parse(i)),d.isString(i)){r.filename=t;var s,o=r(i,n,e),l=0;if(o.imports)for(;l<o.imports.length;++l)(s=c(o.imports[l])||n.resolvePath(t,o.imports[l]))&&p(s);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(s=c(o.weakImports[l])||n.resolvePath(t,o.weakImports[l]))&&p(s,!0)}else n.setOptions(i.options).addJSON(i.nested)}catch(t){a(t)}h||f||a(null,n)}function p(t,i){if(!(n.files.indexOf(t)>-1))if(n.files.push(t),t in o)h?l(t,o[t]):(++f,setTimeout((function(){--f,l(t,o[t])})));else if(h){var e;try{e=d.fs.readFileSync(t).toString("utf8")}catch(t){return void(i||a(t))}l(t,e)}else++f,n.fetch(t,(function(e,r){--f,s&&(e?i?f||a(null,n):a(e):l(t,r))}))}var f=0;d.isString(i)&&(i=[i]);for(var m,v=0;v<i.length;++v)(m=n.resolvePath("",i[v]))&&p(m);if(h)return n;f||a(null,n)},l.prototype.loadSync=function(t,i){if(!d.isNode)throw Error("not supported");return this.load(t,i,u)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(t){return"'extend "+t.extend+"' in "+t.parent.fullName})).join(", "));return s.prototype.resolveAll.call(this)};var p=/^[A-Z]/;function f(t,i){var e=i.parent.lookup(i.extend);if(e){var s=new h(i.fullName,i.id,i.type,i.rule,void 0,i.options);return s.declaringField=i,i.extensionField=s,e.add(s),!0}return!1}l.prototype.ot=function(t){if(t instanceof h)void 0===t.extend||t.extensionField||f(0,t)||this.deferred.push(t);else if(t instanceof a)p.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof c)){if(t instanceof n)for(var i=0;i<this.deferred.length;)f(0,this.deferred[i])?this.deferred.splice(i,1):++i;for(var e=0;e<t.nestedArray.length;++e)this.ot(t.rt[e]);p.test(t.name)&&(t.parent[t.name]=t)}},l.prototype.ht=function(t){if(t instanceof h){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var i=this.deferred.indexOf(t);i>-1&&this.deferred.splice(i,1)}}else if(t instanceof a)p.test(t.name)&&delete t.parent[t.name];else if(t instanceof s){for(var e=0;e<t.nestedArray.length;++e)this.ht(t.rt[e]);p.test(t.name)&&delete t.parent[t.name]}},l.nt=function(t,i,e){n=t,r=i,o=e}},5054:t=>{"use strict";t.exports={}},5994:(t,i,e)=>{"use strict";i.Service=e(7948)},7948:(t,i,e)=>{"use strict";t.exports=n;var s=e(9693);function n(t,i,e){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");s.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(i),this.responseDelimited=Boolean(e)}(n.prototype=Object.create(s.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(i,e,n,r,o){if(!r)throw TypeError("request must be specified");var h=this;if(!o)return s.asPromise(t,h,i,e,n,r);if(h.rpcImpl)try{return h.rpcImpl(i,e[h.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(t,e){if(t)return h.emit("error",t,i),o(t);if(null!==e){if(!(e instanceof n))try{e=n[h.responseDelimited?"decodeDelimited":"decode"](e)}catch(t){return h.emit("error",t,i),o(t)}return h.emit("data",e,i),o(null,e)}h.end(!0)}))}catch(t){return h.emit("error",t,i),void setTimeout((function(){o(t)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7513:(t,i,e)=>{"use strict";t.exports=h;var s=e(9313);((h.prototype=Object.create(s.prototype)).constructor=h).className="Service";var n=e(4429),r=e(9935),o=e(5994);function h(t,i){s.call(this,t,i),this.methods={},this.lt=null}function a(t){return t.lt=null,t}h.fromJSON=function(t,i){var e=new h(t,i.options);if(i.methods)for(var s=Object.keys(i.methods),r=0;r<s.length;++r)e.add(n.fromJSON(s[r],i.methods[s[r]]));return i.nested&&e.addJSON(i.nested),e.comment=i.comment,e},h.prototype.toJSON=function(t){var i=s.prototype.toJSON.call(this,t),e=!!t&&Boolean(t.keepComments);return r.toObject(["options",i&&i.options||void 0,"methods",s.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||void 0,"comment",e?this.comment:void 0])},Object.defineProperty(h.prototype,"methodsArray",{get:function(){return this.lt||(this.lt=r.toArray(this.methods))}}),h.prototype.get=function(t){return this.methods[t]||s.prototype.get.call(this,t)},h.prototype.resolveAll=function(){for(var t=this.methodsArray,i=0;i<t.length;++i)t[i].resolve();return s.prototype.resolve.call(this)},h.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof n?(this.methods[t.name]=t,t.parent=this,a(this)):s.prototype.add.call(this,t)},h.prototype.remove=function(t){if(t instanceof n){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,a(this)}return s.prototype.remove.call(this,t)},h.prototype.create=function(t,i,e){for(var s,n=new o.Service(t,i,e),h=0;h<this.methodsArray.length;++h){var a=r.lcFirst((s=this.lt[h]).resolve().name).replace(/[^$\w_]/g,"");n[a]=r.codegen(["r","c"],r.isReserved(a)?a+"_":a)("return this.rpcCall(m,q,s,r,c)")({m:s,q:s.resolvedRequestType.ctor,s:s.resolvedResponseType.ctor})}return n}},7645:(t,i,e)=>{"use strict";t.exports=y;var s=e(9313);((y.prototype=Object.create(s.prototype)).constructor=y).className="Type";var n=e(7025),r=e(7598),o=e(3548),h=e(6039),a=e(7513),c=e(8368),d=e(1408),l=e(1173),u=e(9935),p=e(4928),f=e(5305),m=e(4497),v=e(3996),g=e(1667);function y(t,i){s.call(this,t,i),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.ut=null,this.et=null,this.ft=null,this.vt=null}function b(t){return t.ut=t.et=t.ft=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this.ut)return this.ut;this.ut={};for(var t=Object.keys(this.fields),i=0;i<t.length;++i){var e=this.fields[t[i]],s=e.id;if(this.ut[s])throw Error("duplicate id "+s+" in "+this);this.ut[s]=e}return this.ut}},fieldsArray:{get:function(){return this.et||(this.et=u.toArray(this.fields))}},oneofsArray:{get:function(){return this.ft||(this.ft=u.toArray(this.oneofs))}},ctor:{get:function(){return this.vt||(this.ctor=y.generateConstructor(this)())},set:function(t){var i=t.prototype;i instanceof c||((t.prototype=new c).constructor=t,u.merge(t.prototype,i)),t.$type=t.prototype.$type=this,u.merge(t,c,!0),this.vt=t;for(var e=0;e<this.fieldsArray.length;++e)this.et[e].resolve();var s={};for(e=0;e<this.oneofsArray.length;++e)s[this.ft[e].resolve().name]={get:u.oneOfGetter(this.ft[e].oneof),set:u.oneOfSetter(this.ft[e].oneof)};e&&Object.defineProperties(t.prototype,s)}}}),y.generateConstructor=function(t){for(var i,e=u.codegen(["p"],t.name),s=0;s<t.fieldsArray.length;++s)(i=t.et[s]).map?e("this%s={}",u.safeProp(i.name)):i.repeated&&e("this%s=[]",u.safeProp(i.name));return e("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},y.fromJSON=function(t,i){var e=new y(t,i.options);e.extensions=i.extensions,e.reserved=i.reserved;for(var c=Object.keys(i.fields),d=0;d<c.length;++d)e.add((void 0!==i.fields[c[d]].keyType?h.fromJSON:o.fromJSON)(c[d],i.fields[c[d]]));if(i.oneofs)for(c=Object.keys(i.oneofs),d=0;d<c.length;++d)e.add(r.fromJSON(c[d],i.oneofs[c[d]]));if(i.nested)for(c=Object.keys(i.nested),d=0;d<c.length;++d){var l=i.nested[c[d]];e.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?y.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?a.fromJSON:s.fromJSON)(c[d],l))}return i.extensions&&i.extensions.length&&(e.extensions=i.extensions),i.reserved&&i.reserved.length&&(e.reserved=i.reserved),i.group&&(e.group=!0),i.comment&&(e.comment=i.comment),e},y.prototype.toJSON=function(t){var i=s.prototype.toJSON.call(this,t),e=!!t&&Boolean(t.keepComments);return u.toObject(["options",i&&i.options||void 0,"oneofs",s.arrayToJSON(this.oneofsArray,t),"fields",s.arrayToJSON(this.fieldsArray.filter((function(t){return!t.declaringField})),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",i&&i.nested||void 0,"comment",e?this.comment:void 0])},y.prototype.resolveAll=function(){for(var t=this.fieldsArray,i=0;i<t.length;)t[i++].resolve();var e=this.oneofsArray;for(i=0;i<e.length;)e[i++].resolve();return s.prototype.resolveAll.call(this)},y.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},y.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof o&&void 0===t.extend){if(this.ut?this.ut[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),b(this)}return t instanceof r?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),b(this)):s.prototype.add.call(this,t)},y.prototype.remove=function(t){if(t instanceof o&&void 0===t.extend){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),b(this)}if(t instanceof r){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),b(this)}return s.prototype.remove.call(this,t)},y.prototype.isReservedId=function(t){return s.isReservedId(this.reserved,t)},y.prototype.isReservedName=function(t){return s.isReservedName(this.reserved,t)},y.prototype.create=function(t){return new this.ctor(t)},y.prototype.setup=function(){for(var t=this.fullName,i=[],e=0;e<this.fieldsArray.length;++e)i.push(this.et[e].resolve().resolvedType);this.encode=p(this)({Writer:l,types:i,util:u}),this.decode=f(this)({Reader:d,types:i,util:u}),this.verify=m(this)({types:i,util:u}),this.fromObject=v.fromObject(this)({types:i,util:u}),this.toObject=v.toObject(this)({types:i,util:u});var s=g[t];if(s){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=s.fromObject.bind(n),n.toObject=this.toObject,this.toObject=s.toObject.bind(n)}return this},y.prototype.encode=function(t,i){return this.setup().encode(t,i)},y.prototype.encodeDelimited=function(t,i){return this.encode(t,i&&i.len?i.fork():i).ldelim()},y.prototype.decode=function(t,i){return this.setup().decode(t,i)},y.prototype.decodeDelimited=function(t){return t instanceof d||(t=d.create(t)),this.decode(t,t.uint32())},y.prototype.verify=function(t){return this.setup().verify(t)},y.prototype.fromObject=function(t){return this.setup().fromObject(t)},y.prototype.toObject=function(t,i){return this.setup().toObject(t,i)},y.d=function(t){return function(i){u.decorateType(i,t)}}},7063:(t,i,e)=>{"use strict";var s=i,n=e(9935),r=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(t,i){var e=0,s={};for(i|=0;e<t.length;)s[r[e+i]]=t[e++];return s}s.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),s.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),s.long=o([0,0,0,1,1],7),s.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),s.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},9935:(t,i,e)=>{"use strict";var s,n,r=t.exports=e(9693),o=e(5054);r.codegen=e(5124),r.fetch=e(9054),r.path=e(8626),r.fs=r.inquire("fs"),r.toArray=function(t){if(t){for(var i=Object.keys(t),e=new Array(i.length),s=0;s<i.length;)e[s]=t[i[s++]];return e}return[]},r.toObject=function(t){for(var i={},e=0;e<t.length;){var s=t[e++],n=t[e++];void 0!==n&&(i[s]=n)}return i};var h=/\\/g,a=/"/g;r.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},r.safeProp=function(t){return!/^[$\w_]+$/.test(t)||r.isReserved(t)?'["'+t.replace(h,"\\\\").replace(a,'\\"')+'"]':"."+t},r.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var c=/_([a-z])/g;r.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(c,(function(t,i){return i.toUpperCase()}))},r.compareFieldsById=function(t,i){return t.id-i.id},r.decorateType=function(t,i){if(t.$type)return i&&t.$type.name!==i&&(r.decorateRoot.remove(t.$type),t.$type.name=i,r.decorateRoot.add(t.$type)),t.$type;s||(s=e(7645));var n=new s(i||t.name);return r.decorateRoot.add(n),n.ctor=t,Object.defineProperty(t,"$type",{value:n,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;r.decorateEnum=function(t){if(t.$type)return t.$type;n||(n=e(7025));var i=new n("Enum"+d++,t);return r.decorateRoot.add(i),Object.defineProperty(t,"$type",{value:i,enumerable:!1}),i},r.setProperty=function(t,i,e){if("object"!=typeof t)throw TypeError("dst must be an object");if(!i)throw TypeError("path must be specified");return function t(i,e,s){var n=e.shift();if(e.length>0)i[n]=t(i[n]||{},e,s);else{var r=i[n];r&&(s=[].concat(r).concat(s)),i[n]=s}return i}(t,i=i.split("."),e)},Object.defineProperty(r,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(e(9424)))}})},1945:(t,i,e)=>{"use strict";t.exports=n;var s=e(9693);function n(t,i){this.lo=t>>>0,this.hi=i>>>0}var r=n.zero=new n(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return r;var i=t<0;i&&(t=-t);var e=t>>>0,s=(t-e)/4294967296>>>0;return i&&(s=~s>>>0,e=~e>>>0,++e>4294967295&&(e=0,++s>4294967295&&(s=0))),new n(e,s)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if(s.isString(t)){if(!s.Long)return n.fromNumber(parseInt(t,10));t=s.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):r},n.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var i=1+~this.lo>>>0,e=~this.hi>>>0;return i||(e=e+1>>>0),-(i+4294967296*e)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(t){return s.Long?new s.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var h=String.prototype.charCodeAt;n.fromHash=function(t){return t===o?r:new n((h.call(t,0)|h.call(t,1)<<8|h.call(t,2)<<16|h.call(t,3)<<24)>>>0,(h.call(t,4)|h.call(t,5)<<8|h.call(t,6)<<16|h.call(t,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},n.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},n.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,e=this.hi>>>24;return 0===e?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:e<128?9:10}},9693:function(t,i,e){"use strict";var s=i;function n(t,i,e){for(var s=Object.keys(i),n=0;n<s.length;++n)void 0!==t[s[n]]&&e||(t[s[n]]=i[s[n]]);return t}function r(t){function i(t,e){if(!(this instanceof i))return new i(t,e);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),e&&n(this,e)}return(i.prototype=Object.create(Error.prototype)).constructor=i,Object.defineProperty(i.prototype,"name",{get:function(){return t}}),i.prototype.toString=function(){return this.name+": "+this.message},i}s.asPromise=e(4537),s.base64=e(7419),s.EventEmitter=e(9211),s.float=e(945),s.inquire=e(7199),s.utf8=e(4997),s.pool=e(6662),s.LongBits=e(1945),s.isNode=Boolean(void 0!==e.g&&e.g&&e.g.process&&e.g.process.versions&&e.g.process.versions.node),s.global=s.isNode&&e.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},s.isString=function(t){return"string"==typeof t||t instanceof String},s.isObject=function(t){return t&&"object"==typeof t},s.isset=s.isSet=function(t,i){var e=t[i];return!(null==e||!t.hasOwnProperty(i))&&("object"!=typeof e||(Array.isArray(e)?e.length:Object.keys(e).length)>0)},s.Buffer=function(){try{var t=s.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),s.gt=null,s.yt=null,s.newBuffer=function(t){return"number"==typeof t?s.Buffer?s.yt(t):new s.Array(t):s.Buffer?s.gt(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.Long=s.global.dcodeIO&&s.global.dcodeIO.Long||s.global.Long||s.inquire("long"),s.key2Re=/^true|false|0|1$/,s.key32Re=/^-?(?:0|[1-9][0-9]*)$/,s.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,s.longToHash=function(t){return t?s.LongBits.from(t).toHash():s.LongBits.zeroHash},s.longFromHash=function(t,i){var e=s.LongBits.fromHash(t);return s.Long?s.Long.fromBits(e.lo,e.hi,i):e.toNumber(Boolean(i))},s.merge=n,s.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},s.newError=r,s.ProtocolError=r("ProtocolError"),s.oneOfGetter=function(t){for(var i={},e=0;e<t.length;++e)i[t[e]]=1;return function(){for(var t=Object.keys(this),e=t.length-1;e>-1;--e)if(1===i[t[e]]&&void 0!==this[t[e]]&&null!==this[t[e]])return t[e]}},s.oneOfSetter=function(t){return function(i){for(var e=0;e<t.length;++e)t[e]!==i&&delete this[t[e]]}},s.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},s.nt=function(){var t=s.Buffer;t?(s.gt=t.from!==Uint8Array.from&&t.from||function(i,e){return new t(i,e)},s.yt=t.allocUnsafe||function(i){return new t(i)}):s.gt=s.yt=null}},4497:(t,i,e)=>{"use strict";t.exports=function(t){var i=n.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),e=t.oneofsArray,s={};e.length&&i("var p={}");for(var a=0;a<t.fieldsArray.length;++a){var c=t.et[a].resolve(),d="m"+n.safeProp(c.name);if(c.optional&&i("if(%s!=null&&m.hasOwnProperty(%j)){",d,c.name),c.map)i("if(!util.isObject(%s))",d)("return%j",r(c,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),h(i,c,"k[i]"),o(i,c,a,d+"[k[i]]")("}");else if(c.repeated)i("if(!Array.isArray(%s))",d)("return%j",r(c,"array"))("for(var i=0;i<%s.length;++i){",d),o(i,c,a,d+"[i]")("}");else{if(c.partOf){var l=n.safeProp(c.partOf.name);1===s[c.partOf.name]&&i("if(p%s===1)",l)("return%j",c.partOf.name+": multiple values"),s[c.partOf.name]=1,i("p%s=1",l)}o(i,c,a,d)}c.optional&&i("}")}return i("return null")};var s=e(7025),n=e(9935);function r(t,i){return t.name+": "+i+(t.repeated&&"array"!==i?"[]":t.map&&"object"!==i?"{k:"+t.keyType+"}":"")+" expected"}function o(t,i,e,n){if(i.resolvedType)if(i.resolvedType instanceof s){t("switch(%s){",n)("default:")("return%j",r(i,"enum value"));for(var o=Object.keys(i.resolvedType.values),h=0;h<o.length;++h)t("case %i:",i.resolvedType.values[o[h]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",e,n)("if(e)")("return%j+e",i.name+".")("}");else switch(i.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",n)("return%j",r(i,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",r(i,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',n)("return%j",r(i,"number"));break;case"bool":t('if(typeof %s!=="boolean")',n)("return%j",r(i,"boolean"));break;case"string":t("if(!util.isString(%s))",n)("return%j",r(i,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",r(i,"buffer"))}return t}function h(t,i,e){switch(i.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",e)("return%j",r(i,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",e)("return%j",r(i,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",e)("return%j",r(i,"boolean key"))}return t}},1667:(t,i,e)=>{"use strict";var s=i,n=e(8368);s[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var i=t["@type"].substring(t["@type"].lastIndexOf("/")+1),e=this.lookup(i);if(e){var s="."===t["@type"].charAt(0)?t["@type"].substr(1):t["@type"];return-1===s.indexOf("/")&&(s="/"+s),this.create({type_url:s,value:e.encode(e.fromObject(t)).finish()})}}return this.fromObject(t)},toObject:function(t,i){var e="",s="";if(i&&i.json&&t.type_url&&t.value){s=t.type_url.substring(t.type_url.lastIndexOf("/")+1),e=t.type_url.substring(0,t.type_url.lastIndexOf("/")+1);var r=this.lookup(s);r&&(t=r.decode(t.value))}if(!(t instanceof this.ctor)&&t instanceof n){var o=t.$type.toObject(t,i);return""===e&&(e="type.googleapis.com/"),s=e+("."===t.$type.fullName[0]?t.$type.fullName.substr(1):t.$type.fullName),o["@type"]=s,o}return this.toObject(t,i)}}},1173:(t,i,e)=>{"use strict";t.exports=l;var s,n=e(9693),r=n.LongBits,o=n.base64,h=n.utf8;function a(t,i,e){this.fn=t,this.len=i,this.next=void 0,this.val=e}function c(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new a(c,0,0),this.tail=this.head,this.states=null}var u=function(){return n.Buffer?function(){return(l.create=function(){return new s})()}:function(){return new l}};function p(t,i,e){i[e]=255&t}function f(t,i){this.len=t,this.next=void 0,this.val=i}function m(t,i,e){for(;t.hi;)i[e++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)i[e++]=127&t.lo|128,t.lo=t.lo>>>7;i[e++]=t.lo}function v(t,i,e){i[e]=255&t,i[e+1]=t>>>8&255,i[e+2]=t>>>16&255,i[e+3]=t>>>24}l.create=u(),l.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype.bt=function(t,i,e){return this.tail=this.tail.next=new a(t,i,e),this.len+=i,this},f.prototype=Object.create(a.prototype),f.prototype.fn=function(t,i,e){for(;t>127;)i[e++]=127&t|128,t>>>=7;i[e]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this.bt(m,10,r.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var i=r.from(t);return this.bt(m,i.length(),i)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var i=r.from(t).zzEncode();return this.bt(m,i.length(),i)},l.prototype.bool=function(t){return this.bt(p,1,t?1:0)},l.prototype.fixed32=function(t){return this.bt(v,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var i=r.from(t);return this.bt(v,4,i.lo).bt(v,4,i.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this.bt(n.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this.bt(n.float.writeDoubleLE,8,t)};var g=n.Array.prototype.set?function(t,i,e){i.set(t,e)}:function(t,i,e){for(var s=0;s<t.length;++s)i[e+s]=t[s]};l.prototype.bytes=function(t){var i=t.length>>>0;if(!i)return this.bt(p,1,0);if(n.isString(t)){var e=l.alloc(i=o.length(t));o.decode(t,e,0),t=e}return this.uint32(i).bt(g,i,t)},l.prototype.string=function(t){var i=h.length(t);return i?this.uint32(i).bt(h.write,i,t):this.bt(p,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new a(c,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new a(c,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,i=this.tail,e=this.len;return this.reset().uint32(e),e&&(this.tail.next=t.next,this.tail=i,this.len+=e),this},l.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),e=0;t;)t.fn(t.val,i,e),e+=t.len,t=t.next;return i},l.nt=function(t){s=t,l.create=u(),s.nt()}},3155:(t,i,e)=>{"use strict";t.exports=r;var s=e(1173);(r.prototype=Object.create(s.prototype)).constructor=r;var n=e(9693);function r(){s.call(this)}function o(t,i,e){t.length<40?n.utf8.write(t,i,e):i.utf8Write?i.utf8Write(t,e):i.write(t,e)}r.nt=function(){r.alloc=n.yt,r.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(t,i,e){i.set(t,e)}:function(t,i,e){if(t.copy)t.copy(i,e,0,t.length);else for(var s=0;s<t.length;)i[e++]=t[s++]}},r.prototype.bytes=function(t){n.isString(t)&&(t=n.gt(t,"base64"));var i=t.length>>>0;return this.uint32(i),i&&this.bt(r.writeBytesBuffer,i,t),this},r.prototype.string=function(t){var i=n.Buffer.byteLength(t);return this.uint32(i),i&&this.bt(o,i,t),this},r.nt()},8660:(t,i,e)=>{var s;!function(t){!function(i){var s="object"==typeof e.g?e.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),n=r(t);function r(t,i){return function(e,s){"function"!=typeof t[e]&&Object.defineProperty(t,e,{configurable:!0,writable:!0,value:s}),i&&i(e,s)}}void 0===s.Reflect?s.Reflect=t:n=r(s.Reflect,n),function(t){var i=Object.prototype.hasOwnProperty,e="function"==typeof Symbol,s=e&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",n=e&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",r="function"==typeof Object.create,o={__proto__:[]}instanceof Array,h=!r&&!o,a={create:r?function(){return st(Object.create(null))}:o?function(){return st({__proto__:null})}:function(){return st({})},has:h?function(t,e){return i.call(t,e)}:function(t,i){return i in t},get:h?function(t,e){return i.call(t,e)?t[e]:void 0}:function(t,i){return t[i]}},c=Object.getPrototypeOf(Function),d="object"==typeof process&&{DEBUG_MODE:!1}&&"true"==={DEBUG_MODE:!1}.REFLECT_METADATA_USE_MAP_POLYFILL,l=d||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,u=d||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?it():Set,p=new(d||"function"!=typeof WeakMap?et():WeakMap);function f(t,i,e,s){if(R(e)){if(!H(t))throw new TypeError;if(!W(i))throw new TypeError;return P(t,i)}if(!H(t))throw new TypeError;if(!j(i))throw new TypeError;if(!j(s)&&!R(s)&&!D(s))throw new TypeError;return D(s)&&(s=void 0),A(t,i,e=q(e),s)}function m(t,i){function e(e,s){if(!j(e))throw new TypeError;if(!R(s)&&!G(s))throw new TypeError;M(t,i,e,s)}return e}function v(t,i,e,s){if(!j(e))throw new TypeError;return R(s)||(s=q(s)),M(t,i,e,s)}function g(t,i,e){if(!j(i))throw new TypeError;return R(e)||(e=q(e)),k(t,i,e)}function y(t,i,e){if(!j(i))throw new TypeError;return R(e)||(e=q(e)),T(t,i,e)}function b(t,i,e){if(!j(i))throw new TypeError;return R(e)||(e=q(e)),C(t,i,e)}function I(t,i,e){if(!j(i))throw new TypeError;return R(e)||(e=q(e)),E(t,i,e)}function w(t,i){if(!j(t))throw new TypeError;return R(i)||(i=q(i)),L(t,i)}function _(t,i){if(!j(t))throw new TypeError;return R(i)||(i=q(i)),B(t,i)}function S(t,i,e){if(!j(i))throw new TypeError;R(e)||(e=q(e));var s=x(i,e,!1);if(R(s))return!1;if(!s.delete(t))return!1;if(s.size>0)return!0;var n=p.get(i);return n.delete(e),n.size>0||p.delete(i),!0}function P(t,i){for(var e=t.length-1;e>=0;--e){var s=(0,t[e])(i);if(!R(s)&&!D(s)){if(!W(s))throw new TypeError;i=s}}return i}function A(t,i,e,s){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(i,e,s);if(!R(r)&&!D(r)){if(!j(r))throw new TypeError;s=r}}return s}function x(t,i,e){var s=p.get(t);if(R(s)){if(!e)return;s=new l,p.set(t,s)}var n=s.get(i);if(R(n)){if(!e)return;n=new l,s.set(i,n)}return n}function k(t,i,e){if(T(t,i,e))return!0;var s=Z(i);return!D(s)&&k(t,s,e)}function T(t,i,e){var s=x(i,e,!1);return!R(s)&&U(s.has(t))}function C(t,i,e){if(T(t,i,e))return E(t,i,e);var s=Z(i);return D(s)?void 0:C(t,s,e)}function E(t,i,e){var s=x(i,e,!1);if(!R(s))return s.get(t)}function M(t,i,e,s){x(e,s,!0).set(t,i)}function L(t,i){var e=B(t,i),s=Z(t);if(null===s)return e;var n=L(s,i);if(n.length<=0)return e;if(e.length<=0)return n;for(var r=new u,o=[],h=0,a=e;h<a.length;h++){var c=a[h];r.has(c)||(r.add(c),o.push(c))}for(var d=0,l=n;d<l.length;d++){c=l[d];r.has(c)||(r.add(c),o.push(c))}return o}function B(t,i){var e=[],s=x(t,i,!1);if(R(s))return e;for(var n=J(s.keys()),r=0;;){var o=Y(n);if(!o)return e.length=r,e;var h=X(o);try{e[r]=h}catch(t){try{K(n)}finally{throw t}}r++}}function O(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function R(t){return void 0===t}function D(t){return null===t}function V(t){return"symbol"==typeof t}function j(t){return"object"==typeof t?null!==t:"function"==typeof t}function F(t,i){switch(O(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var e=3===i?"string":5===i?"number":"default",n=Q(t,s);if(void 0!==n){var r=n.call(t,e);if(j(r))throw new TypeError;return r}return N(t,"default"===e?"number":e)}function N(t,i){if("string"===i){var e=t.toString;if(z(e))if(!j(n=e.call(t)))return n;if(z(s=t.valueOf))if(!j(n=s.call(t)))return n}else{var s;if(z(s=t.valueOf))if(!j(n=s.call(t)))return n;var n,r=t.toString;if(z(r))if(!j(n=r.call(t)))return n}throw new TypeError}function U(t){return!!t}function $(t){return""+t}function q(t){var i=F(t,3);return V(i)?i:$(i)}function H(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function z(t){return"function"==typeof t}function W(t){return"function"==typeof t}function G(t){switch(O(t)){case 3:case 4:return!0;default:return!1}}function Q(t,i){var e=t[i];if(null!=e){if(!z(e))throw new TypeError;return e}}function J(t){var i=Q(t,n);if(!z(i))throw new TypeError;var e=i.call(t);if(!j(e))throw new TypeError;return e}function X(t){return t.value}function Y(t){var i=t.next();return!i.done&&i}function K(t){var i=t.return;i&&i.call(t)}function Z(t){var i=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return i;if(i!==c)return i;var e=t.prototype,s=e&&Object.getPrototypeOf(e);if(null==s||s===Object.prototype)return i;var n=s.constructor;return"function"!=typeof n||n===t?i:n}function tt(){var t={},i=[],e=function(){function t(t,i,e){this.It=0,this.wt=t,this._t=i,this.St=e}return t.prototype["@@iterator"]=function(){return this},t.prototype[n]=function(){return this},t.prototype.next=function(){var t=this.It;if(t>=0&&t<this.wt.length){var e=this.St(this.wt[t],this._t[t]);return t+1>=this.wt.length?(this.It=-1,this.wt=i,this._t=i):this.It++,{value:e,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this.It>=0&&(this.It=-1,this.wt=i,this._t=i),t},t.prototype.return=function(t){return this.It>=0&&(this.It=-1,this.wt=i,this._t=i),{value:t,done:!0}},t}();return function(){function i(){this.wt=[],this._t=[],this.Pt=t,this.At=-2}return Object.defineProperty(i.prototype,"size",{get:function(){return this.wt.length},enumerable:!0,configurable:!0}),i.prototype.has=function(t){return this.xt(t,!1)>=0},i.prototype.get=function(t){var i=this.xt(t,!1);return i>=0?this._t[i]:void 0},i.prototype.set=function(t,i){var e=this.xt(t,!0);return this._t[e]=i,this},i.prototype.delete=function(i){var e=this.xt(i,!1);if(e>=0){for(var s=this.wt.length,n=e+1;n<s;n++)this.wt[n-1]=this.wt[n],this._t[n-1]=this._t[n];return this.wt.length--,this._t.length--,i===this.Pt&&(this.Pt=t,this.At=-2),!0}return!1},i.prototype.clear=function(){this.wt.length=0,this._t.length=0,this.Pt=t,this.At=-2},i.prototype.keys=function(){return new e(this.wt,this._t,s)},i.prototype.values=function(){return new e(this.wt,this._t,r)},i.prototype.entries=function(){return new e(this.wt,this._t,o)},i.prototype["@@iterator"]=function(){return this.entries()},i.prototype[n]=function(){return this.entries()},i.prototype.xt=function(t,i){return this.Pt!==t&&(this.At=this.wt.indexOf(this.Pt=t)),this.At<0&&i&&(this.At=this.wt.length,this.wt.push(t),this._t.push(void 0)),this.At},i}();function s(t,i){return t}function r(t,i){return i}function o(t,i){return[t,i]}}function it(){return function(){function t(){this.kt=new l}return Object.defineProperty(t.prototype,"size",{get:function(){return this.kt.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this.kt.has(t)},t.prototype.add=function(t){return this.kt.set(t,t),this},t.prototype.delete=function(t){return this.kt.delete(t)},t.prototype.clear=function(){this.kt.clear()},t.prototype.keys=function(){return this.kt.keys()},t.prototype.values=function(){return this.kt.values()},t.prototype.entries=function(){return this.kt.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[n]=function(){return this.keys()},t}()}function et(){var t=16,e=a.create(),s=n();return function(){function t(){this.Tt=n()}return t.prototype.has=function(t){var i=r(t,!1);return void 0!==i&&a.has(i,this.Tt)},t.prototype.get=function(t){var i=r(t,!1);return void 0!==i?a.get(i,this.Tt):void 0},t.prototype.set=function(t,i){return r(t,!0)[this.Tt]=i,this},t.prototype.delete=function(t){var i=r(t,!1);return void 0!==i&&delete i[this.Tt]},t.prototype.clear=function(){this.Tt=n()},t}();function n(){var t;do{t="@@WeakMap@@"+c()}while(a.has(e,t));return e[t]=!0,t}function r(t,e){if(!i.call(t,s)){if(!e)return;Object.defineProperty(t,s,{value:a.create()})}return t[s]}function o(t,i){for(var e=0;e<i;++e)t[e]=255*Math.random()|0;return t}function h(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t)}function c(){var i=h(t);i[6]=79&i[6]|64,i[8]=191&i[8]|128;for(var e="",s=0;s<t;++s){var n=i[s];4!==s&&6!==s&&8!==s||(e+="-"),n<16&&(e+="0"),e+=n.toString(16).toLowerCase()}return e}}function st(t){return t.Ct=void 0,delete t.Ct,t}t("decorate",f),t("metadata",m),t("defineMetadata",v),t("hasMetadata",g),t("hasOwnMetadata",y),t("getMetadata",b),t("getOwnMetadata",I),t("getMetadataKeys",w),t("getOwnMetadataKeys",_),t("deleteMetadata",S)}(n)}()}(s||(s={}))},6515:(t,i,e)=>{"use strict";e.d(i,{X:()=>n});var s=e(655),n=function(t){function i(i){var e=t.call(this)||this;return e.Et=i,e}return(0,s.ZT)(i,t),Object.defineProperty(i.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),i.prototype.Mt=function(i){var e=t.prototype.Mt.call(this,i);return!e.closed&&i.next(this.Et),e},i.prototype.getValue=function(){var t=this,i=t.hasError,e=t.thrownError,s=t.Et;if(i)throw e;return this.Lt(),s},i.prototype.next=function(i){t.prototype.next.call(this,this.Et=i)},i}(e(6716).x)},1480:(t,i,e)=>{"use strict";e.d(i,{y:()=>l});var s=e(5642),n=e(5720),r=e(6766),o=e(278);function h(t){return 0===t.length?o.y:1===t.length?t[0]:function(i){return t.reduce((function(t,i){return i(t)}),i)}}var a=e(3912),c=e(8474),d=e(8846),l=function(){function t(t){t&&(this.Mt=t)}return t.prototype.lift=function(i){var e=new t;return e.source=this,e.operator=i,e},t.prototype.subscribe=function(t,i,e){var r,o=this,h=(r=t)&&r instanceof s.Lv||function(t){return t&&(0,c.m)(t.next)&&(0,c.m)(t.error)&&(0,c.m)(t.complete)}(r)&&(0,n.Nn)(r)?t:new s.Hp(t,i,e);return(0,d.x)((function(){var t=o,i=t.operator,e=t.source;h.add(i?i.call(h,e):e?o.Mt(h):o.Bt(h))})),h},t.prototype.Bt=function(t){try{return this.Mt(t)}catch(i){t.error(i)}},t.prototype.forEach=function(t,i){var e=this;return new(i=u(i))((function(i,n){var r=new s.Hp({next:function(i){try{t(i)}catch(t){n(t),r.unsubscribe()}},error:n,complete:i});e.subscribe(r)}))},t.prototype.Mt=function(t){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(t)},t.prototype[r.L]=function(){return this},t.prototype.pipe=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return h(t)(this)},t.prototype.toPromise=function(t){var i=this;return new(t=u(t))((function(t,e){var s;i.subscribe((function(t){return s=t}),(function(t){return e(t)}),(function(){return t(s)}))}))},t.create=function(i){return new t(i)},t}();function u(t){var i;return null!==(i=null!=t?t:a.v.Promise)&&void 0!==i?i:Promise}},6716:(t,i,e)=>{"use strict";e.d(i,{x:()=>c});var s=e(655),n=e(1480),r=e(5720),o=(0,e(1819).d)((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),h=e(3699),a=e(8846),c=function(t){function i(){var i=t.call(this)||this;return i.closed=!1,i.observers=[],i.isStopped=!1,i.hasError=!1,i.thrownError=null,i}return(0,s.ZT)(i,t),i.prototype.lift=function(t){var i=new d(this,this);return i.operator=t,i},i.prototype.Lt=function(){if(this.closed)throw new o},i.prototype.next=function(t){var i=this;(0,a.x)((function(){var e,n;if(i.Lt(),!i.isStopped){var r=i.observers.slice();try{for(var o=(0,s.XA)(r),h=o.next();!h.done;h=o.next()){h.value.next(t)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}}))},i.prototype.error=function(t){var i=this;(0,a.x)((function(){if(i.Lt(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=t;for(var e=i.observers;e.length;)e.shift().error(t)}}))},i.prototype.complete=function(){var t=this;(0,a.x)((function(){if(t.Lt(),!t.isStopped){t.isStopped=!0;for(var i=t.observers;i.length;)i.shift().complete()}}))},i.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(i.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),i.prototype.Bt=function(i){return this.Lt(),t.prototype.Bt.call(this,i)},i.prototype.Mt=function(t){return this.Lt(),this.Ot(t),this.Rt(t)},i.prototype.Rt=function(t){var i=this,e=i.hasError,s=i.isStopped,n=i.observers;return e||s?r.Lc:(n.push(t),new r.w0((function(){return(0,h.P)(n,t)})))},i.prototype.Ot=function(t){var i=this,e=i.hasError,s=i.thrownError,n=i.isStopped;e?t.error(s):n&&t.complete()},i.prototype.asObservable=function(){var t=new n.y;return t.source=this,t},i.create=function(t,i){return new d(t,i)},i}(n.y),d=function(t){function i(i,e){var s=t.call(this)||this;return s.destination=i,s.source=e,s}return(0,s.ZT)(i,t),i.prototype.next=function(t){var i,e;null===(e=null===(i=this.destination)||void 0===i?void 0:i.next)||void 0===e||e.call(i,t)},i.prototype.error=function(t){var i,e;null===(e=null===(i=this.destination)||void 0===i?void 0:i.error)||void 0===e||e.call(i,t)},i.prototype.complete=function(){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===i||i.call(t)},i.prototype.Mt=function(t){var i,e;return null!==(e=null===(i=this.source)||void 0===i?void 0:i.subscribe(t))&&void 0!==e?e:r.Lc},i}(c)},5642:(t,i,e)=>{"use strict";e.d(i,{Hp:()=>g,Lv:()=>p});var s=e(655),n=e(8474),r=e(5720),o=e(3912),h=e(5);function a(){}var c=d("C",void 0,void 0);function d(t,i,e){return{kind:t,value:i,error:e}}var l=e(8380),u=e(8846),p=function(t){function i(i){var e=t.call(this)||this;return e.isStopped=!1,i?(e.destination=i,(0,r.Nn)(i)&&i.add(e)):e.destination=I,e}return(0,s.ZT)(i,t),i.create=function(t,i,e){return new g(t,i,e)},i.prototype.next=function(t){this.isStopped?b(function(t){return d("N",t,void 0)}(t),this):this.Dt(t)},i.prototype.error=function(t){this.isStopped?b(d("E",void 0,t),this):(this.isStopped=!0,this.Vt(t))},i.prototype.complete=function(){this.isStopped?b(c,this):(this.isStopped=!0,this.jt())},i.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},i.prototype.Dt=function(t){this.destination.next(t)},i.prototype.Vt=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},i.prototype.jt=function(){try{this.destination.complete()}finally{this.unsubscribe()}},i}(r.w0),f=Function.prototype.bind;function m(t,i){return f.call(t,i)}var v=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var i=this.partialObserver;if(i.next)try{i.next(t)}catch(t){y(t)}},t.prototype.error=function(t){var i=this.partialObserver;if(i.error)try{i.error(t)}catch(t){y(t)}else y(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){y(t)}},t}(),g=function(t){function i(i,e,s){var r,h,a=t.call(this)||this;(0,n.m)(i)||!i?r={next:null!=i?i:void 0,error:null!=e?e:void 0,complete:null!=s?s:void 0}:a&&o.v.useDeprecatedNextContext?((h=Object.create(i)).unsubscribe=function(){return a.unsubscribe()},r={next:i.next&&m(i.next,h),error:i.error&&m(i.error,h),complete:i.complete&&m(i.complete,h)}):r=i;return a.destination=new v(r),a}return(0,s.ZT)(i,t),i}(p);function y(t){o.v.useDeprecatedSynchronousErrorHandling?(0,u.O)(t):(0,h.h)(t)}function b(t,i){var e=o.v.onStoppedNotification;e&&l.z.setTimeout((function(){return e(t,i)}))}var I={closed:!0,next:a,error:function(t){throw t},complete:a}},5720:(t,i,e)=>{"use strict";e.d(i,{Lc:()=>a,w0:()=>h,Nn:()=>c});var s=e(655),n=e(8474),r=(0,e(1819).d)((function(t){return function(i){t(this),this.message=i?i.length+" errors occurred during unsubscription:\n"+i.map((function(t,i){return i+1+") "+t.toString()})).join("\n  "):"",this.name="UnsubscriptionError",this.errors=i}})),o=e(3699),h=function(){function t(t){this.initialTeardown=t,this.closed=!1,this.Ft=null,this.Nt=null}var i;return t.prototype.unsubscribe=function(){var t,i,e,o,h;if(!this.closed){this.closed=!0;var a=this.Ft;if(a)if(this.Ft=null,Array.isArray(a))try{for(var c=(0,s.XA)(a),l=c.next();!l.done;l=c.next()){l.value.remove(this)}}catch(i){t={error:i}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}else a.remove(this);var u=this.initialTeardown;if((0,n.m)(u))try{u()}catch(t){h=t instanceof r?t.errors:[t]}var p=this.Nt;if(p){this.Nt=null;try{for(var f=(0,s.XA)(p),m=f.next();!m.done;m=f.next()){var v=m.value;try{d(v)}catch(t){h=null!=h?h:[],t instanceof r?h=(0,s.ev)((0,s.ev)([],(0,s.CR)(h)),(0,s.CR)(t.errors)):h.push(t)}}}catch(t){e={error:t}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(e)throw e.error}}}if(h)throw new r(h)}},t.prototype.add=function(i){var e;if(i&&i!==this)if(this.closed)d(i);else{if(i instanceof t){if(i.closed||i.Ut(this))return;i.$t(this)}(this.Nt=null!==(e=this.Nt)&&void 0!==e?e:[]).push(i)}},t.prototype.Ut=function(t){var i=this.Ft;return i===t||Array.isArray(i)&&i.includes(t)},t.prototype.$t=function(t){var i=this.Ft;this.Ft=Array.isArray(i)?(i.push(t),i):i?[i,t]:t},t.prototype.qt=function(t){var i=this.Ft;i===t?this.Ft=null:Array.isArray(i)&&(0,o.P)(i,t)},t.prototype.remove=function(i){var e=this.Nt;e&&(0,o.P)(e,i),i instanceof t&&i.qt(this)},t.EMPTY=((i=new t).closed=!0,i),t}(),a=h.EMPTY;function c(t){return t instanceof h||t&&"closed"in t&&(0,n.m)(t.remove)&&(0,n.m)(t.add)&&(0,n.m)(t.unsubscribe)}function d(t){(0,n.m)(t)?t():t.unsubscribe()}},3912:(t,i,e)=>{"use strict";e.d(i,{v:()=>s});var s={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},7878:(t,i,e)=>{"use strict";e.d(i,{Xf:()=>m});var s=e(655),n=e(5685),r=e(3841),o=e(1480),h=e(1764),a=e(8430),c=e(8729),d=e(1837),l=e(8671),u=e(8474),p=e(5),f=e(6766);function m(t){if(t instanceof o.y)return t;if(null!=t){if((0,h.c)(t))return y=t,new o.y((function(t){var i=y[f.L]();if((0,u.m)(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if((0,n.z)(t))return g=t,new o.y((function(t){for(var i=0;i<g.length&&!t.closed;i++)t.next(g[i]);t.complete()}));if((0,r.t)(t))return m=t,new o.y((function(t){m.then((function(i){t.closed||(t.next(i),t.complete())}),(function(i){return t.error(i)})).then(null,p.h)}));if((0,a.D)(t))return v(t);if((0,d.T)(t))return e=t,new o.y((function(t){var i,n;try{for(var r=(0,s.XA)(e),o=r.next();!o.done;o=r.next()){var h=o.value;if(t.next(h),t.closed)return}}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}t.complete()}));if((0,l.L)(t))return i=t,v((0,l.Q)(i))}var i,e,m,g,y;throw(0,c.z)(t)}function v(t){return new o.y((function(i){(function(t,i){var e,n,r,o;return(0,s.mG)(this,void 0,void 0,(function(){var h,a;return(0,s.Jh)(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=(0,s.KL)(t),c.label=1;case 1:return[4,e.next()];case 2:if((n=c.sent()).done)return[3,4];if(h=n.value,i.next(h),i.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),r={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(o=e.return)?[4,o.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return i.complete(),[2]}}))}))})(t,i).catch((function(t){return i.error(t)}))}))}},6196:(t,i,e)=>{"use strict";e.d(i,{H:()=>o});var s=e(1480),n=e(8843),r=e(4865);function o(t,i,e){void 0===t&&(t=0),void 0===e&&(e=n.P);var o=-1;return null!=i&&((0,r.K)(i)?e=i:o=i),new s.y((function(i){var s,n=(s=t)instanceof Date&&!isNaN(s)?+t-e.now():t;n<0&&(n=0);var r=0;return e.schedule((function(){i.closed||(i.next(r++),0<=o?this.schedule(void 0,o):i.complete())}),n)}))}},2566:(t,i,e)=>{"use strict";e.d(i,{x:()=>n});var s=e(655);function n(t,i,e,s,n){return new r(t,i,e,s,n)}var r=function(t){function i(i,e,s,n,r,o){var h=t.call(this,i)||this;return h.onFinalize=r,h.shouldUnsubscribe=o,h.Dt=e?function(t){try{e(t)}catch(t){i.error(t)}}:t.prototype.Dt,h.Vt=n?function(t){try{n(t)}catch(t){i.error(t)}finally{this.unsubscribe()}}:t.prototype.Vt,h.jt=s?function(){try{s()}catch(t){i.error(t)}finally{this.unsubscribe()}}:t.prototype.jt,h}return(0,s.ZT)(i,t),i.prototype.unsubscribe=function(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var e=this.closed;t.prototype.unsubscribe.call(this),!e&&(null===(i=this.onFinalize)||void 0===i||i.call(this))}},i}(e(5642).Lv)},4975:(t,i,e)=>{"use strict";e.d(i,{h:()=>r});var s=e(6798),n=e(2566);function r(t,i){return(0,s.e)((function(e,s){var r=0;e.subscribe((0,n.x)(s,(function(e){return t.call(i,e,r++)&&s.next(e)})))}))}},4978:(t,i,e)=>{"use strict";e.d(i,{w:()=>o});var s=e(7878),n=e(6798),r=e(2566);function o(t,i){return(0,n.e)((function(e,n){var o=null,h=0,a=!1,c=function(){return a&&!o&&n.complete()};e.subscribe((0,r.x)(n,(function(e){null==o||o.unsubscribe();var a=0,d=h++;(0,s.Xf)(t(e,d)).subscribe(o=(0,r.x)(n,(function(t){return n.next(i?i(e,t,d,a++):t)}),(function(){o=null,c()})))}),(function(){a=!0,c()})))}))}},89:(t,i,e)=>{"use strict";e.d(i,{q:()=>o});var s=new(e(1480).y)((function(t){return t.complete()}));var n=e(6798),r=e(2566);function o(t){return t<=0?function(){return s}:(0,n.e)((function(i,e){var s=0;i.subscribe((0,r.x)(e,(function(i){++s<=t&&(e.next(i),t<=s&&e.complete())})))}))}},8843:(t,i,e)=>{"use strict";e.d(i,{P:()=>l,z:()=>d});var s=e(655),n=function(t){function i(i,e){return t.call(this)||this}return(0,s.ZT)(i,t),i.prototype.schedule=function(t,i){return void 0===i&&(i=0),this},i}(e(5720).w0),r={setInterval:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=r.delegate;return((null==e?void 0:e.setInterval)||setInterval).apply(void 0,(0,s.ev)([],(0,s.CR)(t)))},clearInterval:function(t){var i=r.delegate;return((null==i?void 0:i.clearInterval)||clearInterval)(t)},delegate:void 0},o=e(3699),h=function(t){function i(i,e){var s=t.call(this,i,e)||this;return s.scheduler=i,s.work=e,s.pending=!1,s}return(0,s.ZT)(i,t),i.prototype.schedule=function(t,i){if(void 0===i&&(i=0),this.closed)return this;this.state=t;var e=this.id,s=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(s,e,i)),this.pending=!0,this.delay=i,this.id=this.id||this.requestAsyncId(s,this.id,i),this},i.prototype.requestAsyncId=function(t,i,e){return void 0===e&&(e=0),r.setInterval(t.flush.bind(t,this),e)},i.prototype.recycleAsyncId=function(t,i,e){if(void 0===e&&(e=0),null!=e&&this.delay===e&&!1===this.pending)return i;r.clearInterval(i)},i.prototype.execute=function(t,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var e=this.zt(t,i);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},i.prototype.zt=function(t,i){var e,s=!1;try{this.work(t)}catch(t){s=!0,e=t||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),e},i.prototype.unsubscribe=function(){if(!this.closed){var i=this.id,e=this.scheduler,s=e.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,o.P)(s,this),null!=i&&(this.id=this.recycleAsyncId(e,i,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},i}(n),a=e(4318),c=function(){function t(i,e){void 0===e&&(e=t.now),this.schedulerActionCtor=i,this.now=e}return t.prototype.schedule=function(t,i,e){return void 0===i&&(i=0),new this.schedulerActionCtor(this,t).schedule(e,i)},t.now=a.l.now,t}(),d=new(function(t){function i(i,e){void 0===e&&(e=c.now);var s=t.call(this,i,e)||this;return s.actions=[],s.Wt=!1,s.Gt=void 0,s}return(0,s.ZT)(i,t),i.prototype.flush=function(t){var i=this.actions;if(this.Wt)i.push(t);else{var e;this.Wt=!0;do{if(e=t.execute(t.state,t.delay))break}while(t=i.shift());if(this.Wt=!1,e){for(;t=i.shift();)t.unsubscribe();throw e}}},i}(c))(h),l=d},4318:(t,i,e)=>{"use strict";e.d(i,{l:()=>s});var s={now:function(){return(s.delegate||Date).now()},delegate:void 0}},8380:(t,i,e)=>{"use strict";e.d(i,{z:()=>n});var s=e(655),n={setTimeout:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=n.delegate;return((null==e?void 0:e.setTimeout)||setTimeout).apply(void 0,(0,s.ev)([],(0,s.CR)(t)))},clearTimeout:function(t){var i=n.delegate;return((null==i?void 0:i.clearTimeout)||clearTimeout)(t)},delegate:void 0}},9768:(t,i,e)=>{"use strict";e.d(i,{h:()=>s});var s="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},6766:(t,i,e)=>{"use strict";e.d(i,{L:()=>s});var s="function"==typeof Symbol&&Symbol.observable||"@@observable"},3699:(t,i,e)=>{"use strict";function s(t,i){if(t){var e=t.indexOf(i);0<=e&&t.splice(e,1)}}e.d(i,{P:()=>s})},1819:(t,i,e)=>{"use strict";function s(t){var i=t((function(t){Error.call(t),t.stack=(new Error).stack}));return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}e.d(i,{d:()=>s})},8846:(t,i,e)=>{"use strict";e.d(i,{O:()=>o,x:()=>r});var s=e(3912),n=null;function r(t){if(s.v.useDeprecatedSynchronousErrorHandling){var i=!n;if(i&&(n={errorThrown:!1,error:null}),t(),i){var e=n,r=e.errorThrown,o=e.error;if(n=null,r)throw o}}else t()}function o(t){s.v.useDeprecatedSynchronousErrorHandling&&n&&(n.errorThrown=!0,n.error=t)}},278:(t,i,e)=>{"use strict";function s(t){return t}e.d(i,{y:()=>s})},5685:(t,i,e)=>{"use strict";e.d(i,{z:()=>s});var s=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},8430:(t,i,e)=>{"use strict";e.d(i,{D:()=>n});var s=e(8474);function n(t){return Symbol.asyncIterator&&(0,s.m)(null==t?void 0:t[Symbol.asyncIterator])}},8474:(t,i,e)=>{"use strict";function s(t){return"function"==typeof t}e.d(i,{m:()=>s})},1764:(t,i,e)=>{"use strict";e.d(i,{c:()=>r});var s=e(6766),n=e(8474);function r(t){return(0,n.m)(t[s.L])}},1837:(t,i,e)=>{"use strict";e.d(i,{T:()=>r});var s=e(9768),n=e(8474);function r(t){return(0,n.m)(null==t?void 0:t[s.h])}},3841:(t,i,e)=>{"use strict";e.d(i,{t:()=>n});var s=e(8474);function n(t){return(0,s.m)(null==t?void 0:t.then)}},8671:(t,i,e)=>{"use strict";e.d(i,{L:()=>o,Q:()=>r});var s=e(655),n=e(8474);function r(t){return(0,s.FC)(this,arguments,(function(){var i,e,n;return(0,s.Jh)(this,(function(r){switch(r.label){case 0:i=t.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,(0,s.qq)(i.read())];case 3:return e=r.sent(),n=e.value,e.done?[4,(0,s.qq)(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,(0,s.qq)(n)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return i.releaseLock(),[7];case 10:return[2]}}))}))}function o(t){return(0,n.m)(null==t?void 0:t.getReader)}},4865:(t,i,e)=>{"use strict";e.d(i,{K:()=>n});var s=e(8474);function n(t){return t&&(0,s.m)(t.schedule)}},6798:(t,i,e)=>{"use strict";e.d(i,{e:()=>n});var s=e(8474);function n(t){return function(i){if(function(t){return(0,s.m)(null==t?void 0:t.lift)}(i))return i.lift((function(i){try{return t(i,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}},5:(t,i,e)=>{"use strict";e.d(i,{h:()=>r});var s=e(3912),n=e(8380);function r(t){n.z.setTimeout((function(){var i=s.v.onUnhandledError;if(!i)throw t;i(t)}))}},8729:(t,i,e)=>{"use strict";function s(t){return new TypeError("You provided "+(null!==t&&"object"==typeof t?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}e.d(i,{z:()=>s})},8532:(t,i,e)=>{"use strict";e.d(i,{Km:()=>o,Zr:()=>n,n9:()=>h,q0:()=>s,rl:()=>r});const s={Play:"play",Pause:"pause",QualityChanged:"qualityChanged",PlayError:"playError",VolumeChanged:"volumeChanged"},n={FullscreenChanged:"fullscreenChanged",PlayerFloatChanged:"playerFloatChanged",FloatingEnterStart:"floatingEnterStart",FloatingEnterStop:"floatingEnterStop",FloatingExitStart:"floatingExitStart",FloatingExitStop:"floatingExitStop"},r={OmidViewabilityThreshold:"OmidViewabilityThreshold"},o=Object.assign(Object.assign(Object.assign(Object.assign({Ready:"ready",Removed:"removed",SetupError:"setupError",IsViewable:"isViewable",SizeChanged:"sizeChanged",BrandingClicked:"brandingClicked",ImpressionPrice:"impressionPrice",ImpressionRevenue:"impressionRevenue"},s),n),r),{AdLoaded:"adLoaded",AdStarted:"adStarted",AdClick:"adClick",AdPlay:"adPlay",AdPause:"adPause",AdImpression:"adImpression",AdCompleted25:"adCompleted25",AdCompleted50:"adCompleted50",AdCompleted75:"adCompleted75",AdCompleted100:"adCompleted100",AdVolumeChange:"adVolumeChange",AdSkipped:"adSkipped",AdError:"adError",AdStopped:"adStopped",AdCompanion:"adCompanion"});var h;!function(t){t.SetupError="SetupError",t.NoPlayer="NoPlayer",t.RenderError="RenderError",t.InvalidGUID="InvalidGUID"}(h||(h={}))},8576:(t,i,e)=>{"use strict";var s,n,r,o,h;e.d(i,{FX:()=>r,Ht:()=>a,Oc:()=>h,_S:()=>o,bS:()=>c,do:()=>n,lI:()=>s}),function(t){t.Chrome="chrome",t.Firefox="firefox",t.Edge="edge",t.Safari="safari",t.Opera="opera",t.Samsung="samsung",t.Facebook="facebook",t.InternetExplorer="ie"}(s||(s={})),function(t){t.Standard="standard",t.Webkit="webkit",t.Moz="moz",t.Ms="ms",t.O="o"}(n||(n={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.ETHERNET=1]="ETHERNET",t[t.WIFI=2]="WIFI",t[t.CELLULAR_UNKNOWN=3]="CELLULAR_UNKNOWN",t[t.CELLULAR_2G=4]="CELLULAR_2G",t[t.CELLULAR_3G=5]="CELLULAR_3G",t[t.CELLULAR_4G=6]="CELLULAR_4G",t[t.CELLULAR_5G=7]="CELLULAR_5G"}(r||(r={})),function(t){t.ETHERNET="ethernet",t.WIFI="wifi",t.CELLULAR="cellular"}(o||(o={})),function(t){t.CELLULAR_SLOW_2G="slow-2g",t.CELLULAR_2G="2g",t.CELLULAR_3G="3g",t.CELLULAR_4G="4g"}(h||(h={}));const a=[{name:n.Standard,keys:{fullscreenEnabled:"fullscreenEnabled",fullscreenElement:"fullscreenElement",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen",fullscreenchange:"fullscreenchange",fullscreenerror:"fullscreenerror"}},{name:n.Webkit,keys:{fullscreenEnabled:"webkitFullscreenEnabled",fullscreenElement:"webkitFullscreenElement",requestFullscreen:"webkitRequestFullscreen",exitFullscreen:"webkitExitFullscreen",fullscreenchange:"webkitfullscreenchange",fullscreenerror:"webkitfullscreenerror"}},{name:n.Webkit,keys:{fullscreenEnabled:"webkitSupportsFullscreen",fullscreenElement:"webkitFullscreenElement",requestFullscreen:"webkitEnterFullscreen",exitFullscreen:"webkitExitFullscreen",fullscreenchange:"webkitfullscreenchange",fullscreenerror:"webkitfullscreenerror"}},{name:n.Moz,keys:{fullscreenEnabled:"mozFullScreenEnabled",fullscreenElement:"mozFullScreenElement",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen",fullscreenchange:"mozfullscreenchange",fullscreenerror:"mozfullscreenerror"}},{name:n.Ms,keys:{fullscreenEnabled:"msFullscreenEnabled",fullscreenElement:"msFullscreenElement",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen",fullscreenchange:"MSFullscreenChange",fullscreenerror:"MSFullscreenError"}}];var c;!function(t){t.Self="_self",t.Blank="_blank",t.Parent="_parent",t.Top="_top"}(c||(c={}))},8983:(t,i,e)=>{"use strict";var s,n,r;e.d(i,{Gj:()=>s,Hs:()=>w,Ig:()=>h,Ih:()=>g,Ng:()=>a,QO:()=>l,Rq:()=>o,Yk:()=>u,_7:()=>p,hQ:()=>v,iu:()=>c,jG:()=>f,mr:()=>_,oV:()=>b,p0:()=>S,pT:()=>I,s6:()=>n,sN:()=>y,s_:()=>r}),function(t){t.Invisible="cnx-mod-invisible",t.HovarableButton="cnx-ui-btn-hoverable",t.HoverStart="cnx-mod-hover-s",t.HoverEnd="cnx-mod-hover",t.HoverBoom="cnx-mod-boom",t.DisplayNone="cnx-mod-display-none",t.Active="cnx-mod-active",t.HideOnVolumeHover="cnx-hide-on-volume-hover",t.HideOnSingleVideo="cnx-hide-on-single-video",t.NoTransition="cnx-mod-no-transition",t.Collapsable="cnx-mod-collapsable",t.HasCustomScrollbar="cnx-mod-scrollbar",t.Show="cnx-mod-show",t.Hide="cnx-mod-hide",t.NoHeight="cnx-mod-no-height",t.OnHold="cnx-mod-onhold",t.ForceLineBreak="cnx-mod-force-line-break",t.HideOnAdOverlay="cnx-mod-ad-overlay-none",t.HideOnPodLoadingScreen="cnx-mod-pod-loading-none"}(s||(s={})),function(t){t.Fullscreen="cnx-in-fullscreen",t.Ad="cnx-in-ad",t.AdNonLinear="cnx-in-ad-non-linear",t.AdOverlayType="cnx-in-ad-overlay",t.AdFullSize="cnx-in-ad-full",t.AdShowCard="cnx-ad-show-card",t.ShowControls="cnx-in-show-controls",t.Mobile="cnx-in-mobile",t.Desktop="cnx-in-desktop",t.Muted="cnx-in-mute",t.Collapsed="cnx-in-collapse",t.GalleryPortrait="cnx-in-g-portrait",t.GalleryLandscape="cnx-in-g-landscape",t.ContextController="cnx-context-controller",t.HideUI="cnx-in-hide-ui",t.PodLoadingScreen="cnx-in-pod-loading",t.AdShowCountdown="cnx-ad-show-countdown",t.CloseOn="cnx-close-on",t.CloseOff="cnx-close-off",t.CloseHover="cnx-close-hover",t.CloseFloatOn="cnx-close-float-on",t.CloseFloatOff="cnx-close-float-off",t.CloseFloatHover="cnx-close-float-hover",t.UiInView="cnx-ui-in-view",t.ClickToPlayThumbnail="cnx-click-to-play-thumbnail",t.VideoWrapper="cnx-video-wrapper",t.PlayerFocused="cnx-focused",t.TabFocus="cnx-tab-focus",t.AdUserInteraction="cnx-ad-user-interaction",t.BottomButtonsContainer="cnx-ui-buttons",t.HeadButtonsContainer="cnx-ui-head-buttons",t.MuteWatermark="cnx-mute-watermark"}(n||(n={})),function(t){t.Playing="cnx-is-playing",t.Paused="cnx-is-paused",t.Stopped="cnx-is-stopped",t.Preroll="cnx-is-preroll",t.Postroll="cnx-is-postroll",t.Loading="cnx-is-loading",t.LiveEnded="cnx-live-ended"}(r||(r={}));const o={Xxl:"cnx-bp-xxl-v",Xl:"cnx-bp-xl-v",Lg:"cnx-bp-lg-v",Md:"cnx-bp-md-v",Sm:"cnx-bp-sm-v",Xs:"cnx-bp-xs-v",Xxs:"cnx-bp-xxs-v"};var h,a,c,d,l,u,p;!function(t){t.Responsive="cnx-size-responsive",t.Fixed="cnx-size-fixed"}(h||(h={})),function(t){t.ClickOption="cnx-cm-item--click",t.ToggleOption="cnx-cm-item--toggle",t.SubmenuOption="cnx-cm-item--submenu",t.ItemIcon="cnx-cm-item__icon",t.ItemTitle="cnx-cm-item__title",t.ItemExtra="cnx-cm-item__extra",t.Items="cnx-cm-items",t.Container="cnx-cm-container"}(a||(a={})),function(t){t.Icons="cnx-color-icon",t.TooltipText="cnx-color-tt-text",t.TooltipBackground="cnx-color-tt-bg",t.AccentColor="cnx-color-accent",t.PrimaryColor="cnx-color-primary",t.SecondaryColor="cnx-color-secondary",t.TitleComponent="cnx-title-component",t.TitleLink="cnx-color-title-link",t.SlideProgressBar="cnx-slides-progress-bar",t.ProgressFill="cnx-progress-fill"}(c||(c={})),function(t){t.InheritTitleFontFamily="cnx-inherit-title-font-family",t.InheritBodyFontFamily="cnx-inherit-body-font-family"}(d||(d={})),function(t){t.Connatix="#0099FF",t.Icons="#FFFFFF",t.PrimaryBackground="#F1F1F1",t.PrimaryForeground="#000000",t.SecondaryBackground="#000000",t.SecondaryForeground="#F1F1F1",t.AccentForeground="#FFFFFF"}(l||(l={})),function(t){t.CaptionContainer="cnx-captions-text-holder"}(u||(u={})),function(t){t.MainClass="cnx-float",t.TransitionClass="cnx-float-transition",t.AlwaysFloating="cnx-always-floating",t.PinnedTopFloating="cnx-pinned-top-floating",t.PinnedFloating="cnx-pinned",t.PinnedBottomFloating="cnx-pinned-bottom-floating",t.PinnedWrapper="cnx-pinned-wrapper",t.ContentWrapper="cnx-content-wrapper",t.HidePinnedTitle="cnx-hide-pinned-title-in-ad"}(p||(p={}));const f={FadeOutBase:"cnx-fade-out-base",FadeOut:"cnx-fade-out",FadeInBase:"cnx-fade-in-base",FadeIn:"cnx-fade-in"};var m,v,g;!function(t){t.CurrentSlide="cnx-slide-current",t.NextSlide="cnx-slide-next",t.SlideLeft="cnx-slide-left",t.SlideRight="cnx-slide-right"}(m||(m={})),function(t){t.OpacityInTransition="cnx-tooltip-animation-in"}(v||(v={})),function(t){t.Card="cnx-g-card",t.CardSlot="cnx-g-card-slot",t.CardImage="cnx-g-card-image",t.CardText="cnx-g-card-text",t.CardTextContainer="cnx-g-card-text-container",t.CardPlaceholder="cnx-g-card-placeholder",t.CardRail="cnx-g-rail",t.StyleDetailed="cnx-g-style-detailed",t.StyleVisual="cnx-g-style-visual",t.ExploreMore="cnx-g-explore-more",t.FadeOut="cnx-g-fade-out"}(g||(g={}));const y={MainContainer:"cnx-main-container",MainContainerFlex:"cnx-main-container-flex",PlayerWrapper:"cnx-player-wrapper",ImagePlaceholder:"cnx-image-placeholder"},b="cnx-ratio",I="cnx-hide-video",w={Text:"cnx-skip-ad-text",Timer:"cnx-timer-loader",Icon:"cnx-skip-ad-icon",SkipAdButton:"cnx-skip-ad-button",InTimer:"cnx-skip-ad-in-timer"},_={Icon:"cnx-pod-open-new-icon",Button:"cnx-pod-read-more-btn",ButtonContainer:"cnx-pod-read-more-container",Wrapper:"cnx-pod-read-more-wrapper",BackgroundImg:"cnx-pod-loading-background",InfoContainer:"cnx-pod-loading-info",FallbackContainer:"cnx-pod-loading-fallback",SlotCountText:"cnx-pod-slot-count-text"},S={CloseButton:"cnx-ad-close-non-linear-button"}},3775:(t,i,e)=>{"use strict";var s;e.d(i,{b:()=>s}),function(t){t.GarbageCollector="data-cnx-gc",t.ContextMenuSettings="cnx-ui-cm-settings"}(s||(s={}))},7945:(t,i,e)=>{"use strict";e.d(i,{g:()=>s,x:()=>n});const s=JSON.parse('{"version":209100,"domainPrefix":"","logToConsole":false,"logToServer":true,"env":"production"}'),n=!0},5227:(t,i,e)=>{"use strict";var s,n;e.d(i,{Uh:()=>n,Xh:()=>s,dP:()=>r}),function(t){t.SessionRendered="rendered",t.SessionView="enter_view"}(s||(s={})),function(t){t.UserInteraction="userInteraction",t.GeneralUserInteraction="generalUserInteraction",t.CanStart="canStart",t.Destroy="destroy"}(n||(n={}));const r={StateChanged:"stateChanged"}},4581:(t,i,e)=>{"use strict";e.d(i,{x:()=>s});const s="//securepubads.g.doubleclick.net/tag/js/gpt.js"},9022:(t,i,e)=>{"use strict";e.d(i,{$b:()=>a,f3:()=>n,fJ:()=>o,kd:()=>h,xs:()=>r});var s=e(289);const n=31,r={[s.ProtoAdType.Video]:2e3,[s.ProtoAdType.Overlay]:1e3,[s.ProtoAdType.Nonlinear]:1e3},o=.5,h="connatix.com",a="Advertisement"},8211:(t,i,e)=>{"use strict";e.d(i,{M:()=>r,a:()=>n});var s=e(289);const n=[s.ProtoDeviceType.Smartphone,s.ProtoDeviceType.Tablet];var r;!function(t){t.Ios="ios",t.Android="android",t.Mac="macos",t.Windows="windows",t.Linux="linux",t.IPadOS="ipados"}(r||(r={}))},307:(t,i,e)=>{"use strict";e.d(i,{Fk:()=>n,Kp:()=>r,a8:()=>o,br:()=>s,ym:()=>h});const s="https://info.connatix.com/",n="v",r="pid",o="sid",h="cid"},1509:(t,i,e)=>{"use strict";var s;e.d(i,{n:()=>s}),function(t){t[t.FirstQuartile=0]="FirstQuartile",t[t.SecondQuartile=1]="SecondQuartile",t[t.ThirdQuartile=2]="ThirdQuartile",t[t.FourthQuartile=3]="FourthQuartile"}(s||(s={}))},9357:(t,i,e)=>{"use strict";e.d(i,{T9:()=>s,Y0:()=>h,oG:()=>c,p7:()=>n,s_:()=>o,ti:()=>a,uD:()=>r});const s=/(\d\d):(\d\d):(\d\d)(\.(\d\d\d))?/,n=36e5,r=6e4,o=1e3,h=60,a=864e5,c=60},274:(t,i,e)=>{"use strict";var s,n;e.d(i,{fI:()=>n,r5:()=>r,zc:()=>s}),function(t){t.Fullscreen="fullscreen",t.Normal="normal",t.Thumbnail="thumbnail"}(s||(s={})),function(t){t.AdLoaded="AdLoaded",t.AdStarted="AdStarted",t.AdStopped="AdStopped",t.AdSkipped="AdSkipped",t.AdSkippableStateChange="AdSkippableStateChange",t.AdSizeChange="AdSizeChange",t.AdLinearChange="AdLinearChange",t.AdDurationChange="AdDurationChange",t.AdExpandedChange="AdExpandedChange",t.AdRemainingTimeChange="AdRemainingTimeChange",t.AdVolumeChange="AdVolumeChange",t.AdImpression="AdImpression",t.AdVideoStart="AdVideoStart",t.AdVideoFirstQuartile="AdVideoFirstQuartile",t.AdVideoMidpoint="AdVideoMidpoint",t.AdVideoThirdQuartile="AdVideoThirdQuartile",t.AdVideoComplete="AdVideoComplete",t.AdClickThru="AdClickThru",t.AdInteraction="AdInteraction",t.AdUserAcceptInvitation="AdUserAcceptInvitation",t.AdUserMinimize="AdUserMinimize",t.AdUserClose="AdUserClose",t.AdPaused="AdPaused",t.AdPlaying="AdPlaying",t.AdLog="AdLog",t.AdError="AdError"}(n||(n={}));const r="nonLinearCloseClick"},9490:(t,i,e)=>{"use strict";var s,n,r,o;e.d(i,{Ez:()=>r,L5:()=>o,Qg:()=>l,T$:()=>h,XQ:()=>a,ZH:()=>n,d0:()=>u,gQ:()=>d,se:()=>c,wB:()=>s}),function(t){t.Play="play",t.Playing="playing",t.Pause="pause",t.Mute="mute",t.Unmute="unmute",t.Canplay="canplay",t.Ended="ended",t.Timeupdate="timeupdate",t.Seeking="seeking",t.Seeked="seeked",t.Volumechange="volumechange",t.Durationchange="durationchange",t.Fullscreen="fullscreen",t.LoadedData="loadeddata",t.LoadedMetadata="loadedmetadata",t.Error="error"}(s||(s={})),function(t){t[t.Auto=0]="Auto",t[t.Strict=1]="Strict"}(n||(n={})),function(t){t[t.PlayingState=0]="PlayingState",t[t.PausedState=1]="PausedState",t[t.PrerollState=2]="PrerollState",t[t.PostrollState=3]="PostrollState",t[t.StoppedState=4]="StoppedState",t[t.ReplayState=5]="ReplayState",t[t.HiddenState=6]="HiddenState",t[t.BufferingState=7]="BufferingState",t[t.LiveStreamStarting=8]="LiveStreamStarting",t[t.LiveStreamEnded=9]="LiveStreamEnded",t[t.LiveStreamStopped=10]="LiveStreamStopped",t[t.LiveStreamNotSupported=11]="LiveStreamNotSupported",t[t.InCuePoint=12]="InCuePoint"}(r||(r={})),function(t){t.H264="h264",t.Hevc="hevc"}(o||(o={}));const h={PlayError:"playError",NewVideo:"newVideo",Buffering:"buffering",Buffered:"buffered",LevelSwitching:"levelSwitching",EndOfStream:"endOfStream",LiveStreamNotPlayable:"liveNotPlayable"},a={Change:"VideoQualityChanged",CurrentQuality:"CurrentQuality",Loaded:"QualityListLoaded"};var c;!function(t){t[t.Low144p=144]="Low144p",t[t.Low240p=240]="Low240p",t[t.Medium360p=360]="Medium360p",t[t.Medium480p=480]="Medium480p",t[t.High720p=720]="High720p",t[t.High1080p=1080]="High1080p"}(c||(c={}));const d=720,l=5e3,u={NewThumbnail:"NewThumbnail"}},6027:(t,i,e)=>{"use strict";e.d(i,{e:()=>h,j:()=>s});var s,n=e(9791);class r{}r.clientAb0=(0,n.Vm)([50,50]),r.clientAb1=(0,n.Vm)([100]);class o{}o.clientAb0=(0,n.Vm)([50,50]),o.clientAb1=(0,n.Vm)([100]),function(t){t[t.ElementsABService=0]="ElementsABService",t[t.PlayspaceABService=1]="PlayspaceABService"}(s||(s={}));class h{static get clientAb0(){return this.getABValueForKey("clientAb0")}static get clientAb1(){return this.getABValueForKey("clientAb1")}static getABValueForKey(t){return this.abServiceType===s.PlayspaceABService?o[t]:r[t]}static setClientAb1(t){if(this.abServiceType===s.PlayspaceABService)o.clientAb1=t;else r.clientAb1=t}}},2450:(t,i,e)=>{"use strict";e.d(i,{$:()=>a});const s="ats-liveramp-envelope-request";var n=e(289),r=e(9791),o=e(4798),h=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class a{static getEnvelopeFromParentAts(t){var i;return h(this,void 0,void 0,(function*(){if(!(null===(i=a.envelope)||void 0===i?void 0:i.envelope))try{const i=yield this.Qt(t);return(0,o.$K)(i)?void(a.envelope=JSON.parse(i)):void a.communicateViaPostMessage(t)}catch(t){}}))}static Qt(t){return h(this,void 0,void 0,(function*(){if(t.ats){try{return t.ats.retrieveEnvelope().then((t=>t))}catch(t){}return this.retrieveEnvelopeWithCallback(t)}}))}static retrieveEnvelopeWithCallback(t){return h(this,void 0,void 0,(function*(){try{return yield t.ats.retrieveEnvelope((t=>t))}catch(t){}}))}static communicateViaPostMessage(t){a.dispatchEnvelopeRequestEvent(t),a.addEnvelopeListener()}static dispatchEnvelopeRequestEvent(t){try{t.postMessage(s,"*")}catch(i){void 0!==t.contentWindow&&t.contentWindow.postMessage(s,"*")}}static receiveEnvelopeListener(t){t&&t.data&&"ats-liveramp-envelope-result"===t.data.message&&t.data.result&&(a.envelope=JSON.parse(t.data.result),window.removeEventListener("message",a.receiveEnvelopeListener))}static addEnvelopeListener(){window.addEventListener("message",a.receiveEnvelopeListener,!1)}static getEnvelopeWithConsent(t,i){return new Promise(((e,s)=>{i.isConsentConnatix()?a.getEnvelopeFromParentAts(t).then((()=>{var t;(null===(t=a.envelope)||void 0===t?void 0:t.envelope)?e(a.envelope.envelope):setTimeout((()=>s()),500)})):setTimeout((()=>s()),500)}))}static getEnvelope(t,i){return h(this,void 0,void 0,(function*(){yield(0,r.Up)((()=>a.getEnvelopeWithConsent(t,i))).catch((()=>{}))}))}static setEnvelopeStatus(t){a.envelopeStatus=t}static getValidEnvelope(){var t;return(null===(t=a.envelope)||void 0===t?void 0:t.envelope)&&a.envelopeStatus===n.LiveRampEnvelopeStatusEnum.Ok?a.envelope.envelope:null}static wasRequestEnhanced(t){var i;return(null===(i=a.envelope)||void 0===i?void 0:i.envelope)&&t===n.LiveRampEnvelopeStatusEnum.Ok}static destroy(){a.envelope=null}}a.envelope=null,a.envelopeStatus=n.LiveRampEnvelopeStatusEnum.Ok},3094:(t,i,e)=>{"use strict";e.d(i,{_:()=>p});var s=e(4581);const n=["adBanner","banner-search","abc_banner","Banner_Top","ad_container","pub_300x250","pub_300x250m","pub_728x90","text-ad","text_ad","textAd","text-ad-links","text_ads","text-ads","text-ad-links"],r="cnxtestadblock";var o=e(3020),h=e(9791),a=e(4798),c=e(655),d=e(6716),l=e(4318),u=function(t){function i(i,e,s){void 0===i&&(i=1/0),void 0===e&&(e=1/0),void 0===s&&(s=l.l);var n=t.call(this)||this;return n.Jt=i,n.Xt=e,n.Yt=s,n.Kt=[],n.Zt=!0,n.Zt=e===1/0,n.Jt=Math.max(1,i),n.Xt=Math.max(1,e),n}return(0,c.ZT)(i,t),i.prototype.next=function(i){var e=this,s=e.isStopped,n=e.Kt,r=e.Zt,o=e.Yt,h=e.Xt;s||(n.push(i),!r&&n.push(o.now()+h)),this.ii(),t.prototype.next.call(this,i)},i.prototype.Mt=function(t){this.Lt(),this.ii();for(var i=this.Rt(t),e=this.Zt,s=this.Kt.slice(),n=0;n<s.length&&!t.closed;n+=e?1:2)t.next(s[n]);return this.Ot(t),i},i.prototype.ii=function(){var t=this,i=t.Jt,e=t.Yt,s=t.Kt,n=t.Zt,r=(n?1:2)*i;if(i<1/0&&r<s.length&&s.splice(0,s.length-r),!n){for(var o=e.now(),h=0,a=1;a<s.length&&s[a]<=o;a+=2)h=a;h&&s.splice(0,h+1)}},i}(d.x);class p{static get isBannerBlocked(){return this.ei}static onAdBlockerDetected(){return this.si.asObservable()}static detectUsingCSS(t){try{let i=!1;t.document.body.insertAdjacentHTML("beforeend",this.ni());const e=t.document.getElementById(r);return 0!==e.getBoundingClientRect().height&&0!==e.getBoundingClientRect().width||(i=!0),t.document.body.removeChild(e),this.oi(i),i}catch(t){return this.oi(!1),!1}}static detectUsingScript(){return new Promise((t=>{const i=(0,h.pE)(window).topFrame,e=i=>{this.si.next(i),this.si.complete(),t(i)};i.googletag&&e(!1),(0,o.dZ)({src:s.x},i.document.head,i,(()=>i.googletag&&(0,a.QM)(i.googletag.getVersion())?e(!1):e(!0)),(()=>e(!0)))}))}static oi(t){this.ei=t,this.ei&&(this.si.next(!0),this.si.complete())}static ni(){return`<style>.adBanner{background-color: transparent; height: 1px !important; width: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important; display:block !important; }</style><div id="cnxtestadblock" class="${n.join(" ")}"></div>`}}p.ei=null,p.si=new u(1)},7129:(t,i,e)=>{"use strict";var s;!function(t){t.prebid="prebid",t.bid="bid",t.win="win",t.impression="impression",t.viewableImpression="viewableImpression",t.postbid="postbid",t.initAd="initAd",t.request="request",t.startAd="startAd"}(s||(s={}))},9741:(t,i,e)=>{"use strict";e.d(i,{S:()=>s});class s{}s.MaxLogOverflow=1e3,s.maxLogOverflowCount={},s.logCount={},s.maxLogSent={},s.sessionId="",s.playerDestroyed=!1,s.incrementLogCount=t=>{s.logCount[t]?(++s.maxLogOverflowCount[t],++s.logCount[t]):(s.logCount[t]=1,s.maxLogOverflowCount[t]=1)},s.isMaxLog=(t,i)=>!!(s.logCount[t]&&s.logCount[t]>i),s.isMaxLogOverflow=t=>s.maxLogOverflowCount[t]>s.MaxLogOverflow&&(s.maxLogOverflowCount[t]=1,!0),s.setMaxLogSent=t=>{s.maxLogSent[t]=!0},s.isMaxLogSent=t=>!!s.maxLogSent[t]},5742:(t,i,e)=>{"use strict";e.d(i,{f:()=>n});var s=e(307);class n{static getCidKeyValueObject(){return!!this.customerId&&{[s.ym]:this.customerId}}}n.customerId=null},8395:(t,i,e)=>{"use strict";e.d(i,{f:()=>d});var s=e(277),n=e(8843),r=e(6196);var o,h=e(4546),a=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},c=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)};let d=o=class{constructor(){var t,i;this.ai=new Map,this.ci=0,this.di=(void 0===(t=o.TIME_BETWEEN_TICKS)&&(t=0),void 0===i&&(i=n.z),t<0&&(t=0),(0,r.H)(t,t,i)),this.di.subscribe((()=>this.ui()))}setTimeout(t,i=0){return this.pi(t,i,!0)}clearTimeout(t){this.ai.delete(t)}setInterval(t,i=0){return this.pi(t,i,!1)}clearInterval(t){this.ai.delete(t)}mi(t){try{t.callback()}catch(t){(0,s.n)({message:"TimerService_error",callStack:t.stack,exception:t.message,level:s.D.INFO},{throttle:1})}}ui(){const t=(new Date).getTime(),i=[];for(const[e,s]of this.ai)t-s.startTime<s.duration*(s.intervalTimesCalled+1)||(this.mi(s),s.isTimeout?i.push(e):s.intervalTimesCalled++);for(const t of i)this.ai.delete(t)}pi(t,i,e){const s=++this.ci;return this.ai.set(s,{startTime:(new Date).getTime(),isTimeout:e,callback:t,duration:i,intervalTimesCalled:0}),s}};d.TIME_BETWEEN_TICKS=100,d=o=a([(0,h.ri)(),c("design:paramtypes",[])],d)},5935:(t,i,e)=>{"use strict";e.d(i,{X:()=>c});var s=e(8211),n=e(9791),r=e(8576),o=e(51),h=e(4798),a=e(3802);class c{constructor(t){this.vi=t,this.gi=100,this.yi=(0,n.pE)(window).topFrame,this.bi=s.a.indexOf(this.vi.browser.device)>-1,this.Ii=(0,n.dz)(),this.wi={browserType:this._i(),browserVersion:this.vi.browser.browserVersion},this.Si=this.Pi(),this.Ai=a.EN.fromProtoGetDeviceType(this.vi.browser.device),this.xi=this.pageUrl.substr(0,this.gi),this.ki=(0,o.ge)(this.xi),this.Ci=(0,o.FM)(this.xi)}_i(){let t;return Object.keys(r.lI).forEach((i=>{this.vi.browser.browserType.toLowerCase().includes(r.lI[i])&&(t=r.lI[i])})),t}Pi(){let t,i=0;const e=this.vi.browser.osCode.split("_"),n=e[0].toLowerCase();return Object.keys(s.M).forEach((i=>{n.includes(s.M[i])&&(t=s.M[i])})),t===s.M.IPadOS&&(t=s.M.Ios),e.length>1&&(i=parseFloat(`${e[1]||0}.${e[2]||0}`)),{os:t,osVersion:i}}get device(){return this.vi.browser.device}get browser(){return this.wi}get os(){return this.Si}get deviceType(){return this.Ai}get geoLocation(){return this.vi.geoLocation}get pageUrl(){return this.vi.pageUrl||""}get sessionId(){return this.vi.sessionId}get pageUrlTrunc(){return this.xi}get pageDomain(){return this.ki}get pageDomainFullPath(){return this.Ci}get isMobile(){return this.bi}get isInApp(){return(0,h.QM)(this.vi.bundleID)}get isAmp(){return this.vi.isAmp}get playerId(){return this.vi.playerId}get appId(){return this.Ii}get bundleID(){return(0,h.QM)(this.vi.iOSAppID)?this.vi.iOSAppID:this.vi.bundleID}get domainURL(){return this.vi.domainURL}get storeURL(){return this.vi.storeURL}get explorationMode(){return this.vi.explorationMode}get appName(){return this.vi.appName}get appCategories(){return this.vi.appCategories}get appVersion(){return this.vi.appVersion}get sdkVersion(){return this.vi.sdkVersion}get appPrivacyPolicy(){return this.vi.appPrivacyPolicy}get appIsPaid(){return this.vi.appIsPaid}get deviceId(){return this.vi.deviceId}get topWindow(){return this.yi}get appPageURL(){return this.vi.appPageURL}get isOVPDomain(){return this.vi.isOVPDomain}}},565:(t,i,e)=>{"use strict";var s;e.d(i,{Z:()=>s}),function(t){t.InPod="cnx-ad-in-pod",t.AdMarkerInPodTextContainer="cnx-ad-marker-text",t.AdDurationLabel="cnx-ad-duration",t.AdTitleLabel="cnx-ad-title",t.AdMarkerTitleContainer="cnx-ad-marker-title",t.AdMarkerTitleText="cnx-ad-title-text",t.CardImage="cnx-ad-card-image",t.CardTitle="cnx-ad-card-title",t.AdUiContent="cnx-ui-ad-content",t.InAd="cnx-ui-ad"}(s||(s={}))},9098:(t,i,e)=>{"use strict";e.d(i,{M4:()=>h,_n:()=>a,nn:()=>s,nu:()=>r,qF:()=>o,wy:()=>n});const s=4,n=4,r=20,o=100,h=50;var a;!function(t){t.MainContainer="cnx-scrollbar",t.Wrapper="cnx-scrollbar-wrapper",t.Content="cnx-scrollbar-content",t.Horizontal="cnx-scrollbar-horizontal",t.Handle="cnx-scrollbar-handle",t.PreventSelect="cnx-scrollbar-prevent-select",t.ShowOnHover="cnx-scrollbar-show-on-hover"}(a||(a={}))},3310:(t,i,e)=>{"use strict";e.d(i,{$:()=>r});var s=e(9098),n=e(3020);class r{constructor(t,i={}){if(this.Ei=t,this.vi=i,this.Mi=0,this.Li=t=>{t.preventDefault(),this.Bi=t.pageY,this.Oi=t.pageX,(0,n.cn)(this.Ri,s._n.PreventSelect),(0,n.cn)(this.Di.document.body,s._n.PreventSelect),this.Di.document.addEventListener("mousemove",this.Vi),this.Di.document.addEventListener("mouseup",this.ji)},this.Vi=t=>{const i=this.vi.horizontal?t.pageX-this.Oi:t.pageY-this.Bi;this.Bi=t.pageY,this.Oi=t.pageX,(0,n.PM)(this.Di,(()=>{this.vi.horizontal?this.Fi.scrollLeft+=i/this.Ni:this.Fi.scrollTop+=i/this.Ni}))},this.ji=t=>{(0,n.IV)(this.Ri,s._n.PreventSelect),(0,n.IV)(this.Di.document.body,s._n.PreventSelect),this.Di.document.removeEventListener("mousemove",this.Vi),this.Di.document.removeEventListener("mouseup",this.ji)},this.Ui=t=>{if(!this.vi.horizontal)return;const i=t.deltaMode?s.qF*(t.deltaY<0?-1:1):t.deltaY,e=s.nu*(Math.floor(i)/33),r=this.Mi+e;r>=-1*this.Ri.clientWidth&&r<=this.Fi.scrollWidth-this.Ri.clientWidth&&(this.Mi=r),(0,n.PM)(this.Di,(()=>this.Fi.scrollLeft=this.Mi))},this.$i=()=>{clearTimeout(this.qi),this.qi=setTimeout((()=>{this.Hi()}),s.M4)},this.Hi=()=>{const t=this.vi.horizontal?this.Fi.scrollWidth:this.Fi.scrollHeight,i=this.vi.horizontal?this.Ei.clientWidth:this.Ei.clientHeight;this.Ni=i/t;const e=-1*(this.Ei.clientWidth-(this.Ri.clientWidth||s.nn)-s.wy),r=this.Ei.clientHeight-this.Ri.clientHeight-s.wy;(0,n.PM)(this.Di,(()=>{if(this.Ni>=1)(0,n.MV)(this.Ri);else{if((0,n.Ho)(this.Ri),this.vi.horizontal)return void(0,n.T7)(this.Ri,{width:`${Math.max(100*this.Ni,10)}%`,height:"",top:`${r}px`,right:"",left:this.Fi.scrollLeft/t*100+"%"});(0,n.T7)(this.Ri,{width:"",height:`${Math.max(100*this.Ni,10)}%`,top:this.Fi.scrollTop/t*100+"%",right:`${e}px`,left:""}),this.zi()}}))},this.Di=(0,n.LT)(t),!this.Di)throw new Error("window was not found");this.Wi(),this.Ri.addEventListener("mousedown",this.Li),this.vi.overrideNativeHorizontalScroll&&this.Fi.addEventListener("wheel",this.Ui,{passive:!0}),this.Di.addEventListener("resize",this.$i),this.Fi.addEventListener("scroll",this.Hi),this.Fi.addEventListener("mouseenter",this.Hi),(0,n.cn)(this.Ei,s._n.MainContainer,this.vi.horizontal?s._n.Horizontal:void 0,this.vi.showOnHover?s._n.ShowOnHover:void 0),this.Hi();const e=(0,n.Dx)(this.Ei,this.Di);"0px"===e.height&&"0px"!==e.maxHeight&&(0,n.T7)(this.Ei,{height:e.maxHeight})}Wi(){for(this.Ri=(0,n.G$)(`<cnx class="${s._n.Handle}">`,this.Di),this.Gi=(0,n.G$)(`<cnx class="${s._n.Wrapper}">`,this.Di),this.Fi=(0,n.G$)(`<cnx class="${s._n.Content}">`,this.Di),this.Gi.appendChild(this.Fi);this.Ei.firstChild;)this.Fi.appendChild(this.Ei.firstChild);this.Ei.appendChild(this.Gi),this.Ei.insertAdjacentElement("beforeend",this.Ri)}zi(){const t=new Event("cnx-mod-scrollbar");this.Ei.dispatchEvent(t)}destroy(){for(this.removeListeners(),(0,n.bX)(this.Ri);this.Fi.firstChild;)this.Ei.appendChild(this.Fi.firstChild);(0,n.bX)(this.Gi),(0,n.IV)(this.Ei,s._n.MainContainer,s._n.Horizontal,s._n.ShowOnHover)}removeListeners(){this.Di.document.removeEventListener("mousemove",this.Vi),this.Di.document.removeEventListener("mouseup",this.ji),this.Ri.removeEventListener("mousedown",this.Li),this.Fi.removeEventListener("wheel",this.Ui),this.Di.removeEventListener("resize",this.$i),this.Fi.removeEventListener("scroll",this.Hi),this.Fi.removeEventListener("mouseenter",this.Hi)}}},7994:(t,i,e)=>{"use strict";e.d(i,{C:()=>s});class s{constructor(){this.Qi=!1,this.promise=new Promise(((t,i)=>{this.Xi=t,this.Yi=i}))}Ki(){this.Qi||(this.Qi=!0)}resolve(t){this.Ki(),this.Xi(t)}reject(t){this.Ki(),this.Yi(t)}get isPending(){return!this.Qi}}},6299:(t,i,e)=>{"use strict";e.d(i,{P:()=>a});var s,n=e(4798),r=e(289);!function(t){t[t.Desktop=2]="Desktop",t[t.SmartTV=3]="SmartTV",t[t.Smartphone=4]="Smartphone",t[t.Tablet=5]="Tablet",t[t.GameConsole=6]="GameConsole",t[t.Unrecognized=7]="Unrecognized"}(s||(s={}));const o={[r.ProtoDeviceType.Desktop]:s.Desktop,[r.ProtoDeviceType.Smartphone]:s.Smartphone,[r.ProtoDeviceType.Tablet]:s.Tablet,[r.ProtoDeviceType.GameConsole]:s.GameConsole,[r.ProtoDeviceType.SmartTV]:s.SmartTV,[r.ProtoDeviceType.WearableComputer]:s.Unrecognized,[r.ProtoDeviceType.PDA]:s.Unrecognized,[r.ProtoDeviceType.Unrecognized]:s.Unrecognized},h="cnx_fraud_sensor";class a{constructor(t,i,e,s){this.Zi=t,this.te=i,this.ie=e,this.ne(s)}addFraudSensorScript(){if(this.te.getElementById(h))return;const t={id:h,src:this.Zi.setupMacros("https://s.srvsynd.com/2/234175/analytics.js?dt=2341751597675869250012&di=[DOMAIN]&ui=[FS_USER_ID]&md=[FS_MEDIA_TYPE]&ap=[FS_DEVICE_IDENT]&sr=[CNX_SUPPLIER_ID]&pp=[PUBLISHER_ID]&ti=[SESSION_ID]&de=[FS_DEVICE_TYPE]&to=[MGTO]&pv=[MGID]")};this.te.insertScript(t,null,"FraudSensor_script_error")}ne(t){t=(0,n.QM)(t)?t:"00000000-0000-0000-0000-000000000000";const{lookupId:i,lookupResponseCode:e,publisherAdsTxt:s,deviceIdentifier:r}=this.ie,h=o[this.ie.deviceType];this.Zi.setPublisherId(s),this.Zi.setUserId(t),this.Zi.setFraudSensorMacros({lookupId:i,lookupResponseCode:e,deviceType:h,mediaType:2,deviceIdentifier:r})}}},8049:(t,i,e)=>{"use strict";e.d(i,{a:()=>Q});var s=e(9361),n=e(8532),r=e(8983),o=e(7945),h=e(5227),a=e(307),c=e(6027),d=e(3094),l=e(9741),u=e(5935),p=e(6299),f=e(970),m=e(5701),v=e(4701),g=e(1997),y=e(5172),b=e(289),I=e.n(b),w=e(3326),_=e(6153),S=e(5687),P=e(6666),A=e(1992),x=e(7187),k=e(1526),T=e(5292),C=e(5421),E=e(1553),M=e(7269),L=e(5650),B=e(3020),O=e(9791),R=e(51),D=e(277),V=e(9600),j=e(3003),F=e(4798),N=e(4975),U=e(89),$=e(9577),q=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};const H=[],z=[],W="player_instance",G=",";class Q extends m._{constructor(t,i,e,s,n,r,o){super(),this.services=t,this.GLOBAL=i,this.re=e,this.oe=s,this.he=n,this.ae=r,this.readyCallback=o,this.ce={},this.de="<cnx-placeholder></cnx-placeholder>",this.le=100,this.ue=1e3,this.PLAYER_REQUEST_RETRIES_NUMBER=2,this.isServerlessMode=!1,this.pe=!1,this.fe=[],this.me="{{omidVerificationClient}}",this.ve=[],this.re&&this.ye(),d._.detectUsingCSS(this.GLOBAL),this.be=(0,B.sw)(this.GLOBAL)}initUrlSuffixer(t){const i=new E.f;if(t.bandwidthLoggingState===b.ProtoBandwidthLoggingEnum.Disabled)return i;const e=this.Ie(t);return i.setUrlParams({domain:_.n.bundleDomain,urlParams:[(0,j.IS)(e,t.playerId)]}),i}_e(){const t={playerId:this.externalAttributes.playerId,_appSettings:this.externalAttributes._appSettings,settings:{_connatixInternals:this.externalAttributes.settings._connatixInternals,advertising:{},customization:{},rendering:{},plugins:{}}};this.externalAttributes.customParam1&&(t.customParam1=this.externalAttributes.customParam1),this.externalAttributes.customParam2&&(t.customParam2=this.externalAttributes.customParam2),this.externalAttributes.customParam3&&(t.customParam3=this.externalAttributes.customParam3),this.externalAttributes.customParam4&&(t.customParam4=this.externalAttributes.customParam4),this.externalAttributes.customParam5&&(t.customParam5=this.externalAttributes.customParam5),this.externalAttributes.settings.useExternalViewabilityService&&(t.settings.useExternalViewabilityService=this.externalAttributes.settings.useExternalViewabilityService),this.externalAttributes=t}Se(t){const i=this.GLOBAL.frameElement;if(!(0,B.GF)(i))return;let e=!0;i&&t&&(e=!1),e?(0,B.MV)(i):(0,B.Ho)(i)}Pe(t,i){try{return this.Ae(t,i)}catch(t){return null}}xe(t){let i;try{i=eval(t)}catch(e){i=t.replace(/\[(\d+)]/g,":nth-child($1)")}return i}ke(t,i){const e=this.Pe(t,i);return null===e?new Promise((e=>{setTimeout((()=>{e(this.ke(t,i))}),this.le)})):Promise.resolve(e)}Te(t,i){const e=this.xe(t);return Promise.resolve(this.ke(e,i))}Ae(t,i){let e;return t.split(/(\.cnxEq\(\d+\))/).filter((t=>t)).forEach((t=>{e=t.includes("cnxEq")?this.Ce(e,t):e?e.querySelectorAll(t):(0,B.Wb)(t,i)})),e?(e.hasOwnProperty("length")&&(e=e.length>0?e[0]:null),e):null}Ce(t,i){const e=/\d+/g.exec(i),s=parseInt(e[0],10);return s>t.length?(0,L.Sz)(t)[t.length-1]:(0,L.Sz)(t)[s]}Ee(){return this.oe?b.ProtoImplementationType.Amp:b.ProtoImplementationType.Web}Me(t,i){const e=(0,O.pE)(this.GLOBAL);let s;return s=(0,F.$K)(this.externalAttributes.settings.rendering.forceInsertPath)?this.externalAttributes.settings.rendering.forceInsertPath:i.forceInsertPath,new Promise(((n,o)=>{let h=(0,B.G$)(this.de,this.GLOBAL);if(s||t.tag.parentNode===this.GLOBAL.document.head&&(!e.topChildFrame||i.renderInFrame)){let t,s,o;e.topChildFrame&&(0,B.IV)(e.topChildFrame.frameElement,r.Gj.DisplayNone),t=(0,F.QM)(this.externalAttributes.settings.rendering.containerSelector)?this.externalAttributes.settings.rendering.containerSelector:i.containerSelector,s=(0,F.$K)(this.externalAttributes.settings.rendering.insertPosition)?this.externalAttributes.settings.rendering.insertPosition:i.insertPosition,o=(0,F.$K)(this.externalAttributes.settings.rendering.position)?this.externalAttributes.settings.rendering.position:i.position,this.Te(t,e.topFrame).then((t=>{this.Le(t,h,s,o),n({insertContainer:h,insertWindow:e.topFrame})}))}else e.topChildFrame&&!i.renderInFrame?(h=(0,B.G$)(this.de,e.topFrame),e.topChildFrame.frameElement.parentNode.insertBefore(h,e.topChildFrame.frameElement),(0,B.cn)(e.topChildFrame.frameElement,r.Gj.DisplayNone),n({insertContainer:h,insertWindow:e.topFrame})):(t.tag.parentNode.insertBefore(h,t.tag),n({insertContainer:h}))}))}Be(t,i,e){(0,B.IS)(i,t,e)}Oe(t,i,e){switch(e){case b.ProtoPlayerInsertMode.BeforeContainer:t.parentElement.insertBefore(i,t);break;case b.ProtoPlayerInsertMode.ReplaceContainer:t.parentElement.insertBefore(i,t),(0,B.bX)(t);break;case b.ProtoPlayerInsertMode.HideContainer:t.parentElement.insertBefore(i,t),(0,B.MV)(t);break;case b.ProtoPlayerInsertMode.AfterContainer:t.nextElementSibling?t.parentElement.insertBefore(i,t.nextElementSibling):t.parentElement.appendChild(i)}}Le(t,i,e,s){e===b.ProtoPlayerInsertMode.WithinContainer?this.Be(t,i,s):this.Oe(t,i,e)}Re(t,i=[]){t.lineItems=[...t.lineItems,...i];const e=t.lineItems.length;t.lineItems=(0,L.qy)("advertiserLineItemId",t.lineItems),e!==t.lineItems.length&&(0,D.n)({level:D.D.WARN,message:"Loader_duplicated_adsources",callStack:"_"})}De(t,i){const e=t.players[i],{sessionId:r}=e,{playerModel:o,globalDomUtilsService:a,urlSuffixerService:c}=this.ce[i];if(this.je(t.cookieSyncUrls),this.services.UserManagerService.setGeoLocation(t.geoLocation),l.S.sessionId=r,this.Fe.addPlayerSession(e.playerId,r),!o)return void this.registerApiError(n.n9.SetupError,"No playlist was provided!");const p=new u.X({iOSAppID:this.re&&!this.he?t.iOSAppID:null,browser:t.browser,geoLocation:t.geoLocation,pageUrl:this.pageUrl,playerId:o.playerId,explorationMode:t.explorationMode,isAmp:this.oe,bundleID:this.externalAttributes._appSettings.bundleID,domainURL:this.externalAttributes._appSettings.domainURL,storeURL:this.externalAttributes._appSettings.storeURL,appCategories:this.externalAttributes._appSettings.appCategories,appIsPaid:this.externalAttributes._appSettings.appIsPaid,appName:this.externalAttributes._appSettings.appName,appPrivacyPolicy:this.externalAttributes._appSettings.appPrivacyPolicy,appVersion:this.externalAttributes._appSettings.appVersion,sdkVersion:this.externalAttributes._appSettings.sdkVersion,deviceId:this.externalAttributes._appSettings.deviceID,appPageURL:this.externalAttributes._appSettings.appPageURL,isOVPDomain:this.ae,sessionId:r}),f={browser:t.browser,geoLocation:t.geoLocation,playerId:o.playerId,userId:this.services.UserManagerService.getTrackableUser(),sessionId:t.players[i].sessionId,pageUrl:this.pageUrl,bundleId:this.externalAttributes._appSettings.bundleID,customParam1:this.externalAttributes.customParam1,customParam2:this.externalAttributes.customParam2,customParam3:this.externalAttributes.customParam3,customParam4:this.externalAttributes.customParam4,customParam5:this.externalAttributes.customParam5,abTestId:t.players[i].abTestId,isExplorationMode:t.explorationMode,bundleAbId:t.bundleAbId,bundlePart:t.bundlePart,lineItemAbTestInformation:t.lineItemAbTestInformation,implementationType:this.Ee(),iasSegmentCodes:t.IASSegmentCodes,amazonTamPubId:t.AmazonTamPubId},m={pageDomain:p.pageDomain},{sessionEvents:v,generalRepository:g,wcagService:y,mediaEvents:I,trackingService:w,adEvents:_}=$.o.boostrapSessionContainer(e.sessionId,f,this.services.UserManagerService,m,o.disableTracking),S=new T.v(a),P=this.getViewabilityService(o,S,g);d._.detectUsingCSS(o.global);const A=new k.c(o,t.geoLocation,p.pageUrl,p.pageDomain,p.pageDomainFullPath,this.externalAttributes._appSettings,this.be,t.publisherNetworkCode),E={services:{GlobalDomUtilsService:a,ViewabilityService:P,ResizeObserver:new C.a(o.global),UserManagerService:this.services.UserManagerService,MacrosService:A,EventsStorageService:this.services.EventsStorageService,PageFocusService:S,InteractionService:new x.k(o.global,p.isMobile),UrlSuffixerService:c},config:p};d._.isBannerBlocked&&v.sessionAdBlocked.next({adBlockDetectionType:s.ev.Banner}),E.services.UserManagerService.setPageUrl(E.config.pageUrl),o.externalMacros&&E.services.MacrosService.addExtraMacros(o.externalMacros),E.services.UserManagerService.onEvent([M.k.CCPA_INFO_RECEIVED]).then((()=>{E.services.MacrosService.setUsPrivacyString(E.services.UserManagerService.getUsPrivacyString())})),E.services.UserManagerService.onEvent([M.k.CONSENT_DATA_UPDATE]).then((()=>{g.userId=E.services.UserManagerService.getTrackableUser();const t=E.services.UserManagerService.getConsentPayload();if(g.hasGdprConsentPayload=(0,F.QM)(t),this.services.UserManagerService.gdprConsentMode===b.ProtoGdprConsentModeEnum.NoConsent||this.re){const t=o.lineItemSettings.lineItems.filter((t=>(0,F.QM)(t.vendorId))).every((t=>this.services.UserManagerService.isConsent(t.vendorId)));this.services.UserManagerService.gdprConsentMode=t?b.ProtoGdprConsentModeEnum.AllGood:b.ProtoGdprConsentModeEnum.NotAllDemandConsent}}));const L={wasPlayerReloaded:this.Fe.wasPlayerReloaded(e.playerId),wasPlayerInView:this.Fe.getSessionInView(e.playerId)};this.renderer=this.getRendererInstance(o,E,L,this.externalAttributes._appSettings,v,_,I,g,y,w),this.subscribe(h.Xh.SessionView,this.renderer,(()=>{this.Fe.addSessionInView(e.playerId)})),this.subscribe(h.Xh.SessionRendered,this.renderer,(()=>{this.Ne(A,a,E.config)}));const B=Object.assign({configEnums:this.getApiConfigEnums(),configEvents:this.getApiConfigEvents()},this.renderer.getApiMethods());let O=e.customJsCode;if(O){const t=`${W}_${E.config.appId}`;this.GLOBAL[t]=B,O=O.cnx_replaceAll(`"{{${W}}}"`,`window.${t}`)}this.renderer.init((()=>{this.Ue(O)}))?this.registerApiSuccess(B):this.registerApiError(n.n9.RenderError,"Player size under supported value")}Ue(t,i={useSafeMode:!0}){if(!t)return;const{global:e,useSafeMode:s}=i,n=e||this.GLOBAL;let r;r=s?`\n        (function() {\n            "use strict";\n            try {\n                ${t}\n            }catch(e){\n                console.warn('---CnxCustomApiError---');\n                console.warn(e.message);\n            }\n          })()\n        `:t,(0,B.ML)(n.document.head,n,r.trim())}ye(){if(this.me.includes("{{omidVerificationClient"))return;const t={useSafeMode:!1,global:window};this.Ue(decodeURI(this.me),t)}$e(){const{playerId:t,parseDomain:i}=this.He;return this.ze(t,i).catch((t=>{const i=new Error(t);throw(0,D.n)({callStack:i.stack,level:D.D.CRITICAL,exception:i.message,message:"Prerender_Loader_player_id_call_get_pls"},{throttle:1e3}),this.registerApiError(n.n9.SetupError,"player data call error"),this.We(),i}))}Ge(t){return q(this,void 0,void 0,(function*(){const{browser:i,userInformation:e}=t;if(this.services.UserManagerService.setUserInformation(e),this.services.UserManagerService.setBrowserInfo(i),t.hashedPageUrl&&(yield P.k.loadPageInsights({insightsInputType:A.i.Page,id:t.hashedPageUrl})),e&&e.callFraudSensor){const{lookupId:t,lookupResponseCode:s,publisherAdsTxt:n}=e;this.ie={lookupId:t,lookupResponseCode:s,publisherAdsTxt:n,deviceType:i.device}}c.e.serverAb0=t.serverAb0,c.e.serverAb1=t.serverAb1,(0,L.BZ)(t.players)?(t.players.length>1&&(this._e(),this.pe=!0),Object.keys(t.players).forEach((i=>{this.Qe(t,this.He,i)}))):this.registerApiError(n.n9.NoPlayer,`No player available for given player id:${this.He.playerId}`),this.We()}))}We(){this.Je(),this.Xe()}Xe(){this.ve.push(this.renderer.onReady().pipe((0,N.h)((t=>!!t)),(0,U.q)(1)).subscribe((()=>{setTimeout((()=>{if(!this.pe){const t=this.fe[0];this.readyCallback&&this.readyCallback(t.apiErrorObj,t.apiConfigObj)}this.Ye()}))})))}Ye(){this.fe.filter((t=>t.apiErrorObj)).forEach((()=>{this.services.EventsStorageService.emitRenderError()}))}Qe(t,i,e){const s=t.players[e],{playerModel:n}=this.ce[e];this.Se(s.renderInFrame),this.De(t,e),this.Ke(n,this.renderer.playerContainer)}ze(t,i=!1){let e={parseDomain:i,referrer:this.be,pageUrl:this.pageUrl,tokens:[t]};e.bundleId=this.externalAttributes._appSettings.bundleID,this.queryParams.cnxLineItemId&&(e.forceLineItemIds=this.queryParams.cnxLineItemId.split(G).filter((t=>(0,F.QM)(t)))),this.queryParams.cnxPlayerId?e.forcePlayerId=this.queryParams.cnxPlayerId:this.externalAttributes.settings._connatixInternals.skipServingRules&&(e.forcePlayerId=t),this.queryParams.cnxExplorationMode&&(e.forceExploration=!0);const{queryJsTargeting:s}=this.externalAttributes.settings;return(0,F.as)(s)&&Object.keys(s).length>0&&(e.queryJsTargeting=(0,O.rM)(s)),e.customParam1=this.externalAttributes.customParam1,e.customParam2=this.externalAttributes.customParam2,e.customParam3=this.externalAttributes.customParam3,e.customParam4=this.externalAttributes.customParam4,e.customParam5=this.externalAttributes.customParam5,e.disableTracking=this.externalAttributes.settings._connatixInternals.disableTracking,e.version=o.g.version,e.es6=o.x,e.userId=this.services.UserManagerService.getForcedTrackableUser(),e.isConsentConnatix=this.services.UserManagerService.isConsentConnatix(),e.clientAb0=c.e.clientAb0,e.clientAb1=c.e.clientAb1,e.implementationType=this.Ee(),e.reloadedPlayers=this.Fe.getCookiePlayersSession(),e.servingRuleId=this.externalAttributes.servingRuleId,e=Object.assign(Object.assign({},e),this.getSpecificRequestData()),this.He.playerId?this.getPlayerResponse(e):new Promise(((t,i)=>{this.isServerlessMode=!0,t(this.defaultInitFromProto())}))}Ze(){const t=(0,R.Ph)("cnxVideoPosition",this.pageUrl),i=parseInt((0,R.Ph)("cnxStoryPosition",this.pageUrl),10);return{cnxStoryId:(0,R.Ph)("cnxStoryId",this.pageUrl),cnxLineItemId:(0,R.Ph)("cnxLineItemId",this.pageUrl),cnxPlayerId:(0,R.Ph)("cnxPlayerId",this.pageUrl),cnxMediaId:(0,R.Ph)("cnxMediaId",this.pageUrl),cnxPlaylistId:(0,R.Ph)("cnxPlaylistId",this.pageUrl),cnxVideoPosition:t?parseInt(t,10):null,cnxExplorationMode:"true"===(0,R.Ph)("cnxExplorationMode",this.pageUrl),cnxStoryPosition:(0,F.r)(i)?i:null,cnxSkipAdsFlag:"true"===(0,R.Ph)("cnxSkipAdsFlag",this.pageUrl),cnxReloadTime:parseInt((0,R.Ph)("cnxReloadTime",this.pageUrl),10),cnxOverrideLineitems:"true"===(0,R.Ph)("cnxOverrideLineitems",this.pageUrl),cnxIsSeoTraffic:"true"===(0,R.Ph)("cnxIsSeoTraffic",this.pageUrl),cnxDebug:"true"===(0,R.Ph)("cnxDebug",this.pageUrl),cnxEnableNewUi:"true"===(0,R.Ph)("cnxEnableNewUi",this.pageUrl)}}Ke(t,i){const e=this.getDelegateHandler(),s=new v.N(this.GLOBAL,this.services.EventsStorageService,e,t,i);this.ae?d._.isBannerBlocked||this.ve.push(d._.onAdBlockerDetected().subscribe((t=>{t||s.start()}))):s.start()}Ne(t,i,e){if(!this.ie)return;const s=this.services.UserManagerService.getTrackableUser();this.ie.deviceIdentifier=e.bundleID;const n=new p.P(t,i,this.ie,s);this.ae?this.ve.push(d._.onAdBlockerDetected().subscribe((t=>{t||n.addFraudSensorScript()}))):n.addFraudSensorScript()}je(t){d._.isBannerBlocked||(this.ae?this.ve.push(d._.onAdBlockerDetected().subscribe((i=>{i||this.services.UserManagerService.setThirdPartySyncUrls(t)}))):this.services.UserManagerService.setThirdPartySyncUrls(t))}ts(){const t=y.$.getSessionClient(this.GLOBAL);t?this.es=new g.Z(t,this.services.EventsStorageService,this.externalAttributes._appSettings.sdkVersion):(0,D.n)({message:"OmidSessionClient not found.",level:D.D.CRITICAL})}ss(t){const i=()=>new Promise(((i,e)=>{const s=this.ns();t.addCssStylesheetToHead(s,(()=>i()),(t=>e(t)))}));return(0,O.Up)((()=>i())).catch((t=>{throw(0,D.n)({message:"Loader_add_css_link",exception:t,level:D.D.INFO}),new Error(t)}))}Ie(t){return t.bandwidthLoggingState===b.ProtoBandwidthLoggingEnum.Enabled?a.Kp:t.bandwidthLoggingState===b.ProtoBandwidthLoggingEnum.SaaS?a.a8:void 0}setApiHostUrl(t){_.n.apiHostUrl=t}setInappPageUrl(t){(0,F.QM)(t)&&(this.pageUrl=t)}updateQueryParams(){this.queryParams=this.Ze()}loadScriptTag(t,i){if(this.externalAttributes=t,(0,F.QM)(t.playerId)&&!(0,O.er)(t.playerId))return(0,D.n)({level:D.D.WARN,message:"Invalid_Player_GUID",exception:t.playerId}),this.registerApiError(n.n9.InvalidGUID,"Invalid PlayerID was provided"),!1;let e;if(i&&(e=this.GLOBAL.document.getElementById(i)),!e)return(0,D.n)({message:"Loader_no_script_id",exception:`${t.playerId}`,level:D.D.WARN}),this.registerApiError(n.n9.SetupError,"Could not locate any script tag ids in the page"),!1;const s=(0,F.as)(t.settings.plugins.adobeAnalyticsSettings);return this.he&&this.ts(),this.He={parseDomain:s,playerId:t.playerId,tag:e},!0}insertRenderer(){try{this.Fe=new f.e(this.queryParams.cnxReloadTime),this.Se();const t=()=>{try{this.$e().then((t=>{const i=[];t.players.forEach(((e,s)=>{t.players[s].limitClientSideApiUse&&this._e();const r=this.Me(this.He,e).then((i=>{this.Re(e,t.lineItems);const n=this.initUrlSuffixer(e),r=this.getPlayerModel(i,t,n,s.toString()),o=new S.m(r.global);return(0,w.u)(r.lineItemSettings.lineItems),this.ce[s]={playerModel:r,globalDomUtilsService:o,urlSuffixerService:n},this.ss(o)})).catch((t=>{this.registerApiError(n.n9.SetupError,"rendering error"),(0,D.n)({message:"Loader_send_data_to_renderer",exception:t.message,callStack:t.stack,level:D.D.CRITICAL})}));i.push(r)})),Promise.all(i).then((()=>this.Ge(t)))}))}catch(t){(0,D.n)({message:"Prerender_Loader_do_player_call",callStack:t.stack,exception:t.message,level:D.D.WARN},{throttle:1e3})}};this.Je=this.services.UserManagerService.registerPlsCall(t)}catch(t){(0,D.n)({message:"Prerender_Loader_insert_renderer",exception:t.message,callStack:t.stack,level:D.D.CRITICAL})}}findPageUrl(t,i,e=!1){if(t.cnx_page_url)this.pageUrl=t.cnx_page_url;else try{t["cnxAmpAd)"]?this.pageUrl=t.context.sourceUrl||t.context.location.href:this.pageUrl=i||(0,O.lU)((0,O.pE)(this.GLOBAL),this.GLOBAL)}catch(t){}if(!this.pageUrl||0===this.pageUrl.length)return e||(0,D.n)({message:"Prerender_Loader_find_page_url",level:D.D.INFO},{throttle:1e3}),new Promise((e=>{setTimeout((()=>{this.findPageUrl(t,i,!0).then((()=>e()))}),this.ue)}));try{return this.pageUrl=(0,R.sH)(this.pageUrl),Promise.resolve()}catch(t){return(0,D.n)({message:"Loader_find_page_url",exception:t.message,callStack:t.stack,level:D.D.CRITICAL}),Promise.reject()}}registerApiError(t=n.n9.SetupError,i=""){this.fe.push({apiErrorObj:{type:t,message:i}})}registerApiSuccess(t){this.fe.push({apiConfigObj:t})}setClientAb1(){try{const t=(0,R.ge)(this.pageUrl);if(H.includes(t))c.e.setClientAb1(2);else{z.includes(t)&&c.e.setClientAb1(1)}}catch(t){}}destroy(){this.renderer&&this.renderer.destroy(),(0,V.i)(this.ve)}}},970:(t,i,e)=>{"use strict";e.d(i,{e:()=>o});var s=e(9791),n=e(277),r=e(9357);class o{constructor(t){this.RELOAD_TIME=r.ti,this.RELOAD_COOKIES="cnx_player_reload",this.SESSION_IN_VIEW_FLAG="_sessionWasViewed",this.rs={},this.hs={},this.cs={},this.yi=(0,s.pE)(window).topFrame,this.ds(t);try{this.ls()}catch(t){(0,n.n)({message:"PlayerReloader_cookie_fetch_failed",level:n.D.WARN,exception:t})}}wasPlayerReloaded(t){return!!this.rs[t]}addPlayerSession(t,i){this.hs[t]=i}getCookiePlayersSession(){return this.rs}addSessionInView(t){this.hs[t]+=this.SESSION_IN_VIEW_FLAG}getSessionInView(t){return this.cs[t]}ds(t){setTimeout((()=>{this.us(),this.yi.location.reload()}),t||this.RELOAD_TIME)}ls(){decodeURIComponent(this.yi.document.cookie).split(";").forEach((t=>{const i=t.split("=");i[0].includes(this.RELOAD_COOKIES)&&(this.rs=JSON.parse(i[1]))})),this.ps(),this.vs()}ps(){Object.keys(this.rs).forEach((t=>{const i=this.rs[t].indexOf(this.SESSION_IN_VIEW_FLAG);i>-1&&(this.rs[t]=this.rs[t].substr(0,i),this.cs[t]=!0)}))}vs(){this.yi.document.cookie=`${this.RELOAD_COOKIES}=; expires = Thu, 01 Jan 1970 00:00:00 GMT; path=/`}us(){Object.keys(this.cs).forEach((t=>{this.hs[t].includes(this.SESSION_IN_VIEW_FLAG)||this.addSessionInView(t)}));const t=new Date;let i=t.getTime();i+=r.Y0*r.s_,t.setTime(i),this.yi.document.cookie=`${this.RELOAD_COOKIES}=${JSON.stringify(this.hs)}; expires=${t.toUTCString()}; path=/`}}},6224:(t,i,e)=>{"use strict";e.d(i,{t:()=>h});var s=e(9791),n=e(277),r=e(4798),o=e(9831);class h{constructor(t,i){this.gs=t,this.ys=i,this.bs=(t,i)=>new Promise(((e,s)=>{o.n.sendProtoRequest({protoResponse:this.gs,endpoint:t,requestType:"GET",shouldLogErrors:!0,timeout:i}).then((t=>{e(t)})).catch((t=>{s(t)}))}))}fetchMetadata(t,i=5,e=!0,n){const o=t=>403===this.Is(t);return new Promise(((h,a)=>{(0,s.Up)((()=>this.bs(t,n)),i,o).then((i=>{if((0,r.as)(i))return h(i);const e=new Error("invalid metadata");return this.ws({url:t,metadata:i,e}),a(e)})).catch((i=>{e&&this.ws({url:t,e:i}),a(i)}))}))}ws(t){var i;const e=(0,r.QM)(null===(i=t.e)||void 0===i?void 0:i.message)?t.e.message:"";e.includes("XhrUtils_XMLHttpRequest_error")||(0,n.n)({message:"MediaMetadataHandler_fetchMetadata",exception:`${this.ys}_${e}:${JSON.stringify(t)}`,callStack:t.e&&t.e.stack,level:n.D.CRITICAL})}Is(t){if(t&&t.message){const i=t.message.split("status:")[1];return i?parseInt(i.slice(0,3),10):null}return null}}},5701:(t,i,e)=>{"use strict";e.d(i,{_:()=>n});var s=e(5650);class n{constructor(){this._s={}}subscribe(t,i,e){this._s[t]||(this._s[t]=[]),this._s[t].push({context:i,func:e})}unsubscribe(t,i,e){this._s[t]&&(this._s[t]=this._s[t].filter((t=>!(t.context===i&&(t.func===e||!e)))))}unsubscribeAll(t){Object.keys(this._s).forEach((i=>{this._s[i]=this._s[i].filter((i=>i.context!==t))}))}publish(t,i,e={payload:void 0}){Object.prototype.hasOwnProperty.call(this._s,i)&&this._s[i].forEach((i=>{i.context===t&&i.func(e)}))}relay(t,i,e,n){(0,s.qo)(t).forEach((t=>{this.subscribe(t,i,(i=>{n.publish(e,t,i)}))}))}relayBulk(t,i,e){t.forEach((t=>{this.relay(t.channel,t.source,i,e)}))}}},4701:(t,i,e)=>{"use strict";e.d(i,{N:()=>p});var s,n=e(3020);class r{constructor(t){this.Ss=[],this.Ps=t=>{this.Ss.push(t)},this.As=t.subscribe(this.Ps)}get cachedEvents(){return this.Ss}destroy(){this.Ss=null,this.As()}}!function(t){t.AdobeAnalytics="AdobeAnalytics",t.MoatAnalytics="MoatAnalytics"}(s||(s={}));var o=e(4798),h=e(277),a=e(5650),c=e(9791),d=e(51),l=e(7945),u=e(6153);class p{constructor(t,i,e,s,n){this.ks=i,this.Ts=e,this.Cs=s,this.Es=n,this.Ls=[],this.Bs=t=>{try{this.Os(t);const i=this.Ls.find((i=>i.name===t.type));let e;if(i&&!i.started){i.started=!0;const t=i.eventsCacheHandler;e=t.cachedEvents,t.destroy()}const{adobeAnalyticsSettings:s,moatAnalyticsSettings:n,_debugLogging:r}=this.Cs.apiConfig.settings.plugins,{secondLevelDomain:o,playerId:h}=this.Cs,a={cachedEvents:e,adobeAnalyticsSettings:s,moatAnalyticsSettings:n,_debugLogging:r,secondLevelDomain:o,playerId:h,pageName:this.Rs,pageUrl:this.Ds,version:l.g.version,delegateHandlers:this.Ts,playerContainer:this.Es,playerWindow:window};t.getInstance().start(this.ks,a)}catch(t){(0,h.n)({callStack:t.stack,exception:t.message,level:h.D.CRITICAL,message:"PluginsHandler_initPlugin"})}};const r=(0,c.pE)(t);this.Di=r.topFrame,this.Ds=(0,c.lU)(r,this.Di),this.Ds=(0,d.sH)(this.Ds),this.Rs=(0,d.ge)(this.Ds)}start(){this.Vs(),this.js(),this.Di.cnxPlugins.pluginsHandlers.push(this.Bs)}Vs(){let t=[];Array.isArray(this.Di.cnxPlugins)&&this.Di.cnxPlugins.length>0&&(t=this.Di.cnxPlugins,t.forEach((t=>this.Bs(t)))),(0,o.as)(this.Di.cnxPlugins)||this.Ns(t)}js(){const t=this.Us();(0,a.BZ)(t)&&this.$s(t)}zs(t){const i=this.Di.cnxPlugins.cachedPlugins;if((0,a.BZ)(i))return i.find((i=>i.type===t))}Os(t){this.zs(t.type)||this.Di.cnxPlugins.cachedPlugins.push(t)}Ns(t){this.Di.cnxPlugins={cachedPlugins:t,pluginsHandlers:[],push:function(t){this.pluginsHandlers.forEach((i=>{i(t)}))}}}$s(t){t.forEach((t=>{this.zs(t)||this.Ls.push({name:t,started:!1,eventsCacheHandler:new r(this.ks)})})),this.Ls.forEach((({name:t})=>this.Ws(t)))}Gs(t){return Object.values(t).every((t=>(0,o.QM)(t)))}Us(){const t=[];return this.Cs.apiConfig.settings.plugins.adobeAnalyticsSettings&&this.Gs(this.Cs.apiConfig.settings.plugins.adobeAnalyticsSettings)&&t.push(s.AdobeAnalytics),this.Cs.moatTrackingEnabled&&t.push(s.MoatAnalytics),t}Ws(t){const i={id:`cnx-${t}`,src:""};switch(t){case s.AdobeAnalytics:i.src=u.n.endPoints.assets.plugins.adobeAnalytics;break;case s.MoatAnalytics:i.src=u.n.endPoints.assets.plugins.moatAnalytics}this.Di.document.getElementById(i.id)||(0,n.dZ)(i,this.Di.document.head,this.Di,null,null,!0,"PluginsHandler_unable_to_insert_plugin_script")}}},4065:(t,i,e)=>{"use strict";e.d(i,{B:()=>h});var s=e(1509),n=e(9357),r=e(7332),o=e(6716);class h{constructor(t,i=0,e=1e3){this.Qs=t,this.timerDuration=i,this.Js=e,this.Ks=0,this.Zs=null,this.tn=!1,this.en=!1,this.sn=new o.x,this.rn=new o.x,this.hn=new o.x,this.an=[{event:s.n.FirstQuartile,quartile:1},{event:s.n.SecondQuartile,quartile:2},{event:s.n.ThirdQuartile,quartile:3},{event:s.n.FourthQuartile,quartile:4}],this.dn=null,this.ln=()=>{this.un(),this.sn.next(),this.pn(this.Ks,this.timerDuration),this.mn(),this.vn=(new Date).getTime()},i||this.disable()}start(){this.en=!0,null===this.Zs&&this.gn()}stop(){this.en=!1,null!==this.Zs&&(this.un(),this.yn())}reset(t){t&&(this.timerDuration=t),this.Ks=0,this.tn=!1,this.dn=null,(null!==this.Zs||this.en)&&(this.yn(),this.gn())}get timeElapsed(){return this.Ks}get timeRemaining(){return this.timerDuration-this.Ks}disable(){this.tn=!0,this.yn()}get onTimeUpdate(){return this.sn.asObservable()}get onTimeElapsed(){return this.rn.asObservable()}get onQuartile(){return this.hn.asObservable()}un(){this.Ks+=(new Date).getTime()-this.vn}gn(){this.tn||(this.mn(),this.vn=(new Date).getTime(),this.Zs=this.Qs.setInterval(this.ln,this.Js))}yn(){this.Qs.clearInterval(this.Zs),this.Zs=null}bn(){this.disable(),this.rn.next(),this.Ks=0}mn(){this.Ks/n.s_>=this.timerDuration/n.s_&&this.bn()}pn(t,i){const e=Math.floor((0,r.dQ)(0,i,1,4,t));this.dn<=e&&this.an.forEach((({event:t,quartile:i})=>{i===e&&i!==this.dn&&(this.hn.next(t),this.dn=i)}))}}},2300:(t,i,e)=>{"use strict";var s;e.d(i,{r:()=>s}),function(t){t[t.PlayButton=0]="PlayButton",t[t.BigPlayButton=1]="BigPlayButton",t[t.VolumeButton=2]="VolumeButton",t[t.VolumeProgress=3]="VolumeProgress",t[t.VolumeControls=4]="VolumeControls",t[t.ExpandButton=5]="ExpandButton",t[t.SettingsButton=6]="SettingsButton",t[t.CaptionButton=7]="CaptionButton",t[t.CaptionComponent=8]="CaptionComponent",t[t.UpNextButton=9]="UpNextButton",t[t.UpNextBox=10]="UpNextBox",t[t.PreviousButton=11]="PreviousButton",t[t.LogoComponent=12]="LogoComponent",t[t.LogoOutstream=13]="LogoOutstream",t[t.MoreButton=14]="MoreButton",t[t.ElapsedTimeLabel=15]="ElapsedTimeLabel",t[t.TotalDurationLabel=16]="TotalDurationLabel",t[t.RemainingDurationLabel=17]="RemainingDurationLabel",t[t.ProgressBar=18]="ProgressBar",t[t.QualityMenu=19]="QualityMenu",t[t.QueStateOverlay=20]="QueStateOverlay",t[t.Loader=21]="Loader",t[t.ContextMenu=22]="ContextMenu",t[t.ElementsSettingsMenu=23]="ElementsSettingsMenu",t[t.CloseButton=24]="CloseButton",t[t.SkipAdButton=25]="SkipAdButton",t[t.AdLoadingScreen=26]="AdLoadingScreen",t[t.CtaButton=27]="CtaButton",t[t.PlayspaceProgressBar=28]="PlayspaceProgressBar",t[t.PlayspaceSettingsMenu=29]="PlayspaceSettingsMenu",t[t.ClickToPlayButton=30]="ClickToPlayButton",t[t.OverlayComponent=31]="OverlayComponent",t[t.SlideTitle=32]="SlideTitle",t[t.TopTitle=33]="TopTitle",t[t.TopLogo=34]="TopLogo",t[t.TopSlideTitle=35]="TopSlideTitle",t[t.TopStoryTitle=36]="TopStoryTitle",t[t.TextLabel=37]="TextLabel",t[t.LivePoster=38]="LivePoster",t[t.LiveIcon=39]="LiveIcon",t[t.ElementsCaptionMenu=40]="ElementsCaptionMenu",t[t.PinnedTitle=41]="PinnedTitle"}(s||(s={}))},9762:(t,i,e)=>{"use strict";var s;e.d(i,{C:()=>s}),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Replay=2]="Replay",t[t.Volume=3]="Volume",t[t.Mute=4]="Mute",t[t.Unmute=5]="Unmute",t[t.DraggingStart=6]="DraggingStart",t[t.DraggingStopped=7]="DraggingStopped",t[t.Seek=8]="Seek",t[t.SeekingStart=9]="SeekingStart",t[t.SeekingStopped=10]="SeekingStopped",t[t.Expand=11]="Expand",t[t.Collapse=12]="Collapse",t[t.Quality=13]="Quality",t[t.Close=14]="Close",t[t.Next=15]="Next",t[t.Prev=16]="Prev",t[t.Settings=17]="Settings",t[t.SettingsMenu=18]="SettingsMenu",t[t.CaptionOn=19]="CaptionOn",t[t.CaptionOff=20]="CaptionOff",t[t.CaptionUpdate=21]="CaptionUpdate",t[t.CaptionMenu=22]="CaptionMenu",t[t.VolumeHoverStart=23]="VolumeHoverStart",t[t.VolumeHoverStopped=24]="VolumeHoverStopped",t[t.UIHideStart=25]="UIHideStart",t[t.UIShowStart=26]="UIShowStart",t[t.UIEndShowHide=27]="UIEndShowHide",t[t.ContextMenuOpen=28]="ContextMenuOpen",t[t.ContextMenuClose=29]="ContextMenuClose",t[t.ContextClick=30]="ContextClick",t[t.AboutClick=31]="AboutClick",t[t.OverlayClick=32]="OverlayClick",t[t.LogoClicked=33]="LogoClicked",t[t.HoverStart=34]="HoverStart",t[t.HoverEnd=35]="HoverEnd",t[t.StateChanged=36]="StateChanged",t[t.RebindComponent=37]="RebindComponent",t[t.SkipAd=38]="SkipAd",t[t.FocusStart=39]="FocusStart"}(s||(s={}))},6203:(t,i,e)=>{"use strict";var s;e.d(i,{Z:()=>n}),function(t){t[t.HoldStart=0]="HoldStart",t[t.HoldEnd=1]="HoldEnd",t[t.TapLeft=2]="TapLeft",t[t.TapRight=3]="TapRight",t[t.SwipeEnd=4]="SwipeEnd",t[t.SwipeMove=5]="SwipeMove",t[t.Scroll=6]="Scroll",t[t.Click=7]="Click"}(s||(s={}));const n=s},7263:(t,i,e)=>{"use strict";e.d(i,{P:()=>o});var s=e(5701),n=e(3020),r=e(7405);class o extends s._{constructor(t,i,e,s,n){super(),this.mediator=t,this.In=i,this.wn=e,this.bi=n,this.Sn=this.In.createElementByString(s)}getContainer(){return this.Sn}getCoordinates(t){const i=this.In.getElementCoordinates(this.Sn);return this.bi&&t?((t&r.C.Top)===r.C.Top&&(i.clientY-=this.Sn.clientHeight),(t&r.C.Right)===r.C.Right&&(i.clientX+=this.Sn.clientWidth)):i.clientX+=i.width/2,i}showComponent(t=!1){if(!this.Sn||!this.Sn.parentElement)return;const i=(0,n.pv)(this.Sn.parentElement,"cnx-ui-btn")?this.Sn.parentElement:this.Sn;t&&(0,n.GF)(i)?(0,n.Ji)(i):(0,n.Ho)(i)}hideComponent(t=!1){if(!this.Sn||!this.Sn.parentElement)return;const i=(0,n.pv)(this.Sn.parentElement,"cnx-ui-btn")?this.Sn.parentElement:this.Sn;t&&!(0,n.GF)(i)?(0,n.U6)(i,(()=>(0,n.MV)(i))):(0,n.MV)(i)}destroy(){this.Sn.innerHTML="",this.Sn.style.display="none",this.wn.unregisterAll(this)}}},2631:(t,i,e)=>{"use strict";e.d(i,{s:()=>r});var s=e(6019),n=e(3020);class r extends s.Y{constructor(){super(...arguments),this.onClick=t=>{this.onInteractionHandler(t),this.onClickHandler(),this.addBoomEffect()}}addBoomEffect(){(0,n.cn)(this.Sn,"cnx-boom"),(0,n.Tp)(this.Sn),(0,n.cn)(this.Sn,"cnx-boom-anim");const t=i=>{"transform"===i.propertyName&&((0,n.IV)(this.Sn,"cnx-boom"),(0,n.IV)(this.Sn,"cnx-boom-anim"),this.Sn.removeEventListener("transitionend",t))};this.Sn.addEventListener("transitionend",t)}initComponent(){super.initComponent(),this.Sn.appendChild(this.In.createElementByString('<cnx class="cnx-boom-elem"></cnx>'))}}},6019:(t,i,e)=>{"use strict";e.d(i,{Y:()=>r});var s=e(6203),n=e(7263);class r extends n.P{constructor(){super(...arguments),this.eventList=[s.Z[s.Z.Scroll],s.Z[s.Z.Click]],this.Pn=t=>{this.onInteractionHandler(t)},this.onBeforeClick=t=>{t.stopPropagation()},this.onClick=t=>{this.onInteractionHandler(t),this.onClickHandler(t)}}onInteractionHandler(t){t.stopPropagation()}onClickHandler(t){}initComponent(){const t={interactionstart:this.onBeforeClick,interaction:this.Pn,click:this.onClick};this.wn.register(this.Sn,this,this.wn,t),this.bi&&(this.subscribe(s.Z[s.Z.Click],this.wn,(()=>{this.onClickHandler()})),this.relay(s.Z[s.Z.Scroll],this.wn,this,this.mediator))}destroy(){this.unsubscribeAll(this.wn),super.destroy()}}},9040:(t,i,e)=>{"use strict";e.d(i,{h:()=>h});var s=e(8983),n=e(3020),r=e(9762),o=e(2631);class h extends o.s{constructor(){super(...arguments),this.eventList=[r.C[r.C.HoverStart],r.C[r.C.HoverEnd],r.C[r.C.FocusStart],...this.eventList],this.onStartHover=()=>{(0,n.cn)(this.Sn,s.Gj.HoverStart),(0,n.cn)(this.Sn,s.Gj.HoverEnd),this.mediator.publish(this,r.C[r.C.HoverStart])},this.onEndHover=()=>{(0,n.IV)(this.Sn,s.Gj.HoverEnd),this.mediator.publish(this,r.C[r.C.HoverEnd])},this.An=()=>{this.mediator.publish(this,r.C[r.C.FocusStart]),this.onStartHover()},this.xn=()=>{this.onEndHover()}}initComponent(){super.initComponent(),this.bi?(this.Sn.addEventListener("touchstart",this.onStartHover,{passive:!0}),this.Sn.addEventListener("touchend",this.onEndHover),this.Sn.addEventListener("touchcancel",this.onEndHover)):(this.Sn.addEventListener("mouseenter",this.onStartHover),(0,n.Iy)(this.Sn)&&(this.Sn.addEventListener("focusin",this.An),this.Sn.addEventListener("focusout",this.xn)),this.Sn.addEventListener("mouseleave",this.onEndHover))}destroy(){this.bi?(this.Sn.removeEventListener("touchstart",this.onStartHover),this.Sn.removeEventListener("touchend",this.onEndHover),this.Sn.removeEventListener("touchcancel",this.onEndHover)):(this.Sn.removeEventListener("mouseenter",this.onStartHover),this.Sn.removeEventListener("mouseleave",this.onEndHover),(0,n.Iy)(this.Sn)&&(this.Sn.removeEventListener("focusin",this.An),this.Sn.removeEventListener("focusout",this.xn))),super.destroy()}onInteractionHandler(t){this.onEndHoverClick()}onEndHoverClick(){(0,n.IV)(this.Sn,s.Gj.HoverEnd),(0,n.IV)(this.Sn,s.Gj.HoverStart)}}},9055:(t,i,e)=>{"use strict";e.d(i,{a:()=>o});var s=e(7332),n=e(9762),r=e(9901);class o extends r.N{constructor(t,i,e,s,r=!1){super(t,i,e,s,r),this.kn=0,this.Tn=null,this.Cn=!1,this.eventList=[n.C[n.C.DraggingStart],n.C[n.C.DraggingStopped]],this.En=t=>{this.cacheWidths(),this.Mn(this.Ln(t)),this.bi?this.Sn.addEventListener(this.Bn,this.Rn):this.In.addEventListenerOnGlobal(this.Bn,this.Rn),this.onDragStart()},this.Rn=t=>{null===this.Tn&&(this.Cn||(this.Cn=!0,this.disableTransition()),this.Tn=this.In.requestAnimationFrameHelper((()=>{const i=this.Dn+(this.Ln(t)-this.Vn);this.isValidTranslation()&&this.jn(i),this.Tn=null})))},this.Fn=t=>{t.stopPropagation(),this.bi?this.Sn.removeEventListener(this.Bn,this.Rn):this.In.removeEventListenerOnGlobal(this.Bn,this.Rn),this.Cn=!1,this.enableTransition(),this.onDragEnd()},this.Bn=r?"touchmove":"mousemove"}cacheDomElements(){super.cacheDomElements(),this.Un=this.Sn.getElementsByClassName("cnx-progress-handle")[0]}cacheWidths(){super.cacheWidths(),this.kn=this.Un.getBoundingClientRect().width/2}updateUi(t){super.updateUi(t);const i=this.getComputedTranslation(t);this.Un.style.transform=`translateX(${i-this.kn}px)`}onDragEnd(){this.mediator.publish(this,n.C[n.C.DraggingStopped])}onDragStart(){this.mediator.publish(this,n.C[n.C.DraggingStart])}Ln(t){return this.bi?t.touches.item(0).clientX:t.clientX}Mn(t){this.Dn=t-this.$n,this.Vn=t,this.jn(this.Dn)}jn(t){if(this.isValidTranslation()){const i=this.getComputedTranslation(t),e=0,n=this.qn,r=0,o=100;this.updateUi(i),this.onProgressChange((0,s.dQ)(e,n,r,o,i))}}setProgress(t){super.setProgress(t)}initComponent(){super.initComponent();const t={interactionstart:this.En,interactionend:this.Fn};this.wn.register(this.Sn,this,this.wn,t)}destroy(){super.destroy()}}},7617:(t,i,e)=>{"use strict";e.d(i,{E:()=>r});var s=e(3020),n=e(8538);class r extends n.s{constructor(t,i,e,s){super(i,e,s),this.mediator=t,this.Sn=this.Hn.getRenderedDom()}getContainer(){return this.Sn}initComponent(){this.Hn.initComponents()}showComponent(){(0,s.Ho)(this.Sn)}hideComponent(){(0,s.MV)(this.Sn)}}},9901:(t,i,e)=>{"use strict";e.d(i,{N:()=>h});var s=e(7332),n=e(3020),r=e(8983),o=e(7263);class h extends o.P{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.qn=0,this.$n=null,this.zn=0,this.Wn=0,this.Gn=100,this.cacheDomElements()}cacheDomElements(){this.Qn=this.Sn.getElementsByClassName("cnx-progress-fill")[0],this.Jn=this.Sn.getElementsByClassName("cnx-progress-rail")[0]}cacheWidths(){this.qn=this.fixedRailWidth?this.fixedRailWidth:this.Jn.getBoundingClientRect().width,this.$n=this.Jn.getBoundingClientRect().left}updateUi(t){const i=this.getComputedTranslation(t);this.zn=i,this.Qn.style.transform=`translateX(${i}px)`}isValidTranslation(){return this.zn>=0&&this.zn<=this.qn}getComputedTranslation(t){return t<0?0:t>this.qn?this.qn:t}setProgress(t){this.Sn.setAttribute("aria-valuenow",t.toString()),this.cacheWidths();const i=this.getComputedTranslation((0,s.dQ)(0,100,0,this.qn,t));this.updateUi(i)}disableTransition(){(0,n.cn)(this.Sn,r.Gj.NoTransition)}enableTransition(){(0,n.IV)(this.Sn,r.Gj.NoTransition)}Xn(t){this.disableTransition(),this.setProgress(t),(0,n.Tp)(this.Qn),this.enableTransition()}forceStartState(){this.Xn(this.Wn)}forceEndState(){this.Xn(this.Gn)}initComponent(){this.Sn.setAttribute("role","slider"),this.cacheWidths()}destroy(){super.destroy()}}},1e3:(t,i,e)=>{"use strict";e.d(i,{V:()=>h,q:()=>s});var s,n=e(9040),r=e(8983),o=e(9762);!function(t){t[t.expand=0]="expand",t[t.collapse=1]="collapse"}(s||(s={}));class h extends n.h{constructor(){super(...arguments),this.eventList=[o.C[o.C.Expand],o.C[o.C.Collapse],...this.eventList],this.Kn="Full Screen (f)",this.Zn="Exit Full Screen (f)"}initComponent(){super.initComponent(),this.Sn&&this.Sn.setAttribute("aria-label",this.tooltip)}onClickHandler(){switch(this.tr){case s.collapse:this.mediator.publish(this,o.C[o.C.Expand]);break;case s.expand:this.mediator.publish(this,o.C[o.C.Collapse]);break;default:this.mediator.publish(this,o.C[o.C.Expand])}}ir(){this.Sn&&(this.Sn.setAttribute("aria-label",this.tooltip),this.tr===s.expand?this.Sn.classList.add(r.Gj.Active):this.Sn.classList.remove(r.Gj.Active))}setState(t){this.tr!==t&&(this.tr=t,this.ir())}get tooltip(){return this.tr===s.expand?this.Zn:this.Kn}}},5637:(t,i,e)=>{"use strict";e.d(i,{Z:()=>r});var s=e(6019),n=e(2300);class r extends s.Y{constructor(t,i,e,s,r,o,h){super(t,i,e,s,r),this.tooltip=h,this.eventList=[],this.sr=n.r[o],this.eventList.push(this.sr)}onClickHandler(){this.mediator.publish(this,this.sr)}}},1458:(t,i,e)=>{"use strict";e.d(i,{c:()=>r});var s=e(9040),n=e(2300);class r extends s.h{constructor(t,i,e,s,r,o,h){super(t,i,e,s,r),this.tooltip=h,this.sr=n.r[o],this.eventList.push(this.sr)}onClickHandler(){this.mediator.publish(this,this.sr)}}},3894:(t,i,e)=>{"use strict";e.d(i,{Z:()=>p});var s=e(1215),n=e(2300),r=e(7936),o=e(6263),h=e(3669),a=e(3775);const c="More",d="Close Player",l="Next (Shift + N)",u="Previous (Shift + P)",p={[n.r[n.r.MoreButton]]:{template:(0,r.Z)(n.r.MoreButton,h,"",{hasPopup:!0,expanded:!1,label:c,controls:a.b.ContextMenuSettings}),tooltip:c,isHoverable:!0},[n.r[n.r.CloseButton]]:{template:(0,r.Z)(n.r.CloseButton,s,d),tooltip:d,isHoverable:!0},[n.r[n.r.UpNextButton]]:{template:(0,r.Z)(n.r.UpNextButton,o,l),tooltip:l,isHoverable:!0},[n.r[n.r.PreviousButton]]:{template:(0,r.Z)(n.r.PreviousButton,o,u),tooltip:u,isHoverable:!0}}},6805:(t,i,e)=>{"use strict";e.d(i,{Z:()=>o});var s=e(2300),n=e(1458),r=e(5637);class o{constructor(t,i,e,n){this.In=t,this.wn=i,this.bi=e,this.nr=new Map,Object.keys(n).forEach((t=>this.rr(s.r[t],n[t])))}getButton(t,i){const{isHoverable:e,template:s,tooltip:o}=this.hr(t);return e?new n.c(i,this.In,this.wn,s,this.bi,t,o):new r.Z(i,this.In,this.wn,s,this.bi,t,o)}isGeneralComponent(t){return this.nr.has(t)}hr(t){return this.nr.get(t)}rr(t,i){this.nr.set(t,i)}}},7936:(t,i,e)=>{"use strict";e.d(i,{Z:()=>n});var s=e(2300);function n(t,i,e,n=null,r=!0){if(r){const{expanded:r,hasPopup:o,label:h,controls:a}=n||{};return`\n        ${n?`<cnx aria-expanded=${r} aria-haspopup=${o} aria-controls=${a} aria-label="${h}" role="button" class="cnx-icon-button cnx-button-${s.r[t].toLowerCase()} cnx-ui-btn-hoverable" tabindex="0">`:`<cnx class="cnx-icon-button cnx-button-${s.r[t].toLowerCase()} cnx-ui-btn-hoverable" aria-label="${e}" role="button" tabindex="0">`}\n                <cnx class="cnx-btn-container">\n                    ${i}\n                </cnx>\n            </cnx>\n        `.trim()}return`<cnx class="cnx-button-${s.r[t].toLowerCase()}">${i}</cnx>`}},8092:(t,i,e)=>{"use strict";e.d(i,{z:()=>o});var s=e(7263),n=e(3020),r=e(8983);class o extends s.P{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,n.Ho)(this.Sn),(0,n.Tp)(this.Sn),(0,n.cn)(this.Sn,r.Gj.Active)}hide(){(0,n.IV)(this.Sn,r.Gj.Active),(0,n.MV)(this.Sn)}}},4115:(t,i,e)=>{"use strict";e.d(i,{J:()=>o,L:()=>s});var s,n=e(9040),r=e(9762);!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(s||(s={}));class o extends n.h{constructor(t,i,e,n,o,h){super(t,i,e,n,o),this.isBig=h,this.ar=!1,this.eventList=[r.C[r.C.Play],r.C[r.C.Pause],r.C[r.C.Replay],r.C[r.C.StateChanged],...this.eventList],this.cr="Play (SPACE)",this.dr="Pause (SPACE)",this.setState(s.Pause)}onClickHandler(){this.tr===s.Pause?this.mediator.publish(this,r.C[r.C.Pause]):this.ar?this.mediator.publish(this,r.C[r.C.Replay]):this.mediator.publish(this,r.C[r.C.Play]),this.Sn.setAttribute("aria-label",this.tooltip)}ir(){this.tr===s.Play?this.Sn.setAttribute("aria-hidden","false"):this.isBig&&this.Sn.setAttribute("aria-hidden","true")}toggleReplay(t){this.ar=t}setState(t){this.tr!==t&&(this.tr=t,this.ir(),this.Sn.setAttribute("aria-label",this.tooltip),this.mediator.publish(this,r.C[r.C.StateChanged]))}get tooltip(){return this.tr===s.Play?this.cr:this.dr}}},4651:(t,i,e)=>{"use strict";e.d(i,{t:()=>r});var s=e(834),n=e(1639);function r(t=!1){return`\n    <cnx class="cnx-icon-button cnx-ui-btn-hoverable ${t?"cnx-button-big-play":""}" role="button" tabindex="0">\n        <cnx class="cnx-btn-container">\n            <cnx class="cnx-play-icon">${s}</cnx>\n            <cnx class="cnx-pause-icon">${n}</cnx>\n        </cnx>\n    </cnx>\n`.trim()}},6516:(t,i,e)=>{"use strict";e.d(i,{k:()=>h});var s=e(9055),n=e(8983),r=e(3020),o=e(9762);class h extends s.a{constructor(t,i,e,s,h=!1){super(t,i,e,s,h),this.lr=!1,this.ur=t=>{(0,r.cn)(this.Sn,n.Gj.HoverEnd),this.lr=!0},this.pr=t=>{const i=this.getComputedTranslation(t.clientX-this.$n);this.vr.style.transform=`translateX(${i}px)`},this.gr=t=>{this.vr.style.transform="translateX(0)",this.lr=!1,this.yr()},this.eventList=this.eventList.concat([o.C[o.C.Seek],o.C[o.C.SeekingStart],o.C[o.C.SeekingStopped]])}onProgressChange(t){this.mediator.publish(this,o.C[o.C.Seek],{payload:t-.1})}onDragEnd(){super.onDragEnd(),this.mediator.publish(this,o.C[o.C.SeekingStopped]),this.yr()}onDragStart(){super.onDragStart(),this.mediator.publish(this,o.C[o.C.SeekingStart])}yr(){this.lr||this.Cn||(0,r.IV)(this.Sn,n.Gj.HoverEnd)}initComponent(){super.initComponent(),this.Sn.addEventListener("mousemove",this.pr),this.Sn.addEventListener("mouseenter",this.ur),this.Sn.addEventListener("mouseleave",this.gr),this.vr=this.Sn.getElementsByClassName("cnx-progress-follow")[0]}hide(){(0,r.MV)(this.Sn)}show(){(0,r.Ho)(this.Sn)}destroy(){super.destroy(),this.Sn.removeEventListener("mousemove",this.pr),this.Sn.removeEventListener("mouseenter",this.ur),this.Sn.removeEventListener("mouseleave",this.gr)}}},8029:(t,i,e)=>{"use strict";e.d(i,{r:()=>h});var s=e(7263),n=e(1310),r=e(8983),o=e(3020);class h extends s.P{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.Ir=this.Sn.getElementsByTagName("cnx-span")[0]}setTime(t){isNaN(t)||"number"!=typeof t?(0,o.cn)(this.Sn,r.Gj.Invisible):(this.Ir.innerHTML=(0,n.to)(t),(0,o.IV)(this.Sn,r.Gj.Invisible))}}},52:(t,i,e)=>{"use strict";e.d(i,{a:()=>a});var s=e(3093),n=e(7405),r=e(3020),o=e(5356),h=e(8983);class a{constructor(t,i){this.wr=t,this.In=i,this._r=[],this.Sr={top:12,bottom:24,margin:4},this.Pr=!1}Ar(){this.kr=this.In.getElementCoordinates(this.wr.parentElement)}Tr(t,i){t.getElementsByClassName("cnx-tooltip-text")[0].innerHTML=i}Cr(t){if(!t||!t.tooltip||this.Pr)return;if(this._r.find((i=>i.component===t)))return;const i=this.In.createElementByString(s.Z);this.Tr(i,t.tooltip),this.Ar();const e=t.getCoordinates();let a=!1;const{clientY:c,height:d}=e,{clientY:l,height:u}=this.In.getElementCoordinates(this.wr);!(0,r.pv)(this.wr,h.s6.ShowControls)&&!(0,o.mb)(this.wr)||c<=l+u/2-d?e.clientY+=this.Sr.top:(e.clientY-=this.Sr.bottom,a=!0),this.wr.appendChild(i),(0,n.p)(i,e,this.kr,{alignMiddle:!0,alignTop:a,forceRight:!0,distanceFromMargin:this.Sr.margin}),(0,r.Tp)(i),(0,r.cn)(i,h.hQ.OpacityInTransition),this._r.push({component:t,domElement:i})}Er(t){if(!t.tooltip)return;const i=this._r.find((i=>i.component===t));if(!i)return;const e=i.domElement;this.wr.removeChild(e),this._r=this._r.filter((i=>i.component!==t))}Mr(t){if(!t.tooltip)return;const i=this._r.find((t=>t.component===this.Lr));i&&this.Tr(i.domElement,t.tooltip)}Br(){this.Lr=null,this._r.forEach((t=>this.Er(t.component)))}removeActiveTooltip(){this.Lr&&this.Er(this.Lr)}setDistanceValues(t){this.Sr=Object.assign(Object.assign({},this.Sr),t)}hoverStart(t){this.removeActiveTooltip(),this.Lr=t,this.Cr(t)}hoverEnd(t){this.Lr=null,this.Er(t)}stateChanged(t){this.Lr===t&&this.Mr(t)}disableTooltips(){this.Pr=!0,this.Br()}enableTooltips(){this.Pr=!1,this.Cr(this.Lr)}}},1191:(t,i,e)=>{"use strict";e.d(i,{F:()=>h,u:()=>s});var s,n=e(3020),r=e(9762),o=e(9040);!function(t){t[t.Mute=0]="Mute",t[t.Unmute=1]="Unmute"}(s||(s={}));class h extends o.h{constructor(t,i,e,s,n,o){super(t,i,e,s,o),this.eventList=[r.C[r.C.Mute],r.C[r.C.Unmute],r.C[r.C.StateChanged],...this.eventList],this.Or="Mute (m)",this.Rr="Unmute (m)",this.tr=n,this.Sn.setAttribute("aria-label",this.tooltip)}onClickHandler(){this.tr===s.Mute?(this.mediator.publish(this,r.C[r.C.Unmute]),this.setState(s.Unmute)):(this.mediator.publish(this,r.C[r.C.Mute]),this.setState(s.Mute))}ir(){this.tr===s.Mute?(0,n.L_)(this.Sn,"cnx-sound-on","cnx-sound-off"):(0,n.L_)(this.Sn,"cnx-sound-off","cnx-sound-on")}get tooltip(){return this.tr===s.Mute?this.Rr:this.Or}initComponent(){super.initComponent(),this.ir()}setState(t){this.tr!==t&&(this.tr=t,this.ir(),this.Sn.setAttribute("aria-label",this.tooltip),this.mediator.publish(this,r.C[r.C.StateChanged]))}setVolume(t){t>0?this.setState(s.Unmute):this.setState(s.Mute)}}},1277:(t,i,e)=>{"use strict";e.d(i,{N:()=>c});var s=e(1191),n=e(7617),r=e(3020),o=e(9762),h=e(2300),a=e(8983);class c extends n.E{constructor(t,i,e,s){super(t,i,e,s),this.Dr=null,this.eventList=[o.C[o.C.Volume],o.C[o.C.VolumeHoverStart],o.C[o.C.VolumeHoverStopped],o.C[o.C.DraggingStopped],o.C[o.C.DraggingStart],o.C[o.C.HoverStart],o.C[o.C.HoverEnd],o.C[o.C.StateChanged],o.C[o.C.FocusStart]],this.Vr=.2,this.jr=600,this.Fr=!1,this.Nr=t=>{clearTimeout(this.Dr),(0,r.cn)(this.Sn,"cnx-mod-hover"),this.mediator.publish(this,o.C[o.C.VolumeHoverStart])},this.Ur=()=>{this.Fr||(null!==this.Dr&&clearTimeout(this.Dr),this.Dr=setTimeout((()=>{(0,r.IV)(this.Sn,"cnx-mod-hover"),this.mediator.publish(this,o.C[o.C.VolumeHoverStopped])}),this.jr))},this.An=()=>{(0,r.cn)(this.Sn,"cnx-mod-hover"),this.mediator.publish(this,o.C[o.C.FocusStart]),this.mediator.publish(this,o.C[o.C.VolumeHoverStart])},this.xn=()=>{(0,r.IV)(this.Sn,"cnx-mod-hover"),this.mediator.publish(this,o.C[o.C.VolumeHoverStopped])},this.$r=this.Vr,this.qr=this.getComponent(h.r.VolumeButton),this.Hr=this.getComponent(h.r.VolumeProgress),(0,r.IV)(this.qr.getContainer(),a.Gj.HovarableButton)}zr(t,i,e){let s;switch(t){case o.C[o.C.Volume]:s=i.payload/100,this.Wr(s),this.Gr(i.payload);break;case o.C[o.C.Mute]:s=0,this.setVolumeProgress(0);break;case o.C[o.C.Unmute]:s=this.$r,this.setVolumeProgress(100*this.$r);break;case o.C[o.C.DraggingStopped]:this.Fr=!1,this.mediator.publish(this,o.C[o.C.DraggingStopped]),this.Ur();break;case o.C[o.C.DraggingStart]:this.Fr=!0,this.mediator.publish(this,o.C[o.C.DraggingStart]);break;case o.C[o.C.HoverStart]:this.mediator.publish(this,o.C[o.C.HoverStart],{payload:{targetComponent:e}});break;case o.C[o.C.HoverEnd]:this.mediator.publish(this,o.C[o.C.HoverEnd],{payload:{targetComponent:e}});break;case o.C[o.C.StateChanged]:this.mediator.publish(this,o.C[o.C.StateChanged],{payload:{targetComponent:e}})}void 0!==s&&this.Qr(s)}Wr(t){t<this.Vr?this.$r=this.Vr:this.$r=t}Qr(t){this.mediator.publish(this,o.C[o.C.Volume],{payload:t})}Gr(t){0===t?this.qr.setState(s.u.Mute):this.qr.setState(s.u.Unmute)}setVolumeProgress(t){this.Hr.setProgress(t)}initComponent(){super.initComponent(),this.Sn.addEventListener("mouseenter",this.Nr),this.Sn.addEventListener("mouseleave",this.Ur),this.Sn.addEventListener("focusin",this.An),this.Sn.addEventListener("focusout",this.xn)}setVolume(t){const i=100*t;this.Gr(i),this.setVolumeProgress(i)}destroy(){super.destroy(),this.Sn.removeEventListener("mouseenter",this.Nr),this.Sn.removeEventListener("mouseleave",this.Ur),this.Sn.removeEventListener("focusin",this.An),this.Sn.removeEventListener("focusout",this.xn)}}},9391:(t,i,e)=>{"use strict";e.d(i,{Z:()=>n});var s=e(2300);const n=`\n    <cnx class="cnx-volume-container">\n        <cnx class="cnx-ui-btn cnx-volume-btn">\n            [[${s.r.VolumeButton}]]\n        </cnx>\n        <cnx class="cnx-volume-bar">\n            [[${s.r.VolumeProgress}]]\n        </cnx>\n    </cnx>\n`.trim()},3356:(t,i,e)=>{"use strict";e.d(i,{J:()=>r});var s=e(9055),n=e(9762);class r extends s.a{constructor(t,i,e,s,r=!1){super(t,i,e,s,r),this.Jr=80,this.fixedRailWidth=this.Jr,this.eventList.push(n.C[n.C.Volume])}onProgressChange(t){this.mediator.publish(this,n.C[n.C.Volume],{payload:t})}}},2823:(t,i,e)=>{"use strict";e.d(i,{$:()=>o});var s=e(8983),n=e(3020),r=e(8538);class o extends r.s{constructor(t,i,e,s,n){super(e,s,n),this.mediator=t,this.$container=i,this.$uiContainer=this.Hn.getRenderedDom(),i.appendChild(this.$uiContainer),this.Hn.initComponents()}changeState(t){const i=this.Xr[t];i!==this.currentState&&this.currentState.canTransitionToState(i)&&(this.currentState.exitState(i),i.enterState())}hide(){(0,n.cn)(this.$uiContainer,s.Gj.DisplayNone)}show(){(0,n.IV)(this.$uiContainer,s.Gj.DisplayNone)}destroy(){super.destroy(),this.$uiContainer.parentNode.removeChild(this.$uiContainer)}}},244:(t,i,e)=>{"use strict";e.d(i,{A:()=>I});var s=e(2300),n=e(4651),r=e(4115),o=e(3356),h=e(5616),a=e(1e3),c=e(3225),d=e(8092),l=e(852),u=e(6805),p=e(3894),f=e(8029),m=e(9268),v=e(6516),g=e(9735),y=e(1191),b=e(2390);class I{constructor(t,i,e,I={},w={}){this.In=t,this.wn=i,this.Sn=e,this.vi=I,this.Yr={[s.r.PlayButton]:t=>this.Kr(!1,t),[s.r.BigPlayButton]:t=>this.Kr(!0,t),[s.r.VolumeProgress]:t=>new o.J(t,this.In,this.wn,h.Z),[s.r.ExpandButton]:t=>new a.V(t,this.In,this.wn,c.Z,this.vi.isMobile),[s.r.Loader]:t=>new d.z(t,this.In,this.wn,l.Z),[s.r.ElapsedTimeLabel]:t=>new f.r(t,this.In,this.wn,m.Z),[s.r.TotalDurationLabel]:t=>new f.r(t,this.In,this.wn,m.Z),[s.r.RemainingDurationLabel]:t=>new f.r(t,this.In,this.wn,m.Z),[s.r.ProgressBar]:t=>new v.k(t,this.In,this.wn,g.Z,this.vi.isMobile),[s.r.VolumeButton]:t=>new y.F(t,this.In,this.wn,b.Z,y.u.Mute,this.vi.isMobile)},this.Kr=(t,i)=>new r.J(i,this.In,this.wn,(0,n.t)(t),this.vi.isMobile,t),this.io=t=>i=>{const e=this.Yr[t];if(e)return e(i)},this.eo=new u.Z(this.In,this.wn,this.vi.isMobile,Object.assign(Object.assign({},p.Z),w))}createComponent(t,i){const e=this.io(t)(i);return e||(this.eo.isGeneralComponent(t)?this.eo.getButton(t,i):void 0)}}},8538:(t,i,e)=>{"use strict";e.d(i,{s:()=>o});var s=e(5701),n=e(8364),r=e(9762);class o extends s._{constructor(t,i,e){super(),this.globalDomUtilsService=t,this.templateString=i,this.componentFactory=e,this.so={},this.Hn=new n.B(i,t),this.addComponents()}addComponents(){this.Hn.getComponentList().forEach((t=>{const i=this.componentFactory.createComponent(t,this);this.registerComponent(t,i)}))}registerComponent(t,i){this.Hn.registerSlot(t,i),this.so[t]=i,this.no(i)}no(t){t.eventList.forEach((i=>{this.subscribe(i,t,(e=>{i===r.C[r.C.RebindComponent]&&this.ro(t),this.zr(i,e,t)}))}))}ro(t){t&&(this.unsubscribeAll(t),this.no(t))}getComponent(t){return this.so[t]}destroy(){Object.keys(this.so).forEach((t=>{this.so[t].destroy()}))}}},6664:(t,i,e)=>{"use strict";e.d(i,{q:()=>l});var s=e(2823),n=e(52),r=e(9762),o=e(3020),h=e(2300),a=e(7332),c=e(8983),d=e(1e3);class l extends s.${constructor(t,i,e,s,r){super(r,t,i,e,s),this.oo=new n.a(this.$uiContainer,i)}zr(t,i,e){let s=e;switch(i.payload&&i.payload.targetComponent&&(s=i.payload.targetComponent),t){case r.C[r.C.HoverStart]:this.oo.hoverStart(s);break;case r.C[r.C.HoverEnd]:this.oo.hoverEnd(s);break;case r.C[r.C.StateChanged]:this.oo.stateChanged(s)}}updateDuration(t,i){if(!(0,o.pv)(this.$uiContainer,c.s6.ShowControls))return;const e=this.getComponent(h.r.ElapsedTimeLabel),s=this.getComponent(h.r.TotalDurationLabel),n=this.getComponent(h.r.ProgressBar);if(e&&e.setTime(t),s&&s.setTime(i),n){const e=0,s=i,r=0,o=100;n.setProgress((0,a.dQ)(e,s,r,o,t))}}updateVolume(t){}expand(){this.getComponent(h.r.ExpandButton).setState(d.q.expand)}collapse(){this.getComponent(h.r.ExpandButton).setState(d.q.collapse)}}},8364:(t,i,e)=>{"use strict";e.d(i,{B:()=>s});class s{constructor(t,i){this.ho=t,this.In=i,this.ao=/\[\[([0-9]+)]]/g,this.co=[],this.uo=[],this.po=this.In.createElementByString(this.fo(this.ho))}mo(t){return`<cnx class="pl_${t}"></cnx>`}fo(t){return t.replace(this.ao,((t,i)=>(this.co.push(parseInt(i,10)),this.mo(i))))}vo(t,i){return this.uo.some((i=>i.slotName===t))||this.uo.some((t=>t.component===i))?null:this.po.getElementsByClassName(`pl_${t}`)[0]}getComponentList(){return this.co}getRenderedDom(){return this.po}registerSlot(t,i){const e=this.vo(t,i);if(null!==e){const s=i.getContainer();return e.parentNode.replaceChild(s,e),this.uo.push({component:i,slotName:t}),!0}return!1}initComponents(){this.uo.forEach((t=>t.component.initComponent()))}}},2925:(t,i,e)=>{"use strict";e.d(i,{w:()=>s});class s{constructor(t){this.yo=t}onClick(){}canTransitionToState(t){return!0}enterState(){this.initState(),this.yo.currentState=this}}},4291:(t,i,e)=>{"use strict";e.d(i,{d:()=>h});var s=e(2300),n=e(4115),r=e(8983),o=e(2925);class h extends o.w{initState(){var t;this.yo.$uiContainer.classList.add(r.s_.Paused);const i=this.yo.getComponent(s.r.PlayButton);i&&i.setState(n.L.Play);const e=this.yo.getComponent(s.r.BigPlayButton);e&&(null===(t=e.getContainer())||void 0===t||t.setAttribute("tabindex","0"),e.setState(n.L.Play))}exitState(){var t;const i=this.yo.getComponent(s.r.BigPlayButton);null===(t=null==i?void 0:i.getContainer())||void 0===t||t.removeAttribute("tabindex"),this.yo.$uiContainer.classList.remove(r.s_.Paused)}}},2246:(t,i,e)=>{"use strict";e.d(i,{_:()=>h});var s=e(2300),n=e(4115),r=e(8983),o=e(2925);class h extends o.w{initState(){this.yo.$uiContainer.classList.add(r.s_.Playing);const t=this.yo.getComponent(s.r.PlayButton);t&&t.setState(n.L.Pause);const i=this.yo.getComponent(s.r.BigPlayButton);i&&i.setState(n.L.Pause)}exitState(){this.yo.$uiContainer.classList.remove(r.s_.Playing)}}},7405:(t,i,e)=>{"use strict";var s;function n(t,i,e,s){t.style.top=`${function(t,i,e,s,n){let r=i-s.clientY;const o=s.clientY+s.height-i;n.alignTop&&r>t.offsetHeight?r-=t.offsetHeight:!n.alignTop&&o<t.offsetHeight?r-=t.offsetHeight-o:(r+=e,r+t.offsetHeight>s.height&&(r=s.height-t.offsetHeight));return r}(t,i.clientY,i.height,e,s)}px`,t.style.left=`${function(t,i,e,s){const n=s.distanceFromMargin?s.distanceFromMargin:0;let r=Math.ceil(i)-Math.ceil(e.clientX),o=i,h=o+t.offsetWidth;const a=e.clientX+e.width;if(s.alignMiddle){const i=t.offsetWidth/2;r-=Math.ceil(i),o-=i,h-=i}if(s.alignMiddle||s.forceRight)return e.clientX>o?r=0+n:a<h&&(r-=Math.ceil(h)-Math.ceil(a)+n),r;h>a&&(r-=t.offsetWidth);return r}(t,i.clientX,e,s)}px`}e.d(i,{C:()=>s,p:()=>n}),function(t){t[t.Top=1]="Top",t[t.Bottom=2]="Bottom",t[t.Right=4]="Right",t[t.Left=8]="Left",t[t.Middle=16]="Middle"}(s||(s={}))},1783:(t,i,e)=>{"use strict";e.d(i,{Ve:()=>h,_f:()=>d,cv:()=>s,fi:()=>r,jI:()=>n,li:()=>l,qZ:()=>c,sm:()=>a,yA:()=>o});const s="Connatix";var n,r,o,h,a,c,d,l;!function(t){t.Generic="generic",t.Video="video"}(n||(n={})),function(t){t.Click="click",t.InvitationAccept="invitationAccept"}(r||(r={})),function(t){t.PreRoll="preroll",t.MidRoll="midroll",t.PostRoll="postroll",t.Standalone="standalone"}(o||(o={})),function(t){t.SessionStart="sessionStart",t.SessionError="sessionError",t.SessionFinish="sessionFinish"}(h||(h={})),function(t){t.DefinedByJavascript="definedByJavaScript",t.BeginToRender="beginToRender"}(a||(a={})),function(t){t.DefinedByJavascript="definedByJavaScript",t.Video="video"}(c||(c={})),function(t){t.sessionError="sessionError",t.geometryChange="geometryChange"}(d||(d={})),function(t){t.backgrounded="backgrounded",t.notFound="notFound"}(l||(l={}))},1997:(t,i,e)=>{"use strict";e.d(i,{Z:()=>l});var s,n,r=e(1783),o=e(4772),h=e(1703);!function(t){t.Minimized="minimized",t.Collapsed="collapsed",t.Normal="normal",t.Expanded="expanded",t.Fullscreen="fullscreen"}(s||(s={})),function(t){t.StateChanged="stateChanged"}(n||(n={}));class a{constructor(t){this.mediator=t}computeState(t){const i=this.bo(t);this.Io&&this.Io.name===i||this.mediator.publish(this,n.StateChanged,{payload:{state:i}}),this.Io={dimensions:t,name:i},this.wo||i!==s.Normal||(this.wo=Object.assign({},this.Io))}setPlayerState(t){this.Io&&this.Io.name===t||this.mediator.publish(this,n.StateChanged,{payload:{state:t}}),this.Io={name:t},this.wo||t!==s.Normal||(this.wo=Object.assign({},this.Io))}get currentState(){return this.Io&&this.Io.name}bo(t){if(!this.wo)return s.Normal;const{width:i,height:e}=this.wo.dimensions,n=i*e,r=t.width*t.height;switch(!0){case n<r:return s.Expanded;case n>r:return s.Collapsed;default:return s.Normal}}}var c=e(5701),d=e(277);class l extends c._{constructor(t,i,e){super(),this._o=t,this.ks=i,this.So=new a(this),this.Po=!1,this.Ao={[o.Z.AdError]:()=>this.xo(),[o.Z.PlayError]:()=>this.ko(),[o.Z.RenderError]:()=>this.To(),[o.Z.AdImpression]:()=>this.Co(),[o.Z.AdComplete]:()=>this.Eo(),[o.Z.AdVideoStart]:({adVideoStartMetadata:t})=>this.Mo(t),[o.Z.AdVideoFirstQuartile]:()=>this.Lo(),[o.Z.AdVideoMidpoint]:()=>this.Bo(),[o.Z.AdVideoThirdQuartile]:()=>this.Oo(),[o.Z.AdVideoComplete]:()=>this.Ro(),[o.Z.VolumeChange]:({volume:t})=>this.Do(t),[o.Z.AdPause]:()=>this.Vo(),[o.Z.AdPlay]:()=>this.jo(),[o.Z.AdSkipped]:()=>this.Fo(),[o.Z.AdClickThru]:()=>this.Uo(),[o.Z.AdInteraction]:()=>this.$o(),[o.Z.AdLoaded]:({adLoadedMetadata:t})=>this.zo(t),[o.Z.AdStateChange]:({adStateChangedMetadata:t})=>this.Wo(t),[o.Z.PlayerResized]:({playerDimensionsMetadata:t})=>this.Go(t),[o.Z.OnEnterFullscreen]:()=>this.Qo(),[o.Z.PlayerCollapsed]:()=>this.Jo(),[o.Z.PlayerExpanded]:()=>this.Xo(),[o.Z.Destroy]:()=>this.unsubscribeAll(this.So)},this.Yo=t=>{try{const i=this.Ao[t.name];if(!i)return;i(t.metadata)}catch(t){(0,d.n)({message:"SessionClientWrapper_omsdk__onEventStorageEvent",exception:t.message,callStack:t.callStack,level:d.D.WARN})}};try{const{AdSession:t,AdEvents:i,MediaEvents:s}=this._o,r=this.Ko(e);this.Zo=new t(r),this.th=new i(this.Zo),this.ih=new s(this.Zo),this.ks.subscribe(this.Yo),this.subscribe(n.StateChanged,this.So,(({payload:{state:t}})=>{this.eh(t)})),this.sh()}catch(t){(0,d.n)({message:"SessionClientWrapper_omsdk_classes_init_err",exception:t.message,callStack:t.callStack,level:d.D.WARN})}}xo(){this.Zo.error(r.jI.Video,o.Z.AdError)}ko(){this.Zo.error(r.jI.Video,o.Z.PlayError)}To(){this.Zo.error(r.jI.Generic,o.Z.RenderError)}Ko(t){const{Partner:i,Context:e}=this._o;return new e(new i(r.cv,t))}Co(){this.Po=!0,this.th.impressionOccurred();const t=this.So.currentState;t!==s.Normal&&this.eh(t)}Eo(){this.Po=!1}Mo(t){const{duration:i,mediaPlayerVolume:e}=t;this.ih.start(i,e)}Lo(){this.ih.firstQuartile()}Bo(){this.ih.midpoint()}Oo(){this.ih.thirdQuartile()}Ro(){this.ih.complete()}Do(t){this.Po&&this.ih.volumeChange(t)}Vo(){this.ih.pause()}jo(){this.ih.resume()}Fo(){this.ih.skipped()}Uo(){this.ih.adUserInteraction(r.fi.Click)}$o(){this.ih.adUserInteraction(r.fi.InvitationAccept)}zo(t){const{isSkippable:i,skipOffset:e,isAutoPlay:s}=t,{VastProperties:n}=this._o,r=new n(i,e,s,this.nh);this.th.loaded(r)}Wo({state:t}){this.nh=r.yA[h.I[t]]}eh(t){t&&this.ih.playerStateChange(t)}rh(t){this.So.computeState(t)}oh(t){this.So.setPlayerState(t)}Go(t){this.rh(t)}Qo(){this.oh(s.Fullscreen)}Jo(){this.oh(s.Minimized)}Xo(){this.oh(s.Normal)}sh(){this.Zo.registerSessionObserver((t=>{t.type===r.Ve.SessionStart?this.hh(t):t.type===r.Ve.SessionError&&(0,d.n)({message:"SessionClientWrapper_omsdk_session_error",exception:t.type,callStack:JSON.stringify(t),level:d.D.WARN},{throttle:1,shouldSendMaxLog:!1})}))}hh(t){t.data.creativeType===r.qZ.DefinedByJavascript&&this.Zo.setCreativeType(r.qZ.Video),t.data.impressionType===r.sm.DefinedByJavascript&&this.Zo.setImpressionType(r.sm.BeginToRender)}}},5172:(t,i,e)=>{"use strict";var s;e.d(i,{$:()=>s}),function(t){const i=["1.3.25-iab3167","1.3.13-iab2343"],e=["1.3.25-iab3167","1.3.13-iab2343"];function s(t,i){if(!t)return null;let e=null;for(let s=0;s<i.length&&(e=t[i[s]],!e);s++);return e}t.getSessionClient=function(t){return s(t.OmidSessionClient,i)},t.getVerificationClient=function(t){return s(t.OmidVerificationClient,e)}}(s||(s={}))},7175:()=>{String.prototype.cnx_replaceAll=function(t,i){return this.split(t).join(i)}},3326:(t,i,e)=>{"use strict";e.d(i,{A:()=>u,u:()=>l});var s=e(6224),n=e(289),r=e(6153),o=e(4798),h=e(277);const a=new s.t(n.ProtoAdDomainBlockingResponse,"AdDomainBlockingService");let c;const d=new Map;function l(t){c||(c=new Promise((i=>{const e=t.find((t=>t.blockedDomainsRevisionNumber));if(!e)return void i();const{publisherLineItemId:s,blockedDomainsRevisionNumber:n}=e,o=`${r.n.endPoints.base.lineItems}${s}/blockedDomains_${n}.bin`;a.fetchMetadata(o,2).then((t=>{d.set(s,t.domains),i()})).catch((()=>{(0,h.n)({message:"AdDomainBlockingService_fetchBlockedDomains_endpoint_unavailable",level:h.D.CRITICAL},{throttle:2,shouldSendMaxLog:!1}),i()}))})))}function u(t,i){return new Promise((e=>{(0,o.QM)(i)?c.then((()=>{d.has(t)&&d.get(t).some((t=>i.includes(t)))?e(!0):e(!1)})):e(!1)}))}},9906:(t,i,e)=>{"use strict";e.d(i,{h:()=>n});var s=e(4546);class n{constructor(t=s.nC){this.ah=t}static getInstance(){return this.dh||(this.dh=new n),this.dh}static getGlobalContainer(){return this.getInstance().globalContainer}static getSessionChildContainer(t){const i=n.lh.get(t);return i||n.ph(t)}get globalContainer(){return this.ah}static ph(t){const i=n.getGlobalContainer().createChildContainer();return n.lh.set(t,i),i}}n.lh=new Map},6661:(t,i,e)=>{"use strict";var s;e.d(i,{c:()=>s}),function(t){t.GeneralMetadata="GeneralMetadata",t.UserManagerService="UserManagerService",t.Temp="TempDataForSS"}(s||(s={}))},6153:(t,i,e)=>{"use strict";e.d(i,{n:()=>a});var s=e(51),n=e(7945),r=e(9791),o=e(4798);class h{constructor(t){this.base=t,this.api={pls:t.core+"core/pls",story:t.core+"core/story",rtb:t.core+"rtb/g",syncUrls:t.core+"core/us",fallbackstory:t.core+"core/fallbackstory",cookie:t.core+"core/ck",tam:t.core+"core/atam"},this.tracking={session_rendered:t.tracking+"sr",session_view:t.tracking+"sv",session_time:t.tracking+"st",session_client_error:t.tracking+"e",media_quartile:t.tracking+"mq",media_click:t.tracking+"mc",ad_impression:t.tracking+"ai",bids:t.tracking+"abt",ad_impression_viewable:t.tracking+"av",ad_quartile:t.tracking+"aq",ad_click:t.tracking+"ac",playerStart:t.tracking+"ps",adOpportunity:t.tracking+"ao",sessionAdBlocker:t.tracking+"sab",heavy_ad_intervention:t.tracking+"ha",auctionInformation:t.tracking+"aucinfo"},this.assets={css:{elements:`${this.fh(t.assets)}player.css`,playspace:`${this.fh(t.assets)}connatix.playspace.css`},plugins:{adobeAnalytics:`${t.plugins}p/plugins/adobe.plugin.js`,moatAnalytics:`${t.plugins}p/plugins/moat.plugin.js`,prebidScript:`${t.plugins}p/plugins/prebid7.17.0-5.js`,apstagScript:`${t.plugins}p/plugins/apstag22.10.131733.js`}}}fh(t){return`${t}p/${n.g.version}/`}}class a{static set bundleDomain(t){this.mh=t}static get bundleDomain(){if(!(0,o.QM)(this.mh))throw new Error("bundleDomain missing");return this.mh}static set apiHostUrl(t){this.gh=t,a.yh=a.bh()}static wh(t){let i=`capi{{env}}.${t}`;return this.gh&&(i=this.gh),{video:`//vid.${t}/`,image:`//img.${t}/`,core:`https://${i}/`,tracking:`https://${i}/tr/`,metadata:`//vid.${t}/`,insights:`//ins.${t}/`,assets:`//cds{{env}}.${t}/`,plugins:`//cds.${t}/`,lineItems:`//lit.${t}/`}}static bh(){const t=(0,s.Ph)("cnxEnv",(0,r.pE)(window).topFrame.location.href);t&&(n.g.domainPrefix=`-${t}`);const i=this.wh(this.bundleDomain);return Object.keys(i).forEach((t=>{i[t]=i[t].replace("{{env}}",n.g.domainPrefix)})),new h(i)}static get endPoints(){return null===a.yh&&(a.yh=a.bh()),a.yh}}a.yh=null},1703:(t,i,e)=>{"use strict";e.d(i,{I:()=>s,V:()=>r});var s,n=e(289);!function(t){t[t.PreRoll=0]="PreRoll",t[t.MidRoll=1]="MidRoll",t[t.PostRoll=2]="PostRoll",t[t.Standalone=3]="Standalone"}(s||(s={}));const r={[n.ProtoAdSlotsEnum.PreRoll]:s.PreRoll,[n.ProtoAdSlotsEnum.MidRoll]:s.MidRoll,[n.ProtoAdSlotsEnum.PostRoll]:s.PostRoll}},4772:(t,i,e)=>{"use strict";e.d(i,{Z:()=>n});const s=e(274).fI,n=Object.assign(Object.assign({},s),{AdBreakStart:"adBreakStart",AdComplete:"adComplete",AdBreakComplete:"adBreakComplete",Pause:"pause",AdPause:"adPause",Play:"play",AdPlay:"adPlay",ContentComplete:"contentComplete",SessionStart:"sessionStart",SessionEnd:"sessionEnd",PlayerResized:"playerStateResize",OnEnterFullscreen:"onEnterFullscreen",OnExitFullscreen:"onExitFullscreen",PlayerCollapsed:"playerCollapsed",PlayerExpanded:"playerExpanded",PlayError:"playError",RenderError:"renderError",AdStateChange:"adStateChange",VolumeChange:"volumeChange",Destroy:"destroy"})},5687:(t,i,e)=>{"use strict";e.d(i,{m:()=>d});var s=e(8211),n=e(6153),r=e(5650),o=e(3020),h=e(9791),a=e(277),c=e(4798);class d{constructor(t){this.createElement=(t,i=this.Di)=>i.document.createElement(t),this.Di=t,this.addPreconnect()}get global(){return this.Di}addCssString(t,i=""){return(0,o.uc)(t,i,this.Di)}addPreconnect(){(0,o.tp)(n.n.endPoints.base.video,this.Di),(0,o.tp)(n.n.endPoints.base.core,this.Di),(0,o.tp)(n.n.endPoints.base.image,this.Di)}getLineHeightPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("line-height")}getFontSizePropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("font-size")}getFontWeightPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("font-weight")}getTransformPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("transform")}getPaddingTopPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("padding-top")}getPaddingBottomPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("padding-bottom")}getMarginTopPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("margin-top")}getMarginBottomPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("margin-bottom")}getMarginLeftPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("margin-left")}getMarginRightPropertyValue(t){return(0,o.Dx)(t,this.Di).getPropertyValue("margin-right")}createElementByString(t,i=this.Di){return(0,o.G$)(t,i)}createDocumentFragment(t=this.Di){return t.document.createDocumentFragment()}isHttpsProtocolUsed(){return(0,o.eA)(this.Di)}isURLSameDomainToTop(t){return(0,o.uh)(t,this.Di)}isDetachedFromDOM(t){let i=t;for(;i.parentNode;)if(i=i.parentNode,i===this.Di.document.body)return!1;return!0}hasIosFullscreenBehaviour(t){return t&&t===s.M.Ios||!this.getFullscreenKeys()}querySelector(t,i=this.Di){let e;try{e=i.document.querySelector(t)}catch(t){}return e}addCssStylesheetToHead(t,i,e){const s=this.Di.document;s.getElementById(t.id)?(0,c.mf)(i)&&i():(0,o.NS)(t,s.head,this.Di,i,e)}getFullscreenKeys(t){return(0,o.S0)(t||this.Di.document)}exitFullscreen(t,i){(i||this.Di.document)[t]()}getDocumentProperty(t){return this.Di.document[t]}addEventListenerOnGlobal(t,i,e,s=!1){(e?this.Di.document:this.Di).addEventListener(t,i,s)}removeEventListenerOnGlobal(t,i,e,s=!1){(e?this.Di.document:this.Di).removeEventListener(t,i,s)}trackWithImages(t,i){(0,h.Hh)(t,this.Di,i)}getElementCoordinates(t){let{top:i,left:e}=t.getBoundingClientRect();const{width:s,height:n}=t.getBoundingClientRect();return i+=this.Di.pageYOffset,e+=this.Di.pageXOffset,{clientX:e,clientY:i,width:s,height:n}}getElementDistanceToViewport(t){const{top:i,left:e}=t.getBoundingClientRect();return{top:i,left:e}}requestAnimationFrameHelper(t){return(0,o.PM)(this.Di,t)}cancelRequestAnimationFrame(t){return(0,o.h_)(this.Di,t)}getGlobalLocationProperties(){const t=this.Di.location;return{hostname:t.hostname,pathname:t.pathname,href:t.href,protocol:t.protocol,host:t.host,port:t.port,search:t.search,hash:t.hash}}open(t,i){this.Di.open(t,i)}getComputedTranslateX(t){let i=0;const e=(0,o.Dx)(t,this.Di).getPropertyValue("transform").match(/^matrix\((.+)\)$/);return(0,r.BZ)(e)&&(i=parseFloat(e[1].split(", ")[4])),i}getBodyDimensions(){try{const t=(0,h.pE)(this.Di).topFrame.document.body;let{offsetWidth:i,offsetHeight:e}=t;const s=(0,o.Dx)(t,this.Di);return i+=parseInt(s.marginLeft,10)+parseInt(s.marginRight,10),e+=parseInt(s.marginTop,10)+parseInt(s.marginBottom,10),{width:i,height:e}}catch(t){return(0,a.n)({message:"DomUtils_error_getting_body_dimensions",exception:t.message,callStack:t.stack,level:a.D.CRITICAL}),{width:0,height:0}}}getViewportWidth(){return(0,h.pE)(this.Di).topFrame.document.documentElement.clientWidth}getViewportHeight(){return(0,h.pE)(this.Di).topFrame.innerHeight}getGlobalClosestTop(){return(0,h.pE)(this.Di)}stripHtmlTags(t){return(0,o.ju)(t,this.Di)}getComputedStyle(t,i){return(0,o.Dx)(t,this.Di,i)}getElementById(t){return(0,o.rI)(t,this.Di)}getElementsByClassName(t){return(0,o.Fs)(t,this.Di)}insertScript(t,i,e){this.Di.document.getElementById(t.id)?(0,c.mf)(i)&&i():(0,o.dZ)(t,this.Di.document.head,this.Di,i,null,!0,e)}destroy(){}}},6666:(t,i,e)=>{"use strict";e.d(i,{k:()=>u});var s=e(6224),n=e(289),r=e(6153),o=e(277),h=e(1992),a=e(9791),c=e(4798),d=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};const l={insights:[],sentimentAnalysis:void 0};class u{static loadInsights(t){const{id:i}=t;let e=u.insightsPromiseStore.get(i);return e||(e=new Promise((i=>{const e=u.requestUrlBuilder(t);u.mediaMetadataHandler.fetchMetadata(e,2,false,1e4).then((t=>{const e=t.insights.map((t=>t.key));i({insights:e,sentimentAnalysis:t.sentimentAnalysis})})).catch((t=>{(0,a.Vm)([95,5])&&(0,o.n)({message:"LoadInsightIndexesService_endpoint_unavailable",exception:e,callStack:`${t}`,level:o.D.WARN},{shouldSendMaxLog:!1}),i(l)}))})),u.insightsPromiseStore.set(i,e)),e}static loadPageInsights(t){return d(this,void 0,void 0,(function*(){const i=yield u.loadInsights(t);return u.pageInsights={insights:i.insights},u.pageInsights}))}static requestUrlBuilder({insightsInputType:t,id:i,versionId:e}){return t===h.i.Page||(0,c.$K)(e)||(0,o.n)({message:"LoadInsightIndexesService_requestUrlBuilder_noVersionIdProvided",exception:`Type: ${t}, id: ${i}`,level:o.D.CRITICAL}),t===h.i.Page?`${r.n.endPoints.base.insights}${i}/insights.bin`:`${r.n.endPoints.base.insights}${i}/${e}/insights.bin`}static markAsUnavailable(t){u.insightsPromiseStore.get(t)||u.insightsPromiseStore.set(t,Promise.resolve(l))}}u.mediaMetadataHandler=new s.t(n.ProtoInsightsResponse,"InsightsLoaderService"),u.insightsPromiseStore=new Map},1992:(t,i,e)=>{"use strict";var s;e.d(i,{i:()=>s}),function(t){t[t.Video=0]="Video",t[t.Story=1]="Story",t[t.Page=2]="Page"}(s||(s={}))},8230:(t,i,e)=>{"use strict";var s,n,r,o;e.d(i,{Av:()=>o,HT:()=>n,WR:()=>r,qs:()=>s}),function(t){t[t.X=0]="X",t[t.Y=1]="Y"}(s||(s={})),function(t){t.Click="click",t.InteractionStart="interactionstart",t.Interaction="interaction",t.InteractionEnd="interactionend"}(n||(n={})),function(t){t[t.Swipe=0]="Swipe",t[t.Hold=1]="Hold"}(r||(r={})),function(t){t[t.Left=0]="Left",t[t.Right=1]="Right"}(o||(o={}))},7187:(t,i,e)=>{"use strict";e.d(i,{k:()=>u});var s=e(8983),n=e(6203),r=e(8230),o=e(5650),h=e(3020);const a=0;function c(t){return t.button===a}var d=e(7332),l=e(4798);class u{constructor(t,i,e){this._h=t,this.bi=i,this.mediator=null,this.Sh=30,this.Ah=250,this.xh=25,this.kh=[],this.Th={},this.Ch=0,this.Eh=0,this.Mh=!0,this.Lh=null,this.Bh=!1,this.Oh=!1,this.Rh=!1,this.Dh=!1,this.Vh=0,this.jh=0,this.Fh=null,this.Tn=null,this.Nh=null,this.$h=!0,this.qh=!1,this.zh=t=>{this.bi?(t.element.addEventListener("touchstart",this.Wh,{passive:!0}),t.element.addEventListener("touchmove",this.Gh,{passive:!0}),t.element.addEventListener("touchend",this.Qh),t.element.addEventListener("touchcancel",this.Yh),t.element.addEventListener("mouseup",this.Kh)):(t.element.addEventListener("mousedown",this.Zh),t.element.addEventListener("mouseup",this.Kh))},this.ta=t=>{this.bi?(t.element.removeEventListener("touchstart",this.Wh),t.element.removeEventListener("touchmove",this.Gh),t.element.removeEventListener("touchend",this.Qh),t.element.removeEventListener("touchcancel",this.Yh),t.element.removeEventListener("mouseup",this.Kh)):(t.element.removeEventListener("mousedown",this.Zh),t.element.removeEventListener("mouseup",this.Kh))},this.Wh=t=>{t.stopPropagation();const i=this.ia(t);this.Nh=i,this.Oh=!1,this.ea(i,r.WR.Hold)&&this.sa(t);const e=this.na(t);this.Eh=e.eventX,this.Ch=e.eventY,this.ra(t,i,r.HT.InteractionStart),this.Mh=!0},this.Gh=t=>{t.stopPropagation();const i=this.ia(t),e=this.na(t);if(this.Mh&&(Math.abs(e.deltaXFromStart)>this.xh||Math.abs(e.deltaYFromStart)>this.xh)&&(this.Mh=!1),this.Bh||this.ea(i,r.WR.Swipe)){if(null===this.Fh&&this.oa(i,e),this.Fh===r.qs.Y)return;null===this.Tn&&(this.Tn=(0,h.PM)(this._h,(()=>{this.Tn=null,this.ha(e.deltaXFromStart),i.mediator.publish(i.context,n.Z[n.Z.SwipeMove],{payload:e.deltaXFromStart})})))}},this.Qh=t=>{const i=this.ia(t);if(this.qh=!1,this.Nh===i){const e=this.na(t);t.cancelable&&this.ea(i,r.WR.Hold)&&Math.abs(e.deltaXFromStart)<this.xh&&Math.abs(e.deltaYFromStart)<this.xh&&t.preventDefault(),this.aa(t,i,e);this.ca(e)===r.qs.Y&&Math.abs(e.deltaYFromStart)>=this.xh?this.$h&&i.mediator.publish(i.context,n.Z[n.Z.Scroll]):!this.Mh||this.Rh||this.Oh||(this.qh=!0)}this.Nh=null},this.Yh=t=>{const i=this.ia(t);this.aa(t,i),this.Nh=null},this.Zh=t=>{if(!c(t))return void this.da(r.HT.InteractionStart,t);const i=this.ia(t);this.Nh=i,t.stopPropagation(),t.preventDefault(),this.ea(i,r.WR.Hold)&&this.sa(t),this.ra(t,i,r.HT.InteractionStart)},this.Kh=t=>{const i=this.ia(t);return this.qh?(i.mediator.publish(i.context,n.Z[n.Z.Click]),void(this.qh=!1)):c(t)&&this.Nh?(t.stopPropagation(),t.preventDefault(),this.ra(t,this.Nh,r.HT.Interaction),this.ra(t,this.Nh,r.HT.InteractionEnd),(this.Bh||this.ea(i,r.WR.Hold))&&this.la(t),this.Nh===i&&(this.ra(t,i,r.HT.Click),i.mediator.publish(i.context,n.Z[n.Z.Click])),void(this.Nh=null)):(this.da(r.HT.Interaction,t),void this.da(r.HT.InteractionEnd,t))},this.pa=t=>{if(!c(t))return this.da(r.HT.Interaction,t),void this.da(r.HT.InteractionEnd,t);this.Nh=null},this.fa=t=>{if(!c(t)||!this.Nh)return this.da(r.HT.Interaction,t),void this.da(r.HT.InteractionEnd,t);this.ra(t,this.Nh,r.HT.Interaction),this.ra(t,this.Nh,r.HT.InteractionEnd),(this.Bh||this.ea(this.Nh,r.WR.Hold))&&this.la(t),this.Nh=null};const{leftTapSizeThreshold:s,holdTriggerDuration:o,scrollThreshold:a}=Object.assign({},e);this.Sh=s||this.Sh,this.Ah=o||this.Ah,this.xh=a||this.xh,this._h.document.addEventListener("mousedown",this.pa),this._h.document.addEventListener("mouseup",this.fa)}register(t,i,e,s={},n=[]){const r={element:t,mediator:i,context:e,callbacks:s||{},allowedSpecialInteractions:n,disabledSpecialInteractions:[]};this.kh.push(r),this.zh(r)}unregister(t){const i=this.kh.find((i=>i.element===t));i&&(this.kh=this.kh.filter((i=>i.element!==t)),this.ta(i))}unregisterAll(t){const i=this.kh.filter((i=>i.mediator===t));i.forEach(this.ta),this.kh=(0,o.V7)(this.kh,i)}addGlobalActions(t,i){Object.keys(Object.assign({},i)).forEach((e=>{this.Th[e]=this.Th[e]||[],this.Th[e].push({initiator:t,action:i[e]})}))}removeGlobalActions(t){Object.keys(this.Th).forEach((i=>{this.Th[i].some((i=>i.initiator===t))&&(this.Th[i]=this.Th[i].filter((i=>i.initiator!==t)))}))}disableSpecialInteractions(t){const i=this.ma(t);i&&(i.disabledSpecialInteractions=(0,o.gX)(i.allowedSpecialInteractions))}enableSpecialInteractions(t){const i=this.ma(t);i&&(i.disabledSpecialInteractions=[])}getNonInterruptibleInteractions(){return[n.Z.HoldStart,n.Z.HoldEnd,n.Z.SwipeMove,n.Z.SwipeEnd,n.Z.Scroll]}disableScrollEvent(){this.$h=!1}enableScrollEvent(){this.$h=!0}destroy(){clearTimeout(this.Lh),this.kh.forEach(this.ta),this._h.document.removeEventListener("mousedown",this.pa),this._h.document.removeEventListener("mouseup",this.fa)}va(t){const i=this.ia(t),e=i.element.getBoundingClientRect(),s=this.ga(t),n=e.width,r=(0,d.dQ)(0,n,0,100,s);this.ya(i,this.Sh,r)}ya(t,i,e){e<i?t.mediator.publish(t.context,n.Z[n.Z.TapLeft]):t.mediator.publish(t.context,n.Z[n.Z.TapRight])}sa(t){clearTimeout(this.Lh),this.Bh=!1,this.Rh=!1;const i=this.ia(t);(0,h.cn)(i.element,s.Gj.OnHold),this.Lh=setTimeout((()=>{this.Bh=!0,this.Mh&&(this.Rh=!0,i.mediator.publish(i.context,n.Z[n.Z.HoldStart]))}),this.Ah)}la(t){clearTimeout(this.Lh);const i=this.ia(t);(0,h.IV)(i.element,s.Gj.OnHold),this.Bh?(this.Bh=!1,this.Rh&&(this.Rh=!1,i.mediator.publish(i.context,n.Z[n.Z.HoldEnd]))):(this.Oh=!0,this.va(t))}aa(t,i,e){e=e||this.na(t),t.stopPropagation(),this.ra(t,i,r.HT.Interaction),this.ra(t,i,r.HT.InteractionEnd),(this.Bh||this.Dh||this.Mh&&this.ea(i,r.WR.Hold))&&this.la(t),(this.Dh||this.ea(i,r.WR.Swipe))&&this.ba(i,e)}oa(t,i){this.Fh=this.ca(i),this.Fh===r.qs.X&&(this.Dh=!0,this.Bh||(clearTimeout(this.Lh),this.Lh=null,this.Bh=!0,t.mediator.publish(t.context,n.Z[n.Z.HoldStart])))}ba(t,i){if(this.Dh){const e=this.Ia(i);t.mediator.publish(t.context,n.Z[n.Z.SwipeEnd],{payload:e})}(0,h.h_)(this._h,this.Tn),this.Tn=null,this.Dh=!1,this.Eh=null,this.Ch=null,this.Fh=null,this.Vh=0,this.jh=0}ha(t){this.jh<this.xh?this.jh++:(this.Vh=t,this.jh=0)}ca(t){return Math.abs(t.deltaXFromStart)>=Math.abs(t.deltaYFromStart)?r.qs.X:r.qs.Y}Ia(t){return t.deltaXFromStart-this.Vh<0?r.Av.Left:r.Av.Right}na(t){const i=t.changedTouches[0];return{deltaXFromStart:i.clientX-this.Eh,deltaYFromStart:i.clientY-this.Ch,eventX:i.clientX,eventY:i.clientY}}ia(t){return this.Nh||this.ma(t.currentTarget)}ma(t){return this.kh.find((i=>i.element===t))}ga(t){const i=this.ia(t);if(this.bi){return t.changedTouches[0].clientX-i.element.getBoundingClientRect().left}return t.offsetX}ea(t,i){return t.allowedSpecialInteractions.includes(i)&&!t.disabledSpecialInteractions.includes(i)}ra(t,i,e){const s=i.callbacks[e];(0,l.mf)(s)&&s(t),this.da(e,t)}da(t,i){var e;null===(e=this.Th[t])||void 0===e||e.forEach((t=>{t.action(i)}))}}},1526:(t,i,e)=>{"use strict";e.d(i,{c:()=>l});var s,n,r=e(289),o=e(9791),h=e(3020),a=e(9022),c=e(4798),d=e(277);!function(t){t.isStringWithMacros=function(t,i){if(!(0,c.QM)(t))return!1;const e=`\\${i[0]}.*?\\${i[1]}`,s=new RegExp(e,"g");return!!t.match(s)}}(s||(s={})),function(t){t.AppUrl="APP_URL",t.AppBundle="APP_BUNDLE",t.AppName="APP_NAME",t.Uuid="UUID",t.PageUrl="PAGE_URL",t.AdPosition="AD_POSITION",t.VideoTitle="VIDEO_TITLE",t.MediaTitle="MEDIA_TITLE",t.VideoDuration="VIDEO_DURATION",t.ContentLength="CONTENT_LENGTH",t.VideoDescription="VIDEO_DESCRIPTION",t.VideoUrl="VIDEO_URL",t.VideoId="VIDEO_ID",t.VideoTime="VIDEO_TIME",t.DescriptionUrl="DESCRIPTION_URL",t.VideoKeywords="VIDEO_KEYWORDS",t.Autoplay="AUTOPLAY",t.UserAgent="UA",t.Ip="IP",t.CashBuster="CB",t.Width="WIDTH",t.Height="HEIGHT",t.Domain="DOMAIN",t.SourceReferrer="SOURCE_REFERRER",t.Gdpr="GDPR",t.GdprConsent="GDPR_CONSENT",t.Consent="CONSENT",t.Ctd="CTD",t.Publisher="PUBLISHER",t.Random="RAND",t.Site="SITE",t.SubId="SUB_ID",t.Url="URL",t.UserLat="USER_LAT",t.UserLong="USER_LONG",t.UsPrivacyString="US_PRIVACY",t.Npa="NPA",t.DoNotTrack="DNT",t.FraudSensorUserId="FS_USER_ID",t.PublisherId="PUBLISHER_ID",t.SessionId="SESSION_ID",t.FraudSensorDeviceType="FS_DEVICE_TYPE",t.FraudSensorLookupId="MGID",t.FraudSensorLookupResponseCode="MGTO",t.FraudSensorMediaType="FS_MEDIA_TYPE",t.FraudSensorDeviceIdentifier="FS_DEVICE_IDENT",t.CnxSupplierId="CNX_SUPPLIER_ID",t.AdxPublisherNetworkCode="ADX_CPNC"}(n||(n={}));class l{constructor(t,i,e,s,o,h,d,l){this.wa=new Map,this._a="[",this.Sa="]",this.wa.set(n.Autoplay,t.playbackMode===r.ProtoPlayerPlaybackModeEnum.Autoplay),this.wa.set(n.UserAgent,navigator.userAgent),this.wa.set(n.UserLong,i.lon),this.wa.set(n.UserLat,i.lat),this.wa.set(n.Ip,i.ip),this.Pa(h),this.Aa(d),this.xa(e,s,o),this.ka(),this.wa.set(n.Domain,s),this.wa.set(n.CnxSupplierId,a.kd),this.wa.set(n.SessionId,t.sessionId),(0,c.QM)(l)&&this.wa.set(n.AdxPublisherNetworkCode,`,${l}`)}Pa(t){this.wa.set(n.AppBundle,t.bundleID),this.wa.set(n.AppName,t.appName),this.wa.set(n.AppUrl,t.storeURL)}Aa(t){this.wa.set(n.SourceReferrer,t)}ka(){const t=(0,h.w6)()?1:0;this.wa.set(n.DoNotTrack,t)}xa(t,i,e){this.wa.set(n.Url,t),this.wa.set(n.PageUrl,e),this.wa.set(n.Site,i),this.wa.set(n.Publisher,t),this.wa.set(n.DescriptionUrl,t)}Ta(){const t=(0,o.qs)();this.wa.set(n.CashBuster,t),this.wa.set(n.Random,t),this.wa.set(n.Ctd,t)}Ca(t){return t.split("?")[0]}Ea(t){return t.split("?").slice(1).join("?")}Ma(t,i){const e=this.Ca(t),s=this.La(this.Ea(t),i);return`${e}${s?`?${s}`:""}`}La(t,i,e=!1){let n=t;const r=n.split("&"),o=[this._a,this.Sa];try{r.forEach((t=>{const r=t.split("=");if(r[1])if(s.isStringWithMacros(r[1],o))n=n.replace(r[1],this.Ba(r[1].toLowerCase(),i,e));else if(decodeURIComponent(r[1]).split("=").length>1){const t=this.La(decodeURIComponent(r[1]),i,!0);n=n.replace(r[1],encodeURIComponent(t))}}))}catch(i){throw(0,d.n)({message:"MacrosService_handleMacros",exception:i.message,callStack:t,level:d.D.CRITICAL},{throttle:1}),i}return n=this.Oa(n,i),this.Ra(n)}Ra(t){return t.includes(this._a)&&(t=t.cnx_replaceAll(this._a,encodeURIComponent(this._a))),t.includes(this.Sa)&&(t=t.cnx_replaceAll(this.Sa,encodeURIComponent(this.Sa))),t}Ba(t,i,e){let s,n=t;return i.forEach(((t,i)=>{for(;n.includes(this._a+i.toLowerCase()+this.Sa);)s=e?t:encodeURIComponent(t),n=n.replace(this._a+i.toLowerCase()+this.Sa,s)})),n}Oa(t,i){const e=`${this._a}${n.AdxPublisherNetworkCode}${this.Sa}`;return t.includes(e)?i.has(n.AdxPublisherNetworkCode)?t.cnx_replaceAll(e,i.get(n.AdxPublisherNetworkCode)):t.cnx_replaceAll(e,""):t}setAdWidth(t){this.wa.set(n.Width,Math.floor(t))}setAdHeight(t){this.wa.set(n.Height,Math.floor(t))}setSubId(t){this.wa.set(n.SubId,t)}setGDPR(t){this.wa.set(n.Gdpr,t)}setUUID(t){this.wa.set(n.Uuid,t)}setGDPRConsent(t){this.wa.set(n.GdprConsent,t)}setConsent(t){this.wa.set(n.Consent,t)}setVideoId(t){this.wa.set(n.VideoId,t)}setNPA(t){this.wa.set(n.Npa,t)}setVideoTime(t){this.wa.set(n.VideoTime,Math.floor(t))}setVideoUrl(t){this.wa.set(n.VideoUrl,t)}setVideoDescription(t){this.wa.set(n.VideoDescription,t)}setVideoDuration(t){this.wa.set(n.VideoDuration,t),this.wa.set(n.ContentLength,t)}setVideoTitle(t){let i;this.wa.set(n.VideoTitle,t),this.wa.set(n.MediaTitle,t),t&&(i=t.split(" ").join(",")),this.wa.set(n.VideoKeywords,i)}setAdPosition(t="midRoll"){this.wa.set(n.AdPosition,t)}setupMacros(t){return this.Ta(),this.Ma(t,this.wa)}addExtraMacros(t){const i=Object.values(n);Object.keys(t).filter((t=>!i.includes(t.toUpperCase()))).forEach((i=>{this.wa.set(i,t[i])}))}getMacroValue(t){return this.wa.get(t)}getExtraMacros(){const t=Object.values(n),i={};return this.wa.forEach(((e,s)=>{t.includes(s)||null==e||(i[s]=(0,c.QM)(e)?e:JSON.stringify(e))})),i}setUsPrivacyString(t){const i=t||"";this.wa.set(n.UsPrivacyString,i)}setUserId(t){this.wa.set(n.FraudSensorUserId,t)}setPublisherId(t){this.wa.set(n.PublisherId,t)}setFraudSensorMacros(t){this.wa.set(n.FraudSensorDeviceType,t.deviceType),this.wa.set(n.FraudSensorLookupId,t.lookupId),this.wa.set(n.FraudSensorLookupResponseCode,t.lookupResponseCode),this.wa.set(n.FraudSensorMediaType,t.mediaType),this.wa.set(n.FraudSensorDeviceIdentifier,t.deviceIdentifier)}destroy(){}}},5292:(t,i,e)=>{"use strict";var s,n;e.d(i,{v:()=>r}),function(t){t.hidden="hidden",t.msHidden="msHidden",t.webkitHidden="webkitHidden"}(s||(s={})),function(t){t.visibilitychange="visibilitychange",t.msvisibilitychange="msvisibilitychange",t.webkitvisibilitychange="webkitvisibilitychange"}(n||(n={}));class r{constructor(t){this.In=t,this.Da=[],this.Va(),this.ja()}on(t){this.Da.push(t),t(this.isDocumentVisible())}off(t){this.Da=this.Da.filter((i=>i!==t))}Va(){void 0!==this.In.getDocumentProperty(s.hidden)?(this.Fa=s.hidden,this.Na=n.visibilitychange):void 0!==this.In.getDocumentProperty(s.msHidden)?(this.Fa=s.msHidden,this.Na=n.msvisibilitychange):void 0!==this.In.getDocumentProperty(s.webkitHidden)&&(this.Fa=s.webkitHidden,this.Na=n.webkitvisibilitychange)}ja(){this.In.addEventListenerOnGlobal(this.Na,(()=>{this.Da.forEach((t=>{t(this.isDocumentVisible())}))}),!0,!1)}isDocumentVisible(){return!this.In.getDocumentProperty(this.Fa)}}},5421:(t,i,e)=>{"use strict";e.d(i,{a:()=>z});var s,n=e(277),r=e(3020),o=[],h="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(s||(s={}));var a,c=function(t){return Object.freeze(t)},d=function(t,i){this.inlineSize=t,this.blockSize=i,c(this)},l=function(){function t(t,i,e,s){return this.x=t,this.y=i,this.width=e,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,c(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(i){return new t(i.x,i.y,i.width,i.height)},t}(),u=function(t){return t instanceof SVGElement&&"getBBox"in t},p=function(t){if(u(t)){var i=t.getBBox(),e=i.width,s=i.height;return!e&&!s}var n=t,r=n.offsetWidth,o=n.offsetHeight;return!(r||o||t.getClientRects().length)},f=function(t){var i,e;if(t instanceof Element)return!0;var s=null===(e=null===(i=t)||void 0===i?void 0:i.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(s&&t instanceof s.Element)},m="undefined"!=typeof window?window:{},v=new WeakMap,g=/auto|scroll/,y=/^tb|vertical/,b=/msie|trident/i.test(m.navigator&&m.navigator.userAgent),I=function(t){return parseFloat(t||"0")},w=function(t,i,e){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=!1),new d((e?i:t)||0,(e?t:i)||0)},_=c({devicePixelContentBoxSize:w(),borderBoxSize:w(),contentBoxSize:w(),contentRect:new l(0,0,0,0)}),S=function(t,i){if(void 0===i&&(i=!1),v.has(t)&&!i)return v.get(t);if(p(t))return v.set(t,_),_;var e=getComputedStyle(t),s=u(t)&&t.ownerSVGElement&&t.getBBox(),n=!b&&"border-box"===e.boxSizing,r=y.test(e.writingMode||""),o=!s&&g.test(e.overflowY||""),h=!s&&g.test(e.overflowX||""),a=s?0:I(e.paddingTop),d=s?0:I(e.paddingRight),f=s?0:I(e.paddingBottom),m=s?0:I(e.paddingLeft),S=s?0:I(e.borderTopWidth),P=s?0:I(e.borderRightWidth),A=s?0:I(e.borderBottomWidth),x=m+d,k=a+f,T=(s?0:I(e.borderLeftWidth))+P,C=S+A,E=h?t.offsetHeight-C-t.clientHeight:0,M=o?t.offsetWidth-T-t.clientWidth:0,L=n?x+T:0,B=n?k+C:0,O=s?s.width:I(e.width)-L-M,R=s?s.height:I(e.height)-B-E,D=O+x+M+T,V=R+k+E+C,j=c({devicePixelContentBoxSize:w(Math.round(O*devicePixelRatio),Math.round(R*devicePixelRatio),r),borderBoxSize:w(D,V,r),contentBoxSize:w(O,R,r),contentRect:new l(m,a,O,R)});return v.set(t,j),j},P=function(t,i,e){var n=S(t,e),r=n.borderBoxSize,o=n.contentBoxSize,h=n.devicePixelContentBoxSize;switch(i){case s.DEVICE_PIXEL_CONTENT_BOX:return h;case s.BORDER_BOX:return r;default:return o}},A=function(t){var i=S(t);this.target=t,this.contentRect=i.contentRect,this.borderBoxSize=c([i.borderBoxSize]),this.contentBoxSize=c([i.contentBoxSize]),this.devicePixelContentBoxSize=c([i.devicePixelContentBoxSize])},x=function(t){if(p(t))return 1/0;for(var i=0,e=t.parentNode;e;)i+=1,e=e.parentNode;return i},k=function(){var t=1/0,i=[];o.forEach((function(e){if(0!==e.activeTargets.length){var s=[];e.activeTargets.forEach((function(i){var e=new A(i.target),n=x(i.target);s.push(e),i.lastReportedSize=P(i.target,i.observedBox),n<t&&(t=n)})),i.push((function(){e.callback.call(e.observer,s,e.observer)})),e.activeTargets.splice(0,e.activeTargets.length)}}));for(var e=0,s=i;e<s.length;e++){(0,s[e])()}return t},T=function(t){o.forEach((function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach((function(e){e.isActive()&&(x(e.target)>t?i.activeTargets.push(e):i.skippedTargets.push(e))}))}))},C=function(){var t,i=0;for(T(i);o.some((function(t){return t.activeTargets.length>0}));)i=k(),T(i);return o.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:h}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=h),window.dispatchEvent(t)),i>0},E=[],M=function(t){if(!a){var i=0,e=document.createTextNode("");new MutationObserver((function(){return E.splice(0).forEach((function(t){return t()}))})).observe(e,{characterData:!0}),a=function(){e.textContent=""+(i?i--:i++)}}E.push(t),a()},L=0,B={attributes:!0,characterData:!0,childList:!0,subtree:!0},O=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],R=function(t){return void 0===t&&(t=0),Date.now()+t},D=!1,V=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var i=this;if(void 0===t&&(t=250),!D){D=!0;var e,s=R(t);e=function(){var e=!1;try{e=C()}finally{if(D=!1,t=s-R(),!L)return;e?i.run(1e3):t>0?i.run(t):i.start()}},M((function(){requestAnimationFrame(e)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,i=function(){return t.observer&&t.observer.observe(document.body,B)};document.body?i():m.addEventListener("DOMContentLoaded",i)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),O.forEach((function(i){return m.addEventListener(i,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),O.forEach((function(i){return m.removeEventListener(i,t.listener,!0)})),this.stopped=!0)},t}()),j=function(t){!L&&t>0&&V.start(),!(L+=t)&&V.stop()},F=function(){function t(t,i){this.target=t,this.observedBox=i||s.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,i=P(this.target,this.observedBox,!0);return t=this.target,u(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},t}(),N=function(t,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=i},U=new WeakMap,$=function(t,i){for(var e=0;e<t.length;e+=1)if(t[e].target===i)return e;return-1},q=function(){function t(){}return t.connect=function(t,i){var e=new N(t,i);U.set(t,e)},t.observe=function(t,i,e){var s=U.get(t),n=0===s.observationTargets.length;$(s.observationTargets,i)<0&&(n&&o.push(s),s.observationTargets.push(new F(i,e&&e.box)),j(1),V.schedule())},t.unobserve=function(t,i){var e=U.get(t),s=$(e.observationTargets,i),n=1===e.observationTargets.length;s>=0&&(n&&o.splice(o.indexOf(e),1),e.observationTargets.splice(s,1),j(-1))},t.disconnect=function(t){var i=this,e=U.get(t);e.observationTargets.slice().forEach((function(e){return i.unobserve(t,e.target)})),e.activeTargets.splice(0,e.activeTargets.length)},t}(),H=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");q.connect(this,t)}return t.prototype.observe=function(t,i){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!f(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");q.observe(this,t,i)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!f(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");q.unobserve(this,t)},t.prototype.disconnect=function(){q.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();class z{constructor(t){this.Ua=[],this.$a=(t,i)=>{t.forEach((t=>{this.qa(t.target).forEach((t=>{t&&((0,r.Tp)(t.element),t.callback(t.element))}))}))};try{const i=t.ResizeObserver||H;this.Ha=new i(this.$a)}catch(t){(0,n.n)({message:"ResizeObserver_constructor",callStack:t.stack,exception:t.message,level:n.D.CRITICAL})}}on(t,i){this.za(t,i)||(this.Ua.push({element:t,callback:i}),this.Ha.observe(t))}off(t,i){const e=this.za(t,i);if(!e)return;this.Ha.unobserve(e.element);const s=this.Ua.indexOf(e);s>=0&&this.Ua.splice(s,1)}destroy(){if(this.Ua)for(;this.Ua.length>0;)this.Ua.pop();this.Ha.disconnect()}qa(t){return this.Ua.filter((i=>i.element===t))}za(t,i){return this.Ua.find((e=>e.element===t&&e.callback===i))}}},1553:(t,i,e)=>{"use strict";e.d(i,{f:()=>o});var s=e(5650),n=e(51),r=e(4798);class o{constructor(){this.Wa={},this.Ga={domain:"",urlParams:[]},this.ignoredDomains=[]}setQueryParams(t){this.Wa=t}setUrlParams(t){this.Ga=t}appendParamsToUrl(t){return this.isIgnoredDomain(t)?t:this.Qa(t)}appendQueryParamsToUrl(t){return this.isIgnoredDomain(t)?t:this.Ja(t,Object.keys(this.Wa).map((t=>({paramName:t,paramValue:this.Wa[t]}))))}Qa(t){if(!(0,s.BZ)(Object.keys(this.Ga))||!(0,s.BZ)(this.Ga.urlParams)||!t.includes(this.Ga.domain))return t;const i=this.Ga.urlParams.reduce(((t,i)=>`${t}${i}`),"");return t.replace(this.Ga.domain,this.Ga.domain+"/"+i)}Ja(t,i){if(!(0,s.BZ)(i))return t;t+=(0,n.CK)(t);let e="";return i.forEach((t=>{(0,r.QM)(t.paramName)&&(0,r.QM)(t.paramValue)&&(e+=`${e.length>0?"&":""}${t.paramName}=${t.paramValue}`)})),t+e}isIgnoredDomain(t){return this.ignoredDomains.some((i=>t.indexOf(i)>-1))}}},3199:(t,i,e)=>{"use strict";var s;e.d(i,{Z:()=>n}),function(t){t[t.P1=1]="P1",t[t.P2=2]="P2",t[t.P3=3]="P3",t[t.P4=4]="P4",t[t.P5=5]="P5",t[t.P6=6]="P6",t[t.P7=7]="P7",t[t.P8=8]="P8",t[t.P9=9]="P9",t[t.P10=10]="P10"}(s||(s={}));const n=[s.P1,s.P2,s.P4,s.P7,s.P8]},7269:(t,i,e)=>{"use strict";e.d(i,{k:()=>Y,x:()=>tt});var s,n=e(9791);!function(t){t.Connatix="143",t.AppNexus="32",t.DistrictM="144",t.IndexExchange="10",t.Lkqd="237",t.OneVideo="25",t.Openx="69",t.Pubmatic="76",t.RhythmOne="36",t.Rubicon="52",t.Spotx="165",t.Telaria="202",t.MediaNet="142",t.AdMan="149",t.IronSource="",t.Undertone="677",t.SynacorMedia="",t.AmxRTB="737",t.Smaato="82",t.TheMediaGrid="686",t.Rise="1043"}(s||(s={}));const r=["1YNY"];var o=e(9831),h=e(289),a=e(6153),c=e(4798),d=e(307),l=e(7945);class u{constructor(t){this.Xa=t,this.Ya=!0,this.Ka="",this.Za=!1,this.tc=[]}static getInstance(t){const i=(0,n.pE)(t).topFrame;return i.cnx_usr_storage||(i.cnx_usr_storage=new u(i)),i.cnx_usr_storage}get userId(){if((0,c.QM)(this.ic))return this.ic.split("_")[0]}set userId(t){this.ic=t}get isCcpaApplicable(){return this.Ya}set isCcpaApplicable(t){this.Ya=t}get usPrivacyString(){return this.Ka}set usPrivacyString(t){this.Ka=t}get consentPayload(){return this.ec}set consentPayload(t){this.ec||(this.ec=t)}getScope(){return this.Xa}syncDemandPartner(t){if(this.userId){const i={userId:this.userId,demandPartner:parseInt(t.demandPartner,10),demandPartnerUserId:t.demandPartnerUserId};o.n.sendProtoRequest({protoRequest:h.ProtoUserSyncRequest,endpoint:a.n.endPoints.api.syncUrls,requestData:i,queryParams:{[d.Fk]:l.g.version},shouldLogErrors:!0}).then((t=>{})).catch((t=>{}))}}registerPlsCall(t){return this.Za?(this.tc.push(t),()=>{}):this.userId?(t(),()=>{}):(this.Za=!0,t(),()=>{this.Za=!1,this.tc.forEach((t=>t())),this.tc=[]})}}var p,f,m=e(1310),v=e(277),g=e(5650);!function(t){t.USER_ID="cnx_userId"}(p||(p={}));class y{constructor(t,i){this.sc=t,this.Di=i,this.rc={[p.USER_ID]:30},this.oc=["Facebook App","Google App","Flipboard App","Instagram App","Pinterest App"],this.hc=!1}ac({name:t,value:i}){t===p.USER_ID&&(this.sc.userId=this.cc(i))}dc(t){let i="";const e=this.rc[t.name];if(e){i=`; expires=${new Date((0,m.XF)(e)).toUTCString()}`}this.Di.document.cookie=`${t.name}=${t.value}${i}; path=/`}lc(t,i){if(!(0,g.BZ)(t))return;const e={cookieList:t,secureMode:i?h.ProtoCookieSecureModeEnum.Unsecure:h.ProtoCookieSecureModeEnum.Auto,browserInfo:this.fc};return o.n.sendProtoRequest({requestData:e,protoRequest:h.ProtoCookieSyncRequest,endpoint:a.n.endPoints.api.cookie,hasCredentials:!0,queryParams:{[d.Fk]:l.g.version},shouldLogErrors:!1}).catch((t=>(0,v.n)({message:"UserCookieManager_setThirdPartyCookie",exception:t.message,callStack:t.callStack,level:v.D.CRITICAL})))}cc(t){return t.split("_")[0]}mc(t){try{const i=t+"=",e=decodeURIComponent(this.Di.document.cookie).split(";");for(let t of e){for(;" "===t.charAt(0);)t=t.substring(1);if(t.includes(i))return this.cc(t.substring(i.length,t.length))}}catch(t){}return""}getUserId(){return this.sc.userId}syncFirstPartyCookie(t){const i={name:t,value:"",timestamp:(0,m.XF)(this.rc[t])};t===p.USER_ID&&(i.value=this.sc.userId),(0,c.QM)(i.value)&&this.dc(i)}syncThirdPartyCookieList(t){const i=[p.USER_ID],e=[];i.forEach((t=>{t===p.USER_ID&&(0,c.QM)(this.sc.userId)&&e.push({name:p.USER_ID,value:this.sc.userId,timestamp:(0,m.XF)(this.rc[p.USER_ID])})})),this.lc(e,t)}setBrowserInfo(t,i){this.fc=t,this.hc=this.oc.includes(t.browserType),this.hc&&i&&this.syncThirdPartyCookieList(this.hc)}setUserInformation(t){t&&this.ac({name:p.USER_ID,value:t.userId})}fetchCookies(){[p.USER_ID].map((t=>({name:t,value:this.mc(t)}))).filter((({value:t})=>(0,c.QM)(t))).forEach((t=>this.ac(t)))}get unsecuredCookieSync(){return this.hc}}!function(t){t[t.CmpApi=0]="CmpApi",t[t.TcfApi=1]="TcfApi"}(f||(f={}));const b={[f.CmpApi]:{windowPropertyName:"__cmp",framePropertyName:"__cmpLocator",getVendorConsentDataMethodName:"getVendorConsents",getConsentDataMethodName:"getConsentData"},[f.TcfApi]:{windowPropertyName:"__tcfapi",framePropertyName:"__tcfapiLocator",getVendorConsentDataMethodName:"getTCData",consentUpdateMethodName:"addEventListener",removeUpdateListenerMethodName:"removeEventListener"}};class I{constructor(t,i){this.vc=t,this.gc=i,this.apiType=f.CmpApi,this.yc={},this.ec=null,this.bc=t=>new Promise(((i,e)=>{try{const e="string"==typeof t.data?JSON.parse(t.data):t.data;if("object"==typeof e&&e.Ic)if(e.Ic.callId===this.wc){const t=e.Ic.returnValue&&e.Ic.returnValue.vendorConsents;this._c(t).then((()=>i(this.wc)))}else if(e.Ic.callId===this.Sc){const t=e.Ic.returnValue&&e.Ic.returnValue.consentData;this.Pc(t).then((()=>i(this.Sc)))}}catch(t){e()}}))}isApiOnPage(){return null!==this.vc||null!==this.gc}bindToApi(){return null!==this.vc?new Promise(((t,i)=>{this.Ac(this.vc).then((()=>t())).catch((t=>i(t)))})):null!==this.gc?this.xc(this.gc):Promise.reject()}isConsentForVendor(t){return!!this.yc[t]}getConsentPayload(){return this.ec}setInAppConsentData(t){this._c(t),this.Pc(t.consentString)}hasIvtConsent(){return this.isConsentForVendor(s.Connatix)}isConsentForPurposes(t){return!0}xc(t){this.Sc=(0,n.qs)(),this.wc=(0,n.qs)();const i={};return new Promise((e=>{const s=t=>{this.bc(t).then((t=>{i[t]=!0,i[this.Sc]&&i[this.wc]&&(window.removeEventListener("message",s,!1),e())})).catch((t=>{}))};window.addEventListener("message",s,!1);const n=b[f.CmpApi].getVendorConsentDataMethodName,r=b[f.CmpApi].getConsentDataMethodName;t.postMessage({kc:{command:n,parameter:null,callId:this.wc}},"*"),t.postMessage({kc:{command:r,parameter:null,callId:this.Sc}},"*")}))}Ac(t){const i=b[f.CmpApi].windowPropertyName,e=b[f.CmpApi].getVendorConsentDataMethodName,s=b[f.CmpApi].getConsentDataMethodName;if(t&&t[i]){const n=new Promise((s=>{t[i](e,null,((t,i)=>{if(i){const{vendorConsents:i}=t;this._c(i).then((()=>s()))}}))})),r=new Promise((e=>{t[i](s,null,((t,i)=>{if(i){const{consentData:i}=t;this.Pc(i).then((()=>e()))}}))}));return Promise.all([n,r])}return Promise.reject()}_c(t){return(0,c.as)(t)?(this.yc=t,Promise.resolve()):Promise.reject()}Pc(t){return(0,c.HD)(t)?(this.ec=t,Promise.resolve()):Promise.reject()}}var w=e(3020),_=e(8462),S=e(2381);const P=(t,i)=>{const e=b[i].windowPropertyName;return(0,w.uq)(t,e)},A=(t,i)=>{const e=b[i].framePropertyName;return(0,w.wl)(t,e)},x=(t,i)=>null!==P(t,i)||null!==A(t,i),k=t=>{const i=S.E.decode(t),e={},s={};return i.vendorConsents.forEach(((t,i)=>e[i]=t)),i.purposeConsents.forEach(((t,i)=>s[i]=t)),{vendorConsents:e,purposeConsents:s,tcString:t}},T=t=>{const i=_.decodeConsentString(t);let e="";const s=i.maxVendorId;for(let t=1;t<=s;t++)e+="0";const n=e.split("");i.allowedVendorIds.forEach((t=>{n[t-1]="1"}));return(t=>{const i={consentString:t};for(let e=0;e<t.length;e++)i[e+1]="1"===t[e];return i})(n.join(""))},C=(t,i,e)=>{let s;try{s=i(t)}catch(t){}if((0,c.as)(s))return s;try{s=e(t)}catch(t){}return s},E=t=>{var i;return(0,c.QM)(null===(i=t)||void 0===i?void 0:i.tcString)},M=t=>{var i;return(0,c.QM)(null===(i=t)||void 0===i?void 0:i.consentString)},L=({cmpEncodedString:t,tcfEncodedString:i})=>{if(!(0,c.QM)(t)&&!(0,c.QM)(i))return null;let e=null;return(0,c.QM)(i)&&(e=C(i,k,T)),(0,c.as)(e)?e:(0,c.QM)(t)?(e=C(t,T,k),(0,c.as)(e)?e:((0,v.n)({message:"UserManagerService_getDecodedConsentData",exception:"cmpEncodedString failed to decode",callStack:JSON.stringify({cmpEncodedString:t,tcfEncodedString:i}),level:v.D.CRITICAL}),null)):((0,v.n)({message:"UserManagerService_getDecodedConsentData",exception:"tcfEncodedString failed to decode",callStack:JSON.stringify({tcfEncodedString:i}),level:v.D.CRITICAL}),null)};class B{constructor(t,i){this.Cc=t,this.Ec=i,this.apiType=f.TcfApi,this.Mc=t=>new Promise(((i,e)=>{try{let s=t.data;if("string"==typeof t.data)try{s=JSON.parse(t.data)}catch(t){s=void 0}if("object"==typeof s&&s.Bc&&s.Bc.callId===this.Rc){const t=s.Bc.returnValue.tcString;this._c(t).then((()=>i(this.Rc))).catch((t=>e()))}}catch(t){e()}}))}isApiOnPage(){return null!==this.Cc||null!==this.Ec}bindToApi(){return null!==this.Cc?new Promise(((t,i)=>{this.Ac(this.Cc).then((()=>t())).catch((t=>i(t)))})):null!==this.Ec?this.xc(this.Ec):Promise.reject()}isConsentForVendor(t){var i,e;return!!(null===(i=this.Dc)||void 0===i?void 0:i.vendorConsents)&&!!(null===(e=this.Dc)||void 0===e?void 0:e.vendorConsents[t])}getConsentPayload(){var t;return null===(t=this.Dc)||void 0===t?void 0:t.tcString}setInAppConsentData(t){this.Dc=Object.assign(Object.assign({},this.Dc),t)}hasIvtConsent(){return!0}isConsentForPurposes(t){var i;return!!(null===(i=this.Dc)||void 0===i?void 0:i.purposeConsents)&&t.every((t=>!!this.Dc.purposeConsents[t]))}xc(t){this.Rc=(0,n.qs)();const i={};return new Promise((e=>{const s=t=>{this.Mc(t).then((t=>{i[t]=!0,i[this.Rc]&&(window.removeEventListener("message",s,!1),e())})).catch((t=>{}))};window.addEventListener("message",s,!1);const n=b[f.TcfApi].getVendorConsentDataMethodName;t.postMessage({Vc:{command:n,parameter:null,callId:this.Rc}},"*")}))}Ac(t){const i=b[f.TcfApi].windowPropertyName,e=b[f.TcfApi].consentUpdateMethodName,s=b[f.TcfApi].removeUpdateListenerMethodName;return t&&t[i]?new Promise((t=>{this.Cc[i](e,2,((e,n)=>{if(n&&("useractioncomplete"===e.eventStatus||"tcloaded"===e.eventStatus)){const n=e.tcString;this._c(n).then((()=>t())),this.Cc[i](s,2,(()=>{}),e.listenerId)}}))})):Promise.reject()}_c(t){const i=L({tcfEncodedString:t});return E(i)?(this.Dc=i,Promise.resolve()):Promise.reject()}}var O=e(3199);class R{constructor(t,i,e={}){var s,n;this.jc=t,this.Di=i;const r=L({cmpEncodedString:null===(s=e.cmp)||void 0===s?void 0:s.consentString,tcfEncodedString:null===(n=e.tcf)||void 0===n?void 0:n.tcString}),o=this.Fc(r);null!==o?(this.Nc(o),(E(r)||M(r))&&this.Uc.setInAppConsentData(r)):(0,v.n)({message:"UserManagerService_UserConsentApiManager",exception:"failed to find the right api, no consent string and no framework on page was found",callStack:JSON.stringify({_appSettings:e}),level:v.D.CRITICAL})}setPageUrl(t){this.Ds=t}setAmpUserConsent(t){var i,e;if(!this.isConsentRequired())return;const s=t.consentStringTypeEnum.US_PRIVACY_STRING,n=null===(i=t.consentMetadata)||void 0===i?void 0:i.consentStringType,r=t.encodeConsentString||(null===(e=t.consentMetadata)||void 0===e?void 0:e.additionalConsent);let o;if(!(0,c.QM)(r))return void(0,v.n)({level:v.D.INFO,message:"AMP_no_consent_string_provided",callStack:JSON.stringify(t),exception:this.Ds});if(n===s)return void(0,v.n)({message:"UserConsentApiManager_CCPA_encoded_string_from_amp_not_used",level:v.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL_${this.Ds}`},{throttle:2,shouldSendMaxLog:!1});const h=L({tcfEncodedString:r,cmpEncodedString:r});E(h)?o=new B(null,null):M(h)&&(o=new I(null,null)),o?o?(this.Uc=o,this.Uc.setInAppConsentData(h)):(0,v.n)({message:"UserConsentApiManager_amp_userConsentApi_not_found",level:v.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL__${this.Ds}`},{shouldSendMaxLog:!1,throttle:2}):(0,v.n)({message:"UserConsentApiManager_encoded_string_not_tcf_and_not_cmp",level:v.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL__${this.Ds}`},{throttle:2,shouldSendMaxLog:!1})}isConsentRequired(){return this.jc}isConsent(t,i=[]){if(this.isConsentRequired()){return this.Uc.isConsentForVendor(t)&&this.Uc.isConsentForPurposes(i)}return!0}isConsentConnatix(){return this.isConsent(s.Connatix,O.Z)}isConsentForPersonalisedAds(){return this.getConsentApiType()!==f.CmpApi&&this.Uc.isConsentForPurposes(O.Z)}getConsentDataPayload(){return this.Uc.getConsentPayload()}bindToConsentApi(){return this.Uc.bindToApi()}isConsentApiOnPage(){return this.Uc.isApiOnPage()}hasIVTConsent(){return this.Uc.hasIvtConsent()}getConsentApiType(){return this.Uc.apiType}Nc(t){const i=P(this.Di,t),e=A(this.Di,t);t===f.TcfApi?this.Uc=new B(i,e):this.Uc=new I(i,e)}Fc(t){if(E(t))return f.TcfApi;if(M(t))return f.CmpApi;if(x(this.Di,f.TcfApi))return f.TcfApi;return x(this.Di,f.CmpApi)?f.CmpApi:f.TcfApi}}var D=e(51);const V="PUBMATIC",j="predirect",F="UserThirdPartySyncManager_Pubmatic",N="CookieSync_syncScript_not_properly_loaded",U="CookieSync_param_not_parsed_properly",$=(t,i)=>{if(!window.PubMaticSync)return H(N,V),!1;const e=Number.parseInt(t,10);return(0,c.hj)(e)?!!(0,c.QM)(i)||(H(U,V,j),!1):(H(U,V,"p"),!1)},q=(t,i,e,s)=>{const n={pubId:Number.parseInt(t,10),url:i};e&&(n.delay=1e3,n.gdpr=1,n.gdprConsent=s),window.PubMaticSync.sync(n)},H=(t,i,e="")=>{(0,v.n)({message:t,callStack:i,exception:e,level:v.D.CRITICAL},{throttle:1,shouldSendMaxLog:!1})};class z{constructor(t,i){this.$c=t,this.jc=i,this.qc=[]}replaceuserIdMacros(t,i){let e=t;return e=e.replace("%5BuserId%5D",i),e=e.replace("[userId]",i),e=e.replace("%7bUSER_ID%7d",i),e}Hc(t,i){try{if(this.Wc(t)){const e=i.document.createElement("iframe");e.setAttribute("style","width:1px;height:1px;border:0px;margin:0px;padding:0px"),e.src=t.url,i.document.body.appendChild(e)}else(0,w.dZ)({src:t.url},i.document.head,i,null,null,1===(0,n.Vm)([99,1]),"UserManager_unable_to_insert_sync_url_script");return!0}catch(t){return!1}}Wc(t){switch(t.vendorId){case s.Rubicon:case s.Pubmatic:return!0;default:return!!t.url.includes("yellowblue.io")}}syncUrls(t,i){this.qc.forEach((e=>{if(this.$c.isConsent(e.vendorId)&&!e.synced){if(e.vendorId===s.Pubmatic)return void((t,i,e)=>new Promise(((s,n)=>{const r=(0,D.Ph)("p",t),o=(0,D.Ph)(j,t);if(window.PubMaticSync){if(!$(r,o))return void n();q(r,o,i,e),s(!0)}else(0,w.dZ)({src:"//ads.pubmatic.com/AdServer/js/userSync.js"},window.document.head,window,(()=>{$(r,o)?(q(r,o,i,e),s(!0)):n()}),(()=>{n()}),!0,F)})))(e.url,this.$c.isConsentRequired(),this.$c.getConsentDataPayload()).then((()=>{e.synced=!0}));if(e.url.includes("openx.net"))return e.url=`${e.url.split("r=")[0]}&r=\n                        ${encodeURIComponent(`${a.n.endPoints.api.syncUrls}?DemandPartner=8&UserId=${t}&DemandPartnerUserId=`)}`,e.url=this.replaceuserIdMacros(e.url,t),o.n.trackPixel(e.url),void(e.synced=!0);if("755"===e.vendorId){const t=this.$c.getConsentDataPayload(),i=this.$c.isConsentRequired();return e.url=(0,D.Bp)(e.url,"gdpr",""+(i?1:0)),i&&(e.url=(0,D.Bp)(e.url,"gdpr_consent",t)),o.n.trackPixel(e.url),void(e.synced=!0)}if(e.url.includes("sync.technoratimedia.com/services"))return o.n.trackPixel(e.url),void(e.synced=!0);if(e.url.includes("pixel.advertising.com")&&(e.url=e.url.replace("gdpr=","gdpr="+(this.$c.isConsentRequired()?1:0)),e.url=e.url.replace("gdpr_consent=","gdpr_consent=0")),e.url=this.replaceuserIdMacros(e.url,t),this.jc){e.url=(0,D.Bp)(e.url,"gdpr","1");const t=this.$c.getConsentDataPayload();e.url=(0,D.Bp)(e.url,"gdpr_consent",t)}this.Hc(e,i)&&(e.synced=!0)}}))}setSyncUrls(t={}){return!(this.qc.length>0)&&(this.qc=[],Object.keys(t).forEach((i=>{this.qc.push({vendorId:i,url:t[i],synced:!1})})),!0)}}var W=e(7994);const G={California:5332921},Q={US:6252001};var J;!function(t){t.CCPA_Error="CCPA Error",t.CCPA_Pending="CCPA Pending",t.CCPA_Success="CCPA Success",t.CCPA_Delayed_Success="CCPA Delayed Success",t.CCPA_Delayed_Failure="CCPA Delayed Failure"}(J||(J={}));class X{constructor(t,i){this.sc=t,this.Gc=1,this.Qc="__uspapi",this.Jc="getUSPData",this.Xc={isPending:!0,isRejected:!1,isDelayed:!1,promise:new Promise((()=>{}))},this.Kc(i)}getUsPrivacyString(){if(this.sc.usPrivacyString||this.sc.isCcpaApplicable)return this.sc.usPrivacyString}isCcpaApplicable(){return this.sc.isCcpaApplicable}isSellUserAllowed(){return!this.sc.isCcpaApplicable||this.Zc()}setGeoLocation(t){this.td=t,t.subdivisionId!==G.California&&(this.sc.isCcpaApplicable=!1)}fetchUsPrivacyString(){return this.ed()&&this.sd(),this.isCcpaApplicable()?new Promise((t=>{this.getUsPrivacyString()?t():t(this.nd())})):Promise.resolve()}nd(){return this.Xc.promise=new Promise(((t,i)=>{const e=this.sc.getScope()[this.Qc];e?(this.rd=!0,e(this.Jc,this.Gc,((e,s)=>{s?(this.Kc(e.uspString),t()):i()}))):i()})),this.makeQuerablePromise(this.Xc),this.Xc.promise}Zc(){return!this.sc.usPrivacyString||(0,g.d3)(this.sc.usPrivacyString,r)}Kc(t){this.sc.usPrivacyString=t}ed(){if(!(0,n.Vm)([95,5]))return!1;const t=new Date(2020,10,16,12,0,0).getTime(),i=new Date(2020,10,17,12,0,0).getTime();return(0,m.k$)(t,i)}sd(){const{countryGeoId:t,subdivisionId:i}=this.td;t===Q.US&&(0,v.n)({message:"UserCcpaManager_logCCPA",level:v.D.INFO,callStack:JSON.stringify(i),exception:this.sc.usPrivacyString})}ccpaInfoLogging(t){this.isCcpaApplicable()&&this.rd&&(this.Xc.isPending?((0,v.n)({message:J.CCPA_Pending,exception:"CCPA_Pending_At_Start_AdRequest",level:v.D.INFO,callStack:t}),this.Xc.isDelayed=!0,this.od=t):this.Xc.isRejected&&(0,v.n)({message:J.CCPA_Error,exception:"CCPA_Error_At_Start_AdRequest",level:v.D.INFO,callStack:t}))}makeQuerablePromise(t){t.promise.then((()=>{t.isPending=!1,t.isDelayed&&(0,v.n)({message:J.CCPA_Delayed_Success,exception:"CCPA_Success_After_Delay",level:v.D.INFO,callStack:this.od})})).catch((i=>{throw t.isRejected=!0,t.isPending=!1,t.isDelayed&&(0,v.n)({message:J.CCPA_Delayed_Failure,exception:"CCPA_Failed_After_Delay",level:v.D.INFO,callStack:this.od}),i}))}}var Y,K,Z=e(2450);!function(t){t.CCPA_INFO_RECEIVED="ccpaInfoReceived",t.CONSENT_DATA_UPDATE="consentDataUpdate"}(Y||(Y={})),function(t){t.SYNC_URLS_RECEIVED="thirdPartySyncUrlsReceived",t.USER_INFO_RECEIVED="userInfoReceived"}(K||(K={}));class tt{constructor(t,i,e,s={}){this.re=i,this.oe=e,this._appSettings=s,this.gdprConsentMode=h.ProtoGdprConsentModeEnum.Unknown,this.hd={},this.dd="",this.ud=!1,this.pd=()=>{!this.$c.isConsentRequired()||this.re?this.resolveEvent(Y.CONSENT_DATA_UPDATE):(this.gdprConsentMode=this.$c.isConsentApiOnPage()||this.oe?h.ProtoGdprConsentModeEnum.NoConsent:h.ProtoGdprConsentModeEnum.NoCmp,this.$c.bindToConsentApi().then((()=>{this.isConsentConnatix()||(this.gdprConsentMode=h.ProtoGdprConsentModeEnum.NoConnatixConsent),this.resolveEvent(Y.CONSENT_DATA_UPDATE)})).catch((t=>{})))},this.fd=()=>{Z.$.getEnvelope(this.yi,this.$c)},this.vd=()=>{this.isConsentConnatix()&&(this.onEvent([K.USER_INFO_RECEIVED]).then((()=>{this.ud&&(this.gd.syncThirdPartyCookieList(),this.gd.unsecuredCookieSync&&this.gd.syncThirdPartyCookieList(this.gd.unsecuredCookieSync),this.gd.syncFirstPartyCookie(p.USER_ID))})),this.onEvent([K.SYNC_URLS_RECEIVED,Y.CONSENT_DATA_UPDATE,Y.CCPA_INFO_RECEIVED]).then((()=>{if(this.isConsentConnatix()&&this.yd.isSellUserAllowed())try{this.bd.syncUrls(this.sc.userId,this.sc.getScope())}catch(t){(0,v.n)({level:v.D.WARN,message:"UserManager_syncUrls",exception:t.message,callStack:t.stack})}})))};try{this.yi=t,this.sc=u.getInstance(t),this.re||(this.gd=new y(this.sc,t));const{cmp:i,tcf:e}=this._appSettings;this.$c=new R(!!this.dd,t,{cmp:i,tcf:e}),this.bd=new z(this.$c,this.isGDPR()),this.yd=new X(this.sc,this._appSettings.usPrivacyString),this.Id()}catch(t){(0,v.n)({callStack:t.stack,exception:t.message,message:"UserManager_constructor",level:v.D.CRITICAL})}}get identityEnvelope(){return Z.$.getValidEnvelope()}Id(){this.gd&&this.gd.fetchCookies(),this.pd(),this.onEvent([Y.CONSENT_DATA_UPDATE]).then((()=>{this.fd(),setTimeout((()=>{try{if(this.re)return;this.vd()}catch(t){(0,v.n)({callStack:t.stack,exception:t.message,message:"UserManager_consent_data_received",level:v.D.CRITICAL})}}),0)}))}wd(t){return void 0===this.hd[t]&&(this.hd[t]=new W.C,this.hd[t].promise.catch((()=>this.hd[t].reject()))),this.hd[t]}resolveEvent(t,i){this.wd(t).resolve(i)}setAmpUserConsent(t){this.$c.setAmpUserConsent(t),this.resolveEvent(Y.CONSENT_DATA_UPDATE)}setPageUrl(t){this.$c&&this.$c.setPageUrl(t)}onEvent(t){const i=t.map((t=>this.wd(t).promise));return Promise.all(i)}isConsent(t,i){return this.$c.isConsent(t,i)}isConsentConnatix(){return this.$c.isConsentConnatix()}ccpaInfoLogging(t){this.yd.ccpaInfoLogging(t)}getConsentPayload(){return this.$c.getConsentDataPayload()}isConsentRequired(){return this.$c.isConsentRequired()}isPersonalisedAdsAllowed(){return this.isConsentRequired()?this.$c.isConsentForPersonalisedAds():!this.isCcpaApplicable()||this.yd.isSellUserAllowed()}setThirdPartySyncUrls(t){this.re||this.bd.setSyncUrls(t)&&this.resolveEvent(K.SYNC_URLS_RECEIVED)}setGeoLocation(t){this.yd.setGeoLocation(t),this.yd.fetchUsPrivacyString().then((()=>{this.resolveEvent(Y.CCPA_INFO_RECEIVED)})).catch((()=>{this.resolveEvent(Y.CCPA_INFO_RECEIVED)}))}getUserId(){if(this.isConsentConnatix()&&this.gd)return this.gd.getUserId()}_d(){return this.gd&&this.gd.getUserId()}setUserInformation(t){this.gd&&(this.gd.setUserInformation(t),this.resolveEvent(K.USER_INFO_RECEIVED),!this.re&&this.isConsentConnatix()&&this.gd.syncFirstPartyCookie(p.USER_ID))}isGDPR(){return!!this.dd}getUsPrivacyString(){return this.yd.getUsPrivacyString()}isCcpaApplicable(){return this.yd.isCcpaApplicable()}isSellUserAllowed(){return this.re||this.yd.isSellUserAllowed()}getDeviceId(){if(this.isConsentConnatix())return this._appSettings.deviceID}Sd(){return this._appSettings.deviceID}getTrackableUser(){return this.re?this.getDeviceId():this.getUserId()}getForcedTrackableUser(){return this.re?this.Sd():this._d()}registerPlsCall(t){return this.isConsentConnatix()||(this.ud=!0),this.sc.registerPlsCall(t)}setBrowserInfo(t){this.gd&&this.gd.setBrowserInfo(t,this.isConsentConnatix())}getGdprConsentApiType(){return this.$c.getConsentApiType()}}},5650:(t,i,e)=>{"use strict";e.d(i,{BZ:()=>l,Gg:()=>p,Sz:()=>c,V7:()=>f,d3:()=>o,ee:()=>y,fn:()=>u,gX:()=>v,qo:()=>h,qy:()=>a,sj:()=>g,tN:()=>m,ti:()=>d});var s=e(4798),n=e(277),r=e(7531);e(9791);function o(t,i){return i.indexOf(t)>-1}function h(t){return Array.isArray(t)?t:[t]}function a(t,i){const e=[],s=new Map;return i.forEach((i=>{s.has(i[t])||(s.set(i[t],!0),e.push(i))})),e}function c(t){return[].slice.call(t)}function d(t){const i=[];for(const e in t)e&&parseInt(e,10)>=0&&i.push(t[e]);return i}function l(t){return t&&t.length>0}function u(t){return t.every((t=>(0,s.hj)(t)))}function p(t){let i="[";for(let e=0;e<t.length;e++)i+=(0,r.H)(t[e])+(e===t.length-1?"":",");return i+="]",i}function f(t,i){return t.filter((t=>!i.includes(t)))}function m(t,i){return t.filter((t=>i.includes(t)))}function v(t){return t.filter(((i,e)=>t.indexOf(i)===e))}function g(t,i){const e=t.indexOf(i);-1!==e?t.splice(e,1):(0,n.n)({message:"removeItemFromArray_error_item_not_found",exception:JSON.stringify(i),level:n.D.WARN})}function y(t){const i=[];return t.forEach((t=>i.push(t))),i}},5356:(t,i,e)=>{"use strict";e.d(i,{Xj:()=>a,mb:()=>c,xm:()=>h});var s=e(289),n=e(3020),r=e(8983),o=e(565);function h(t,i){let e=!1;switch(t){case s.ProtoAdBreakTypeEnum.PreRoll:e=i===s.ProtoAdSlotsEnum.PreRoll;break;case s.ProtoAdBreakTypeEnum.MidRoll:e=i===s.ProtoAdSlotsEnum.MidRoll;break;case s.ProtoAdBreakTypeEnum.PostRoll:e=i===s.ProtoAdSlotsEnum.PostRoll}return e}function a(t,i){return!(i.skippability===s.ProtoPlayerSkippabilityType.AllowNonSkipAdsIfTheyAreShorterThan&&t<i.skipMin)}function c(t){return(0,n.pv)(t,r.s6.Ad)||(0,n.pv)(t,o.Z.InAd)}},3020:(t,i,e)=>{"use strict";e.d(i,{AX:()=>rt,Dx:()=>k,Fs:()=>T,G$:()=>M,GF:()=>Q,Ho:()=>p,IS:()=>q,IV:()=>_,Iy:()=>V,Ji:()=>G,Kk:()=>nt,LT:()=>U,L_:()=>A,ML:()=>I,MV:()=>u,NN:()=>ct,NS:()=>y,Nb:()=>it,PM:()=>R,Q1:()=>L,S0:()=>B,T7:()=>f,Tp:()=>O,U6:()=>W,UR:()=>ot,Wb:()=>Z,_w:()=>ht,aQ:()=>m,bX:()=>v,bZ:()=>at,cn:()=>w,dZ:()=>b,eA:()=>tt,fj:()=>N,h_:()=>D,jG:()=>$,ju:()=>J,nw:()=>F,oW:()=>dt,og:()=>P,pv:()=>S,rI:()=>x,sw:()=>et,tp:()=>E,uC:()=>g,uc:()=>C,uh:()=>st,uq:()=>Y,w6:()=>X,wl:()=>K});var s=e(8576),n=e(4798),r=e(5650),o=e(8983),h=e(9791),a=e(51),c=e(307),d=e(277);function l(t,i){t&&(t.style.display=i?"":"none")}function u(t){l(t,!1)}function p(t){l(t,!0)}function f(t,i){for(const e in i)i.hasOwnProperty(e)&&(t.style[e]=i[e])}function m(t,...i){i.forEach((i=>{t.style[i]=""}))}function v(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function g(t,i=document){v(i.getElementById(t))}function y(t,i,e,s,r){if(i)try{const o=e.document.createElement("link");return o.id=t.id,o.type="text/css",o.rel="stylesheet",o.href=t.src,(0,n.mf)(s)&&(o.onload=()=>{s()}),(0,n.mf)(r)&&(o.onerror=t=>{i.removeChild(o),(0,n.HD)(t)?r(`link_stylesheet_load_error_${t}`):r(`link_stylesheet_load_error_${function(t,i){const e=t.document.createElement("div");return e.appendChild(i),e.innerHTML}(e,o)}`)}),i.appendChild(o),o}catch(t){return null}}function b(t,i,e,s,r,o=!0,h){try{const a=e.document.createElement("script");if(a.src=t.src,a.async=!0,a.type="text/javascript",t.id&&(a.id=t.id),t.attributes)for(const i of t.attributes)a.setAttribute(i.name,i.value);return(0,n.mf)(s)&&(a.onload=()=>{s()}),a.onerror=e=>{i.removeChild(a),o&&(0,d.n)({message:h,exception:"script_load_error",callStack:t.src,level:d.D.INFO},{throttle:2,shouldSendMaxLog:!1}),(0,n.mf)(r)&&r()},i.appendChild(a),a}catch(i){return o&&(0,d.n)({message:h,exception:`script_insert_error_${i.message}_${i.stack}`,callStack:t.src,level:d.D.CRITICAL},{throttle:2,shouldSendMaxLog:!1}),(0,n.mf)(r)&&r(),null}}function I(t,i,e){if(t)try{const s=i.document.createElement("script"),n=i.document.createTextNode(e);return s.appendChild(n),t.appendChild(s),s}catch(t){return null}}function w(t,...i){t&&t.classList.add(...i)}function _(t,...i){t&&t.classList.remove(...i)}function S(t,i){return t&&t.classList.contains(i)}function P(t,i,e){return!!t&&t.classList.toggle(i,e)}function A(t,i,e,s=!1){t&&(t.classList.remove(i),t.classList.add(e),s&&O(t))}const x=(t,i)=>i.document.getElementById(t),k=(t,i,e)=>i.getComputedStyle(t,e),T=(t,i)=>i.document.getElementsByClassName(t);function C(t,i="",e){const s=e.document.getElementsByTagName("head")[0],n=e.document.createElement("style");n.setAttribute("type","text/css"),n.id=i,n.appendChild(e.document.createTextNode(t)),s.appendChild(n)}function E(t,i){const e=i.document.getElementsByTagName("head")[0],s=i.document.createElement("link");s.setAttribute("rel","preconnect"),s.setAttribute("link",t),e.appendChild(s)}function M(t,i){const e=i.document.createElement("div");return e.innerHTML=t,e.firstElementChild}function L(t,i){i>0?(t.removeAttribute("muted"),t.muted=!1):(t.setAttribute("muted",""),t.muted=!0)}function B(t){return s.Ht.find((i=>{if(i.keys.fullscreenEnabled in t)return!0}))}function O(t){t.getBoundingClientRect()}function R(t,i){return(t.requestAnimationFrame||t.webkitRequestAnimationFrame||function(t){return setTimeout(t,20)})(i)}function D(t,i){return(t.cancelAnimationFrame||t.webkitCancelAnimationFrame||function(t){return clearTimeout(t)})(i)}function V(t){return!!t.closest(".cnx-el")}function j(t,i,e){const s=function(t,i){const e=function(t,i){let e=i;for(;e;){const i=e.parentNode;if(i){const e=t.reduce(((t,e)=>t||i.querySelector(e)),null);if(e)return e}e=i}return null}(t,i);return e?k(e,U(e)):null}(t,i);return s?function(t,i){return t.getPropertyValue(i)}(s,e):null}function F(t){const i=j(["h1","h2"],t,"font-family");return i||"inherit"}function N(t){const i=j(["p"],t,"font-family");return i||"inherit"}function U(t){try{return t.ownerDocument.defaultView}catch(t){return null}}function $(t,i){t&&i&&(Array.isArray(t)?t.forEach((t=>i.appendChild(t))):i.appendChild(t))}function q(t,i,e){let s=!1;const n=(0,r.Sz)(i.children);for(let i=0;i<n.length;i++)if(e-1===i||0===e){s=!0,Array.isArray(t)?H(n[i],...t):H(n[i],t);break}s||$(t,i)}function H(t,...i){if(t&&t.parentElement)for(let e=i.length;e--;)t.parentElement.insertBefore(i[e],t)}function z(t){const i=U(t);if(!i)return;const{display:e}=k(t,i);"none"===e&&(t.style.display="block")}function W(t,i=(()=>{})){const e=function(s){"opacity"===s.propertyName&&(_(t,o.jG.FadeOutBase,o.jG.FadeOut),i(),t.removeEventListener("transitionend",e))};w(t,o.jG.FadeOutBase),z(t),O(t),t.addEventListener("transitionend",e),w(t,o.jG.FadeOut)}function G(t,i=(()=>{})){const e=function(s){"opacity"===s.propertyName&&(_(t,o.jG.FadeInBase,o.jG.FadeIn),i(),t.removeEventListener("transitionend",e))};w(t,o.jG.FadeInBase),z(t),O(t),t.addEventListener("transitionend",e),w(t,o.jG.FadeIn)}function Q(t){const i=U(t);if(!i)return!0;const{display:e,opacity:s}=k(t,i);return"none"===e||"0"===s}function J(t,i){const e=i.document.createElement("div");return e.innerHTML=t||"",e.innerText}function X(){const t=window.navigator&&window.navigator.doNotTrack||window.doNotTrack;return"1"===t||"yes"===t}function Y(t,i){const e=(0,h.pE)(t).topFrame;return e[i]?e:null}function K(t,i){let e=t,s=null;try{for(;!s;){try{e.frames[i]&&(s=e)}catch(t){}if(!t.top||t.top===e)break;e=e.parent}}catch(t){}return s}function Z(t,i){let e=[];try{e=e.slice.call(i.document.querySelectorAll(t),0)}catch(t){}return e}function tt(t){return(0,h.pE)(t).topFrame.location.protocol.includes("https")}function it(t){if(!tt(t))return;[window,t].forEach((t=>{if(null===t.document.querySelector("meta[content=upgrade-insecure-requests]")){const i=t.document.createElement("meta");i.setAttribute("http-equiv","Content-Security-Policy"),i.content="upgrade-insecure-requests",t.document.head.appendChild(i)}}))}function et(t){return(0,h.pE)(t).topFrame.document.referrer}function st(t,i){const e=(0,h.pE)(i).topFrame.location.hostname,s=(0,h.bx)(t);return s&&s.hostname===e}function nt(t){t.removeAttribute("href"),t.removeAttribute("target"),t.removeAttribute("download"),t.removeAttribute("ping"),t.removeAttribute("rel"),t.removeAttribute("media"),t.removeAttribute("hreflang"),t.removeAttribute("type")}function rt(t,i){try{t.onclick=t=>{const{tagName:e,className:s}=t.target;(0,d.n)({message:`${i} - click on tag:${e} class:${s}`,level:d.D.INFO})}}catch(t){(0,d.n)({message:`${i}_Error - iframe click`,level:d.D.WARN,callStack:t.stack})}}function ot(t){setTimeout((()=>{let i=t.currentTime+.01;i>t.duration&&(i=.01),t.currentTime=i}),0)}function ht(t,i){!function(t,i,e){const s=t.document.createElement("link");s.rel="preload",s.href=i,s.as=e,t.document.head.appendChild(s)}(i,t,"script")}function at(t,i){if(!i||!ct(i))return(0,d.n)({message:"Prerender_Elements_getgetCustomerId_no_currentScript",level:d.D.CRITICAL}),null;const e=i.src;return(0,a.Ph)(c.ym,e)}function ct(t){return"SCRIPT"===t.tagName}function dt(t){const{top:i,left:e}=t.getBoundingClientRect();return{top:i,left:e}}},9791:(t,i,e)=>{"use strict";e.d(i,{Hh:()=>m,M$:()=>S,Of:()=>b,Up:()=>I,Vm:()=>v,bx:()=>p,dz:()=>d,er:()=>l,lU:()=>u,ld:()=>y,oC:()=>w,pE:()=>f,qs:()=>c,rM:()=>_,we:()=>g});var s=e(51),n=e(4798),r=e(7531),o=e(5650),h=e(9361),a=e(8576);function c(){let t=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(i){const e=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===i?e:3&e|8).toString(16)}))}function d(){return c().replace(/-/g,"")}function l(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t.trim())}function u(t,i){let e="";if(!t.err)try{e=t.topFrame.location.href}catch(t){}if(!e||0===e.length)try{e=i.top.location.href}catch(t){}if(!e||0===e.length)try{e=t.topFrame.document.referrer}catch(t){}return e}function p(t){try{const i=t.match(/^(https?:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return{href:t,protocol:i[1],host:i[2],hostname:i[3],port:i[4],pathname:i[5],search:i[6],hash:i[7]}}catch(t){return null}}function f(t){let i=t,e=null,s=!1;try{for(;i.parent.document!==i.document;){if(!i.parent.document){s=!0;break}e=i,i=i.parent}}catch(t){s=!0}return{topFrame:i,topChildFrame:e,err:s}}function m(t=[],i,e={}){t.forEach((t=>{(0,n.HD)(t)&&((new i.Image).src=`${t}${(0,s.CK)(t)}${function(t,i){const e=[];return Object.keys(t).forEach((s=>{const h=i?`${i}[${s}]`:s,a=t[s];if((0,n.as)(a))e.push(`${encodeURIComponent(h)}=${(0,r.H)(a)}`);else if(Array.isArray(a))e.push(`${encodeURIComponent(h)}=${(0,o.Gg)(a)}`);else if(null!=a){const t=encodeURIComponent(a),i=encodeURIComponent(h);t&&i&&e.push(`${i}=${t}`)}})),e.join("&")}(e)}`)}))}function v(t){const i=Math.floor(100*Math.random());let e=0,s=0;for(let n=0;n<t.length;n++)if(s+=t[n],i<s){e=n;break}return e}function g(){let t=!1;try{const i=document.createElement("audio");i.volume=1,i.muted=!1;const e=i.play();void 0!==e&&e.catch((()=>{})),t=!i.paused,i.pause()}catch(t){}return t}function y(t,i=0,...e){return setTimeout((()=>{t.apply(this,e)}),i)}function b(t,i,e){let s=0,n=t;for(;s<=e;){if(s++,n.classList.contains(i))return!0;if(n=n.parentElement,!n)return!1}return!1}function I(t,i=5,e){return new Promise(((s,r)=>{t().then(s).catch((o=>{1===i||(0,n.mf)(e)&&e(o)?r(o):I(t,i-1,e).then(s,r)}))}))}function w(){const t=!!window.MSInputMethodContext&&!!document.documentMode,i=navigator.userAgent.toLowerCase().includes("msie");return t||i}function _(t){return Object.keys(t).reduce(((i,e)=>Object.assign(Object.assign({},i),{[e]:`${t[e]}`})),{})}function S(t){const{connection:i}=window.navigator;if(!i)return a.FX.UNKNOWN;const{type:e,effectiveType:s}=i;if(e===a._S.ETHERNET)return a.FX.ETHERNET;if(e===a._S.WIFI)return a.FX.WIFI;if(e===a._S.CELLULAR)switch(s){case a.Oc.CELLULAR_2G:case a.Oc.CELLULAR_SLOW_2G:return a.FX.CELLULAR_2G;case a.Oc.CELLULAR_3G:return a.FX.CELLULAR_3G;case a.Oc.CELLULAR_4G:return a.FX.CELLULAR_4G;default:return a.FX.CELLULAR_UNKNOWN}return(0,n.$K)(e)||t!==h.VB.Desktop?a.FX.UNKNOWN:a.FX.WIFI}},51:(t,i,e)=>{"use strict";e.d(i,{Bp:()=>o,CK:()=>h,FM:()=>c,Ph:()=>r,ge:()=>a,sH:()=>u});var s=e(4798);const n=".cdn.ampproject.org";function r(t,i){i||(i=location.search),t=t.replace(/\[/,"\\[").replace(/]/,"\\]");const e=new RegExp(`[\\?&]${t}=([^&#]*)`,"i").exec(i);return null===e?null:decodeURIComponent(e[1])}function o(t,i,e){const s=new RegExp(`([?&])${i}=.*?(&|$)`,"i"),n=h(t);return t.match(s)?e?t.replace(s,`$1${i}=${e}$2`):t.replace(s,"$1"):`${t}${n}${i}=${e}`}function h(t){return t.includes("?")?"&":"?"}function a(t){if((0,s.QM)(t))return d(t).split("/")[0]}function c(t){if((0,s.QM)(t))return d(t)}function d(t){return t.includes("://")?t.split("://")[1]:t}function l(t,i){return`${"http"+(/(\/s\/)+/.test(t.replace(i,""))?"s":"")}://${i}`}function u(t,i=!0){return t=function(t){if(!t.includes(n))return t;const i="www.",e="amp.";if((t=(t=(t=(t=(t=(t=(t=t.replace(n,"")).replace("www-",i)).replace("amp-",e)).cnx_replaceAll("--","=")).cnx_replaceAll("-",".")).cnx_replaceAll("=","-")).replace(i,e)).includes(e))return t;const s="http://",r="https://";return(t=t.replace(s,"http://amp.")).replace(r,"https://amp.")}(t=function(t){const i=/^https:\/\/www.google\..*?\/amp\/s*\/*/.exec(t);if(null!==i){const e=t.replace(i[0],"");return l(t,e)}return t}(t=function(t){if(t.includes(n)){t=t.replace("https://","");const i=/^[^\/]+(\/[a-z]+\/)+s*\/*/,e=i.test(t)?t.replace(i.exec(t)[0],""):t;return l(t,e)}return t}(t))),i&&(t=function(t){if(!t.includes("#origin-")&&!t.includes("viewerUrl-"))return t;const i=t.split("#origin-")[1].split("viewerUrl-");return u(t=decodeURIComponent(i[1]),!1)}(t)),t}},7124:(t,i,e)=>{"use strict";e.d(i,{$:()=>p});const s=(t,i,e)=>{u(e);const s=function(t,i){const e=r(t),s=r(i),n=e.pop(),o=s.pop(),h=c(e,s);return 0!==h?h:n&&o?c(n.split("."),o.split(".")):n||o?n?-1:1:0}(t,i);return d[e].includes(s)},n=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,r=t=>{if("string"!=typeof t)throw new TypeError("Invalid argument expected string");const i=t.match(n);if(!i)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return i.shift(),i},o=t=>"*"===t||"x"===t||"X"===t,h=t=>{const i=parseInt(t,10);return isNaN(i)?t:i},a=(t,i)=>{if(o(t)||o(i))return 0;const[e,s]=((t,i)=>typeof t!=typeof i?[String(t),String(i)]:[t,i])(h(t),h(i));return e>s?1:e<s?-1:0},c=(t,i)=>{for(let e=0;e<Math.max(t.length,i.length);e++){const s=a(t[e]||0,i[e]||0);if(0!==s)return s}return 0},d={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},l=Object.keys(d),u=t=>{if("string"!=typeof t)throw new TypeError("Invalid operator type, expected string but got "+typeof t);if(-1===l.indexOf(t))throw new Error(`Invalid operator, expected one of ${l.join("|")}`)};var p;!function(t){t.shouldUseExternalViewabilityService=function(t){return s(t,"3.0.0","<")},t.showAndroidExpandButton=function(t){return s(t,"3.2.0",">=")}}(p||(p={}))},277:(t,i,e)=>{"use strict";e.d(i,{D:()=>c,n:()=>l});var s=e(7945),n=e(9741);var r=e(9791),o=e(9831),h=e(6153);let a=window.location&&window.location.href;try{a=window.top.location.href}catch(t){}var c;!function(t){t.EMERGENCY="Emergency",t.ALERT="Alert",t.CRITICAL="Critical",t.ERROR="Error",t.WARN="Warn",t.INFO="Info"}(c||(c={}));const d={throttle:30,shouldSendMaxLog:!0,pacing:0};function l(t,i={}){if(!((i=Object.assign(Object.assign({},d),i)).pacing>0)||function(t){const i=Math.min(Math.max(t,0),100);return!!(0,r.Vm)([100-i,i])}(i.pacing))if(t.sessionId=n.S.sessionId,n.S.incrementLogCount(t.message),n.S.isMaxLogOverflow(t.message)&&l({message:"Logging_max_log_overflow_1000",exception:t.message,callStack:t.callStack,level:c.CRITICAL,sessionId:n.S.sessionId},{shouldSendMaxLog:!1,throttle:100}),n.S.isMaxLog(t.message,i.throttle))i.shouldSendMaxLog&&!n.S.isMaxLogSent(t.message)&&(n.S.setMaxLogSent(t.message),l({message:"Logging_max_log_sent",exception:t.message,callStack:t.callStack,level:c.CRITICAL,sessionId:n.S.sessionId}));else{if(void 0===t.callStack){const i=new Error(t.message);t.callStack=i.stack}if(t.callStack=t.callStack.substring(0,500),s.g.logToServer){t.pageUrl=t.pageUrl||a,t.version=s.g.version;let e="connatix.com";try{e=h.n.bundleDomain}catch(t){}const n="https://pl."+e;t.ddsource="browser",t.service="player",t.ua=navigator.userAgent,i.sendBeacon?o.n.sendJsonBeaconRequest(t,n):o.n.fetchXhttpRequest({requestUrl:n,requestType:"POST",withCredentials:!1},JSON.stringify(t)).catch((()=>{}))}s.g.logToConsole&&function(t){let i;switch(t.level){case c.CRITICAL:i="#8B0000";break;case c.WARN:i="#FF8C00";break;case c.INFO:i="#000000"}console.log(`%cConnatix Logging:\n   message: ${t.message}\n   exception: ${t.exception}\n   level: ${t.level}\n   version: ${t.version}\n   sessionId: ${t.sessionId}\n   callStack: ${t.callStack}`,`color:${i}`)}(t)}}},7332:(t,i,e)=>{"use strict";e.d(i,{DE:()=>r,ON:()=>a,Tc:()=>o,dO:()=>c,dQ:()=>n,mg:()=>d,oK:()=>h});var s=e(4798);function n(t,i,e,s,n){return e+(s-e)*function(t,i,e){return(e-t)/(i-t)}(t,i,n)}function r(t,i){return i.reduce(((i,e)=>Math.abs(e-t)<=Math.abs(i-t)?e:i))}function o(t,i){return i/100*t}function h(t,i){const e=Math.pow(10,i);return Math.round(t*e)/e}function a(t){return!(0,s.r)(t.width)||!(0,s.r)(t.height)}function c(t,i){for(let e=i;e>1;e--)t%e==0&&i%e==0&&(t/=e,i/=e);return{widthRatio:t,heightRatio:i}}function d(t,i,e){const s=Math.min(i,e),n=Math.max(i,e);return t>=s&&t<=n}},7531:(t,i,e)=>{"use strict";e.d(i,{H:()=>s});e(9791);function s(t){for(const i in t)t.hasOwnProperty(i)&&"string"==typeof t[i]&&(t[i]=`%22${encodeURIComponent(t[i])}%22`);return JSON.stringify(t).cnx_replaceAll('"',"")}},9600:(t,i,e)=>{"use strict";function s(t=[]){t.filter((t=>!!t)).forEach((t=>t.unsubscribe()))}e.d(i,{i:()=>s})},3003:(t,i,e)=>{"use strict";e.d(i,{EQ:()=>o,Ed:()=>a,IS:()=>h,VN:()=>c,f5:()=>r});var s=e(277),n=e(4798);function r(t,i){return t.replace(/(?:\r\n|\r|\n)/g,i)}function o(t){try{return Object.keys(t).reduce(((i,e)=>Object.assign(Object.assign({},i),{[e]:(0,n.QM)(t[e])&&t[e].includes("%%")?void 0:t[e]})),{})}catch(i){return(0,s.n)({message:"sanitizeDfpMacros_error",exception:i.message,callStack:i.stack,level:s.D.WARN}),Object.keys(t).reduce(((i,e)=>Object.assign(Object.assign({},i),{[e]:(0,n.QM)(t[e])&&t[e].includes("%%")?void 0:t[e]})),{})}}function h(t,i){return`${t}-${i}`}function a(t,i){return t.match(i)||[]}function c(t,i,e){return(0,n.QM)(t)?t.substring(i,e):""}},1310:(t,i,e)=>{"use strict";e.d(i,{H8:()=>l,QI:()=>o,XF:()=>h,k$:()=>c,kw:()=>f,pP:()=>r,qe:()=>u,to:()=>a,w4:()=>p,x8:()=>d});var s=e(9357),n=e(4798);function r(t){let i,e;return(0,n.HD)(t)&&(i=t.match(s.T9),i&&(e=parseInt(i[1],10)*s.p7+parseInt(i[2],10)*s.uD+parseInt(i[3],10)*s.s_+parseInt(i[5]||0,10))),isNaN(e)?null:e}function o(t,i){return/^\d+(\.\d+)?%$/g.test(t)?i?i*parseFloat(t.replace("%",""))/100:null:r(t)}function h(t){return Date.now()+t*s.ti}function a(t,i=":"){const e=t=>t>=10?t:`0${t}`;return`${e(Math.floor(t/60))}${i}${e(Math.floor(t%60))}`}function c(t,i){const e=Date.now();return!(e<t||e>i)}function d(){const t=new Date;return t.getTime()-1e3*t.getTimezoneOffset()*60}function l(t){return Math.floor((Date.now()-t)/s.s_)}function u(t,i){return t>=i?t/s.s_:t}function p(t){return(0,n.hj)(t)?t*s.s_:null}function f(t){return Math.round(t/s.s_)}},4798:(t,i,e)=>{"use strict";function s(t){return"string"==typeof t}function n(t){return"number"==typeof t&&isFinite(t)}function r(t){return n(t)&&t>0}function o(t){return s(t)&&t.length>0}function h(t){return void 0!==t}function a(t){return"function"==typeof t}function c(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function d(t){try{if(t.contentWindow||t.contentDocument)return!0}catch(t){}return!1}function l(t,i){var e;return o(t)?!(!(null===(e=Object.values(i))||void 0===e?void 0:e.includes(t))||Object.keys(i).includes(t)):!!n(t)&&t in i}e.d(i,{$K:()=>h,Cz:()=>l,HD:()=>s,QM:()=>o,as:()=>c,cL:()=>d,hj:()=>n,mf:()=>a,r:()=>r})},9831:(t,i,e)=>{"use strict";e.d(i,{n:()=>s});var s,n=e(9791),r=e(4798),o=e(51),h=e(277);!function(t){let i;!function(t){t.DumpJson="Dump Json",t.ServerError="Server Error",t.ProtobufDecode="Protobuf_decode"}(i||(i={}));function e(t,i){return(0,r.as)(i)?(Object.keys(i).forEach((e=>t=(0,o.Bp)(t,e,i[e]))),t):t}function s(t,i){const e=function({requestUrl:t,requestType:i="POST",contentType:e="",responseType:s="",withCredentials:n=!1,timeout:r=3e4}){const o=new XMLHttpRequest;return o.open(i,t,!0),e.length>0&&o.setRequestHeader("Content-Type",e),s.length>0&&(o.responseType=s),o.timeout=r,o.withCredentials=n,o}(t),s=new Date;return new Promise(((t,n)=>{e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE)if(200===e.status)t(e.response);else{let t="";try{t=e.responseText}catch(t){}const i=(new Date).getTime()-s.getTime();n(new Error(`Request fail. status:${e.status}, readyState:${e.readyState}, response:${t}, time:${i}`))}},e.ontimeout=()=>{const t=(new Date).getTime()-s.getTime();n(new Error(`Request timeout status:${e.status}. time:${t}`))},e.send(i)}))}function a(t,e,s,n){return new Promise(((r,o)=>{e.then((e=>{if(t){let a=null;try{const i=e?new Uint8Array(e):new Uint8Array;a=t.toObject(t.decode(i),{defaults:!0,arrays:!0,objects:!0})}catch(t){!function(t,e,s,n){let r;try{r=JSON.parse((new TextDecoder).decode(t))}catch(t){}r?(r.ErrorMessage===i.DumpJson&&(0,h.n)({message:i.DumpJson,exception:JSON.stringify(s),callStack:e,level:h.D.INFO}),r.ErrorMessage===i.ServerError&&(0,h.n)({message:i.ServerError,exception:e,level:h.D.WARN})):(0,h.n)({exception:`${e}__${n.message}`,message:i.ProtobufDecode,callStack:n.stack,level:h.D.WARN},{throttle:10})}(e,s,n,t),o(i.ProtobufDecode)}r(a)}})).catch((t=>{o(t)}))}))}function c(t,i,e){try{const s=(0,n.Vm)([95,5]);!s||i&&0!==Object.keys(i).length||(0,h.n)({message:"empty_proto_request",callStack:"empty_function_argument",exception:e,level:h.D.INFO},{shouldSendMaxLog:!1});const r=t.fromObject(i);!s||r&&0!==Object.keys(r).length||(0,h.n)({message:"empty_proto_request",callStack:"empty_fromObject_result",exception:e,level:h.D.INFO},{shouldSendMaxLog:!1});const o=t.encode(r).finish();return!s||o&&0!==Object.keys(o).length||(0,h.n)({message:"empty_proto_request",callStack:"empty_encode_result",exception:e,level:h.D.INFO},{shouldSendMaxLog:!1}),o}catch(t){throw(0,h.n)({exception:e,level:h.D.CRITICAL,callStack:JSON.stringify(i),message:"Protobuf_encode"},{throttle:10}),Error()}}t.fetchXhttpRequest=s,t.fetchXMLRequest=function(t,i=!0){const e=s({requestUrl:t,requestType:"GET",withCredentials:i});return new Promise(((t,i)=>{e.then((i=>{t(i)})).catch((t=>{i(t)}))}))},t.sendProtoRequest=function({protoResponse:t,protoRequest:i,requestData:r,endpoint:o,requestType:d,hasCredentials:l,queryParams:u,shouldLogErrors:p,timeout:f}){const m=r?c(i,r,o):null;return function(t,i,e="POST",n,r,o,h){return a(t,s({requestUrl:i,requestType:e,withCredentials:r,contentType:"POST"===e?"multipart/form-data":"",responseType:"arraybuffer",timeout:o},n),i,h)}(t,o=e(o,u),d,m,l,f,r).catch((t=>{throw p&&(0,n.Vm)([95,5])&&(0,h.n)({message:"Xhr_error",exception:o,callStack:`${t}, requestData: ${JSON.stringify(r)}`,level:h.D.INFO}),new Error(t)}))},t.sendProtoBeaconRequest=function({protoRequest:t,requestData:i,endpoint:s,queryParams:n=null}){s=e(s,n);const r=i?c(t,i,s):null;return navigator.sendBeacon(s,r)},t.sendJsonBeaconRequest=function(t,i){const e=new Blob([JSON.stringify(t)],{type:"application/json"});return navigator.sendBeacon(i,e)},t.trackPixel=function(t){try{(new Image).src=t}catch(t){(0,h.n)({message:"Xhr_trackPixel",exception:t.message,callStack:t.stack,level:h.D.CRITICAL})}}}(s||(s={}))},5204:(t,i,e)=>{"use strict";e.d(i,{k:()=>o});var s=e(6716),n=e(4546),r=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let o=class{constructor(){this.adClick=new s.x,this.adImpression=new s.x,this.adInView=new s.x,this.adQuartile=new s.x,this.auctionInformation=new s.x,this.heavyAd=new s.x,this.adPrebid=new s.x,this.adPostbid=new s.x,this.adBid=new s.x,this.startBidTracking=new s.x,this.missedImpressionOutOfView=new s.x,this.adBidTracking=new s.x}};o=r([(0,n.b2)(),(0,n.Yn)(n.Fw.ContainerScoped)],o)},9577:(t,i,e)=>{"use strict";e.d(i,{o:()=>oi});var s={};e.r(s);var n={};e.r(n);var r={};e.r(r);var o={};e.r(o);var h={};e.r(h);var a={};e.r(a);var c={};e.r(c);var d={};e.r(d);var l={};e.r(l);var u={};e.r(u);var p={};e.r(p);var f={};e.r(f);class m{}m.MAX_STRING_LENGTH=99,m.TIME_BIDS_INTERVAL_FREQUENCY=5e3;var v,g,y,b=e(5204),I=e(8395),w=e(4546),_=e(3003),S=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},P=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},A=function(t,i){return function(e,s){i(e,s,t)}};let x=v=class{constructor(t,i){this.th=t,this.Qs=i,this.Pd=[],this.xd=[],this.Td=[],this.Cd=[],this.Ld=null,this.Bd()}static Od(t){return t.map((t=>Object.assign(Object.assign({},t),{reason:(0,_.VN)(t.reason,0,m.MAX_STRING_LENGTH)})))}destroy(){this.Ld&&(this.Qs.clearInterval(this.Ld),this.Ld=null)}Bd(){this.Pd.push(this.th.adBid.subscribe((t=>{this.Rd(t)})),this.th.adPostbid.subscribe((t=>{this.Dd(t)})),this.th.adPrebid.subscribe((t=>{this.Vd(t)})),this.th.startBidTracking.subscribe((()=>{this.jd()})))}jd(){this.Ld||(this.Ld=this.Qs.setInterval((()=>{this.Fd()}),m.TIME_BIDS_INTERVAL_FREQUENCY))}Vd(t){this.Td.push(t)}Dd(t){this.Cd.push(t)}Rd(t){this.xd.push(t)}Fd(){this.Nd(),this.Td=[],this.xd=[],this.Cd=[]}Nd(){0===this.Td.length&&0===this.xd.length&&0===this.Cd.length||(this.Cd=v.Od(this.Cd),this.th.adBidTracking.next({prebidList:this.Td,bidList:this.xd,postbidList:this.Cd}))}};x=v=S([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped),A(0,(0,w.f3)(b.k)),A(1,(0,w.f3)(I.f)),P("design:paramtypes",["function"==typeof(g=void 0!==s.IAdEvents&&s.IAdEvents)?g:Object,"function"==typeof(y=void 0!==n.ITimerService&&n.ITimerService)?y:Object])],x);var k=e(2239),T=e(6716),C=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let E=class{constructor(){this.mediaQuartile=new T.x,this.mediaClick=new T.x}};E=C([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped)],E);var M=e(6515),L=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let B=class{constructor(){this.sessionPlaybackChanged=new M.X({isPlaying:!1}),this.sessionViewabilityChanged=new M.X({isInView:!1}),this.sessionTimeElapsed=new T.x,this.sessionRendered=new T.x,this.sessionView=new T.x,this.sessionAdBlocked=new T.x,this.adOpportunity=new T.x,this.adsEnabled=new T.x,this.contentStart=new T.x}};B=L([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped)],B);class O{}O.TRACKING_POINTS=[{delay:7,timesRepeatDelay:1},{delay:8,timesRepeatDelay:1},{delay:15,timesRepeatDelay:3},{delay:30,timesRepeatDelay:2},{delay:60,timesRepeatDelay:1},{delay:120,timesRepeatDelay:1},{delay:300,timesRepeatDelay:8},{delay:600,timesRepeatDelay:13},{delay:1800,timesRepeatDelay:Number.MAX_SAFE_INTEGER}];var R=e(9357),D=e(4065),V=e(4975),j=e(4978),F=e(6196),N=e(6798),U=e(2566);function $(t){return i=function(){return t},(0,N.e)((function(t,s){var n=0;t.subscribe((0,U.x)(s,(function(t){s.next(i.call(e,t,n++))})))}));var i,e}var q,H,z,W=e(89),G=e(1310),Q=e(4798),J=e(9600),X=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},Y=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},K=function(t,i){return function(e,s){i(e,s,t)}};let Z=q=class{constructor(t,i){this.Ud=t,this.Qs=i,this.$d=!1,this.qd=!1,this.Pd=[],this.Hd=new M.X(O.TRACKING_POINTS[0]),this.zd=new D.B(this.Qs,Number.MAX_SAFE_INTEGER,q.TIMER_TICK),this.Wd=new D.B(this.Qs,Number.MAX_SAFE_INTEGER,q.TIMER_TICK),this.Gd()}destroy(){(0,J.i)(this.Pd)}Gd(){const t=this.Ud.sessionRendered.pipe((0,W.q)(1)).subscribe((()=>{this.Qd()}));this.Pd.push(this.Ud.sessionPlaybackChanged.subscribe((({isPlaying:t})=>{this.Jd(t)})),this.Ud.sessionViewabilityChanged.subscribe((({isInView:t})=>{this.Xd(t)})),this.Ud.sessionViewabilityChanged.subscribe((({isInView:t})=>{this.Xd(t)})),t)}Jd(t){this.$d!==t&&(this.$d=t,this.qd&&this.$d&&this.Wd.start(),this.$d?this.zd.start():(this.zd.stop(),this.Wd.stop()))}Xd(t){this.qd!==t&&(this.qd=t,this.qd&&this.$d?this.Wd.start():this.qd||this.Wd.stop())}Qd(){this.Pd.push(this.Hd.pipe((0,V.h)((t=>!!t)),(0,j.w)((t=>(0,F.H)((null==t?void 0:t.delay)*R.s_).pipe($(t))))).subscribe((t=>{this.Yd(t)})))}Yd(t){const i=t;let e=O.TRACKING_POINTS.indexOf(i);i.timesRepeatDelay--,this.Kd(i.delay),0===i.timesRepeatDelay&&e++,(0,Q.$K)(O.TRACKING_POINTS[e])&&this.Zd(O.TRACKING_POINTS[e])}Zd(t){this.Hd.next(t)}Kd(t){const i={sessionTimeInSeconds:t,timePlayedInSeconds:(0,G.kw)(this.zd.timeElapsed),timePlayedInViewInSeconds:(0,G.kw)(this.Wd.timeElapsed)};this.zd.reset(),this.Wd.reset(),this.Ud.sessionTimeElapsed.next(i)}};Z.TIMER_TICK=200,Z=q=X([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped),K(0,(0,w.f3)(B)),K(1,(0,w.f3)(I.f)),Y("design:paramtypes",["function"==typeof(H=void 0!==r.ISessionEvents&&r.ISessionEvents)?H:Object,"function"==typeof(z=void 0!==n.ITimerService&&n.ITimerService)?z:Object])],Z);var tt=e(277),it=e(289),et=e(7945),st=e(6153),nt=e(9831),rt=e(5742),ot=e(307),ht=e(3802);var at=e(3816),ct=e(5650);class dt{static getProtoPayload(t){const{trackingMetadata:i,hasGdprConsent:e,gdprConsentMode:s,isExplorationMode:n,mediaId:r,shouldLogEverything:o,lineItemAbTest:h,prebidList:a,bidList:c,postbidList:d}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),mediaGuid:r,hasGdprConsentPayload:e,gdprConsentMode:s?ht.EN.getProtoGDPRConsentMode(s):void 0,lineItemAbTestInformation:h?ht.p.getProtoLineItemAbTest(h):void 0,prebids:a&&(0,ct.BZ)(a)?a.map((t=>dt.getProtoPrebid(t))):void 0,bids:c&&(0,ct.BZ)(c)?c.map((t=>dt.getProtoBid(t))):void 0,postBids:d&&(0,ct.BZ)(d)?d.map((t=>dt.getProtoPostbid(t))):void 0,shouldLogEverything:o,isExplorationMode:n}}static getProtoPrebid(t){const{advertiserLineItemId:i,publisherLineItemId:e,playerReason:s,partnerReason:n,requestsCount:r,isUserSynced:o,timeSpentMs:h,playerWidth:a,playerHeight:c,partnerCustomHeaders:d,prebidJsBidderName:l,requestedFloorPrice:u,floorPriceInformation:p,dynamicElkFields:f}=t;return{reason:ht.EN.getProtoPrebidReason(s),partnerReason:ht.EN.getProtoPrebidPartnerReason(n),requestNumber:r,timeSpent:h,floorPriceInformation:p?ht.wE.getProtoFloorPriceInformation(p):void 0,requestedFloorPrice:u,advertiserLineItemId:i,publisherLineItemId:e,isUserSynced:o,playerWidth:a,playerHeight:c,partnerCustomHeaders:d,prebidJsBidderName:l,dynamicElkFieldsValues:f}}static getProtoBid(t){const{advertiserLineItemId:i,publisherLineItemId:e,requestsCount:s,isUserSynced:n,timeSpentMs:r,playerWidth:o,playerHeight:h,rtbCreativeId:a,rtbSeatId:c,rtbADomain:d,rtbDspId:l,cnxBidId:u,encryptedPrice:p,customClientPrice:f,prebidJsBidderName:m,requestedFloorPrice:v,floorPriceInformation:g,dynamicElkFields:y}=t;return{requestNumber:s,timeSpent:r,creativeId:a,rtbAdomain:d,dspId:l,floorPriceInformation:g?ht.wE.getProtoFloorPriceInformation(g):void 0,rtbSeatId:c,cnxBidId:u,advertiserLineItemId:i,publisherLineItemId:e,isUserSynced:n,playerWidth:o,playerHeight:h,encryptedPrice:p,customClientPrice:f,prebidJsBidderName:m,requestedFloorPrice:v,dynamicElkFieldsValues:y}}static getProtoPostbid(t){const{advertiserLineItemId:i,publisherLineItemId:e,reason:s,isBidLoaded:n,requestsCount:r,adSourceType:o,vastMediaType:h,adBreakType:a,isUserSynced:c,timeSpentMs:d,winToAdLoadedTimeMs:l,bidElapsedTimeSeconds:u,playerWidth:p,playerHeight:f,adPodSlotPosition:m,auctionInformation:v,auctionReason:g,rtbCreativeId:y,rtbSeatId:b,rtbADomain:I,rtbDspId:w,cnxBidId:_,prebidJsBidderName:S,requestedFloorPrice:P,floorPriceInformation:A,liveRampType:x,discount:k,dynamicElkFields:T}=t;return{error:s,adBreakType:ht.EN.getProtoAdBreakType(a),adsourceType:ht.EN.getProtoAdSourceType(o),auctionInformation:v?ht.Ti.getProtoAuctionInformation(v):void 0,auctionPostbidReason:g?ht.EN.getProtoAuctionPostbidReason(g):void 0,floorPriceInformation:A?ht.wE.getProtoFloorPriceInformation(A):void 0,discount:k?at.d.getProtoDiscount(k):void 0,floorPrice:P,liveRampType:x?ht.EN.getProtoLiveRamp(x):void 0,timeSpent:d,winToAdLoadedTime:l,requestNumber:r,creativeId:y,rtbAdomain:I,dspId:w,rtbSeatId:b,cnxBidId:_,advertiserLineItemId:i,publisherLineItemId:e,isBidLoaded:n,vastMediaType:h,isUserSynced:c,bidElapsedTimeSeconds:u,playerWidth:p,playerHeight:f,adPodSlotPosition:m,prebidJsBidderName:S,dynamicElkFieldsValues:T}}}var lt,ut,pt=e(6286),ft=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},mt=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},vt=function(t,i){return function(e,s){i(e,s,t)}},gt=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};let yt=lt=class{constructor(t){this.tl=t}static ws(t,i){(0,tt.n)({message:`ProtoTrackingCallerService_error_${i}`,level:tt.D.INFO,exception:t?JSON.stringify(t):void 0},{throttle:1,pacing:1,shouldSendMaxLog:!1})}sessionRenderEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.session_rendered,it.ProtoSessionRenderedRequest,class{static getProtoPayload(t){const{dynamicElkFields:i,trackingMetadata:e,isAdBlockerUsed:s,bundleName:n,playerWidth:r,playerHeight:o,pageInsightIndexes:h}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(e),hasAdBlocker:s,bundleName:n,playerHeight:o,playerWidth:r,pageInsightIndexes:h,dynamicElkFieldsValues:i}}}.getProtoPayload(t))}))}playerStartEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.playerStart,it.ProtoPlayerStartRequest,class{static getProtoPayload(t){const{dynamicElkFields:i,trackingMetadata:e,pageInsightIndexes:s}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(e),pageInsightIndexes:s,dynamicElkFieldsValues:i}}}.getProtoPayload(t))}))}adOpportunityEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.adOpportunity,it.ProtoAdOpportunityRequest,class{static getProtoPayload(t){const{dynamicElkFields:i,trackingMetadata:e,adBreakType:s,playerWidth:n,pageInsightIndexes:r}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(e),adBreak:ht.EN.getProtoAdBreakType(s),playerWidth:n,pageInsightIndexes:r,dynamicElkFieldsValues:i}}}.getProtoPayload(t))}))}sessionAdBlockerEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.sessionAdBlocker,it.ProtoSessionAdBlockerRequest,class{static getProtoPayload(t){const{trackingMetadata:i,adBlockerDetectionType:e,dynamicElkFields:s}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),adBlockDetectionType:ht.EN.getProtoAdBlockerDetectionType(e),dynamicElkFieldsValues:s}}}.getProtoPayload(t))}))}sessionTimeEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.session_time,it.ProtoSessionTimeTrackingRequest,class{static getProtoPayload(t){const{trackingMetadata:i,sessionTimePassedSinceLastTracking:e,secondsPlayedInViewSinceLastTracking:s,secondsPlayedSinceLastTracking:n,pageInsightIndexes:r}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),sessionTime:e,timePlayed:n,timePlayedInView:s,pageInsightIndexes:r}}}.getProtoPayload(t))}))}sessionInViewEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.session_view,it.ProtoSessionViewRequest,class{static getProtoPayload(t){const{dynamicElkFields:i,trackingMetadata:e,pageInsightIndexes:s}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(e),pageInsightIndexes:s,dynamicElkFieldsValues:i}}}.getProtoPayload(t))}))}mediaClickEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.media_click,it.ProtoMediaClickTrackingRequest,class{static getProtoPayload(t){const{trackingMetadata:i,type:e,mediaId:s,clickUrl:n,insightIndexes:r,sentimentAnalysis:o,slideTitle:h,slideNumber:a,slideMediaType:c}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),type:ht.EN.getProtoMediaClickType(e),mediaGuid:s,slideMediaType:c?ht.EN.getProtoMediaType(c):void 0,sentimentAnalysis:o?ht.XE.getProtoSentimentAnalysis(o):void 0,clickUrl:n,slideTitle:h,slideNumber:a,insightIndexes:r}}}.getProtoPayload(t))}))}mediaQuartileEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.media_quartile,it.ProtoMediaQuartileRequest,class{static getProtoPayload(t){const{trackingMetadata:i,mediaId:e,quartile:s,insightIndexes:n,sentimentAnalysis:r}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),quartile:ht.EN.getProtoQuartile(s),mediaGuid:e,sentimentAnalysis:r?ht.XE.getProtoSentimentAnalysis(r):void 0,insightIndexes:n}}}.getProtoPayload(t))}))}adBidEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.bids,it.ProtoBidTrackingsRequest,dt.getProtoPayload(t))}))}auctionInformationEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.auctionInformation,it.ProtoAuctionInfoRequest,class{static getProtoPayload(t){const{cnxBidId:i,auctionLossReason:e,auctionInformation:s}=t;return{cnxBidId:i,auctionInformation:s?ht.Ti.getProtoAuctionInformation(s):void 0,auctionLossReason:ht.EN.getProtoAuctionLossReason(e)}}static fromProtoAuctionInformation(t){const{cnxBidId:i,auctionLossReason:e,auctionInformation:s}=t;return{cnxBidId:i,auctionInformation:s?ht.Ti.fromProtoAuctionInformation(s):void 0,auctionLossReason:ht.EN.fromProtoAuctionLossReason(e)}}}.getProtoPayload(t))}))}adImpressionEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.ad_impression,it.ProtoVideoAdImpressionRequest,class{static getProtoPayload(t){const{trackingMetadata:i,advertiserLineItemId:e,publisherLineItemId:s,adBreakType:n,adSourceType:r,vastMediaType:o,adPodSlotPosition:h,isExplorationMode:a,mediaId:c,isUserSynced:d,timeSpentMs:l,winToAdLoadedTimeMs:u,startAdToImpressionTimeMs:p,declaredDurationSeconds:f,impressionDurationSeconds:m,encryptedPrice:v,rtbADomain:g,rtbSeatId:y,rtbCreativeId:b,rtbDspId:I,cnxBidId:w,customClientPrice:_,prebidJsBidderName:S,auctionInformation:P,playerWidth:A,playerHeight:x,hasAdSkip:k,requestsCount:T,requestedFloorPrice:C,floorPriceInformation:E,bidElapsedTimeSeconds:M,insightIndexes:L,pageInsightIndexes:B,sentimentAnalysis:O,liveRampType:R,lineItemAbTest:D,internalAuctionInformation:V,iasSegmentCodes:j,discount:F,dynamicElkFields:N}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),adBreakType:ht.EN.getProtoAdBreakType(n),adsourceType:ht.EN.getProtoAdSourceType(r),auctionInformation:P?ht.Ti.getProtoAuctionInformation(P):void 0,internalAuction:V?ht.W1.getProtoInternalAuction(V):void 0,timeSpent:l,winToAdLoadedTime:u,startAdToImpressionTime:p,declaredDuration:f,impressionDuration:m,sentimentAnalysis:O?ht.XE.getProtoSentimentAnalysis(O):void 0,lineItemAbTestInformation:D?ht.p.getProtoLineItemAbTest(D):void 0,floorPriceInformation:E?ht.wE.getProtoFloorPriceInformation(E):void 0,discount:F?at.d.getProtoDiscount(F):void 0,mediaGuid:c,floorPrice:C,creativeId:b,rtbAdomain:g,dspId:I,requestNumber:T,liveRampType:R?ht.EN.getProtoLiveRamp(R):void 0,dynamicElkFieldsValues:N,cnxBidId:w,rtbSeatId:y,vastMediaType:o,advertiserLineItemId:e,publisherLineItemId:s,isExplorationMode:a,isUserSynced:d,playerWidth:A,playerHeight:x,hasAdSkip:k,bidElapsedTimeSeconds:M,adPodSlotPosition:h,encryptedPrice:v,customClientPrice:_,prebidJsBidderName:S,insightIndexes:L,pageInsightIndexes:B,iasSegmentCodes:j}}}.getProtoPayload(t),t.advertiserLineItemId)}))}adInViewEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.ad_impression_viewable,it.ProtoVideoAdImpressionViewableRequest,class{static getProtoPayload(t){const{trackingMetadata:i,advertiserLineItemId:e,publisherLineItemId:s,adBreakType:n,mediaId:r,hasSkipAd:o,rtbSeatId:h,rtbADomain:a,rtbDspId:c,insightIndexes:d,sentimentAnalysis:l,pageInsightIndexes:u,lineItemAbTest:p,iasSegmentCodes:f,dynamicElkFields:m,discount:v}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),adBreakType:ht.EN.getProtoAdBreakType(n),sentimentAnalysis:l?ht.XE.getProtoSentimentAnalysis(l):void 0,lineItemAbTestInformation:p?ht.p.getProtoLineItemAbTest(p):void 0,discount:v?at.d.getProtoDiscount(v):void 0,mediaGuid:r,hasAdSkip:o,dynamicElkFieldsValues:m,rtbAdomain:a,advertiserLineItemId:e,publisherLineItemId:s,rtbSeatId:h,dspId:c,insightIndexes:d,pageInsightIndexes:u,iasSegmentCodes:f}}}.getProtoPayload(t),t.advertiserLineItemId)}))}adQuartileEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.ad_quartile,it.ProtoVideoAdQuartilesRequest,class{static getProtoPayload(t){const{trackingMetadata:i,advertiserLineItemId:e,publisherLineItemId:s,mediaId:n,type:r,rtbSeatId:o,dspId:h,rtbADomain:a,insightIndexes:c,hasSkipAd:d,adBreakType:l,sentimentAnalysis:u,pageInsightIndexes:p,lineItemAbTest:f,iasSegmentCodes:m}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),quartile:ht.EN.getProtoQuartile(r),adBreakType:ht.EN.getProtoAdBreakType(l),lineItemAbTestInformation:f?ht.p.getProtoLineItemAbTest(f):void 0,sentimentAnalysis:u?ht.XE.getProtoSentimentAnalysis(u):void 0,mediaGuid:n,hasAdSkip:d,rtbAdomain:a,rtbSeatId:o,dspId:h,advertiserLineItemId:e,publisherLineItemId:s,insightIndexes:c,pageInsightIndexes:p,iasSegmentCodes:m}}}.getProtoPayload(t),t.advertiserLineItemId)}))}adClickEvent(t){return gt(this,void 0,void 0,(function*(){return this.il(st.n.endPoints.tracking.ad_click,it.ProtoAdClickTrackingRequest,class{static getProtoPayload(t){const{trackingMetadata:i,advertiserLineItemId:e,publisherLineItemId:s,mediaId:n,type:r,adBreakType:o,insightIndexes:h,sentimentAnalysis:a,pageInsightIndexes:c,lineItemAbTest:d,iasSegmentCodes:l}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(i),mediaGuid:n,type:ht.EN.getProtoAdClickType(r),adBreakType:ht.EN.getProtoAdBreakType(o),sentimentAnalysis:a?ht.XE.getProtoSentimentAnalysis(a):void 0,lineItemAbTestInformation:d?ht.p.getProtoLineItemAbTest(d):void 0,advertiserLineItemId:e,publisherLineItemId:s,insightIndexes:h,pageInsightIndexes:c,iasSegmentCodes:l}}}.getProtoPayload(t),t.advertiserLineItemId)}))}heavyAdEvent(t){this.el(st.n.endPoints.tracking.heavy_ad_intervention,it.ProtoHeavyAdTrackingRequest,class{static getProtoPayload(t){const{dynamicElkFields:i,trackingMetadata:e,advertiserLineItemId:s,type:n}=t;return{trackingRequestMeta:ht.yz.getProtoTrackingMetadata(e),heavyAdBlockTypeEnum:ht.EN.getProtoHeavyAdType(n),advertiserLineItemId:s,dynamicElkFieldsValues:i}}}.getProtoPayload(t))}il(t,i,e,s){return gt(this,void 0,void 0,(function*(){try{const n=yield nt.n.sendProtoRequest({endpoint:t,requestData:e,queryParams:Object.assign({[ot.Fk]:et.g.version},rt.f.getCidKeyValueObject()),protoRequest:i,protoResponse:it.ProtoTrackingResponse,hasCredentials:!0,shouldLogErrors:!0}),r=class{static getTrackingResponseFromProto(t){const{errorMessage:i,adServerLineItemName:e,impressionRevenue:s,isViewabilityRestricted:n,platformCappedLineItemIdList:r}=t;return{errorMessage:i,adServerLineItemName:e,impressionRevenue:s,isViewabilityRestricted:n,platformCappedLineItemIdList:r}}}.getTrackingResponseFromProto(n);this.tl.onResponseReceived(r,s)}catch(i){lt.ws(i,t)}}))}el(t,i,e){try{nt.n.sendProtoBeaconRequest({endpoint:t,requestData:e,protoRequest:i,shouldLogErrors:!1})}catch(i){lt.ws(i,t)}}};yt=lt=ft([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped),vt(0,(0,w.f3)(pt.j)),mt("design:paramtypes",["function"==typeof(ut=void 0!==o.ITrackingResponseService&&o.ITrackingResponseService)?ut:Object])],yt);class bt{}bt.CUSTOM_TEST_PLAYER_ID="e4984e88-9ff4-45a3-8b9d-33aabcad634e",bt.CUSTOM_SESSION_ID="x1291569711993656821050542063616";var It=e(6666);var wt=e(9361);e(7129);var _t,St,Pt,At,xt,kt,Tt,Ct,Et=e(6661),Mt=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},Lt=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},Bt=function(t,i){return function(e,s){i(e,s,t)}};let Ot=class{constructor(t,i,e,s,n,r,o,h){this.sl=t,this.Ud=i,this.ih=e,this.nl=s,this.ol=n,this.th=r,this.hl=o,this.al=h,this.Pd=[],this.Gd(),this.Bd(),this.cl()}destroy(){(0,J.i)(this.Pd),this.nl.destroy(),this.ol.destroy()}Bd(){this.Pd.push(this.th.adClick.subscribe((t=>{this.dl(t)})),this.th.adImpression.subscribe((t=>{this.ll(t)})),this.th.adInView.subscribe((t=>{this.ul(t)})),this.th.adQuartile.subscribe((t=>{this.pl(t)})),this.th.heavyAd.subscribe((t=>{this.fl(t)})),this.th.auctionInformation.subscribe((t=>{this.ml(t)})),this.th.missedImpressionOutOfView.subscribe((t=>{this.vl(t)})),this.th.adBidTracking.subscribe((t=>{this.gl(t)})))}Gd(){this.Pd.push(this.Ud.sessionTimeElapsed.subscribe((t=>{this.yl(t)})),this.Ud.sessionRendered.pipe((0,W.q)(1)).subscribe((t=>{this.bl(t)})),this.Ud.sessionView.subscribe((()=>{this.Il()})),this.Ud.sessionAdBlocked.subscribe((t=>{this._l(t)})),this.Ud.adOpportunity.subscribe((t=>{this.Sl(t)})),this.Ud.contentStart.pipe((0,W.q)(1)).subscribe((()=>{this.Al()})),this.Ud.adsEnabled.pipe((0,W.q)(1)).subscribe((()=>{this.Al()})))}cl(){this.Pd.push(this.ih.mediaQuartile.subscribe((t=>{this.kl(t)})),this.ih.mediaClick.subscribe((t=>{this.Tl(t)})))}Al(){var t;this.sl.isPlayerStartTracked||(this.sl.isPlayerStartTracked=!0,this.hl.playerStartEvent({trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(this.sl.trackingRequestMeta),pageInsightIndexes:null===(t=It.k.pageInsights)||void 0===t?void 0:t.insights}))}fl(t){const{type:i,advertiserLineItemId:e,dynamicElkFields:s}=t;this.hl.heavyAdEvent({trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(this.sl.trackingRequestMeta),type:i,advertiserLineItemId:e,dynamicElkFields:s})}gl(t){const i=ht.EN.fromProtoGDPRConsentMode(this.al.gdprConsentMode),e=class{static fromPayloadToTracking(t,i,e){const{currentMediaMetadata:s,isExplorationMode:n,lineItemAbTestInformation:r,canTrackAllRequests:o,hasGdprConsentPayload:h,playerDimensions:a}=i,c=t.prebidList.map((t=>class{static fromPayloadToTracking(t,i){const{width:e,height:s}=i,{playerReason:n,partnerReason:r,partnerCustomHeaders:o,publisherLineItemId:h,advertiserLineItemId:a,requestedFloorPrice:c,requestsCount:d,isUserSynced:l,prebidJsBidderName:u,timeSpentMs:p,floorPriceInformation:f,dynamicElkFields:m}=t;return{playerWidth:e,playerHeight:s,playerReason:n,partnerReason:r,partnerCustomHeaders:o,publisherLineItemId:h,advertiserLineItemId:a,requestedFloorPrice:c,requestsCount:d,isUserSynced:l,prebidJsBidderName:u,timeSpentMs:p,floorPriceInformation:f,dynamicElkFields:m}}}.fromPayloadToTracking(t,a))),d=t.bidList.map((t=>class{static fromPayloadToTracking(t,i){const{width:e,height:s}=i,{encryptedPrice:n,customClientPrice:r,floorPriceFactorBypassReason:o,rtbCreativeId:h,rtbSeatId:a,rtbADomain:c,rtbDspId:d,cnxBidId:l,publisherLineItemId:u,advertiserLineItemId:p,requestsCount:f,isUserSynced:m,timeSpentMs:v,requestedFloorPrice:g,floorPriceInformation:y,prebidJsBidderName:b,dynamicElkFields:I}=t;return{playerWidth:e,playerHeight:s,encryptedPrice:n,customClientPrice:r,floorPriceFactorBypassReason:o,rtbCreativeId:h,rtbSeatId:a,rtbADomain:c,rtbDspId:d,cnxBidId:l,publisherLineItemId:u,advertiserLineItemId:p,requestsCount:f,isUserSynced:m,timeSpentMs:v,requestedFloorPrice:g,floorPriceInformation:y,prebidJsBidderName:b,dynamicElkFields:I}}}.fromPayloadToTracking(t,a))),l=t.postbidList.map((t=>class{static fromPayloadToTracking(t,i){const{width:e,height:s}=i,{reason:n,adSourceType:r,vastMediaType:o,bidElapsedTimeSeconds:h,isBidLoaded:a,winToAdLoadedTimeMs:c,adBreakType:d,auctionInformation:l,auctionReason:u,adPodSlotPosition:p,prebidJsBidderName:f,dynamicElkFields:m,publisherLineItemId:v,advertiserLineItemId:g,isUserSynced:y,rtbCreativeId:b,rtbSeatId:I,rtbADomain:w,rtbDspId:_,cnxBidId:S,timeSpentMs:P,requestsCount:A,requestedFloorPrice:x,floorPriceInformation:k,discount:T,liveRampType:C}=t;return{playerWidth:e,playerHeight:s,reason:n,adSourceType:r,vastMediaType:o,bidElapsedTimeSeconds:h,isBidLoaded:a,winToAdLoadedTimeMs:c,adBreakType:d,auctionInformation:l,auctionReason:u,adPodSlotPosition:p,prebidJsBidderName:f,dynamicElkFields:m,publisherLineItemId:v,advertiserLineItemId:g,isUserSynced:y,rtbCreativeId:b,rtbSeatId:I,rtbADomain:w,rtbDspId:_,cnxBidId:S,timeSpentMs:P,requestsCount:A,requestedFloorPrice:x,floorPriceInformation:k,discount:T,liveRampType:C}}}.fromPayloadToTracking(t,a)));return{isExplorationMode:n,gdprConsentMode:e,trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(i.trackingRequestMeta),shouldLogEverything:o,prebidList:c,bidList:d,postbidList:l,mediaId:null==s?void 0:s.mediaId,hasGdprConsent:h,lineItemAbTest:r?ht.p.fromProtoLineItemAbTestFromProto(r):void 0}}}.fromPayloadToTracking(t,this.sl,i);this.hl.adBidEvent(e)}yl(t){var i;const{sessionTimeInSeconds:e,timePlayedInSeconds:s,timePlayedInViewInSeconds:n}=t,{trackingRequestMeta:r}=this.sl;this.hl.sessionTimeEvent({trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(r),sessionTimePassedSinceLastTracking:e,secondsPlayedSinceLastTracking:s,secondsPlayedInViewSinceLastTracking:n,pageInsightIndexes:null===(i=It.k.pageInsights)||void 0===i?void 0:i.insights})}bl(t){var i;if(this.sl.isSessionRenderTracked)return;this.sl.isSessionRenderTracked=!0;const{width:e,height:s}=this.sl.playerDimensions,{isBannerBlocked:n,sdkVersion:r}=t,o={};(0,Q.QM)(r)&&(o[3]=`${r}`),this.hl.sessionRenderEvent({playerHeight:s,playerWidth:e,isAdBlockerUsed:n,bundleName:"connatix.player.js",dynamicElkFields:o,trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(this.sl.trackingRequestMeta),pageInsightIndexes:null===(i=It.k.pageInsights)||void 0===i?void 0:i.insights})}Il(){var t;!this.sl.isSessionViewTracked&&this.sl.isPlayerStartTracked&&(this.sl.isSessionViewTracked=!0,this.hl.sessionInViewEvent({trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(this.sl.trackingRequestMeta),pageInsightIndexes:null===(t=It.k.pageInsights)||void 0===t?void 0:t.insights}))}vl(t){var i;const e=Object.assign(Object.assign({},this.sl.trackingRequestMeta),{playerId:bt.CUSTOM_TEST_PLAYER_ID,sessionId:bt.CUSTOM_SESSION_ID}),s={1:`${t.outOfViewAdPrice}`,2:`${t.outOfViewAdLineItemId}`,3:`${t.inViewAdPrice}`,4:`${t.outOfViewTimeRunning}`,5:`${t.distanceWhenOutOfViewStarted}`,6:`${t.timeUntilNextOpportunity}`,7:`${this.sl.sessionId}`,8:`${this.sl.playerId}`};this.hl.sessionInViewEvent({trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(e),pageInsightIndexes:null===(i=It.k.pageInsights)||void 0===i?void 0:i.insights,dynamicElkFields:s})}kl(t){const{mediaId:i,insights:e,sentimentAnalysis:s}=this.sl.currentMediaMetadata,{quartile:n}=t;this.hl.mediaQuartileEvent({trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(this.sl.trackingRequestMeta),sentimentAnalysis:s?ht.XE.fromProtoGetSentimentAnalysis(s):void 0,mediaId:i,quartile:n,insightIndexes:e})}Tl(t){const i=class{static fromPayloadToTracking(t,i){const{mediaId:e,clickUrl:s,sentimentAnalysis:n,slideTitle:r,slideNumber:o,slideMediaType:h,insights:a}=i.currentMediaMetadata,c=t.type||wt.$u.Click;return{trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(i.trackingRequestMeta),slideMediaType:h?ht.EN.fromProtoGetMediaType(h):void 0,sentimentAnalysis:n?ht.XE.fromProtoGetSentimentAnalysis(n):void 0,clickUrl:c===wt.$u.UrlClick?s:void 0,insightIndexes:a,mediaId:e,type:c,slideTitle:r,slideNumber:o}}}.fromPayloadToTracking(t,this.sl);this.hl.mediaClickEvent(i)}ml(t){this.hl.auctionInformationEvent(t)}ll(t){const i=class{static fromPayloadToTracking(t,i){var e;const{width:s,height:n}=i.playerDimensions,{currentMediaMetadata:{mediaId:r,insights:o,sentimentAnalysis:h},lineItemAbTestInformation:a}=i,{adSourceType:c,advertiserLineItemId:d,publisherLineItemId:l,customClientPrice:u,encryptedPrice:p,prebidJsBidderName:f,rtbADomain:m,rtbCreativeId:v,rtbSeatId:g,isUserSynced:y,timeSpentMs:b,vastMediaType:I,rtbDspId:w,cnxBidId:_,winToAdLoadedTimeMs:S,startAdToImpressionTimeMs:P,impressionDurationSeconds:A,declaredDurationSeconds:x,isExplorationMode:k,requestsCount:T,requestedFloorPrice:C,floorPriceInformation:E,bidElapsedTimeSeconds:M,adBreakType:L,internalAuctionInformation:B,auctionInformation:O,dynamicElkFields:R,hasAdSkip:D,discount:V,liveRampType:j}=t;return{adSourceType:c,advertiserLineItemId:d,publisherLineItemId:l,customClientPrice:u,encryptedPrice:p,prebidJsBidderName:f,rtbADomain:m,rtbCreativeId:v,rtbSeatId:g,isUserSynced:y,timeSpentMs:b,vastMediaType:I,rtbDspId:w,cnxBidId:_,winToAdLoadedTimeMs:S,startAdToImpressionTimeMs:P,impressionDurationSeconds:A,declaredDurationSeconds:x,isExplorationMode:k,requestsCount:T,requestedFloorPrice:C,floorPriceInformation:E,bidElapsedTimeSeconds:M,adBreakType:L,internalAuctionInformation:B,auctionInformation:O,dynamicElkFields:R,hasAdSkip:D,mediaId:r,liveRampType:j,trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(i.trackingRequestMeta),lineItemAbTest:a?ht.p.fromProtoLineItemAbTestFromProto(a):void 0,iasSegmentCodes:i.iasSegmentCodes,playerWidth:s,playerHeight:n,insightIndexes:o,sentimentAnalysis:h?ht.XE.fromProtoGetSentimentAnalysis(h):void 0,pageInsightIndexes:null===(e=It.k.pageInsights)||void 0===e?void 0:e.insights,discount:V?at.d.fromProtoDiscount(V):void 0}}}.fromPayloadToTracking(t,this.sl);this.hl.adImpressionEvent(i)}ul(t){const i=class{static fromPayloadToTracking(t,i){var e;const{currentMediaMetadata:{mediaId:s,insights:n,sentimentAnalysis:r},lineItemAbTestInformation:o,trackingRequestMeta:h,iasSegmentCodes:a}=i,{publisherLineItemId:c,advertiserLineItemId:d,rtbSeatId:l,rtbDspId:u,adBreakType:p,hasSkipAd:f,rtbADomain:m,discount:v}=t;return{mediaId:s,publisherLineItemId:c,advertiserLineItemId:d,rtbSeatId:l,rtbDspId:u,adBreakType:p,hasSkipAd:f,rtbADomain:m,iasSegmentCodes:a,discount:v,trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(h),lineItemAbTest:o?ht.p.fromProtoLineItemAbTestFromProto(o):void 0,insightIndexes:n,sentimentAnalysis:r?ht.XE.fromProtoGetSentimentAnalysis(r):void 0,pageInsightIndexes:null===(e=It.k.pageInsights)||void 0===e?void 0:e.insights}}}.fromPayloadToTracking(t,this.sl);this.hl.adInViewEvent(i)}pl(t){const i=class{static fromPayloadToTracking(t,i){var e;const{currentMediaMetadata:{sentimentAnalysis:s,mediaId:n,insights:r},lineItemAbTestInformation:o,iasSegmentCodes:h}=i,{advertiserLineItemId:a,publisherLineItemId:c,type:d,rtbSeatId:l,dspId:u,adBreakType:p,hasSkipAd:f,rtbADomain:m}=t;return{mediaId:n,advertiserLineItemId:a,publisherLineItemId:c,type:d,rtbSeatId:l,dspId:u,adBreakType:p,hasSkipAd:f,rtbADomain:m,iasSegmentCodes:h,insightIndexes:r,trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(i.trackingRequestMeta),sentimentAnalysis:s?ht.XE.fromProtoGetSentimentAnalysis(s):void 0,pageInsightIndexes:null===(e=It.k.pageInsights)||void 0===e?void 0:e.insights,lineItemAbTest:o?ht.p.fromProtoLineItemAbTestFromProto(o):void 0}}}.fromPayloadToTracking(t,this.sl);this.hl.adQuartileEvent(i)}dl(t){const i=class{static fromPayloadToTracking(t,i){var e;const{type:s,adBreakType:n,publisherLineItemId:r,advertiserLineItemId:o}=t,{currentMediaMetadata:{mediaId:h,insights:a,sentimentAnalysis:c},iasSegmentCodes:d,trackingRequestMeta:l,lineItemAbTestInformation:u}=i;return{type:s,adBreakType:n,publisherLineItemId:r,advertiserLineItemId:o,mediaId:h,iasSegmentCodes:d,insightIndexes:a,trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(l),pageInsightIndexes:null===(e=It.k.pageInsights)||void 0===e?void 0:e.insights,sentimentAnalysis:c?ht.XE.fromProtoGetSentimentAnalysis(c):void 0,lineItemAbTest:u?ht.p.fromProtoLineItemAbTestFromProto(u):void 0}}}.fromPayloadToTracking(t,this.sl);this.hl.adClickEvent(i)}Sl(t){var i;const{trackingRequestMeta:e}=this.sl,{playerWidth:s,opportunityId:n,adBreak:r}=t,o={1:`${n}`};this.hl.adOpportunityEvent({adBreakType:r,playerWidth:s,dynamicElkFields:o,trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(e),pageInsightIndexes:null===(i=It.k.pageInsights)||void 0===i?void 0:i.insights})}_l(t){const{adBlockDetectionType:i}=t,e={trackingMetadata:ht.yz.fromProtoGetTrackingMetadata(this.sl.trackingRequestMeta),adBlockerDetectionType:i};this.hl.sessionAdBlockerEvent(e)}};Ot=Mt([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped),Bt(0,(0,w.f3)(k.B)),Bt(1,(0,w.f3)(B)),Bt(2,(0,w.f3)(E)),Bt(3,(0,w.f3)(x)),Bt(4,(0,w.f3)(Z)),Bt(5,(0,w.f3)(b.k)),Bt(6,(0,w.f3)(yt)),Bt(7,(0,w.f3)(Et.c.UserManagerService)),Lt("design:paramtypes",["function"==typeof(_t=void 0!==a.IGeneralRepository&&a.IGeneralRepository)?_t:Object,"function"==typeof(St=void 0!==r.ISessionEvents&&r.ISessionEvents)?St:Object,"function"==typeof(Pt=void 0!==c.IMediaEvents&&c.IMediaEvents)?Pt:Object,"function"==typeof(At=void 0!==h.IAbtTracker&&h.IAbtTracker)?At:Object,"function"==typeof(xt=void 0!==d.ISessionTime&&d.ISessionTime)?xt:Object,"function"==typeof(kt=void 0!==s.IAdEvents&&s.IAdEvents)?kt:Object,"function"==typeof(Tt=void 0!==l.ITrackingCaller&&l.ITrackingCaller)?Tt:Object,"function"==typeof(Ct=void 0!==u.IUserManagerService&&u.IUserManagerService)?Ct:Object])],Ot);var Rt=e(9906),Dt=e(3020),Vt=e(5356),jt=e(8983),Ft=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let Nt=class{constructor(){this.Cl=t=>{const i=t.target.closest("[tabindex]");i&&(i.focus({preventScroll:!0}),(0,Dt.IV)(i,jt.s6.TabFocus),this.El&&(0,Vt.mb)(this.El)&&(0,Dt.cn)(this.El,jt.s6.AdUserInteraction))}}start(t){this.Ml(t)}processAdUserInteraction(t=!1){(t||(0,Dt.pv)(this.El,jt.s6.AdUserInteraction))&&(this.Ll(),this.El&&((0,Dt.IV)(this.El,jt.s6.AdUserInteraction),(0,Dt.IV)(this.El,jt.s6.TabFocus)))}destroy(){var t;null===(t=this.El)||void 0===t||t.removeEventListener("click",this.Cl)}Ll(){var t;null===(t=this.El)||void 0===t||t.focus({preventScroll:!0})}Ml(t){this.El=t,null==t||t.addEventListener("click",this.Cl)}};function Ut(t){var i,e;const s=function(t){return t?(0,Dt.GF)(t)||(0,Dt.pv)(t,"cnx-submenu-title-option")?s(t.nextElementSibling):t:null},n=null===(i=t.getElementsByClassName("cnx-cm-item--click"))||void 0===i?void 0:i[0],r=s(n);r&&((0,Dt.cn)(r,jt.s6.TabFocus),null===(e=r)||void 0===e||e.focus({preventScroll:!0}))}Nt=Ft([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped)],Nt);const $t=t=>Ut(t.target);function qt(t){t&&(t.dispatchEvent(new MouseEvent("mousedown")),t.dispatchEvent(new MouseEvent("mouseup")))}var Ht=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};const zt="Enter",Wt="Escape",Gt="Tab";let Qt=class{constructor(){this.Bl=void 0,this.Ol=t=>{const i=t.target;switch(t.code){case zt:this.Rl(i);break;case Wt:this.Dl(i);break;case Gt:this.Vl(i,t.shiftKey?"firstChild":"lastChild")}}}start(t){t.classList.contains("cnx-playspace-container")||(this.Bl=t,this.jl(t))}destroy(){var t;null===(t=this.Bl)||void 0===t||t.removeEventListener("keyup",this.Ol)}jl(t){t.addEventListener("keyup",this.Ol)}Dl(t){const i=t.closest(".cnx-menu-popup"),e=this.Fl(i);null==e||e.setAttribute("aria-expanded","false"),qt(e),null==e||e.focus()}Rl(t){var i;if(!t)return;const e=t.getAttribute("aria-controls");null===(i=this.Bl)||void 0===i||i.addEventListener("cnx-menu-opened",(()=>{var i;const s=null===(i=this.Bl)||void 0===i?void 0:i.querySelector(`[data-id="${e}"]`),n=function(t){return(0,Dt.pv)(t,jt.Ng.SubmenuOption)}(t);!function(t,i=!1){if(!t)return;if(t.removeEventListener("cnx-mod-scrollbar",$t),i)return t.addEventListener("cnx-mod-scrollbar",$t,{once:!0}),void Ut(t);const e=t.querySelector(".cnx-cm-items:first-of-type");e&&Ut(e)}(s,n)}),{once:!0}),function(t){return(0,Dt.pv)(t,jt.p0.CloseButton)}(t)?function(t){t&&t.dispatchEvent(new MouseEvent("click"))}(t):qt(t)}Vl(t,i){var e;(0,Dt.cn)(t,jt.s6.TabFocus);const s=t.closest("[data-id]");if(s&&t===(null===(e=t.parentElement)||void 0===e?void 0:e[i])){const t=this.Fl(s);qt(t),null==t||t.focus()}this.Bl&&(0,Vt.mb)(this.Bl)&&(0,Dt.cn)(this.Bl,jt.s6.AdUserInteraction)}Fl(t){var i;return null===(i=this.Bl)||void 0===i?void 0:i.querySelector(`[aria-controls="${null==t?void 0:t.getAttribute("data-id")}"]`)}};Qt=Ht([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped)],Qt);var Jt=e(9209),Xt=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let Yt=class{constructor(){this.Nl=new T.x,this.Ul=[Jt.Ys.Space,Jt.Ys.ArrowDown,Jt.Ys.ArrowUp],this.$l=t=>{const i=t.code;let e=Jt.Pl[Jt.Ys[i]];this.Ul.includes(Jt.Ys[i])&&t.preventDefault(),t.shiftKey&&t.code===Jt.Ys[Jt.Ys.KeyN]&&(e=Jt.Pl[Jt.Ys.KeyN]),t.shiftKey&&t.code===Jt.Ys[Jt.Ys.KeyP]&&(e=Jt.Pl[Jt.Ys.KeyP]),void 0!==e&&this.Nl.next({action:e})}}get shortcutsEventObservable(){return this.Nl.asObservable()}start(t){this.ql(t)}destroy(){e.g.removeEventListener("keydown",this.$l)}ql(t){t.addEventListener("keydown",this.$l)}};Yt=Xt([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped)],Yt);var Kt,Zt,ti,ii=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},ei=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},si=function(t,i){return function(e,s){i(e,s,t)}};let ni=class{constructor(t,i,e){this.Hl=t,this.zl=i,this.Wl=e}start(t){this.Hl.start(t),this.zl.start(t),this.Wl.start(t)}getShortcutsObservable(){return this.Wl.shortcutsEventObservable}processAdUserInteraction(t=!1){var i;null===(i=this.Hl)||void 0===i||i.processAdUserInteraction(t)}destroy(){this.Hl.destroy(),this.zl.destroy(),this.Wl.destroy()}};ni=ii([(0,w.b2)(),(0,w.Yn)(w.Fw.ContainerScoped),si(0,(0,w.f3)(Nt)),si(1,(0,w.f3)(Qt)),si(2,(0,w.f3)(Yt)),ei("design:paramtypes",["function"==typeof(Kt=void 0!==p.IFocusService&&p.IFocusService)?Kt:Object,"function"==typeof(Zt=void 0!==Qt&&Qt)?Zt:Object,"function"==typeof(ti=void 0!==f.IKeyboardShortcutsService&&f.IKeyboardShortcutsService)?ti:Object])],ni);var ri=e(5885);class oi{static boostrapSessionContainer(t,i,e,s,n){const r=Rt.h.getSessionChildContainer(t);oi.Gl(r,i,e,s);return oi.Ql(r,n)}static Gl(t,i,e,s){t.register(Et.c.GeneralMetadata,{useValue:Object.assign({},i)}),t.register(Et.c.UserManagerService,{useValue:e}),t.register(Et.c.Temp,{useValue:Object.assign({},s)})}static Ql(t,i){const e=t.resolve(pt.j),s=t.resolve(Z),n=t.resolve(B),r=t.resolve(E);return{trackingResponseService:e,sessionEvents:n,wcagService:t.resolve(ni),mediaEvents:r,generalRepository:t.resolve(k.B),abtTracker:t.resolve(x),adEvents:t.resolve(b.k),sessionTime:s,protoTrackingCallerService:t.resolve(yt),trackingService:i?void 0:t.resolve(Ot),tempServiceSS:t.resolve(ri.P)}}}},2239:(t,i,e)=>{"use strict";e.d(i,{B:()=>p});var s={};e.r(s);var n=e(4546),r=e(6661),o=e(9791),h=e(7945),a=e(6027);var c,d=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},l=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},u=function(t,i){return function(e,s){i(e,s,t)}};let p=class{constructor(t){this.Jl=t,this.Yl={},this.Kl={height:0,width:0},this.Zl=!1,this.tu=!1,this.eu=!1,this.su=!1,this.ru=!1,this.ou=1===(0,o.Vm)([99,1])}get trackingRequestMeta(){return{userId:this.userId,playerId:this.playerId,geo:this.geoLocation,browser:this.browser,version:h.g.version,sessionId:this.sessionId,clientAb0:a.e.clientAb0,clientAb1:a.e.clientAb1,serverAb0:a.e.serverAb0,serverAb1:a.e.serverAb1,pageUrl:this.pageUrl,bundleId:this.bundleId,customParam1:this.customParam1,customParam2:this.customParam2,customParam3:this.customParam3,customParam4:this.customParam4,customParam5:this.customParam5,bundleAbId:this.bundleAbId,bundlePart:this.bundlePart,abTestId:this.abTestId,shouldTrackAllRequests:this.ou,implementationType:this.implementationType,isPageInFocus:this.isPageInFocus}}get canTrackAllRequests(){return this.ou}get implementationType(){return this.Jl.implementationType}get playerId(){return this.Jl.playerId}get geoLocation(){return this.Jl.geoLocation}get browser(){return this.Jl.browser}get sessionId(){return this.Jl.sessionId}get pageUrl(){return this.Jl.pageUrl}get bundleId(){return this.Jl.bundleId}get bundleAbId(){return this.Jl.bundleAbId}get bundlePart(){return this.Jl.bundlePart}get customParam1(){return this.Jl.customParam1}get customParam2(){return this.Jl.customParam2}get customParam3(){return this.Jl.customParam3}get customParam4(){return this.Jl.customParam4}get customParam5(){return this.Jl.customParam5}get abTestId(){return this.Jl.abTestId}get isExplorationMode(){return this.Jl.isExplorationMode}get lineItemAbTestInformation(){return this.Jl.lineItemAbTestInformation}get hasGdprConsentPayload(){return this.Zl}set hasGdprConsentPayload(t){this.Zl=t}get playerDimensions(){return this.Kl}set playerDimensions(t){this.Kl=t}get currentMediaMetadata(){return this.Yl}set currentMediaMetadata(t){this.Yl=t}get isSessionRenderTracked(){return this.eu}set isSessionRenderTracked(t){this.eu=t}get isPlayerStartTracked(){return this.tu}set isPlayerStartTracked(t){this.tu=t}get isSessionViewTracked(){return this.su}set isSessionViewTracked(t){this.su=t}get userId(){return this.Jl.userId}set userId(t){this.Jl.userId=t}get isPageInFocus(){return this.ru}set isPageInFocus(t){this.ru=t}get iasSegmentCodes(){return this.Jl.iasSegmentCodes}get amazonTamPubId(){return this.Jl.amazonTamPubId}};p=d([(0,n.b2)(),(0,n.Yn)(n.Fw.ContainerScoped),u(0,(0,n.f3)(r.c.GeneralMetadata)),l("design:paramtypes",["function"==typeof(c=void 0!==s.IGeneralMetadata&&s.IGeneralMetadata)?c:Object])],p)},9209:(t,i,e)=>{"use strict";var s,n;e.d(i,{Pl:()=>r,Ys:()=>s,d:()=>n}),function(t){t[t.Space=0]="Space",t[t.KeyM=1]="KeyM",t[t.KeyF=2]="KeyF",t[t.KeyC=3]="KeyC",t[t.KeyN=4]="KeyN",t[t.KeyP=5]="KeyP",t[t.ArrowUp=6]="ArrowUp",t[t.ArrowDown=7]="ArrowDown",t[t.ArrowRight=8]="ArrowRight",t[t.ArrowLeft=9]="ArrowLeft",t[t.Digit0=10]="Digit0",t[t.Digit1=11]="Digit1",t[t.Digit2=12]="Digit2",t[t.Digit3=13]="Digit3",t[t.Digit4=14]="Digit4",t[t.Digit5=15]="Digit5",t[t.Digit6=16]="Digit6",t[t.Digit7=17]="Digit7",t[t.Digit8=18]="Digit8",t[t.Digit9=19]="Digit9"}(s||(s={})),function(t){t[t.togglePlay=0]="togglePlay",t[t.toggleMute=1]="toggleMute",t[t.toggleFullscreen=2]="toggleFullscreen",t[t.toggleCaptions=3]="toggleCaptions",t[t.increaseVolume=4]="increaseVolume",t[t.decreaseVolume=5]="decreaseVolume",t[t.seekForward=6]="seekForward",t[t.seekBackward=7]="seekBackward",t[t.seek0Percent=8]="seek0Percent",t[t.seek10Percent=9]="seek10Percent",t[t.seek20Percent=10]="seek20Percent",t[t.seek30Percent=11]="seek30Percent",t[t.seek40Percent=12]="seek40Percent",t[t.seek50Percent=13]="seek50Percent",t[t.seek60Percent=14]="seek60Percent",t[t.seek70Percent=15]="seek70Percent",t[t.seek80Percent=16]="seek80Percent",t[t.seek90Percent=17]="seek90Percent",t[t.nextVideo=18]="nextVideo",t[t.previousVideo=19]="previousVideo"}(n||(n={}));const r={[s.Space]:n.togglePlay,[s.KeyM]:n.toggleMute,[s.KeyF]:n.toggleFullscreen,[s.KeyC]:n.toggleCaptions,[s.ArrowUp]:n.increaseVolume,[s.ArrowDown]:n.decreaseVolume,[s.ArrowRight]:n.seekForward,[s.ArrowLeft]:n.seekBackward,[s.Digit0]:n.seek0Percent,[s.Digit1]:n.seek10Percent,[s.Digit2]:n.seek20Percent,[s.Digit3]:n.seek30Percent,[s.Digit4]:n.seek40Percent,[s.Digit5]:n.seek50Percent,[s.Digit6]:n.seek60Percent,[s.Digit7]:n.seek70Percent,[s.Digit8]:n.seek80Percent,[s.Digit9]:n.seek90Percent,[s.KeyN]:n.nextVideo,[s.KeyP]:n.previousVideo}},5885:(t,i,e)=>{"use strict";e.d(i,{P:()=>d});var s={};e.r(s);var n,r=e(6661),o=e(4546),h=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},a=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},c=function(t,i){return function(e,s){i(e,s,t)}};let d=class{constructor(t){this.hu=t,this.au=["www.selection.ca"],this.cu=["www.dailykos.com","m.dailykos.com"],this.du=["www.legacy.com","legacy.com","m.legacy.com"],this.lu=["www.rd.com"],this.uu=["www.marriage.com"],this.pu=["www.budgetyourtrip.com"],this.fu=0}set adManagerSound(t){this.fu=t}get adManagerSound(){return this.fu}isImaTestCaseForSS(){return this.au.includes(this.hu.pageDomain)}isDailykosDotComDomain(){return this.cu.includes(this.hu.pageDomain)}isLegacyDotComDomain(){return this.du.includes(this.hu.pageDomain)}isRDDotComDomain(){return this.lu.includes(this.hu.pageDomain)}isMarriageDotComDomain(){return this.uu.includes(this.hu.pageDomain)}isBudgetYourTripDotComDomain(){return this.pu.includes(this.hu.pageDomain)}};d=h([(0,o.b2)(),(0,o.Yn)(o.Fw.ContainerScoped),c(0,(0,o.f3)(r.c.Temp)),a("design:paramtypes",["function"==typeof(n=void 0!==s.ITempMetadata&&s.ITempMetadata)?n:Object])],d)},3816:(t,i,e)=>{"use strict";e.d(i,{d:()=>s});class s{static getProtoDiscount(t){return{id:t.id,rate:t.rate}}static fromProtoDiscount(t){return{id:t.id,rate:t.rate}}}},3802:(t,i,e)=>{"use strict";e.d(i,{Ti:()=>d,EN:()=>o,wE:()=>l,W1:()=>u,p:()=>c,yz:()=>h,XE:()=>a});var s=e(9361),n=e(202),r=e(289);class o{static getProtoImplementationType(t){return{[s.Vx.Amp]:r.ProtoImplementationType.Amp,[s.Vx.Web]:r.ProtoImplementationType.Web}[t]}static fromProtoGetImplementationType(t){return{[r.ProtoImplementationType.Amp]:s.Vx.Amp,[r.ProtoImplementationType.Web]:s.Vx.Web}[t]}static getProtoDeviceType(t){return{[s.VB.Desktop]:r.ProtoDeviceType.Desktop,[s.VB.Smartphone]:r.ProtoDeviceType.Smartphone,[s.VB.Tablet]:r.ProtoDeviceType.Tablet,[s.VB.GameConsole]:r.ProtoDeviceType.GameConsole,[s.VB.PDA]:r.ProtoDeviceType.PDA,[s.VB.SmartTV]:r.ProtoDeviceType.SmartTV,[s.VB.Unrecognized]:r.ProtoDeviceType.Unrecognized,[s.VB.WearableComputer]:r.ProtoDeviceType.WearableComputer}[t]}static fromProtoGetDeviceType(t){return{[r.ProtoDeviceType.Desktop]:s.VB.Desktop,[r.ProtoDeviceType.Smartphone]:s.VB.Smartphone,[r.ProtoDeviceType.Tablet]:s.VB.Tablet,[r.ProtoDeviceType.GameConsole]:s.VB.GameConsole,[r.ProtoDeviceType.PDA]:s.VB.PDA,[r.ProtoDeviceType.SmartTV]:s.VB.SmartTV,[r.ProtoDeviceType.Unrecognized]:s.VB.Unrecognized,[r.ProtoDeviceType.WearableComputer]:s.VB.WearableComputer}[t]}static getProtoAdBlockerDetectionType(t){return{[s.ev.Banner]:r.ProtoAdBlockDetectionTypeEnum.Banner,[s.ev.Network]:r.ProtoAdBlockDetectionTypeEnum.Network}[t]}static fromProtoAdBlockerDetectionType(t){return{[r.ProtoAdBlockDetectionTypeEnum.Banner]:s.ev.Banner,[r.ProtoAdBlockDetectionTypeEnum.Network]:s.ev.Network}[t]}static getProtoAdBreakType(t){return{[s.xX.None]:r.ProtoAdBreakTypeEnum.None,[s.xX.PreRoll]:r.ProtoAdBreakTypeEnum.PreRoll,[s.xX.MidRoll]:r.ProtoAdBreakTypeEnum.MidRoll,[s.xX.PostRoll]:r.ProtoAdBreakTypeEnum.PostRoll}[t]||r.ProtoAdBreakTypeEnum.None}static fromProtoAdBreakType(t){return{[r.ProtoAdBreakTypeEnum.None]:s.xX.None,[r.ProtoAdBreakTypeEnum.PreRoll]:s.xX.PreRoll,[r.ProtoAdBreakTypeEnum.MidRoll]:s.xX.MidRoll,[r.ProtoAdBreakTypeEnum.PostRoll]:s.xX.PostRoll}[t]||s.xX.None}static getProtoAdClickType(t){return{[s.VE.AdClick]:r.ProtoAdClickTypeEnum.AdClick,[s.VE.AdClickThrough]:r.ProtoAdClickTypeEnum.AdClickThrough,[s.VE.AdSkipClick]:r.ProtoAdClickTypeEnum.AdSkipClick,[s.VE.AdUserClose]:r.ProtoAdClickTypeEnum.AdUserClose,[s.VE.ExitFullScreenClick]:r.ProtoAdClickTypeEnum.ExitFullScreenClick,[s.VE.FullScreenClick]:r.ProtoAdClickTypeEnum.FullScreenClick,[s.VE.MuteClick]:r.ProtoAdClickTypeEnum.MuteClick,[s.VE.PauseClick]:r.ProtoAdClickTypeEnum.PauseClick,[s.VE.PlayClick]:r.ProtoAdClickTypeEnum.PlayClick,[s.VE.UnmuteClick]:r.ProtoAdClickTypeEnum.UnmuteClick,[s.VE.VolumeClick]:r.ProtoAdClickTypeEnum.VolumeClick}[t]}static fromProtoAdClickType(t){return{[r.ProtoAdClickTypeEnum.AdClick]:s.VE.AdClick,[r.ProtoAdClickTypeEnum.AdClickThrough]:s.VE.AdClickThrough,[r.ProtoAdClickTypeEnum.AdSkipClick]:s.VE.AdSkipClick,[r.ProtoAdClickTypeEnum.AdUserClose]:s.VE.AdUserClose,[r.ProtoAdClickTypeEnum.ExitFullScreenClick]:s.VE.ExitFullScreenClick,[r.ProtoAdClickTypeEnum.FullScreenClick]:s.VE.FullScreenClick,[r.ProtoAdClickTypeEnum.MuteClick]:s.VE.MuteClick,[r.ProtoAdClickTypeEnum.PauseClick]:s.VE.PauseClick,[r.ProtoAdClickTypeEnum.PlayClick]:s.VE.PlayClick,[r.ProtoAdClickTypeEnum.UnmuteClick]:s.VE.UnmuteClick,[r.ProtoAdClickTypeEnum.VolumeClick]:s.VE.VolumeClick}[t]}static getProtoAdSourceType(t){return{[s.Px.AOL]:r.ProtoAdsourceTypeEnum.AOL,[s.Px.CnxMedia]:r.ProtoAdsourceTypeEnum.CnxMedia,[s.Px.Ima]:r.ProtoAdsourceTypeEnum.Ima,[s.Px.Jw]:r.ProtoAdsourceTypeEnum.Jw,[s.Px.Unknown]:r.ProtoAdsourceTypeEnum.Unknown,[s.Px.VastMedia]:r.ProtoAdsourceTypeEnum.VastMedia,[s.Px.Vpaid]:r.ProtoAdsourceTypeEnum.Vpaid}[t]}static fromProtoAdSourceType(t){return{[r.ProtoAdsourceTypeEnum.AOL]:s.Px.AOL,[r.ProtoAdsourceTypeEnum.CnxMedia]:s.Px.CnxMedia,[r.ProtoAdsourceTypeEnum.Ima]:s.Px.Ima,[r.ProtoAdsourceTypeEnum.Jw]:s.Px.Jw,[r.ProtoAdsourceTypeEnum.Unknown]:s.Px.Unknown,[r.ProtoAdsourceTypeEnum.VastMedia]:s.Px.VastMedia,[r.ProtoAdsourceTypeEnum.Vpaid]:s.Px.Vpaid}[t]}static getProtoAuctionLossReason(t){return{[s.AT.AdOpportunityEnd]:r.ProtoAuctionLossReasonEnum.AdOpportunityEnd,[s.AT.TargetingMismatch]:r.ProtoAuctionLossReasonEnum.TargetingMismatch,[s.AT.CompetitorPriority]:r.ProtoAuctionLossReasonEnum.CompetitorPriority}[t]}static fromProtoAuctionLossReason(t){return{[r.ProtoAuctionLossReasonEnum.AdOpportunityEnd]:s.AT.AdOpportunityEnd,[r.ProtoAuctionLossReasonEnum.TargetingMismatch]:s.AT.TargetingMismatch,[r.ProtoAuctionLossReasonEnum.CompetitorPriority]:s.AT.CompetitorPriority}[t]}static getProtoAuctionPostbidReason(t){return{[s.MF.CreativeError]:r.ProtoAuctionPostbidReasonEnum.CreativeError,[s.MF.PlayerError]:r.ProtoAuctionPostbidReasonEnum.PlayerError,[s.MF.SDKFailure]:r.ProtoAuctionPostbidReasonEnum.SDKFailure,[s.MF.TargetingMismatch]:r.ProtoAuctionPostbidReasonEnum.TargetingMismatch,[s.MF.UnsupportedMedia]:r.ProtoAuctionPostbidReasonEnum.UnsupportedMedia}[t]}static fromProtoAuctionPostbidReason(t){return{[r.ProtoAuctionPostbidReasonEnum.CreativeError]:s.MF.CreativeError,[r.ProtoAuctionPostbidReasonEnum.PlayerError]:s.MF.PlayerError,[r.ProtoAuctionPostbidReasonEnum.SDKFailure]:s.MF.SDKFailure,[r.ProtoAuctionPostbidReasonEnum.TargetingMismatch]:s.MF.TargetingMismatch,[r.ProtoAuctionPostbidReasonEnum.UnsupportedMedia]:s.MF.UnsupportedMedia}[t]}static getProtoFloorPriceBypassReason(t){return{[s.N0.BidInHand]:s.N0.BidInHand,[s.N0.FixedCpm]:s.N0.FixedCpm,[s.N0.MaxBidPrice]:s.N0.MaxBidPrice,[s.N0.MinCpm]:s.N0.MinCpm,[s.N0.NoPredictionFound]:s.N0.NoPredictionFound,[s.N0.StaticFactorUsed]:s.N0.StaticFactorUsed,[s.N0.VideoOrBannerMin]:s.N0.VideoOrBannerMin}[t]}static fromProtoFloorPriceBypassReason(t){return{[s.N0.BidInHand]:s.N0.BidInHand,[s.N0.FixedCpm]:s.N0.FixedCpm,[s.N0.MaxBidPrice]:s.N0.MaxBidPrice,[s.N0.MinCpm]:s.N0.MinCpm,[s.N0.NoPredictionFound]:s.N0.NoPredictionFound,[s.N0.StaticFactorUsed]:s.N0.StaticFactorUsed,[s.N0.VideoOrBannerMin]:s.N0.VideoOrBannerMin}[t]}static getProtoGDPRConsentMode(t){return{[s.q1.Unknown]:r.ProtoGdprConsentModeEnum.Unknown,[s.q1.NoCmp]:r.ProtoGdprConsentModeEnum.NoCmp,[s.q1.NoConsent]:r.ProtoGdprConsentModeEnum.NoConsent,[s.q1.NotAllDemandConsent]:r.ProtoGdprConsentModeEnum.NotAllDemandConsent,[s.q1.NoConnatixConsent]:r.ProtoGdprConsentModeEnum.NoConnatixConsent,[s.q1.AllGood]:r.ProtoGdprConsentModeEnum.AllGood}[t]}static fromProtoGDPRConsentMode(t){return{[r.ProtoGdprConsentModeEnum.Unknown]:s.q1.Unknown,[r.ProtoGdprConsentModeEnum.NoCmp]:s.q1.NoCmp,[r.ProtoGdprConsentModeEnum.NoConsent]:s.q1.NoConsent,[r.ProtoGdprConsentModeEnum.NotAllDemandConsent]:s.q1.NotAllDemandConsent,[r.ProtoGdprConsentModeEnum.NoConnatixConsent]:s.q1.NoConnatixConsent,[r.ProtoGdprConsentModeEnum.AllGood]:s.q1.AllGood}[t]}static getProtoHeavyAdType(t){return{[s.Yc.Global]:r.ProtoHeavyAdBlockTypeEnum.Global,[s.Yc.OverlayIframe]:r.ProtoHeavyAdBlockTypeEnum.OverlayIframe,[s.Yc.Script]:r.ProtoHeavyAdBlockTypeEnum.Script,[s.Yc.VPAIDIframe]:r.ProtoHeavyAdBlockTypeEnum.VpaidIframe}[t]}static fromProtoHeavyAdType(t){return{[r.ProtoHeavyAdBlockTypeEnum.Global]:s.Yc.Global,[r.ProtoHeavyAdBlockTypeEnum.OverlayIframe]:s.Yc.OverlayIframe,[r.ProtoHeavyAdBlockTypeEnum.Script]:s.Yc.Script,[r.ProtoHeavyAdBlockTypeEnum.VpaidIframe]:s.Yc.VPAIDIframe}[t]}static getProtoInternalAuctionDemandType(t){return{[s.AM.None]:r.ProtoDemandTypeEnum.None,[s.AM.PMP]:r.ProtoDemandTypeEnum.PMP,[s.AM.OpenMarket]:r.ProtoDemandTypeEnum.OpenMarket,[s.AM.SelfServed]:r.ProtoDemandTypeEnum.SelfServed}[t]}static fromProtoInternalAuctionDemandType(t){return{[r.ProtoDemandTypeEnum.None]:s.AM.None,[r.ProtoDemandTypeEnum.PMP]:s.AM.PMP,[r.ProtoDemandTypeEnum.OpenMarket]:s.AM.OpenMarket,[r.ProtoDemandTypeEnum.SelfServed]:s.AM.SelfServed}[t]}static getProtoLineItemAbTest(t){return{[s.KY.CaseA]:r.ProtoLineItemAbTestCase.CaseA,[s.KY.CaseB]:r.ProtoLineItemAbTestCase.CaseB}[t]}static fromProtoLineItemAbTest(t){return{[r.ProtoLineItemAbTestCase.CaseA]:s.KY.CaseA,[r.ProtoLineItemAbTestCase.CaseB]:s.KY.CaseB}[t]}static getProtoMediaClickType(t){return{[s.$u.Click]:r.ProtoMediaClickTypeEnum.Click,[s.$u.CloseClick]:r.ProtoMediaClickTypeEnum.CloseClick,[s.$u.FullScreenClick]:r.ProtoMediaClickTypeEnum.FullScreenClick,[s.$u.ExitFullScreenClick]:r.ProtoMediaClickTypeEnum.ExitFullScreenClick,[s.$u.GalleryClick]:r.ProtoMediaClickTypeEnum.GalleryClick,[s.$u.MuteClick]:r.ProtoMediaClickTypeEnum.MuteClick,[s.$u.NextClick]:r.ProtoMediaClickTypeEnum.NextClick,[s.$u.PauseClick]:r.ProtoMediaClickTypeEnum.PauseClick,[s.$u.PlayClick]:r.ProtoMediaClickTypeEnum.PlayClick,[s.$u.PreviousClick]:r.ProtoMediaClickTypeEnum.PreviousClick,[s.$u.ScrollClick]:r.ProtoMediaClickTypeEnum.ScrollClick,[s.$u.SubtitleClick]:r.ProtoMediaClickTypeEnum.SubtitleClick,[s.$u.UnmuteClick]:r.ProtoMediaClickTypeEnum.UnmuteClick,[s.$u.UrlClick]:r.ProtoMediaClickTypeEnum.UrlClick,[s.$u.VolumeClick]:r.ProtoMediaClickTypeEnum.VolumeClick}[t]}static fromProtoGetMediaClickType(t){return{[r.ProtoMediaClickTypeEnum.Click]:s.$u.Click,[r.ProtoMediaClickTypeEnum.CloseClick]:s.$u.CloseClick,[r.ProtoMediaClickTypeEnum.FullScreenClick]:s.$u.FullScreenClick,[r.ProtoMediaClickTypeEnum.ExitFullScreenClick]:s.$u.ExitFullScreenClick,[r.ProtoMediaClickTypeEnum.GalleryClick]:s.$u.GalleryClick,[r.ProtoMediaClickTypeEnum.MuteClick]:s.$u.MuteClick,[r.ProtoMediaClickTypeEnum.NextClick]:s.$u.NextClick,[r.ProtoMediaClickTypeEnum.PauseClick]:s.$u.PauseClick,[r.ProtoMediaClickTypeEnum.PlayClick]:s.$u.PlayClick,[r.ProtoMediaClickTypeEnum.PreviousClick]:s.$u.PreviousClick,[r.ProtoMediaClickTypeEnum.ScrollClick]:s.$u.ScrollClick,[r.ProtoMediaClickTypeEnum.SubtitleClick]:s.$u.SubtitleClick,[r.ProtoMediaClickTypeEnum.UnmuteClick]:s.$u.UnmuteClick,[r.ProtoMediaClickTypeEnum.UrlClick]:s.$u.UrlClick,[r.ProtoMediaClickTypeEnum.VolumeClick]:s.$u.VolumeClick}[t]}static getProtoMediaType(t){return{[s.L5.Image]:r.ProtoMediaTypeEnum.Image,[s.L5.Video]:r.ProtoMediaTypeEnum.Video}[t]}static fromProtoGetMediaType(t){return{[r.ProtoMediaTypeEnum.Image]:s.L5.Image,[r.ProtoMediaTypeEnum.Video]:s.L5.Video}[t]}static getProtoPrebidReason(t){return{[s._Z.RequestException]:r.ConnatixNoBidReasonEnum.RequestException,[s._Z.Timeout]:r.ConnatixNoBidReasonEnum.Timeout,[s._Z.EmptyResponse]:r.ConnatixNoBidReasonEnum.EmptyResponse,[s._Z.InvalidResponse]:r.ConnatixNoBidReasonEnum.InvalidResponse,[s._Z.NoBid]:r.ConnatixNoBidReasonEnum.NoBid,[s._Z.BidBelowFloor]:r.ConnatixNoBidReasonEnum.BidBelowFloor,[s._Z.DealIdMismatch]:r.ConnatixNoBidReasonEnum.DealIdMismatch,[s._Z.CsInvalidResponse]:r.ConnatixNoBidReasonEnum.CsInvalidResponse,[s._Z.CsRequestException]:r.ConnatixNoBidReasonEnum.CsRequestException,[s._Z.CsEmptyResponse]:r.ConnatixNoBidReasonEnum.CsEmptyResponse,[s._Z.NoLibInPage]:r.ConnatixNoBidReasonEnum.NoLibInPage,[s._Z.BidIsNotTargetingAllowedEver]:r.ConnatixNoBidReasonEnum.BidIsNotTargetingAllowedEver}[t]}static fromProtoPrebidReason(t){return{[r.ConnatixNoBidReasonEnum.RequestException]:s._Z.RequestException,[r.ConnatixNoBidReasonEnum.Timeout]:s._Z.Timeout,[r.ConnatixNoBidReasonEnum.EmptyResponse]:s._Z.EmptyResponse,[r.ConnatixNoBidReasonEnum.InvalidResponse]:s._Z.InvalidResponse,[r.ConnatixNoBidReasonEnum.NoBid]:s._Z.NoBid,[r.ConnatixNoBidReasonEnum.BidBelowFloor]:s._Z.BidBelowFloor,[r.ConnatixNoBidReasonEnum.DealIdMismatch]:s._Z.DealIdMismatch,[r.ConnatixNoBidReasonEnum.CsInvalidResponse]:s._Z.CsInvalidResponse,[r.ConnatixNoBidReasonEnum.CsRequestException]:s._Z.CsRequestException,[r.ConnatixNoBidReasonEnum.CsEmptyResponse]:s._Z.CsEmptyResponse,[r.ConnatixNoBidReasonEnum.NoLibInPage]:s._Z.NoLibInPage,[r.ConnatixNoBidReasonEnum.BidIsNotTargetingAllowedEver]:s._Z.BidIsNotTargetingAllowedEver}[t]}static getProtoPrebidPartnerReason(t){return{[s.XD.Unknown]:r.PartnerNoBidReasonEnum.Unknown,[s.XD.TechnicalError]:r.PartnerNoBidReasonEnum.TechnicalError,[s.XD.InvalidRequest]:r.PartnerNoBidReasonEnum.InvalidRequest,[s.XD.KnownWebSpider]:r.PartnerNoBidReasonEnum.KnownWebSpider,[s.XD.SuspectedNonHumanTraffic]:r.PartnerNoBidReasonEnum.SuspectedNonHumanTraffic,[s.XD.CloudIP]:r.PartnerNoBidReasonEnum.CloudIP,[s.XD.UnsupportedDevice]:r.PartnerNoBidReasonEnum.UnsupportedDevice,[s.XD.BlockedPublisher]:r.PartnerNoBidReasonEnum.BlockedPublisher,[s.XD.UnmatchedUser]:r.PartnerNoBidReasonEnum.UnmatchedUser,[s.XD.DailyDomainCapMet]:r.PartnerNoBidReasonEnum.DailyDomainCapMet,[s.XD.DailyReaderCapMet]:r.PartnerNoBidReasonEnum.DailyReaderCapMet}[t]}static fromProtoPrebidPartnerReason(t){return{[r.PartnerNoBidReasonEnum.Unknown]:s.XD.Unknown,[r.PartnerNoBidReasonEnum.TechnicalError]:s.XD.TechnicalError,[r.PartnerNoBidReasonEnum.InvalidRequest]:s.XD.InvalidRequest,[r.PartnerNoBidReasonEnum.KnownWebSpider]:s.XD.KnownWebSpider,[r.PartnerNoBidReasonEnum.SuspectedNonHumanTraffic]:s.XD.SuspectedNonHumanTraffic,[r.PartnerNoBidReasonEnum.CloudIP]:s.XD.CloudIP,[r.PartnerNoBidReasonEnum.UnsupportedDevice]:s.XD.UnsupportedDevice,[r.PartnerNoBidReasonEnum.BlockedPublisher]:s.XD.BlockedPublisher,[r.PartnerNoBidReasonEnum.UnmatchedUser]:s.XD.UnmatchedUser,[r.PartnerNoBidReasonEnum.DailyDomainCapMet]:s.XD.DailyDomainCapMet,[r.PartnerNoBidReasonEnum.DailyReaderCapMet]:s.XD.DailyReaderCapMet}[t]}static getProtoQuartile(t){return{[s.yU.Start]:r.ProtoQuartilesEnum.Start,[s.yU.First]:r.ProtoQuartilesEnum.First,[s.yU.Second]:r.ProtoQuartilesEnum.Second,[s.yU.Third]:r.ProtoQuartilesEnum.Third,[s.yU.Fourth]:r.ProtoQuartilesEnum.Fourth}[t]}static fromProtoGetQuartile(t){return{[r.ProtoQuartilesEnum.Start]:s.yU.Start,[r.ProtoQuartilesEnum.First]:s.yU.First,[r.ProtoQuartilesEnum.Second]:s.yU.Second,[r.ProtoQuartilesEnum.Third]:s.yU.Third,[r.ProtoQuartilesEnum.Fourth]:s.yU.Fourth}[t]}static getProtoLiveRamp(t){return{[n.f.None]:r.ProtoLiveRampEnum.None,[n.f.ATS]:r.ProtoLiveRampEnum.ATS,[n.f.NonATS]:r.ProtoLiveRampEnum.NonATS}[t]}static fromProtoLiveRamp(t){return{[r.ProtoLiveRampEnum.None]:n.f.None,[r.ProtoLiveRampEnum.ATS]:n.f.ATS,[r.ProtoLiveRampEnum.NonATS]:n.f.NonATS}[t]}}class h{static getProtoTrackingMetadata(t){const{buildNumber:i,buildAbPart:e,buildAbId:s,customParam1:n,customParam2:r,customParam3:a,customParam4:c,customParam5:d,clientAb0:l,clientAb1:u,serverAb0:p,serverAb1:f,playerId:m,sessionId:v,pageUrl:g,userId:y,shouldTrackAllRequests:b,isPageInFocus:I,bundleId:w,abTestId:_,implementationType:S,browser:P,geo:A}=t;return{geo:A?h.mu(A):void 0,browser:P?h.vu(P):void 0,implementationType:S?o.getProtoImplementationType(S):void 0,customParam1:n,customParam2:r,customParam3:a,customParam4:c,customParam5:d,clientAb0:l,clientAb1:u,serverAb0:p,serverAb1:f,playerId:m,sessionId:v,pageUrl:g,userId:y,isPageInFocus:I,version:i,bundleId:w,bundleAbId:s,bundlePart:e,abTestId:_,shouldTrackAllRequests:b}}static fromProtoGetTrackingMetadata(t){const{bundleAbId:i,version:e,bundlePart:s,customParam1:n,customParam2:r,customParam3:a,customParam4:c,customParam5:d,clientAb0:l,clientAb1:u,serverAb0:p,serverAb1:f,playerId:m,sessionId:v,pageUrl:g,userId:y,shouldTrackAllRequests:b,isPageInFocus:I,bundleId:w,abTestId:_,implementationType:S,browser:P,geo:A}=t;return{geo:A?h.gu(A):void 0,browser:P?h.yu(P):void 0,implementationType:o.fromProtoGetImplementationType(S),customParam1:n,customParam2:r,customParam3:a,customParam4:c,customParam5:d,clientAb0:l,clientAb1:u,serverAb0:p,serverAb1:f,playerId:m,sessionId:v,pageUrl:g,userId:y,isPageInFocus:I,buildNumber:e,bundleId:w,buildAbId:i,buildAbPart:s,abTestId:_,shouldTrackAllRequests:b}}static vu(t){const{osCode:i,browserVersion:e,browserType:s,deviceType:n}=t;return{osCode:i,browserVersion:e,browserType:s,device:o.getProtoDeviceType(n)}}static yu(t){const{osCode:i,browserVersion:e,browserType:s,device:n}=t;return{osCode:i,browserVersion:e,browserType:s,deviceType:o.fromProtoGetDeviceType(n)}}static mu(t){const{latitude:i,longitude:e,zipCode:s,cityId:n,countryGeoId:r,ip:o,subdivisionId:h,dmaId:a}=t;return{cityId:n,countryGeoId:r,ip:o,lat:i,lon:e,subdivisionId:h,zipcode:s,dmaId:a}}static gu(t){const{lat:i,lon:e,zipcode:s,cityId:n,countryGeoId:r,ip:o,subdivisionId:h,dmaId:a}=t;return{cityId:n,countryGeoId:r,ip:o,latitude:i,longitude:e,subdivisionId:h,zipCode:s,dmaId:a}}}class a{static getProtoSentimentAnalysis(t){return{negative:t.negative,neutral:t.neutral,positive:t.positive}}static fromProtoGetSentimentAnalysis(t){return{negative:t.negative,neutral:t.neutral,positive:t.positive}}}class c{static getProtoLineItemAbTest(t){return{guid:t.id,lineItemAbTestCase:o.getProtoLineItemAbTest(t.lineItemAbTestCase)}}static fromProtoLineItemAbTestFromProto(t){return{id:t.guid,lineItemAbTestCase:o.fromProtoLineItemAbTest(t.lineItemAbTestCase)}}}class d{static getProtoAuctionInformation(t){const{bidDensity:i,highestObfuscatedBidPrice:e,secondHighestObfuscatedBidPrice:s}=t;return{bidDensity:i,highestObfuscatedBidPrice:e,secondHighestObfuscatedBidPrice:s}}static fromProtoAuctionInformation(t){const{bidDensity:i,highestObfuscatedBidPrice:e,secondHighestObfuscatedBidPrice:s}=t;return{bidDensity:i,highestObfuscatedBidPrice:e,secondHighestObfuscatedBidPrice:s}}}class l{static getProtoFloorPriceInformation(t){const{floorPrices:i,floorPriceIndexUsed:e,floorPriceFactorBypassReason:s}=t;return{floorPrices:i,floorPriceIndexUsed:e,floorPriceBypassReason:s?o.getProtoFloorPriceBypassReason(s):void 0}}static fromProtoFloorPriceInformation(t){const{floorPrices:i,floorPriceIndexUsed:e,floorPriceBypassReason:s}=t;return{floorPrices:i,floorPriceIndexUsed:e,floorPriceFactorBypassReason:s?o.fromProtoFloorPriceBypassReason(s):void 0}}}class u{static getProtoInternalAuction(t){const{winnerDemandType:i,firstLoser:e,firstOpenMarketLoser:s}=t;return{winnerDemandType:o.getProtoInternalAuctionDemandType(i),firstLoser:e?u.getProtoInternalAuctionBid(e):void 0,firstOpenMarketLoser:s?u.getProtoInternalAuctionBid(s):void 0}}static fromProtoInternalAuction(t){const{winnerDemandType:i,firstLoser:e,firstOpenMarketLoser:s}=t;return{winnerDemandType:o.fromProtoInternalAuctionDemandType(i),firstLoser:e?u.fromProtoInternalAuctionBid(e):void 0,firstOpenMarketLoser:s?u.fromProtoInternalAuctionBid(s):void 0}}static getProtoInternalAuctionBid(t){const{advertiserLineItemId:i,customClientPrice:e,encryptedPrice:s,demandType:n}=t;return{demandType:o.getProtoInternalAuctionDemandType(n),advertiserLineItemId:i,customClientPrice:e,encryptedPrice:s}}static fromProtoInternalAuctionBid(t){const{advertiserLineItemId:i,customClientPrice:e,encryptedPrice:s,demandType:n}=t;return{demandType:o.fromProtoInternalAuctionDemandType(n),advertiserLineItemId:i,customClientPrice:e,encryptedPrice:s}}}},6286:(t,i,e)=>{"use strict";e.d(i,{j:()=>a});var s=e(5650),n=e(4798),r=e(6716),o=e(4546),h=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let a=class{constructor(){this.bu=new r.x,this.Iu=new r.x,this.wu=new r.x}get onLineItemPlatformCapped(){return this.bu.asObservable()}get onImpressionRevenue(){return this.Iu.asObservable()}get onLineItemViewabilityChange(){return this.wu.asObservable()}onResponseReceived(t,i){const{platformCappedLineItemIdList:e,adServerLineItemName:s,impressionRevenue:n,isViewabilityRestricted:r}=t;this._u(e),this.Su(n,s),this.Pu(i,r)}_u(t){(0,n.$K)(t)&&(0,s.BZ)(t)&&this.bu.next(t)}Su(t,i){(0,n.r)(t)&&(0,n.QM)(i)&&this.Iu.next({impressionRevenue:t,adServerLineItemName:i})}Pu(t,i){(0,n.QM)(t)&&(0,n.$K)(i)&&this.wu.next([t,i])}};a=h([(0,o.b2)(),(0,o.Yn)(o.Fw.ContainerScoped)],a)},202:(t,i,e)=>{"use strict";var s;e.d(i,{f:()=>s}),function(t){t[t.None=0]="None",t[t.ATS=1]="ATS",t[t.NonATS=2]="NonATS"}(s||(s={}))},4967:(t,i,e)=>{"use strict";var s;e.d(i,{$:()=>s}),function(t){t[t.Click=0]="Click",t[t.UrlClick=1]="UrlClick",t[t.VolumeClick=2]="VolumeClick",t[t.PlayClick=3]="PlayClick",t[t.PauseClick=4]="PauseClick",t[t.NextClick=5]="NextClick",t[t.PreviousClick=6]="PreviousClick",t[t.MuteClick=7]="MuteClick",t[t.UnmuteClick=8]="UnmuteClick",t[t.CloseClick=9]="CloseClick",t[t.ScrollClick=10]="ScrollClick",t[t.GalleryClick=11]="GalleryClick",t[t.SubtitleClick=12]="SubtitleClick",t[t.FullScreenClick=13]="FullScreenClick",t[t.ExitFullScreenClick=14]="ExitFullScreenClick"}(s||(s={}))},5692:(t,i,e)=>{"use strict";var s;e.d(i,{y:()=>s}),function(t){t[t.Start=0]="Start",t[t.First=1]="First",t[t.Second=2]="Second",t[t.Third=3]="Third",t[t.Fourth=4]="Fourth"}(s||(s={}))},9361:(t,i,e)=>{"use strict";var s,n,r,o;e.d(i,{ev:()=>r,xX:()=>c,VE:()=>y,Px:()=>a,AT:()=>v,MF:()=>m,VB:()=>s,N0:()=>f,q1:()=>d,Yc:()=>o,Vx:()=>n,AM:()=>g,KY:()=>l,$u:()=>I.$,L5:()=>h,XD:()=>p,_Z:()=>u,yU:()=>b.y}),function(t){t[t.Desktop=0]="Desktop",t[t.Smartphone=1]="Smartphone",t[t.Tablet=2]="Tablet",t[t.GameConsole=3]="GameConsole",t[t.SmartTV=4]="SmartTV",t[t.WearableComputer=5]="WearableComputer",t[t.PDA=6]="PDA",t[t.Unrecognized=7]="Unrecognized"}(s||(s={})),function(t){t[t.Web=0]="Web",t[t.Amp=1]="Amp"}(n||(n={})),function(t){t[t.Banner=0]="Banner",t[t.Network=1]="Network"}(r||(r={})),function(t){t[t.Global=0]="Global",t[t.Script=1]="Script",t[t.VPAIDIframe=2]="VPAIDIframe",t[t.OverlayIframe=3]="OverlayIframe"}(o||(o={}));var h,a,c,d,l,u,p,f,m,v,g,y,b=e(5692),I=e(4967);!function(t){t[t.Image=0]="Image",t[t.Video=1]="Video"}(h||(h={})),function(t){t[t.Unknown=0]="Unknown",t[t.Vpaid=1]="Vpaid",t[t.VastMedia=2]="VastMedia",t[t.CnxMedia=3]="CnxMedia",t[t.Jw=4]="Jw",t[t.Ima=5]="Ima",t[t.AOL=6]="AOL"}(a||(a={})),function(t){t[t.None=0]="None",t[t.PreRoll=1]="PreRoll",t[t.MidRoll=2]="MidRoll",t[t.PostRoll=3]="PostRoll"}(c||(c={})),function(t){t[t.Unknown=0]="Unknown",t[t.NoCmp=1]="NoCmp",t[t.NoConsent=2]="NoConsent",t[t.NoConnatixConsent=3]="NoConnatixConsent",t[t.NotAllDemandConsent=4]="NotAllDemandConsent",t[t.AllGood=5]="AllGood"}(d||(d={})),function(t){t[t.CaseA=0]="CaseA",t[t.CaseB=1]="CaseB"}(l||(l={})),function(t){t[t.RequestException=0]="RequestException",t[t.Timeout=1]="Timeout",t[t.EmptyResponse=2]="EmptyResponse",t[t.InvalidResponse=3]="InvalidResponse",t[t.NoBid=4]="NoBid",t[t.BidBelowFloor=5]="BidBelowFloor",t[t.DealIdMismatch=6]="DealIdMismatch",t[t.CsInvalidResponse=7]="CsInvalidResponse",t[t.CsRequestException=8]="CsRequestException",t[t.CsEmptyResponse=9]="CsEmptyResponse",t[t.NoLibInPage=11]="NoLibInPage",t[t.BidIsNotTargetingAllowedEver=12]="BidIsNotTargetingAllowedEver"}(u||(u={})),function(t){t[t.Unknown=0]="Unknown",t[t.TechnicalError=1]="TechnicalError",t[t.InvalidRequest=2]="InvalidRequest",t[t.KnownWebSpider=3]="KnownWebSpider",t[t.SuspectedNonHumanTraffic=4]="SuspectedNonHumanTraffic",t[t.CloudIP=5]="CloudIP",t[t.UnsupportedDevice=6]="UnsupportedDevice",t[t.BlockedPublisher=7]="BlockedPublisher",t[t.UnmatchedUser=8]="UnmatchedUser",t[t.DailyReaderCapMet=9]="DailyReaderCapMet",t[t.DailyDomainCapMet=10]="DailyDomainCapMet"}(p||(p={})),function(t){t[t.MinCpm=0]="MinCpm",t[t.FixedCpm=1]="FixedCpm",t[t.MaxBidPrice=2]="MaxBidPrice",t[t.VideoOrBannerMin=3]="VideoOrBannerMin",t[t.BidInHand=6]="BidInHand",t[t.NoPredictionFound=7]="NoPredictionFound",t[t.StaticFactorUsed=8]="StaticFactorUsed"}(f||(f={})),function(t){t[t.CreativeError=0]="CreativeError",t[t.SDKFailure=1]="SDKFailure",t[t.UnsupportedMedia=2]="UnsupportedMedia",t[t.TargetingMismatch=3]="TargetingMismatch",t[t.PlayerError=4]="PlayerError"}(m||(m={})),function(t){t[t.TargetingMismatch=0]="TargetingMismatch",t[t.CompetitorPriority=1]="CompetitorPriority",t[t.AdOpportunityEnd=2]="AdOpportunityEnd"}(v||(v={})),function(t){t[t.None=0]="None",t[t.PMP=1]="PMP",t[t.OpenMarket=2]="OpenMarket",t[t.SelfServed=3]="SelfServed"}(g||(g={})),function(t){t[t.AdClick=1]="AdClick",t[t.AdClickThrough=2]="AdClickThrough",t[t.AdSkipClick=3]="AdSkipClick",t[t.VolumeClick=4]="VolumeClick",t[t.PauseClick=5]="PauseClick",t[t.PlayClick=6]="PlayClick",t[t.FullScreenClick=7]="FullScreenClick",t[t.MuteClick=8]="MuteClick",t[t.UnmuteClick=9]="UnmuteClick",t[t.ExitFullScreenClick=10]="ExitFullScreenClick",t[t.AdUserClose=11]="AdUserClose"}(y||(y={}));e(202)},4524:(t,i,e)=>{"use strict";var s;e.d(i,{t:()=>s}),function(t){t.Expand="expand",t.Collapse="collapse",t.Close="close",t.OverlayClick="overlayclick",t.GeneralUserInteraction="generaluserinteraction"}(s||(s={}))},655:(t,i,e)=>{"use strict";e.d(i,{CR:()=>a,FC:()=>l,Jh:()=>o,KL:()=>u,XA:()=>h,ZT:()=>n,ev:()=>c,mG:()=>r,qq:()=>d});var s=function(t,i){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])},s(t,i)};function n(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}function r(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))}function o(t,i){var e,s,n,r,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:h(0),throw:h(1),return:h(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function h(r){return function(h){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,s=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){o.label=r[1];break}if(6===r[0]&&o.label<n[1]){o.label=n[1],n=r;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(r);break}n[2]&&o.ops.pop(),o.trys.pop();continue}r=i.call(t,o)}catch(t){r=[6,t],s=0}finally{e=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,h])}}}Object.create;function h(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,n,r=e.call(t),o=[];try{for(;(void 0===i||i-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return o}function c(t,i,e){if(e||2===arguments.length)for(var s,n=0,r=i.length;n<r;n++)!s&&n in i||(s||(s=Array.prototype.slice.call(i,0,n)),s[n]=i[n]);return t.concat(s||Array.prototype.slice.call(i))}function d(t){return this instanceof d?(this.v=t,this):new d(t)}function l(t,i,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,n=e.apply(t,i||[]),r=[];return s={},o("next"),o("throw"),o("return"),s[Symbol.asyncIterator]=function(){return this},s;function o(t){n[t]&&(s[t]=function(i){return new Promise((function(e,s){r.push([t,i,e,s])>1||h(t,i)}))})}function h(t,i){try{(e=n[t](i)).value instanceof d?Promise.resolve(e.value.v).then(a,c):l(r[0][2],e)}catch(t){l(r[0][3],t)}var e}function a(t){h("next",t)}function c(t){h("throw",t)}function l(t,i){t(i),r.shift(),r.length&&h(r[0][0],r[0][1])}}function u(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,e=t[Symbol.asyncIterator];return e?e.call(t):(t=h(t),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(e){i[e]=t[e]&&function(i){return new Promise((function(s,n){(function(t,i,e,s){Promise.resolve(s).then((function(i){t({value:i,done:e})}),i)})(s,n,(i=t[e](i)).done,i.value)}))}}}Object.create},4546:(t,i,e)=>{"use strict";var s;e.d(i,{Fw:()=>n,nC:()=>x,f3:()=>T,b2:()=>C,Yn:()=>M,ri:()=>E}),function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(s||(s={}));const n=s;var r=function(t,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])},r(t,i)};function o(t,i){function e(){this.constructor=t}r(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}function h(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,n,r=e.call(t),o=[];try{for(;(void 0===i||i-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return o}function c(){for(var t=[],i=0;i<arguments.length;i++)t=t.concat(a(arguments[i]));return t}function d(t){return!!t.useClass}function l(t){return!!t.useFactory}var u=function(){function t(t){this.wrap=t,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(t){var i,e=this,s=!1;return new Proxy({},this.createHandler((function(){return s||(i=t(e.wrap()),s=!0),i})))},t.prototype.createHandler=function(t){var i={};return this.reflectMethods.forEach((function(e){i[e]=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];i[0]=t();var n=Reflect[e];return n.apply(void 0,c(i))}})),i},t}();function p(t){return"string"==typeof t||"symbol"==typeof t}function f(t){return"object"==typeof t&&"token"in t&&"transform"in t}function m(t){return!!t.useToken}function v(t){return null!=t.useValue}const g=function(){function t(){this.Au=new Map}return t.prototype.entries=function(){return this.Au.entries()},t.prototype.getAll=function(t){return this.ensure(t),this.Au.get(t)},t.prototype.get=function(t){this.ensure(t);var i=this.Au.get(t);return i[i.length-1]||null},t.prototype.set=function(t,i){this.ensure(t),this.Au.get(t).push(i)},t.prototype.setAll=function(t,i){this.Au.set(t,i)},t.prototype.has=function(t){return this.ensure(t),this.Au.get(t).length>0},t.prototype.clear=function(){this.Au.clear()},t.prototype.ensure=function(t){this.Au.has(t)||this.Au.set(t,[])},t}();const y=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),i}(g);const b=function(){this.scopedResolutions=new Map};function I(t,i,e){var s,n,r=a(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1],o=function(t,i){return null===t?"at position #"+i:'"'+t.split(",")[i].trim()+'" at position #'+i}(void 0===r?null:r,i);return s="Cannot inject the dependency "+o+' of "'+t.name+'" constructor. Reason:',void 0===n&&(n="    "),c([s],e.message.split("\n").map((function(t){return n+t}))).join("\n")}var w=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),i}(g),_=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),i}(g);const S=function(){this.preResolution=new w,this.postResolution=new _};var P=new Map,A=function(){function t(t){this.parent=t,this.xu=new y,this.interceptors=new S}return t.prototype.register=function(t,i,e){var s;if(void 0===e&&(e={lifecycle:n.Transient}),s=function(t){return d(t)||v(t)||m(t)||l(t)}(i)?i:{useClass:i},m(s))for(var r=[t],o=s;null!=o;){var h=o.useToken;if(r.includes(h))throw new Error("Token registration cycle detected! "+c(r,[h]).join(" -> "));r.push(h);var a=this.xu.get(h);o=a&&m(a.provider)?a.provider:null}if((e.lifecycle===n.Singleton||e.lifecycle==n.ContainerScoped||e.lifecycle==n.ResolutionScoped)&&(v(s)||l(s)))throw new Error('Cannot use lifecycle "'+n[e.lifecycle]+'" with ValueProviders or FactoryProviders');return this.xu.set(t,{provider:s,options:e}),this},t.prototype.registerType=function(t,i){return p(i)?this.register(t,{useToken:i}):this.register(t,{useClass:i})},t.prototype.registerInstance=function(t,i){return this.register(t,{useValue:i})},t.prototype.registerSingleton=function(t,i){if(p(t)){if(p(i))return this.register(t,{useToken:i},{lifecycle:n.Singleton});if(i)return this.register(t,{useClass:i},{lifecycle:n.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var e=t;return i&&!p(i)&&(e=i),this.register(t,{useClass:e},{lifecycle:n.Singleton})},t.prototype.resolve=function(t,i){void 0===i&&(i=new b);var e=this.getRegistration(t);if(!e&&p(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),e){var s=this.resolveRegistration(e,i);return this.executePostResolutionInterceptor(t,s,"Single"),s}if(function(t){return"function"==typeof t||t instanceof u}(t)){s=this.construct(t,i);return this.executePostResolutionInterceptor(t,s,"Single"),s}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(t,i){var e,s;if(this.interceptors.preResolution.has(t)){var n=[];try{for(var r=h(this.interceptors.preResolution.getAll(t)),o=r.next();!o.done;o=r.next()){var a=o.value;"Once"!=a.options.frequency&&n.push(a),a.callback(t,i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(e)throw e.error}}this.interceptors.preResolution.setAll(t,n)}},t.prototype.executePostResolutionInterceptor=function(t,i,e){var s,n;if(this.interceptors.postResolution.has(t)){var r=[];try{for(var o=h(this.interceptors.postResolution.getAll(t)),a=o.next();!a.done;a=o.next()){var c=a.value;"Once"!=c.options.frequency&&r.push(c),c.callback(t,i,e)}}catch(t){s={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}this.interceptors.postResolution.setAll(t,r)}},t.prototype.resolveRegistration=function(t,i){if(t.options.lifecycle===n.ResolutionScoped&&i.scopedResolutions.has(t))return i.scopedResolutions.get(t);var e,s=t.options.lifecycle===n.Singleton,r=t.options.lifecycle===n.ContainerScoped,o=s||r;return e=v(t.provider)?t.provider.useValue:m(t.provider)?o?t.instance||(t.instance=this.resolve(t.provider.useToken,i)):this.resolve(t.provider.useToken,i):d(t.provider)?o?t.instance||(t.instance=this.construct(t.provider.useClass,i)):this.construct(t.provider.useClass,i):l(t.provider)?t.provider.useFactory(this):this.construct(t.provider,i),t.options.lifecycle===n.ResolutionScoped&&i.scopedResolutions.set(t,e),e},t.prototype.resolveAll=function(t,i){var e=this;void 0===i&&(i=new b);var s=this.getAllRegistrations(t);if(!s&&p(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),s){var n=s.map((function(t){return e.resolveRegistration(t,i)}));return this.executePostResolutionInterceptor(t,n,"All"),n}var r=[this.construct(t,i)];return this.executePostResolutionInterceptor(t,r,"All"),r},t.prototype.isRegistered=function(t,i){return void 0===i&&(i=!1),this.xu.has(t)||i&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.xu.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,i;try{for(var e=h(this.xu.entries()),s=e.next();!s.done;s=e.next()){var n=a(s.value,2),r=n[0],o=n[1];this.xu.setAll(r,o.filter((function(t){return!v(t.provider)})).map((function(t){return t.instance=void 0,t})))}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}},t.prototype.createChildContainer=function(){var i,e,s=new t(this);try{for(var r=h(this.xu.entries()),o=r.next();!o.done;o=r.next()){var c=a(o.value,2),d=c[0],l=c[1];l.some((function(t){return t.options.lifecycle===n.ContainerScoped}))&&s.xu.setAll(d,l.map((function(t){return t.options.lifecycle===n.ContainerScoped?{provider:t.provider,options:t.options}:t})))}}catch(t){i={error:t}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(i)throw i.error}}return s},t.prototype.beforeResolution=function(t,i,e){void 0===e&&(e={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:i,options:e})},t.prototype.afterResolution=function(t,i,e){void 0===e&&(e={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:i,options:e})},t.prototype.getRegistration=function(t){return this.isRegistered(t)?this.xu.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this.xu.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,i){var e=this;if(t instanceof u)return t.createProxy((function(t){return e.resolve(t,i)}));var s=P.get(t);if(!s||0===s.length){if(0===t.length)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var n=s.map(this.resolveParams(i,t));return new(t.bind.apply(t,c([void 0],n)))},t.prototype.resolveParams=function(t,i){var e=this;return function(s,n){var r,o,h,a;try{return"object"==typeof(a=s)&&"token"in a&&"multiple"in a?f(s)?s.multiple?(r=e.resolve(s.transform)).transform.apply(r,c([e.resolveAll(s.token)],s.transformArgs)):(o=e.resolve(s.transform)).transform.apply(o,c([e.resolve(s.token,t)],s.transformArgs)):s.multiple?e.resolveAll(s.token):e.resolve(s.token,t):f(s)?(h=e.resolve(s.transform,t)).transform.apply(h,c([e.resolve(s.token,t)],s.transformArgs)):e.resolve(s,t)}catch(t){throw new Error(I(i,n,t))}}},t}(),x=new A;var k="injectionTokens";const T=function(t){return i=t,function(t,s,n){var r=Reflect.getOwnMetadata(k,t)||{};r[n]=e?{token:i,transform:e.transformToken,transformArgs:e.args||[]}:i,Reflect.defineMetadata(k,r,t)};var i,e};const C=function(){return function(t){P.set(t,function(t){var i=Reflect.getMetadata("design:paramtypes",t)||[],e=Reflect.getOwnMetadata(k,t)||{};return Object.keys(e).forEach((function(t){i[+t]=e[t]})),i}(t))}};const E=function(){return function(t){C()(t),x.registerSingleton(t)}};function M(t,i){return function(e){C()(e),x.register(i||e,e,{lifecycle:t})}}if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.")},289:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.common||(t.roots.common=new t.Root)).addJSON({ProtoAdBreak:{fields:{types:{rule:"repeated",type:"ProtoAdBreakTypeEnum",id:1,options:{packed:!1}},maxAdPodDuration:{type:"int32",id:2},maxAdSlotDuration:{type:"int32",id:3,options:{default:180}},numberOfAdSlots:{type:"int32",id:4,options:{default:1}}}},ProtoAdDomainBlockingResponse:{fields:{domains:{rule:"repeated",type:"string",id:1}}},ProtoCoreTamBidRequest:{fields:{lineItemId:{type:"string",id:1},code:{type:"string",id:2},metadata:{type:"MetadataModel",id:3},exploration:{type:"bool",id:4}}},MetadataModel:{fields:{version:{type:"int32",id:1},sessionId:{type:"string",id:2},playerId:{type:"string",id:3},userId:{type:"string",id:4},browser:{type:"Browser",id:5},geo:{type:"GeoLocation",id:6},clientAb0:{type:"int32",id:7},clientAb1:{type:"int32",id:8},serverAb0:{type:"int32",id:9},serverAb1:{type:"int32",id:10},pageUrl:{type:"string",id:15},bundleId:{type:"string",id:17},implementationType:{type:"ProtoImplementationType",id:18},shouldTrackAllRequests:{type:"bool",id:19},customParam1:{type:"string",id:20},customParam2:{type:"string",id:21},customParam3:{type:"string",id:22},abTestId:{type:"string",id:24},isPageInFocus:{type:"bool",id:25},customParam4:{type:"string",id:26},customParam5:{type:"string",id:27},bundleAbId:{type:"string",id:28},bundlePart:{type:"string",id:29}}},Browser:{fields:{browserVersion:{type:"string",id:1},browserType:{type:"string",id:2},osCode:{type:"string",id:3},device:{type:"ProtoDeviceType",id:4}}},GeoLocation:{fields:{countryGeoId:{type:"int32",id:1},cityId:{type:"int32",id:2},subdivisionId:{type:"int32",id:3},dmaId:{type:"int32",id:4},ip:{type:"string",id:5},lat:{type:"double",id:6},lon:{type:"double",id:7},zipcode:{type:"string",id:8}}},ProtoCoreTamBidResponse:{fields:{errorMessage:{type:"string",id:1},encryptedBidPrice:{type:"string",id:10},ofskp:{type:"double",id:12},impressionTimeSpent:{type:"int32",id:13},bidRate:{type:"double",id:14},successRate:{type:"double",id:15}}},ProtoCookieSettings:{fields:{name:{type:"string",id:1},value:{type:"string",id:2},timestamp:{type:"int64",id:3}}},ProtoCookieSyncRequest:{fields:{cookieList:{rule:"repeated",type:"ProtoCookieSettings",id:1},secureMode:{type:"ProtoCookieSecureModeEnum",id:2},browserInfo:{type:"Browser",id:3}}},ProtoUserInformation:{fields:{userId:{type:"string",id:1},lookupId:{type:"string",id:3},lookupResponseCode:{type:"int32",id:4},callFraudSensor:{type:"bool",id:5},publisherAdsTxt:{type:"string",id:6}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},ProtoDiscount:{oneofs:{ku:{oneof:["rate"]}},fields:{rate:{type:"double",id:2,options:{proto3_optional:!0}},id:{type:"string",id:1}}},Insights:{fields:{key:{type:"string",id:1}}},ProtoSentimentAnalysis:{fields:{positive:{type:"double",id:1},neutral:{type:"double",id:2},negative:{type:"double",id:3}}},ProtoInsightsResponse:{fields:{insights:{rule:"repeated",type:"Insights",id:1},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:2}}},ProtoLineItemAdBreakTargeting:{fields:{adRollType:{type:"ProtoAdBreakTypeEnum",id:1},adBreakTypeEnum:{type:"ProtoLineItemAdBreakTypeEnum",id:2}}},ProtoLineItemAdPodTargeting:{fields:{targetingType:{type:"ProtoLineItemTargetingTypeEnum",id:1},adSlotTargetingType:{type:"ProtoLineItemAdSlotTargetingTypeEnum",id:2},adSlotPositions:{rule:"repeated",type:"int32",id:3,options:{packed:!1}}}},ProtoLineItemAdBreakSettings:{fields:{adBreakTargeting:{rule:"repeated",type:"ProtoLineItemAdBreakTargeting",id:1},adPodTargeting:{type:"ProtoLineItemAdPodTargeting",id:2}}},ProtoLineItem:{oneofs:{Tu:{oneof:["floorPricesNew"]}},fields:{floorPricesNew:{type:"ProtoFloorPricesNewModel",id:57,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},adTag:{type:"string",id:3},creativeType:{type:"ProtoCreativeTypeEnum",id:4},sound:{type:"bool",id:6},viewability:{type:"bool",id:7},impressionTimeSpent:{type:"int32",id:9},vendorId:{type:"string",id:10},trackers:{rule:"repeated",type:"CreativeTrackerViewModel",id:12},duration:{type:"int32",id:13},renditions:{rule:"repeated",type:"ProtoRendition",id:14},mediaCreativeId:{type:"string",id:15},ignoreFilledRequests:{type:"bool",id:16},requestCap:{type:"int32",id:17,options:{default:3}},impressionCap:{type:"int32",id:18},successRate:{type:"double",id:19},lineItemPriority:{type:"ProtoLineItemPriority",id:20},headerBidderTimeout:{type:"int32",id:22},mediaCreativeClickUrl:{type:"string",id:23},resetRequestsCapTime:{type:"int32",id:24,options:{default:60}},resetImpressionsCapTime:{type:"int32",id:25,options:{default:60}},resetCapType:{type:"ProtoResetCapTypeEnum",id:26},creativeHlsFileName:{type:"string",id:27},timeBetweenRequests:{type:"int32",id:28},skipMode:{type:"ProtoAdSkipMode",id:29},mediaIdTargeting:{type:"ProtoTargetingChoiceModel",id:30},mediaKeywordsTargeting:{type:"ProtoTargetingChoiceModel",id:31},mediaLanguageTargeting:{type:"ProtoTargetingChoiceModel",id:32},adType:{type:"ProtoAdType",id:33},overlayTime:{type:"int32",id:34,options:{default:30}},floorPrice:{type:"double",id:35},adBreakSettings:{type:"ProtoLineItemAdBreakSettings",id:36},bidRate:{type:"double",id:39},pauseAdOutOfView:{type:"ProtoLineItemPauseAdOutOfViewEnum",id:40},moatTrackingEnabled:{type:"bool",id:41},cnxCreativeId:{type:"string",id:42},blockedDomainsRevisionNumber:{type:"int32",id:44},advertiserContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:45},publisherContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:46},playerSizeTargetings:{type:"ProtoPlayerSizeTargetings",id:47},amazonDealId:{type:"string",id:48},playerOrientationTargeting:{type:"ProtoPlayerOrientationTargetingEnum",id:50},skipMin:{type:"int32",id:51,options:{default:6}},skippability:{type:"ProtoLineItemSkippabilityType",id:52},forceCallingInEveryAO:{type:"bool",id:53},networkExpiryTimeSeconds:{type:"int32",id:54,options:{default:21600}},nonlinearLineItemSettings:{type:"ProtoNonlinearLineItemSettings",id:55},prebidJsBidParamsJSONString:{type:"string",id:58},isPMP:{type:"bool",id:59},playerSize:{type:"string",id:101}}},ProtoTargetingChoiceModel:{fields:{choiceCriteria:{type:"ProtoChoiceCriteriaEnum",id:1},items:{rule:"repeated",type:"string",id:2}}},ProtoContextualTargetingCaseModel:{fields:{filters:{rule:"repeated",type:"ProtoContextualTargetingFilterModel",id:1}}},ProtoContextualTargetingFilterModel:{fields:{type:{type:"ProtoLineItemContextualTargetingEnum",id:1},level:{type:"ProtoContextualTargetingLevelEnum",id:3},hashedItemsIds:{rule:"repeated",type:"string",id:4}}},ProtoPlayerSizeTargetings:{fields:{sizeChoiceCriteria:{type:"ProtoSizeChoiceCriteriaEnum",id:1},minWidth:{type:"int32",id:2},maxWidth:{type:"int32",id:3}}},ProtoFloorPricesData:{oneofs:{Cu:{oneof:["floorPriceBypassReason"]}},fields:{floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:2,options:{proto3_optional:!0}},price:{type:"double",id:1}}},ProtoFloorPricesNewModel:{fields:{floorPrices:{rule:"repeated",type:"ProtoFloorPricesData",id:1},recommended:{type:"int32",id:2}}},ProtoRendition:{fields:{height:{type:"int32",id:1},codec:{type:"string",id:2},file:{type:"string",id:3}}},ProtoNonlinearLineItemSettings:{fields:{nonLinearRequestType:{type:"ProtoNonlinearRequestType",id:1},nonLinearAdTimeSeconds:{type:"int32",id:2,options:{default:15}}}},ProtoLineItemAbTestInformation:{fields:{guid:{type:"string",id:1},lineItemAbTestCase:{type:"ProtoLineItemAbTestCase",id:2}}},ProtoLiveMediaMetadataResponse:{fields:{startDate:{type:"string",id:1},outputUrl:{type:"string",id:2},thumbnailUrl:{type:"string",id:3},altText:{type:"string",id:4},name:{type:"string",id:5}}},ProtoSpriteSheet:{fields:{file:{type:"string",id:1},height:{type:"int32",id:2},count:{type:"int32",id:3}}},ProtoTrack:{fields:{file:{type:"string",id:1},type:{type:"ProtoTrackType",id:2},code:{type:"string",id:3},title:{type:"string",id:4}}},ProtoCustomField:{fields:{name:{type:"string",id:1},value:{type:"string",id:2}}},ProtoCuePoint:{fields:{timeStamp:{type:"int32",id:1}}},ProtoMediaMetadataResponse:{fields:{title:{type:"string",id:1},description:{type:"string",id:2},duration:{type:"int32",id:3},clickUrl:{type:"string",id:4},keywordList:{rule:"repeated",type:"string",id:5},trackList:{rule:"repeated",type:"ProtoTrack",id:6},spriteSheet:{type:"ProtoSpriteSheet",id:7},thumbnail:{type:"string",id:8},renditionList:{rule:"repeated",type:"ProtoRendition",id:9},customFields:{rule:"repeated",type:"ProtoCustomField",id:10},hlsFilePath:{type:"string",id:11},languageId:{type:"string",id:12},sourceItemId:{type:"string",id:13},altText:{type:"string",id:14},cuePoints:{rule:"repeated",type:"ProtoCuePoint",id:16},publishDate:{type:"uint32",id:18}}},ProtoNonlinearPlayerSettings:{fields:{numberOfNonlinearAds:{type:"int32",id:1},timeSecondsBetweenNonlinear:{type:"int32",id:2,options:{default:5}},timeSecondsBetweenLinearAndNonlinear:{type:"int32",id:3}}},ProtoRtbRequest:{oneofs:{Eu:{oneof:["lineItemAbTestInformation"]}},fields:{lineItemAbTestInformation:{type:"ProtoLineItemAbTestInformation",id:46,options:{proto3_optional:!0}},metadata:{type:"MetadataModel",id:1},coppa:{type:"bool",id:4},refererUrl:{type:"string",id:5},testMode:{type:"bool",id:6},videoWidth:{type:"int32",id:7},videoHeight:{type:"int32",id:8},gdprCompliant:{type:"bool",id:9},soundOn:{type:"bool",id:10},gdprConsentData:{type:"string",id:11},explorationMode:{type:"bool",id:12},viewability:{type:"bool",id:13},outstream:{type:"bool",id:14},domainURL:{type:"string",id:16},isClickToPlay:{type:"bool",id:18},appVersion:{type:"string",id:21},deviceID:{type:"string",id:24},lineItems:{keyType:"string",type:"ProtoRtbRequestLineItemEntry",id:25},isCcpaBlockingUserInfo:{type:"bool",id:26},usPrivacyString:{type:"string",id:27},gdprConsentMode:{type:"ProtoGdprConsentModeEnum",id:36},maxAdDuration:{type:"int32",id:37,options:{default:180}},customMacros:{keyType:"string",type:"string",id:38},maxBidPrice:{type:"double",id:39},playerWidth:{type:"int32",id:43},playerHeight:{type:"int32",id:44},useNewSkippability:{type:"bool",id:42},liveRampAtsEnvelope:{type:"string",id:45},connectionType:{type:"int32",id:47}}},ProtoRtbRequestLineItemEntry:{oneofs:{Mu:{oneof:["cachedFloorPrice"]}},fields:{cachedFloorPrice:{type:"ProtoCacheFloorPrice",id:16,options:{proto3_optional:!0}},availableRequests:{type:"int32",id:1},gdprConsent:{type:"bool",id:4},publisherLineItemId:{type:"string",id:5},slotWidth:{type:"int32",id:6},slotHeight:{type:"int32",id:7},requestNumber:{type:"int32",id:8},skip:{type:"ProtoSkipEnabledEnum",id:12},skipmin:{type:"int32",id:13},skipafter:{type:"int32",id:14},minDuration:{type:"int32",id:15}}},ProtoCacheFloorPrice:{fields:{floorPrices:{rule:"repeated",type:"double",id:1,options:{packed:!1}},recommended:{type:"int32",id:2}}},ProtoRtbResponse:{fields:{lineItemResponses:{rule:"repeated",type:"ProtoRtbLineItem",id:3},liveRampEnvelopeStatus:{type:"LiveRampEnvelopeStatusEnum",id:4}}},ProtoRtbBid:{oneofs:{Lu:{oneof:["floorPriceInformation"]},Bu:{oneof:["discount"]}},fields:{floorPriceInformation:{type:"ProtoFloorPriceInformation",id:30,options:{proto3_optional:!0}},discount:{type:"ProtoDiscount",id:31,options:{proto3_optional:!0}},winNoticeUrl:{type:"string",id:2},adQualityCheckUrl:{type:"string",id:3},vastTag:{type:"string",id:4},encryptedPrice:{type:"string",id:6},creativeId:{type:"string",id:7},seatId:{type:"string",id:8},adomain:{type:"string",id:9},syncedUser:{type:"bool",id:10},requestedFloorPrice:{type:"double",id:11},campaignId:{type:"string",id:13},width:{type:"int32",id:14},height:{type:"int32",id:15},billingNoticeUrlList:{rule:"repeated",type:"string",id:16},mime:{type:"string",id:17,options:{default:"text/html"}},gtkpbp:{type:"double",id:18},successRate:{type:"double",id:19},impressionTimeSpent:{type:"int32",id:20},bidRate:{type:"double",id:21},dspId:{type:"string",id:22},cnxBidId:{type:"string",id:23},logAuctionInformation:{type:"bool",id:24},auctionBidId:{type:"string",id:25},rtbRequestId:{type:"string",id:26},liveRampType:{type:"ProtoLiveRampEnum",id:32}}},ProtoRtbNoBid:{fields:{connatixReason:{type:"ConnatixNoBidReasonEnum",id:1},partnerReason:{type:"PartnerNoBidReasonEnum",id:2},syncedUser:{type:"bool",id:3},requestedFloorPrice:{type:"double",id:4},partnerCustomHeaders:{type:"string",id:6}}},ProtoRtbLineItem:{oneofs:{Mu:{oneof:["cachedFloorPrice"]}},fields:{cachedFloorPrice:{type:"ProtoCacheFloorPrice",id:6,options:{proto3_optional:!0}},id:{type:"string",id:1},bids:{rule:"repeated",type:"ProtoRtbBid",id:3},noBids:{rule:"repeated",type:"ProtoRtbNoBid",id:4}}},ProtoSupplyChain:{fields:{businessDomain:{type:"string",id:1},supplyChainId:{type:"string",id:3}}},ProtoAdClickTrackingRequest:{oneofs:{Eu:{oneof:["lineItemAbTestInformation"]}},fields:{lineItemAbTestInformation:{type:"ProtoLineItemAbTestInformation",id:14,options:{proto3_optional:!0}},trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},publisherLineItemId:{type:"string",id:3},advertiserLineItemId:{type:"string",id:4},type:{type:"ProtoAdClickTypeEnum",id:5},insightIndexes:{rule:"repeated",type:"string",id:10},adBreakType:{type:"ProtoAdBreakTypeEnum",id:11},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:12},pageInsightIndexes:{rule:"repeated",type:"string",id:13},iasSegmentCodes:{rule:"repeated",type:"string",id:15}}},ProtoAdOpportunityRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:2},adBreak:{type:"ProtoAdBreakTypeEnum",id:3},playerWidth:{type:"int32",id:4},pageInsightIndexes:{rule:"repeated",type:"string",id:5},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoAuctionInfoRequest:{fields:{cnxBidId:{type:"string",id:1},auctionInformation:{type:"ProtoAuctionInformation",id:2},auctionLossReason:{type:"ProtoAuctionLossReasonEnum",id:3}}},ProtoAuctionInformation:{fields:{highestObfuscatedBidPrice:{type:"double",id:1},secondHighestObfuscatedBidPrice:{type:"double",id:2},bidDensity:{type:"int32",id:3}}},ProtoFloorPriceInformation:{oneofs:{Ou:{oneof:["floorPriceIndexUsed"]},Cu:{oneof:["floorPriceBypassReason"]}},fields:{floorPriceIndexUsed:{type:"int32",id:2,options:{proto3_optional:!0}},floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:3,options:{proto3_optional:!0}},floorPrices:{rule:"repeated",type:"double",id:1,options:{packed:!1}}}},ProtoPrebid:{oneofs:{Lu:{oneof:["floorPriceInformation"]}},fields:{floorPriceInformation:{type:"ProtoFloorPriceInformation",id:16,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},isUserSynced:{type:"bool",id:3},timeSpent:{type:"int32",id:4},reason:{type:"ConnatixNoBidReasonEnum",id:5},requestNumber:{type:"int32",id:6},partnerReason:{type:"PartnerNoBidReasonEnum",id:7},requestedFloorPrice:{type:"double",id:8},partnerCustomHeaders:{type:"string",id:9},prebidJsBidderName:{type:"string",id:12},playerWidth:{type:"int32",id:14},playerHeight:{type:"int32",id:15},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoBid:{oneofs:{Lu:{oneof:["floorPriceInformation"]}},fields:{floorPriceInformation:{type:"ProtoFloorPriceInformation",id:22,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},isUserSynced:{type:"bool",id:3},timeSpent:{type:"int32",id:4},requestNumber:{type:"int32",id:5},creativeId:{type:"string",id:6},rtbSeatId:{type:"string",id:7},rtbAdomain:{type:"string",id:8},encryptedPrice:{type:"string",id:9},requestedFloorPrice:{type:"double",id:10},prebidJsBidderName:{type:"string",id:13},customClientPrice:{type:"double",id:14},dspId:{type:"string",id:15},cnxBidId:{type:"string",id:16},playerWidth:{type:"int32",id:18},playerHeight:{type:"int32",id:19},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoPostBid:{oneofs:{Lu:{oneof:["floorPriceInformation"]},Bu:{oneof:["discount"]}},fields:{floorPriceInformation:{type:"ProtoFloorPriceInformation",id:28,options:{proto3_optional:!0}},discount:{type:"ProtoDiscount",id:30,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},isUserSynced:{type:"bool",id:3},timeSpent:{type:"int32",id:4},error:{type:"string",id:5},isBidLoaded:{type:"bool",id:6},creativeId:{type:"string",id:7},rtbSeatId:{type:"string",id:8},rtbAdomain:{type:"string",id:9},adsourceType:{type:"ProtoAdsourceTypeEnum",id:10},vastMediaType:{type:"string",id:11},adPodSlotPosition:{type:"int32",id:12},prebidJsBidderName:{type:"string",id:13},dspId:{type:"string",id:14},cnxBidId:{type:"string",id:15},winToAdLoadedTime:{type:"int32",id:16},auctionInformation:{type:"ProtoAuctionInformation",id:18},auctionPostbidReason:{type:"ProtoAuctionPostbidReasonEnum",id:19},requestNumber:{type:"int32",id:20},floorPrice:{type:"double",id:22},playerWidth:{type:"int32",id:23},playerHeight:{type:"int32",id:24},bidElapsedTimeSeconds:{type:"int32",id:25},adBreakType:{type:"ProtoAdBreakTypeEnum",id:26},liveRampType:{type:"ProtoLiveRampEnum",id:32},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoBidTrackingsRequest:{oneofs:{Eu:{oneof:["lineItemAbTestInformation"]}},fields:{lineItemAbTestInformation:{type:"ProtoLineItemAbTestInformation",id:13,options:{proto3_optional:!0}},trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},prebids:{rule:"repeated",type:"ProtoPrebid",id:4},bids:{rule:"repeated",type:"ProtoBid",id:5},postBids:{rule:"repeated",type:"ProtoPostBid",id:6},shouldLogEverything:{type:"bool",id:7},hasGdprConsentPayload:{type:"bool",id:10},gdprConsentMode:{type:"ProtoGdprConsentModeEnum",id:11},isExplorationMode:{type:"bool",id:12}}},ProtoHeavyAdTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},advertiserLineItemId:{type:"string",id:2},heavyAdBlockTypeEnum:{type:"ProtoHeavyAdBlockTypeEnum",id:3},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoInternalAuction:{oneofs:{Ru:{oneof:["firstLoser"]},Du:{oneof:["firstOpenMarketLoser"]}},fields:{firstLoser:{type:"ProtoInternalAuctionBid",id:2,options:{proto3_optional:!0}},firstOpenMarketLoser:{type:"ProtoInternalAuctionBid",id:3,options:{proto3_optional:!0}},winnerDemandType:{type:"ProtoDemandTypeEnum",id:1}}},ProtoInternalAuctionBid:{oneofs:{Vu:{oneof:["customClientPrice"]},Fu:{oneof:["encryptedPrice"]}},fields:{customClientPrice:{type:"double",id:2,options:{proto3_optional:!0}},encryptedPrice:{type:"string",id:3,options:{proto3_optional:!0}},demandType:{type:"ProtoDemandTypeEnum",id:1},advertiserLineItemId:{type:"string",id:4}}},ProtoMediaClickTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},type:{type:"ProtoMediaClickTypeEnum",id:3},clickUrl:{type:"string",id:4},slideTitle:{type:"string",id:5},slideNumber:{type:"int32",id:6},slideMediaType:{type:"ProtoMediaTypeEnum",id:7},insightIndexes:{rule:"repeated",type:"string",id:12},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:13}}},ProtoMediaQuartileRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},quartile:{type:"ProtoQuartilesEnum",id:4},insightIndexes:{rule:"repeated",type:"string",id:9},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:10}}},ProtoPlayerStartRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},pageInsightIndexes:{rule:"repeated",type:"string",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoSessionAdBlockerRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},adBlockDetectionType:{type:"ProtoAdBlockDetectionTypeEnum",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoSessionRenderedRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},hasAdBlocker:{type:"bool",id:4},bundleName:{type:"string",id:5},playerWidth:{type:"int32",id:6},playerHeight:{type:"int32",id:7},pageInsightIndexes:{rule:"repeated",type:"string",id:8},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoSessionTimeTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},timePlayed:{type:"int32",id:2},timePlayedInView:{type:"int32",id:3},sessionTime:{type:"int32",id:4},pageInsightIndexes:{rule:"repeated",type:"string",id:5}}},ProtoSessionViewRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},pageInsightIndexes:{rule:"repeated",type:"string",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoTrackingResponse:{oneofs:{Nu:{oneof:["isViewabilityRestricted"]}},fields:{isViewabilityRestricted:{type:"bool",id:5,options:{proto3_optional:!0}},errorMessage:{type:"string",id:1},platformCappedLineItemIdList:{rule:"repeated",type:"string",id:2},impressionRevenue:{type:"double",id:3},adServerLineItemName:{type:"string",id:4}}},ProtoVideoAdImpressionRequest:{oneofs:{Lu:{oneof:["floorPriceInformation"]},Eu:{oneof:["lineItemAbTestInformation"]},Uu:{oneof:["internalAuction"]},Bu:{oneof:["discount"]}},fields:{floorPriceInformation:{type:"ProtoFloorPriceInformation",id:46,options:{proto3_optional:!0}},lineItemAbTestInformation:{type:"ProtoLineItemAbTestInformation",id:47,options:{proto3_optional:!0}},internalAuction:{type:"ProtoInternalAuction",id:48,options:{proto3_optional:!0}},discount:{type:"ProtoDiscount",id:50,options:{proto3_optional:!0}},trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},isUserSynced:{type:"bool",id:7},timeSpent:{type:"int32",id:8},encryptedPrice:{type:"string",id:9},creativeId:{type:"string",id:10},rtbSeatId:{type:"string",id:11},rtbAdomain:{type:"string",id:12},customClientPrice:{type:"double",id:13},adsourceType:{type:"ProtoAdsourceTypeEnum",id:14},vastMediaType:{type:"string",id:15},adPodSlotPosition:{type:"int32",id:18},prebidJsBidderName:{type:"string",id:19},dspId:{type:"string",id:20},cnxBidId:{type:"string",id:21},winToAdLoadedTime:{type:"int32",id:22},startAdToImpressionTime:{type:"int32",id:23},declaredDuration:{type:"double",id:24},impressionDuration:{type:"double",id:25},isExplorationMode:{type:"bool",id:26},auctionInformation:{type:"ProtoAuctionInformation",id:27},playerWidth:{type:"int32",id:28},requestNumber:{type:"int32",id:29},floorPrice:{type:"double",id:31},playerHeight:{type:"int32",id:36},bidElapsedTimeSeconds:{type:"int32",id:37},insightIndexes:{rule:"repeated",type:"string",id:38},adBreakType:{type:"ProtoAdBreakTypeEnum",id:40},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:41},hasAdSkip:{type:"bool",id:39},pageInsightIndexes:{rule:"repeated",type:"string",id:42},iasSegmentCodes:{rule:"repeated",type:"string",id:49},liveRampType:{type:"ProtoLiveRampEnum",id:51},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoVideoAdImpressionViewableRequest:{oneofs:{Eu:{oneof:["lineItemAbTestInformation"]},Bu:{oneof:["discount"]}},fields:{lineItemAbTestInformation:{type:"ProtoLineItemAbTestInformation",id:19,options:{proto3_optional:!0}},discount:{type:"ProtoDiscount",id:21,options:{proto3_optional:!0}},trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},rtbSeatId:{type:"string",id:7},dspId:{type:"string",id:8},insightIndexes:{rule:"repeated",type:"string",id:13},hasAdSkip:{type:"bool",id:14},adBreakType:{type:"ProtoAdBreakTypeEnum",id:15},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:16},pageInsightIndexes:{rule:"repeated",type:"string",id:17},rtbAdomain:{type:"string",id:18},iasSegmentCodes:{rule:"repeated",type:"string",id:20},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoVideoAdQuartilesRequest:{oneofs:{Eu:{oneof:["lineItemAbTestInformation"]}},fields:{lineItemAbTestInformation:{type:"ProtoLineItemAbTestInformation",id:20,options:{proto3_optional:!0}},trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},quartile:{type:"ProtoQuartilesEnum",id:7},rtbSeatId:{type:"string",id:8},dspId:{type:"string",id:9},insightIndexes:{rule:"repeated",type:"string",id:14},hasAdSkip:{type:"bool",id:15},adBreakType:{type:"ProtoAdBreakTypeEnum",id:16},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:17},pageInsightIndexes:{rule:"repeated",type:"string",id:18},rtbAdomain:{type:"string",id:19},iasSegmentCodes:{rule:"repeated",type:"string",id:21}}},ProtoUserSyncRequest:{fields:{userId:{type:"string",id:1},demandPartner:{type:"int32",id:2},demandPartnerUserId:{type:"string",id:3}}},ProtoPlayerPlaybackModeEnum:{values:{Autoplay:0,ScrollToPlay:1,ClickToPlay:2}},ProtoPlayerCloseButtonMode:{values:{Off:0,OnHover:1,OnHoverAfterFirstAd:2,AlwaysOn:3}},ProtoPlayerFloatingMode:{values:{Off:0,OnPageLoad:1,AfterInView:2,Always:3}},ProtoPlayerSoundMode:{values:{Mute:0,On:1,Hover:2}},ProtoPlayerInsertMode:{values:{WithinContainer:0,BeforeContainer:1,AfterContainer:2,ReplaceContainer:3,HideContainer:4}},ProtoAdViewabilityPolicy:{values:{Default:0,Strict:1}},ProtoSharingDestination:{values:{Facebook:0,Twitter:1,LinkedIn:2}},ProtoFloatingFixedPositionMode:{values:{Page:0,Element:1}},ProtoPositionMode:{values:{BottomRight:0,BottomLeft:1,TopRight:2,TopLeft:3,PinnedTop:4,PinnedBottom:5}},ProtoAdPlaybackMode:{values:{Autoplay:0,ScrollToPlay:1}},ProtoFloatingAppendLocationEnum:{values:{Above:0,Below:1,Within:2}},ProtoPlayerAdSkippability:{values:{IfLongerThan:0,Always:1,NoRestrictions:2}},ProtoVideoQuality:{values:{Auto:0,High1080p:1,High720p:2,Medium360p:3}},ProtoImplementationType:{values:{Web:0,Amp:1}},ProtoAdBreakTypeEnum:{values:{None:0,PreRoll:1,MidRoll:2,PostRoll:3}},ProtoAdSlotAdTypeEnum:{values:{SingleAd:0,AdPod:1}},ProtoPlayerSkippabilityType:{values:{AllowNonSkipAdsIfTheyAreShorterThan:0,RequireAdsToBeSkippable:1}},ProtoBandwidthLoggingEnum:{values:{Disabled:0,Enabled:1,SaaS:2}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}},ProtoCookieSecureModeEnum:{values:{Secure:0,Unsecure:1,Auto:2}},ProtoTrackerType:{values:{Image:0,Javascript:1,IAS:2}},ProtoTrackerTriggerType:{values:{Impression:0,Complete25Pc:1,Complete50Pc:2,Complete75Pc:3,ViewCompletion:4,VideoClick:5,Pause:6,Resume:7,Mute:8,Unmute:9}},ProtoCreativeTypeEnum:{values:{ThirdParty:0,MediaFile:1,Rtb:2,External:3,HeaderBidder:4,Tam:7,TamDeal:8,TamPrivateAuction:9}},ProtoResetCapTypeEnum:{values:{TimeCapping:0,ContentCapping:1,OpportunityCapping:2}},ProtoAdSlotsEnum:{values:{PreRoll:0,MidRoll:1,PostRoll:2}},ProtoLineItemPriority:{values:{House:0,Default:1,Preferred:2,Top:3}},ProtoAdSkipMode:{values:{IfLongerThan31Sec:0,Always:1,Never:2,NotAplicable:3}},ProtoAdType:{values:{Video:0,Overlay:1,Nonlinear:2}},ProtoChoiceCriteriaEnum:{values:{Only:0,Except:1}},ProtoLineItemAdBreakTypeEnum:{values:{All:1,SingleAd:2,AdPod:3}},ProtoLineItemTargetingTypeEnum:{values:{Only:0,Except:1}},ProtoLineItemAdSlotTargetingTypeEnum:{values:{SpecificSlots:1,Interval:2}},ProtoLineItemPauseAdOutOfViewEnum:{values:{Default:0,Strict:1}},ProtoLineItemContextualTargetingEnum:{values:{IncludeAny:0,IncludeAll:1,ExcludeAny:2,ExcludeAll:3}},ProtoSizeChoiceCriteriaEnum:{values:{GreaterThan:0,SmallerThan:1,Between:2}},ProtoPlayerOrientationTargetingEnum:{values:{Both:0,Portrait:1,Landscape:2}},ProtoLineItemSkippabilityType:{values:{AllowPublisherToDetermineSkippability:0,RequirePublisherToAllowNonSkipAdsShorterThan:1,NotApplicable:2}},ProtoContextualTargetingLevelEnum:{values:{Media:0,Page:1,Both:2}},FloorPriceBypassReasonEnum:{values:{MinCpm:0,FixedCpm:1,MaxBidPrice:2,VideoOrBannerMin:3,BidInHand:6,NoPredictionFound:7,StaticFactorUsed:8}},ProtoNonlinearRequestType:{values:{Banner:0,Video:1}},ProtoLineItemAbTestCase:{values:{CaseA:0,CaseB:1}},ProtoTrackType:{values:{ManualSubtitle:0,AutoGeneratedSubtitle:1,ClosedCaptions:2}},ProtoMediaTypeEnum:{values:{Image:0,Video:1}},ProtoSkipEnabledEnum:{values:{No:0,Yes:1}},LiveRampEnvelopeStatusEnum:{values:{Ok:0,EnvelopeExpired:1,Unauthorized:2}},ConnatixNoBidReasonEnum:{values:{RequestException:0,Timeout:1,EmptyResponse:2,InvalidResponse:3,NoBid:4,BidBelowFloor:5,DealIdMismatch:6,CsInvalidResponse:7,CsRequestException:8,CsEmptyResponse:9,NoLibInPage:11,BidIsNotTargetingAllowedEver:12}},PartnerNoBidReasonEnum:{values:{Unknown:0,TechnicalError:1,InvalidRequest:2,KnownWebSpider:3,SuspectedNonHumanTraffic:4,CloudIP:5,UnsupportedDevice:6,BlockedPublisher:7,UnmatchedUser:8,DailyReaderCapMet:9,DailyDomainCapMet:10}},ProtoAdBlockDetectionTypeEnum:{values:{Banner:0,Network:1}},ProtoAdClickTypeEnum:{values:{AdClick:1,AdClickThrough:2,AdSkipClick:3,VolumeClick:4,PauseClick:5,PlayClick:6,FullScreenClick:7,MuteClick:8,UnmuteClick:9,ExitFullScreenClick:10,AdUserClose:11}},ProtoAdsourceTypeEnum:{values:{Unknown:0,Vpaid:1,VastMedia:2,CnxMedia:3,Jw:4,Ima:5,AOL:6}},ProtoAuctionLossReasonEnum:{values:{TargetingMismatch:0,CompetitorPriority:1,AdOpportunityEnd:2}},ProtoGdprConsentModeEnum:{values:{Unknown:0,NoCmp:1,NoConsent:2,NoConnatixConsent:3,NotAllDemandConsent:4,AllGood:5}},ProtoAuctionPostbidReasonEnum:{values:{CreativeError:0,SDKFailure:1,UnsupportedMedia:2,TargetingMismatch:3,PlayerError:4}},ProtoHeavyAdBlockTypeEnum:{values:{Global:0,Script:1,VpaidIframe:2,OverlayIframe:3}},ProtoDemandTypeEnum:{values:{None:0,PMP:1,OpenMarket:2,SelfServed:3}},ProtoLiveRampEnum:{values:{None:0,ATS:1,NonATS:2}},ProtoMediaClickTypeEnum:{values:{Click:0,UrlClick:1,VolumeClick:2,PlayClick:3,PauseClick:4,NextClick:5,PreviousClick:6,MuteClick:7,UnmuteClick:8,CloseClick:9,ScrollClick:10,GalleryClick:11,SubtitleClick:12,FullScreenClick:13,ExitFullScreenClick:14}},ProtoQuartilesEnum:{values:{Start:0,First:1,Second:2,Third:3,Fourth:4}}})})?s.apply(i,n):s)||(t.exports=r)},7953:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.elements||(t.roots.elements=new t.Root)).addJSON({ProtoElementsRequest:{fields:{tokens:{rule:"repeated",type:"string",id:1},pageUrl:{type:"string",id:3},userId:{type:"string",id:5},forcePlayerId:{type:"string",id:7},forcePlaylistId:{type:"string",id:9},version:{type:"int32",id:10},forceLineItemIds:{rule:"repeated",type:"string",id:11},clientAb0:{type:"int32",id:12},clientAb1:{type:"int32",id:13},customParam1:{type:"string",id:16},customParam2:{type:"string",id:17},customParam3:{type:"string",id:18},forceExploration:{type:"bool",id:20},es6:{type:"bool",id:21},bundleId:{type:"string",id:22},forceSourceItemId:{type:"string",id:23},parseDomain:{type:"bool",id:24},implementationType:{type:"ProtoImplementationType",id:25},queryJsTargeting:{keyType:"string",type:"string",id:26},isConsentConnatix:{type:"bool",id:27,options:{default:!0}},reloadedPlayers:{keyType:"string",type:"string",id:29},disableTracking:{type:"bool",id:31},referrer:{type:"string",id:32},localTimestamp:{type:"int64",id:33},customParam4:{type:"string",id:34},customParam5:{type:"string",id:35},forceMediaIdList:{rule:"repeated",type:"string",id:36},servingRuleId:{type:"string",id:37},cnxDebug:{type:"bool",id:38},useMediaIdListAsPlaylist:{type:"bool",id:39}}},ProtoPlaylistItem:{oneofs:{qu:{oneof:["mediaContentVersionId"]},Hu:{oneof:["insightsRevisionNumber"]},zu:{oneof:["disableAdvertising"]}},fields:{mediaContentVersionId:{type:"string",id:3,options:{proto3_optional:!0}},insightsRevisionNumber:{type:"int32",id:4,options:{proto3_optional:!0}},disableAdvertising:{type:"bool",id:5,options:{proto3_optional:!0}},mediaId:{type:"string",id:1},revisionNumber:{type:"int32",id:2}}},ProtoElements:{fields:{playerId:{type:"string",id:1},playbackMode:{type:"ProtoPlayerPlaybackModeEnum",id:2},soundMode:{type:"ProtoPlayerSoundMode",id:3},upNextMode:{type:"ProtoPlayerUpNextMode",id:4,options:{default:1}},containerSelector:{type:"string",id:5},position:{type:"int32",id:6},insertPosition:{type:"ProtoPlayerInsertMode",id:7},forceInsertPath:{type:"bool",id:8},renderInFrame:{type:"bool",id:9},scrollHijackingProtection:{type:"bool",id:10},preRollBreak:{type:"int32",id:11},postRollBreak:{type:"int32",id:12},midRollNumber:{type:"int32",id:13,options:{default:-1}},timeBetweenAds:{type:"int32",id:14},minTimeBeforeFirstAd:{type:"int32",id:15},adViewabilityPolicy:{type:"ProtoAdViewabilityPolicy",id:16},responsive:{type:"bool",id:18},ratioWidth:{type:"int32",id:19},ratioHeight:{type:"int32",id:20},fixedWidth:{type:"int32",id:21},fixedHeight:{type:"int32",id:22},casting:{type:"bool",id:23},sharingDestinations:{rule:"repeated",type:"ProtoSharingDestination",id:24,options:{packed:!1}},closedCaption:{type:"bool",id:25},muteWatermark:{type:"bool",id:26},expandButton:{type:"bool",id:27},closeButtonMode:{type:"ProtoPlayerCloseButtonMode",id:28},floatingMode:{type:"ProtoPlayerFloatingMode",id:29},floatingDeviceMode:{rule:"repeated",type:"ProtoDeviceType",id:30,options:{packed:!1}},floatingCloseButtonMode:{type:"ProtoPlayerCloseButtonMode",id:31},floatingFixedPosition:{type:"ProtoFloatingFixedPositionMode",id:32},floatingPageElement:{type:"string",id:33},floatingUseElementWidth:{type:"bool",id:34},floatingScrollPosition:{type:"ProtoPositionMode",id:35},floatingGutterX:{type:"int32",id:36},floatingGutterY:{type:"int32",id:37},floatingWidth:{type:"int32",id:38},iconsColor:{type:"string",id:39},accentColor:{type:"string",id:40},tooltipTextColor:{type:"string",id:41},tooltipBackgroundColor:{type:"string",id:42},html:{type:"string",id:43},galleryStyle:{type:"ProtoGalleryStyleMode",id:45},logoPosition:{type:"ProtoLogoPositionMode",id:46},lineItems:{rule:"repeated",type:"ProtoLineItem",id:49},adPlaybackMode:{type:"ProtoAdPlaybackMode",id:50},css:{type:"string",id:51},sessionId:{type:"string",id:52},playlistId:{type:"string",id:53},playerType:{type:"ProtoElementsTypeEnum",id:54},outstreamInitialRendering:{type:"ProtoOutstreamInitialRenderingEnum",id:55},outstreamHouseBackgroundColor:{type:"string",id:56},outstreamTotalAdBreakLength:{type:"int32",id:57},outstreamEndAdBreakPolicy:{type:"ProtoOutstreamEndAdBreakPolicyEnum",id:58},galleryOrientation:{type:"ProtoGalleryOrientationEnum",id:59},playlist:{rule:"repeated",type:"ProtoPlaylistItem",id:60},floatingAppendLocation:{type:"ProtoFloatingAppendLocationEnum",id:61},floatingYAxisPadding:{type:"int32",id:62},customJsCode:{type:"string",id:63},videoQuality:{type:"ProtoVideoQuality",id:64},initializationSettingsJson:{type:"string",id:65},skipAdAfter:{type:"int32",id:67,options:{default:5}},adBreaks:{rule:"repeated",type:"ProtoAdBreak",id:68},amazonTamSlotId:{type:"string",id:69},midRollOnlyOnLongContent:{type:"bool",id:70,options:{default:!0}},limitClientSideApiUse:{type:"bool",id:71},abTestId:{type:"string",id:72},skipMin:{type:"int32",id:73,options:{default:31}},skippability:{type:"ProtoPlayerSkippabilityType",id:74},logoResource:{type:"string",id:76},nonlinearPlayerSettings:{type:"ProtoNonlinearPlayerSettings",id:77},displayAdCountdown:{type:"bool",id:78},bandwidthLoggingState:{type:"ProtoBandwidthLoggingEnum",id:79},prefetchOnPreroll:{type:"bool",id:80,options:{default:!0}},playlistThumbnail:{type:"string",id:81},playlistName:{type:"string",id:82},playlistDescription:{type:"string",id:83}}},ProtoElementsResponse:{oneofs:{Eu:{oneof:["lineItemAbTestInformation"]}},fields:{lineItemAbTestInformation:{type:"ProtoLineItemAbTestInformation",id:31,options:{proto3_optional:!0}},errorMessage:{type:"string",id:1},players:{rule:"repeated",type:"ProtoElements",id:10},browser:{type:"Browser",id:11},geoLocation:{type:"GeoLocation",id:12},lineItems:{rule:"repeated",type:"ProtoLineItem",id:13},cookieSyncUrls:{keyType:"int32",type:"string",id:14},explorationMode:{type:"bool",id:15},supplyChain:{type:"ProtoSupplyChain",id:17},secondLevelDomain:{type:"string",id:18},userInformation:{type:"ProtoUserInformation",id:20},serverAb0:{type:"int32",id:21},serverAb1:{type:"int32",id:22},isSeoTraffic:{type:"bool",id:23},apiHostUrl:{type:"string",id:24},publisherNetworkCode:{type:"string",id:26},iOSAppID:{type:"string",id:27},hashedPageUrl:{type:"string",id:28},bundleAbId:{type:"string",id:29},bundlePart:{type:"string",id:30},IASSegmentCodes:{rule:"repeated",type:"string",id:32},AmazonTamPubId:{type:"string",id:33}}},ProtoLineItemAdBreakTargeting:{fields:{adRollType:{type:"ProtoAdBreakTypeEnum",id:1},adBreakTypeEnum:{type:"ProtoLineItemAdBreakTypeEnum",id:2}}},ProtoLineItemAdPodTargeting:{fields:{targetingType:{type:"ProtoLineItemTargetingTypeEnum",id:1},adSlotTargetingType:{type:"ProtoLineItemAdSlotTargetingTypeEnum",id:2},adSlotPositions:{rule:"repeated",type:"int32",id:3,options:{packed:!1}}}},ProtoLineItemAdBreakSettings:{fields:{adBreakTargeting:{rule:"repeated",type:"ProtoLineItemAdBreakTargeting",id:1},adPodTargeting:{type:"ProtoLineItemAdPodTargeting",id:2}}},ProtoLineItem:{oneofs:{Tu:{oneof:["floorPricesNew"]}},fields:{floorPricesNew:{type:"ProtoFloorPricesNewModel",id:57,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},adTag:{type:"string",id:3},creativeType:{type:"ProtoCreativeTypeEnum",id:4},sound:{type:"bool",id:6},viewability:{type:"bool",id:7},impressionTimeSpent:{type:"int32",id:9},vendorId:{type:"string",id:10},trackers:{rule:"repeated",type:"CreativeTrackerViewModel",id:12},duration:{type:"int32",id:13},renditions:{rule:"repeated",type:"ProtoRendition",id:14},mediaCreativeId:{type:"string",id:15},ignoreFilledRequests:{type:"bool",id:16},requestCap:{type:"int32",id:17,options:{default:3}},impressionCap:{type:"int32",id:18},successRate:{type:"double",id:19},lineItemPriority:{type:"ProtoLineItemPriority",id:20},headerBidderTimeout:{type:"int32",id:22},mediaCreativeClickUrl:{type:"string",id:23},resetRequestsCapTime:{type:"int32",id:24,options:{default:60}},resetImpressionsCapTime:{type:"int32",id:25,options:{default:60}},resetCapType:{type:"ProtoResetCapTypeEnum",id:26},creativeHlsFileName:{type:"string",id:27},timeBetweenRequests:{type:"int32",id:28},skipMode:{type:"ProtoAdSkipMode",id:29},mediaIdTargeting:{type:"ProtoTargetingChoiceModel",id:30},mediaKeywordsTargeting:{type:"ProtoTargetingChoiceModel",id:31},mediaLanguageTargeting:{type:"ProtoTargetingChoiceModel",id:32},adType:{type:"ProtoAdType",id:33},overlayTime:{type:"int32",id:34,options:{default:30}},floorPrice:{type:"double",id:35},adBreakSettings:{type:"ProtoLineItemAdBreakSettings",id:36},bidRate:{type:"double",id:39},pauseAdOutOfView:{type:"ProtoLineItemPauseAdOutOfViewEnum",id:40},moatTrackingEnabled:{type:"bool",id:41},cnxCreativeId:{type:"string",id:42},blockedDomainsRevisionNumber:{type:"int32",id:44},advertiserContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:45},publisherContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:46},playerSizeTargetings:{type:"ProtoPlayerSizeTargetings",id:47},amazonDealId:{type:"string",id:48},playerOrientationTargeting:{type:"ProtoPlayerOrientationTargetingEnum",id:50},skipMin:{type:"int32",id:51,options:{default:6}},skippability:{type:"ProtoLineItemSkippabilityType",id:52},forceCallingInEveryAO:{type:"bool",id:53},networkExpiryTimeSeconds:{type:"int32",id:54,options:{default:21600}},nonlinearLineItemSettings:{type:"ProtoNonlinearLineItemSettings",id:55},prebidJsBidParamsJSONString:{type:"string",id:58},isPMP:{type:"bool",id:59},playerSize:{type:"string",id:101}}},ProtoTargetingChoiceModel:{fields:{choiceCriteria:{type:"ProtoChoiceCriteriaEnum",id:1},items:{rule:"repeated",type:"string",id:2}}},ProtoContextualTargetingCaseModel:{fields:{filters:{rule:"repeated",type:"ProtoContextualTargetingFilterModel",id:1}}},ProtoContextualTargetingFilterModel:{fields:{type:{type:"ProtoLineItemContextualTargetingEnum",id:1},level:{type:"ProtoContextualTargetingLevelEnum",id:3},hashedItemsIds:{rule:"repeated",type:"string",id:4}}},ProtoPlayerSizeTargetings:{fields:{sizeChoiceCriteria:{type:"ProtoSizeChoiceCriteriaEnum",id:1},minWidth:{type:"int32",id:2},maxWidth:{type:"int32",id:3}}},ProtoFloorPricesData:{oneofs:{Cu:{oneof:["floorPriceBypassReason"]}},fields:{floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:2,options:{proto3_optional:!0}},price:{type:"double",id:1}}},ProtoFloorPricesNewModel:{fields:{floorPrices:{rule:"repeated",type:"ProtoFloorPricesData",id:1},recommended:{type:"int32",id:2}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},ProtoRendition:{fields:{height:{type:"int32",id:1},codec:{type:"string",id:2},file:{type:"string",id:3}}},ProtoNonlinearLineItemSettings:{fields:{nonLinearRequestType:{type:"ProtoNonlinearRequestType",id:1},nonLinearAdTimeSeconds:{type:"int32",id:2,options:{default:15}}}},Browser:{fields:{browserVersion:{type:"string",id:1},browserType:{type:"string",id:2},osCode:{type:"string",id:3},device:{type:"ProtoDeviceType",id:4}}},GeoLocation:{fields:{countryGeoId:{type:"int32",id:1},cityId:{type:"int32",id:2},subdivisionId:{type:"int32",id:3},dmaId:{type:"int32",id:4},ip:{type:"string",id:5},lat:{type:"double",id:6},lon:{type:"double",id:7},zipcode:{type:"string",id:8}}},ProtoSupplyChain:{fields:{businessDomain:{type:"string",id:1},supplyChainId:{type:"string",id:3}}},ProtoUserInformation:{fields:{userId:{type:"string",id:1},lookupId:{type:"string",id:3},lookupResponseCode:{type:"int32",id:4},callFraudSensor:{type:"bool",id:5},publisherAdsTxt:{type:"string",id:6}}},ProtoAdBreak:{fields:{types:{rule:"repeated",type:"ProtoAdBreakTypeEnum",id:1,options:{packed:!1}},maxAdPodDuration:{type:"int32",id:2},maxAdSlotDuration:{type:"int32",id:3,options:{default:180}},numberOfAdSlots:{type:"int32",id:4,options:{default:1}}}},ProtoNonlinearPlayerSettings:{fields:{numberOfNonlinearAds:{type:"int32",id:1},timeSecondsBetweenNonlinear:{type:"int32",id:2,options:{default:5}},timeSecondsBetweenLinearAndNonlinear:{type:"int32",id:3}}},ProtoLineItemAbTestInformation:{fields:{guid:{type:"string",id:1},lineItemAbTestCase:{type:"ProtoLineItemAbTestCase",id:2}}},ProtoOutstreamInitialRenderingEnum:{values:{ExpandWithAd:0,FullyRendered:1}},ProtoOutstreamEndAdBreakPolicyEnum:{values:{Hide:0,HouseScreen:1,Loop:2}},ProtoGalleryStyleMode:{values:{None:0,Detailed:1,Visual:2}},ProtoLogoPositionMode:{values:{None:0,ControlBar:1,BottomRight:2,BottomLeft:3,TopRight:4,TopLeft:5,Center:6}},ProtoGalleryOrientationEnum:{values:{Landscape:0,Portrait:1}},ProtoElementsTypeEnum:{values:{InStream:0,OutStream:1,InStreamInApp:2,Live:3}},ProtoPlayerUpNextMode:{values:{Loop:0,Next:1,Stop:2}},ProtoCreativeTypeEnum:{values:{ThirdParty:0,MediaFile:1,Rtb:2,External:3,HeaderBidder:4,Tam:7,TamDeal:8,TamPrivateAuction:9}},ProtoResetCapTypeEnum:{values:{TimeCapping:0,ContentCapping:1,OpportunityCapping:2}},ProtoAdSlotsEnum:{values:{PreRoll:0,MidRoll:1,PostRoll:2}},ProtoLineItemPriority:{values:{House:0,Default:1,Preferred:2,Top:3}},ProtoAdSkipMode:{values:{IfLongerThan31Sec:0,Always:1,Never:2,NotAplicable:3}},ProtoAdType:{values:{Video:0,Overlay:1,Nonlinear:2}},ProtoChoiceCriteriaEnum:{values:{Only:0,Except:1}},ProtoLineItemAdBreakTypeEnum:{values:{All:1,SingleAd:2,AdPod:3}},ProtoLineItemTargetingTypeEnum:{values:{Only:0,Except:1}},ProtoLineItemAdSlotTargetingTypeEnum:{values:{SpecificSlots:1,Interval:2}},ProtoLineItemPauseAdOutOfViewEnum:{values:{Default:0,Strict:1}},ProtoLineItemContextualTargetingEnum:{values:{IncludeAny:0,IncludeAll:1,ExcludeAny:2,ExcludeAll:3}},ProtoSizeChoiceCriteriaEnum:{values:{GreaterThan:0,SmallerThan:1,Between:2}},ProtoPlayerOrientationTargetingEnum:{values:{Both:0,Portrait:1,Landscape:2}},ProtoLineItemSkippabilityType:{values:{AllowPublisherToDetermineSkippability:0,RequirePublisherToAllowNonSkipAdsShorterThan:1,NotApplicable:2}},ProtoContextualTargetingLevelEnum:{values:{Media:0,Page:1,Both:2}},FloorPriceBypassReasonEnum:{values:{MinCpm:0,FixedCpm:1,MaxBidPrice:2,VideoOrBannerMin:3,BidInHand:6,NoPredictionFound:7,StaticFactorUsed:8}},ProtoTrackerType:{values:{Image:0,Javascript:1,IAS:2}},ProtoTrackerTriggerType:{values:{Impression:0,Complete25Pc:1,Complete50Pc:2,Complete75Pc:3,ViewCompletion:4,VideoClick:5,Pause:6,Resume:7,Mute:8,Unmute:9}},ProtoPlayerPlaybackModeEnum:{values:{Autoplay:0,ScrollToPlay:1,ClickToPlay:2}},ProtoPlayerCloseButtonMode:{values:{Off:0,OnHover:1,OnHoverAfterFirstAd:2,AlwaysOn:3}},ProtoPlayerFloatingMode:{values:{Off:0,OnPageLoad:1,AfterInView:2,Always:3}},ProtoPlayerSoundMode:{values:{Mute:0,On:1,Hover:2}},ProtoPlayerInsertMode:{values:{WithinContainer:0,BeforeContainer:1,AfterContainer:2,ReplaceContainer:3,HideContainer:4}},ProtoAdViewabilityPolicy:{values:{Default:0,Strict:1}},ProtoSharingDestination:{values:{Facebook:0,Twitter:1,LinkedIn:2}},ProtoFloatingFixedPositionMode:{values:{Page:0,Element:1}},ProtoPositionMode:{values:{BottomRight:0,BottomLeft:1,TopRight:2,TopLeft:3,PinnedTop:4,PinnedBottom:5}},ProtoAdPlaybackMode:{values:{Autoplay:0,ScrollToPlay:1}},ProtoFloatingAppendLocationEnum:{values:{Above:0,Below:1,Within:2}},ProtoPlayerAdSkippability:{values:{IfLongerThan:0,Always:1,NoRestrictions:2}},ProtoVideoQuality:{values:{Auto:0,High1080p:1,High720p:2,Medium360p:3}},ProtoImplementationType:{values:{Web:0,Amp:1}},ProtoAdBreakTypeEnum:{values:{None:0,PreRoll:1,MidRoll:2,PostRoll:3}},ProtoAdSlotAdTypeEnum:{values:{SingleAd:0,AdPod:1}},ProtoPlayerSkippabilityType:{values:{AllowNonSkipAdsIfTheyAreShorterThan:0,RequireAdsToBeSkippable:1}},ProtoBandwidthLoggingEnum:{values:{Disabled:0,Enabled:1,SaaS:2}},ProtoNonlinearRequestType:{values:{Banner:0,Video:1}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}},ProtoLineItemAbTestCase:{values:{CaseA:0,CaseB:1}}})})?s.apply(i,n):s)||(t.exports=r)},3204:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 22"><path d="M26,22H0V0H31.93L32,16A6,6,0,0,1,26,22Z" style="fill:#ffc800;fill-rule:evenodd"/><path d="M12,5.29h0L16.45,16.7H14.83l-1.06-2.85H8.86l-1,2.85H6.21L10.6,5.31h0Zm5.89,11.42V5.29h3.63A5.52,5.52,0,0,1,26.65,11a5.33,5.33,0,0,1-4.93,5.7H17.89Zm1.46-1.36h2.17c1.77,0,3.7-1.49,3.7-4.35s-1.93-4.28-3.7-4.28H19.35Zm-8-8.16-2,5.24h3.86Z" style="fill-rule:evenodd"/></svg>\n'},1215:t=>{"use strict";t.exports='<svg viewBox = "0 0 22 22" class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ><path d="M18 5.4L16.6 4 11 9.6 5.4 4 4 5.4 9.6 11 4 16.6 5.4 18l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6z"/></svg>\n'},5522:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 73 18"><path d="M32.266 8.293c-.105.902-.439 1.6-1.002 2.092s-1.303.732-2.233.732c-1.008 0-1.816-.361-2.426-1.084s-.908-1.689-.908-2.9v-.82c0-.793.141-1.49.422-2.092s.688-1.062 1.207-1.383 1.121-.486 1.805-.486c.906 0 1.633.254 2.18.762s.865 1.203.955 2.098h-1.131c-.098-.68-.311-1.172-.639-1.477s-.779-.457-1.365-.457c-.719 0-1.283.266-1.693.797s-.609 1.287-.609 2.268v.826c0 .926.193 1.662.58 2.209s.928.82 1.623.82c.625 0 1.104-.141 1.436-.422s.559-.779.668-1.482h1.131zM34.815 11h-1.084V2h1.084v9zm1.453-3.229c0-.621.121-1.18.363-1.676s.586-.879 1.02-1.148a2.79 2.79 0 0 1 1.494-.404c.863 0 1.561.299 2.092.897s.803 1.393.803 2.385V7.9c0 .617-.119 1.172-.357 1.664a2.67 2.67 0 0 1-1.014 1.143c-.437.273-.941.41-1.512.41-.859 0-1.557-.299-2.092-.896s-.797-1.389-.797-2.373v-.076zm1.09.129c0 .703.162 1.268.486 1.693a1.57 1.57 0 0 0 1.312.639c.551 0 .988-.215 1.313-.645s.486-1.039.486-1.816c0-.695-.166-1.258-.498-1.687a1.56 1.56 0 0 0-1.312-.65c-.535 0-.967.213-1.295.639s-.492 1.035-.492 1.828zm9.732 1.418c0-.293-.111-.52-.334-.68s-.604-.305-1.154-.422-.982-.258-1.307-.422-.559-.359-.715-.586-.229-.496-.229-.809c0-.52.219-.959.656-1.318s1.004-.539 1.688-.539c.719 0 1.301.186 1.746.557s.674.846.674 1.424h-1.09c0-.297-.127-.553-.381-.768s-.566-.322-.949-.322c-.395 0-.703.086-.926.258a.81.81 0 0 0-.334.674c0 .262.104.459.311.592s.58.26 1.119.381.983.266 1.318.434.584.371.744.609a1.5 1.5 0 0 1 .246.861 1.63 1.63 0 0 1-.68 1.365c-.453.34-1.041.51-1.764.51-.508 0-.957-.09-1.348-.27s-.697-.43-.92-.75a1.84 1.84 0 0 1-.328-1.049h1.084c.02.363.164.652.433.867s.633.316 1.078.316c.41 0 .738-.082.984-.246a.77.77 0 0 0 .375-.668zm5.127 1.799c-.859 0-1.559-.281-2.098-.844s-.809-1.322-.809-2.267v-.199c0-.629.119-1.189.358-1.682s.578-.883 1.008-1.16a2.56 2.56 0 0 1 1.406-.422c.824 0 1.465.271 1.922.814s.686 1.32.686 2.332v.451h-4.295c.016.625.197 1.131.545 1.518s.797.574 1.336.574c.383 0 .707-.078.973-.234a2.44 2.44 0 0 0 .697-.621l.662.516c-.531.816-1.328 1.225-2.391 1.225zm-.135-5.684a1.44 1.44 0 0 0-1.102.481c-.297.316-.48.762-.551 1.336h3.176v-.082c-.031-.551-.18-.977-.445-1.277s-.625-.457-1.078-.457zM62.84 11c-.062-.125-.113-.348-.152-.668-.504.523-1.105.785-1.805.785-.625 0-1.139-.176-1.541-.527a1.71 1.71 0 0 1-.598-1.348c0-.66.25-1.172.75-1.535s1.211-.551 2.121-.551h1.055v-.498c0-.379-.113-.68-.34-.902s-.561-.34-1.002-.34c-.387 0-.711.098-.973.293s-.393.432-.393.709h-1.09c0-.316.111-.621.334-.914s.531-.531.914-.703.811-.258 1.272-.258c.73 0 1.303.184 1.717.551s.629.865.645 1.506v2.918c0 .582.074 1.045.223 1.389V11H62.84zm-1.799-.826c.34 0 .662-.088.967-.264s.525-.404.662-.686v-1.3h-.85c-1.328 0-1.992.389-1.992 1.166 0 .34.113.605.34.797s.517.287.873.287zm4.148-2.396c0-.973.23-1.754.691-2.344a2.18 2.18 0 0 1 1.811-.891c.742 0 1.33.254 1.764.762V2h1.084v9h-.996l-.053-.68c-.434.531-1.037.797-1.811.797a2.17 2.17 0 0 1-1.799-.902c-.461-.601-.691-1.387-.691-2.355v-.082zm1.084.123c0 .719.148 1.281.445 1.687s.707.609 1.23.609c.688 0 1.189-.309 1.506-.926V6.359a1.59 1.59 0 0 0-1.494-.896c-.531 0-.945.205-1.242.615s-.445 1.018-.445 1.822zM16 1.41L14.59 0 9 5.59 3.41 0 2 1.41 7.59 7 2 12.59 3.41 14 9 8.41 14.59 14 16 12.59 10.41 7 16 1.41z"/></svg>'},3669:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 22 22"><path d="M11 7c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /></svg>\n'},4670:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="2 2 20 20"><path d="M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3m-2 16H5V5h7V3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7h-2v7z"/></svg>'},1639:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 21H3V3h6v18zm12 0h-6V3h6v18z" fill-rule="evenodd"/></svg>\n'},834:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 4v16l16-8z" fill-rule="evenodd"/></svg>\n'},6263:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 21h3V3h-3v18zM3 21l14-9L3 3v18z" fill-rule="evenodd"/></svg>'}},i={},e,s,n,r,o;function h(e){var s=i[e];if(void 0!==s)return s.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return t[e].call(n.exports,n,n.exports,h),n.loaded=!0,n.exports}h.m=t,e=[],h.O=(t,i,s,n)=>{if(!i){var r=1/0;for(d=0;d<e.length;d++){for(var[i,s,n]=e[d],o=!0,a=0;a<i.length;a++)(!1&n||r>=n)&&Object.keys(h.O).every((t=>h.O[t](i[a])))?i.splice(a--,1):(o=!1,n<r&&(r=n));if(o){e.splice(d--,1);var c=s();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[i,s,n]},h.F={},h.E=t=>{Object.keys(h.F).map((i=>{h.F[i](t)}))},h.n=t=>{var i=t&&t.U?()=>t.default:()=>t;return h.d(i,{a:i}),i},n=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,h.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.U)return t;if(16&i&&"function"==typeof t.then)return t}var e=Object.create(null);h.r(e);var r={};s=s||[null,n({}),n([]),n(n)];for(var o=2&i&&t;"object"==typeof o&&!~s.indexOf(o);o=n(o))Object.getOwnPropertyNames(o).forEach((i=>r[i]=()=>t[i]));return r.default=()=>t,h.d(e,r),e},h.d=(t,i)=>{for(var e in i)h.o(i,e)&&!h.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},h.f={},h.e=t=>Promise.all(Object.keys(h.f).reduce(((i,e)=>(h.f[e](t,i),i)),[])),h.u=t=>"hls"===t?"hls.ab55e91cf2e7990a858b.js":"elements.ui"===t?t+".dfd4abd09357a3abb51a.js":void 0,h.miniCssF=t=>{},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),h.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r={},o="Connatix.Player:",h.l=(t,i,e,s)=>{if(r[t])r[t].push(i);else{var n,a;if(void 0!==e)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var l=c[d];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==o+e){n=l;break}}n||(a=!0,(n=document.createElement("script")).charset="utf-8",n.timeout=120,h.nc&&n.setAttribute("nonce",h.nc),n.setAttribute("data-webpack",o+e),n.src=t),r[t]=[i];var u=(i,e)=>{n.onerror=n.onload=null,clearTimeout(p);var s=r[t];if(delete r[t],n.parentNode&&n.parentNode.removeChild(n),s&&s.forEach((t=>t(e))),i)return i(e)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=u.bind(null,n.onerror),n.onload=u.bind(null,n.onload),a&&document.head.appendChild(n)}},h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"U",{value:!0})},h.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;h.g.importScripts&&(t=h.g.location+"");var i=h.g.document;if(!t&&i&&(i.currentScript&&(t=i.currentScript.src),!t)){var e=i.getElementsByTagName("script");e.length&&(t=e[e.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),h.p=t})(),(()=>{var t={"connatix.player":0,player:0};h.f.j=(i,e)=>{var s=h.o(t,i)?t[i]:void 0;if(0!==s)if(s)e.push(s[2]);else{var n=new Promise(((e,n)=>s=t[i]=[e,n]));e.push(s[2]=n);var r=h.p+h.u(i),o=new Error;h.l(r,(e=>{if(h.o(t,i)&&(0!==(s=t[i])&&(t[i]=void 0),s)){var n=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;o.message="Loading chunk "+i+" failed.\n("+n+": "+r+")",o.name="ChunkLoadError",o.type=n,o.request=r,s[1](o)}}),"chunk-"+i,i)}},h.F.j=i=>{if(!h.o(t,i)||void 0===t[i]){t[i]=null;var e=document.createElement("link");h.nc&&e.setAttribute("nonce",h.nc),e.rel="prefetch",e.as="script",e.href=h.p+h.u(i),document.head.appendChild(e)}},h.O.j=i=>0===t[i];var i=(i,e)=>{var s,n,[r,o,a]=e,c=0;if(r.some((i=>0!==t[i]))){for(s in o)h.o(o,s)&&(h.m[s]=o[s]);if(a)var d=a(h)}for(i&&i(e);c<r.length;c++)n=r[c],h.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return h.O(d)},e=self.cnx_webpack_global=self.cnx_webpack_global||[];e.forEach(i.bind(null,0)),e.push=i.bind(null,e.push.bind(e))})(),h.O(0,["connatix.player"],(()=>{h.E("hls")}),5);var a={};(()=>{"use strict";h(8660);var t,i=h(7945),e=h(9791),s=h(51),n=h(4798),r=h(3020),o=h(277);!function(t){t.connatix="connatix.com",t.elements="elements.video"}(t||(t={}));const a={[t.connatix]:"cnx",[t.elements]:"cnxel"};const c=function(i){if(!i||!(0,r.NN)(i))return(0,o.n)({message:"Prerender_Elements_getBundleDomain_no_currentScript",level:o.D.CRITICAL}),null;const e=i.src;return e.includes(t.elements)?t.elements:e.includes(t.connatix)?t.connatix:((0,o.n)({message:"Prerender_Elements_getBundleDomain_unkown_src",level:o.D.CRITICAL}),null)}(window.document.currentScript);let d=`//cds.${c}/p/${i.g.version}/`;const l=(0,s.Ph)("cnxEnv",(0,e.pE)(window).topFrame.location.href);(0,n.QM)(l)&&(d=`//cd-${l}.${c}/`),h.p=d;const u=d;var p,f=h(7269),m=(h(7175),h(289)),v=h(8049),g=h(5701),y=h(5227),b=h(5650),I=h(8983),w=h(3802);!function(t){t.Deprecation="deprecation",t.Intervention="intervention",t.Crash="crash"}(p||(p={}));class _{constructor(t,i,e){this.Di=t,this.Wu=i,this.th=e,this.Gu=!1,this.Qu=!1,this.Ju=()=>{"hidden"===this.Di.document.visibilityState&&this.Xu()},this.Xu=()=>{if(this.Gu||!this.Yu)return;const t=this.Yu.takeRecords();this.Ku(t),this.Gu=!0},this.Ku=t=>{t.filter((({body:t})=>"HeavyAdIntervention"===(null==t?void 0:t.id))).forEach((()=>{const{heavyAdBlockTypeEnum:t,advertiserLineItemId:i}=this.Wu;this.th.heavyAd.next({type:w.EN.fromProtoHeavyAdType(t),advertiserLineItemId:i})}))},this.Id()}destroy(){this.Qu&&(this.Di.removeEventListener("pagehide",this.Xu),this.Di.removeEventListener("visibilitychange",this.Ju))}Zu(){return!!this.Di.ReportingObserver}Id(){this.Zu()&&(this.Qu=!0,this.Yu=new this.Di.ReportingObserver((t=>{this.Ku(t)}),{buffered:!0,types:[p.Intervention]}),this.Yu.observe(),this.Di.addEventListener("pagehide",this.Xu),this.Di.addEventListener("visibilitychange",this.Ju))}}var S=h(3094),P=h(9741);class A extends g._{constructor(t,i,e,s,n,r,o,h,a,c,d){super(),this.mediator=t,this.playerModel=i,this.app=e,this.ep=s,this._appSettings=n,this.Ud=r,this.th=o,this.ih=h,this.sl=a,this.sp=c,this.np=d,this.macroElements={player:[]},this.rp=!1,this.op={description:"{{description}}",title:"{{title}}",player:"{{player}}"},this.ap=null,this.dp=500,this.createExperience(i,n),this.lp=new _(i.global,{heavyAdBlockTypeEnum:m.ProtoHeavyAdBlockTypeEnum.Global},this.th),this.up=new _(window,{heavyAdBlockTypeEnum:m.ProtoHeavyAdBlockTypeEnum.Script},this.th)}subscribeToEvents(){this.subscribe(y.Uh.Destroy,this.experience,(()=>{this.destroy()})),this.subscribe(y.Uh.CanStart,this.experience,(()=>{this.experience.start()})),this.subscribe(y.Xh.SessionRendered,this.experience,(()=>{this.ep.wasPlayerReloaded||this.Ud.sessionRendered.next({isBannerBlocked:S._.isBannerBlocked,sdkVersion:this._appSettings.sdkVersion}),this.mediator.publish(this,y.Xh.SessionRendered)})),this.subscribe(y.Xh.SessionView,this.experience,(()=>{this.ep.wasPlayerInView||(this.Ud.sessionView.next(),this.mediator.publish(this,y.Xh.SessionView))})),Object.values(this.experience.events).forEach((t=>{this.subscribe(t,this.experience,(i=>{this.experienceApi.trigger(t,i.payload)}))}))}updateMacroContent(t,i){t&&t.forEach((t=>{t.textContent=i}))}ss(){this.playerModel.css&&this.app.services.GlobalDomUtilsService.addCssString(this.playerModel.css,`cnx-custom-css-${this.app.config.appId}`)}pp(t){return`<cnx>${t}</cnx>`.replace(/{\{([^}]+)}}/g,"<cnx-span>$&</cnx-span>")}fp(){if(this.experienceContainer=this.mp(),this.playerModel.html){const t=this.app.services.GlobalDomUtilsService.createElementByString(this.pp(this.playerModel.html));this.vp(t);const i=this.macroElements.player[0];if(!i)throw Error("player macro was not found");i.innerHTML="",i.parentNode.insertBefore(this.experienceContainer,i),i.parentNode.removeChild(i);(0,b.Sz)(t.children).forEach((t=>{this.playerModel.targetContainer.parentNode.insertBefore(t,this.playerModel.targetContainer)}))}else this.playerModel.targetContainer.parentNode.insertBefore(this.experienceContainer,this.playerModel.targetContainer);this.playerModel.targetContainer.parentElement.removeChild(this.playerModel.targetContainer)}mp(){const t=this.app.config.isMobile?I.s6.Mobile:I.s6.Desktop;return this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${I.sN.MainContainer} ${t} ${this.gp}"></cnx>`)}vp(t){(0,b.Sz)(t.children).forEach((t=>{t.children.length>0&&this.vp(t),Object.keys(this.op).forEach((i=>{const e=this.op[i];t.textContent.includes(e)&&this.yp(i,t)}))}))}yp(t,i){this.macroElements[t]||(this.macroElements[t]=[]),this.macroElements[t].push(i),i.textContent=""}bp(){null!==this.ap&&(clearInterval(this.ap),this.ap=null)}init(t){this.ss(),this.fp();const i=this.app.config.device;return this.isSupportedBreakpoint(i)?(this.subscribeToEvents(),this.experience.renderExperience(this.playerModel,this.app,this.experienceContainer,t),this.ap=setInterval((()=>{this.rp?this.bp():this.app.services.GlobalDomUtilsService.isDetachedFromDOM(this.experienceContainer)&&(this.destroy(),(0,o.n)({message:"player_removed_from_DOM",level:o.D.INFO}))}),this.dp),!0):(this.destroy(),!1)}getApiMethods(){return this.experienceApi.getApiMethods()}get playerContainer(){return this.experienceContainer}onReady(){return this.experience.onReady()}destroy(){var t;try{P.S.playerDestroyed=!0,this.rp=!0,this.bp(),null===(t=this.np)||void 0===t||t.destroy(),this.app.services.ResizeObserver.destroy(),this.app.services.ViewabilityService.destroy(),this.app.services.InteractionService.destroy(),this.experienceApi.setDestroyed(),this.unsubscribeAll(this.experience),this.experience&&(this.experience.destroy(),this.experience=null),this.experienceContainer.parentNode&&this.experienceContainer.parentNode.removeChild(this.experienceContainer),this.lp.destroy(),this.up.destroy()}catch(t){(0,o.n)({callStack:t.stack,level:o.D.WARN,message:"Renderer_destroy",exception:t.message})}}}var x=h(8532),k=h(9490);const T={imageMaxHeight:160,ratioWidth:16,ratioHeight:9};class C{constructor(t,i,e,s,n=1200){this.wp=t,this._p=i,this.Sp=e,this.Pp=s,this.Ap=n,this.xp=null,this.kp=!1,this.Cp=()=>{if(this.Ep(),!this.kp&&this._p&&this._p.linearAdInWin)return this.kp=!0,void this.Mp(this.Ap);this.wp.startContent()}}destroy(){this.Ep()}changeState(t){switch(t){case k.Ez.PrerollState:this.kp=!1,this.Mp(this.Sp);break;case k.Ez.PostrollState:this.kp=!1,this.Mp(this.Pp);break;default:this.xp&&this.Ep()}}setPreRollBreak(t){this.Sp=t}setPostRollBreak(t){this.Pp=t}Ep(){clearTimeout(this.xp),this.xp=null}Mp(t){this.Ep(),this.xp=setTimeout(this.Cp,t)}}var E,M,L=h(8211),B=h(7994),O=h(8576),R=h(6716);!function(t){t.enter="enterFullscreen",t.exit="exitFullscreen"}(E||(E={}));class D{constructor(t,i,e){if(this.Lp=t,this.Si=e,this.Op=!1,this.Rp=1e3,this.Dp=!0,this.Vp=new R.x,this.jp=new R.x,this.Fp=!1,this.Np=()=>{this.Op&&this.$p()},this.qp=t=>{this.Op?null!==this.fullscreenElement?this.$p():this.zp():this.Vp.next(E.exit)},this.zp=()=>{this.Fp=!1,this.Wp.reject(),this.Op=!1,clearTimeout(this.Gp)},this.Qp=this.Lp.hasIosFullscreenBehaviour(e)?i.getElementsByTagName("video")[0]:i,!this.Qp)throw new Error("element is missing");try{const t=this.Jp();if(null==t)return void(this.Dp=!1);this.Xp=t.keys,this.Yp=t.name,this.Zp()}catch(t){this.Dp=!1,(0,o.n)({message:"Fullscreen init failed",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}Jp(){let t;return t=this.Lp.hasIosFullscreenBehaviour(this.Si)?this.Lp.getFullscreenKeys(this.Qp):this.Lp.getFullscreenKeys(),t}get fullscreenElement(){return this.Lp.getDocumentProperty(this.Xp.fullscreenElement)}get fullscreenEnabled(){return this.Lp.getDocumentProperty(this.Xp.fullscreenEnabled)}enterFullScreen(){if(this.Dp){this.Wp=new B.C,this.Op=!0,clearTimeout(this.Gp),this.Gp=setTimeout(this.zp,this.Rp);try{this.Qp[this.Xp.requestFullscreen]()}catch(t){this.zp()}return this.Wp.promise}}exitFullScreen(){try{this.Lp.exitFullscreen(this.Xp.exitFullscreen,this.Si===L.M.Ios?this.Qp:void 0)}catch(t){(0,o.n)({message:"fullscreen_exit",exception:t.message,callStack:t.stack,level:o.D.WARN})}this.Fp=!1}Zp(){this.Yp===O.do.Moz||this.Yp===O.do.Ms?(this.Lp.addEventListenerOnGlobal(this.Xp.fullscreenchange,this.qp),this.Lp.addEventListenerOnGlobal(this.Xp.fullscreenerror,this.zp)):(this.Qp.addEventListener(this.Xp.fullscreenchange,this.qp),this.Qp.addEventListener(this.Xp.fullscreenerror,this.zp)),this.Lp.hasIosFullscreenBehaviour(this.Si)&&(this.Qp.addEventListener("webkitbeginfullscreen",this.Np),this.Qp.addEventListener("webkitendfullscreen",this.qp))}tf(){this.Yp===O.do.Moz||this.Yp===O.do.Ms?(this.Lp.removeEventListenerOnGlobal(this.Xp.fullscreenchange,this.qp),this.Lp.removeEventListenerOnGlobal(this.Xp.fullscreenerror,this.zp)):(this.Qp.removeEventListener(this.Xp.fullscreenchange,this.qp),this.Qp.removeEventListener(this.Xp.fullscreenerror,this.zp)),this.Si===L.M.Ios&&(this.Qp.removeEventListener("webkitbeginfullscreen",this.Np),this.Qp.removeEventListener("webkitendfullscreen",this.qp))}$p(){this.Fp=!0,this.jp.next(E.enter),this.Wp.resolve(),this.Op=!1,clearTimeout(this.Gp)}get isFullscreen(){return this.Fp}get onFullScreenExit(){return this.Vp.asObservable()}get onFullScreenEnter(){return this.jp.asObservable()}destroy(){this.isFullscreen&&this.exitFullScreen(),this.tf(),this.Wp&&this.Wp.isPending&&this.Wp.reject()}}!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(M||(M={}));class V{constructor(t,i){switch(this.mediator=t,this.inView=!1,this.if=!1,this.ef=!1,this.sf=!1,this.nf=()=>{},i){case m.ProtoPlayerPlaybackModeEnum.Autoplay:this.rf(this.hf);break;case m.ProtoPlayerPlaybackModeEnum.ClickToPlay:this.rf(this.af);break;case m.ProtoPlayerPlaybackModeEnum.ScrollToPlay:this.rf(this.cf)}}rf(t){this.nf=()=>{this.if||t.call(this)}}hf(){this.sf&&!this.ef&&this.inView&&(this.ef=!0,this.mediator.publish(this,M[M.Play]))}cf(){this.sf&&(this.df&&(this.lf=this.volume),this.inView||this.Fp&&!this.inView?(this.mediator.publish(this,M[M.Play],{payload:{volume:this.lf}}),this.lf=null):(this.lf=this.volume,this.mediator.publish(this,M[M.Pause],{payload:{volume:0}})))}af(){}setViewability(t){this.inView=t,this.nf()}setIsAppBackgrounded(t){this.df=t}setSoundVolume(t){this.volume=t}setUserPlayback(t){!this.ef&&t&&(this.ef=t),this.if=!t}setCanPlay(t){this.sf=t,this.if||!this.inView&&!this.ef||this.nf()}setIsFullscreen(t){this.Fp=t}}var j,F=h(9762),N=h(4967);!function(t){t.PreRoll="pre-roll",t.MidRoll="mid-roll",t.PostRoll="post-roll"}(j||(j={}));const U=j;var $,q,H=h(9600),z=h(9209),W=h(9361);!function(t){t[t.DirectionIn=0]="DirectionIn",t[t.DirectionOut=1]="DirectionOut",t[t.FadeIn=2]="FadeIn"}($||($={})),function(t){t.Float="float",t.Embed="embed"}(q||(q={}));const G=.5;var Q,J=h(9357),X=h(274);!function(t){t[t.None=0]="None",t[t.Portrait=1]="Portrait",t[t.Landscape=2]="Landscape"}(Q||(Q={}));var Y,K,Z,tt=h(5356);!function(t){t.PARALLEL_CALLS_DEFAULT=5,t.PARALLEL_WINS_DEFAULT=10,t.MAX_WINS_DEFAULT=-1,t.DEFAULT_DESIRED_BITRATE=1,t.REMOVE_BIDS_DEFAULT=!1,t.MID_SESSION_PREFETCH_MINIMUM_TIME=1e4,t.NON_LINEAR_MAX_HEIGHT_PERCENT=20,t.NON_LINEAR_MAX_WIDTH_PERCENT=80,t.DEFAULT_MAX_AD_DURATION=180}(Y||(Y={}));class it{constructor(t){this.uf=t,this.pf={breakType:m.ProtoAdBreakTypeEnum.None,currentPodNumber:0,maxAdSlotDuration:0,maxAdPodDuration:0,totalNumberOfAdSlots:0},this.ff=null}get adBreaks(){return this.uf}setNewBreak(t){this.uf.forEach((i=>{i.types.forEach((e=>{(0,tt.xm)(e,t)&&(this.pf.currentPodNumber=i.numberOfAdSlots,this.pf.maxAdSlotDuration=i.maxAdSlotDuration,this.pf.maxAdPodDuration=i.maxAdPodDuration,this.pf.totalNumberOfAdSlots=i.numberOfAdSlots)}))}))}adStarted(){this.vf(),0===this.pf.currentPodNumber&&(this.pf.currentPodNumber=this.pf.totalNumberOfAdSlots),this.pf.currentPodNumber--}endPod(){this.vf(),this.pf.currentPodNumber=0}enterPodTimeout(t){this.vf(),this.ff=setTimeout((()=>{this.vf(),t()}),k.Qg)}isInAdPod(){return this.pf.currentPodNumber>0}isCurrentBreakInPod(){return this.pf.totalNumberOfAdSlots>1}getMaxAdSlotDuration(){return this.pf.maxAdSlotDuration}getMaxAdPodDuration(){return this.pf.maxAdPodDuration}getMaxAdSlotPossibleDuration(){let t=0;for(let i=0;i<this.uf.length;i++){if(0===this.uf[i].maxAdSlotDuration)return 0;t=Math.max(t,this.uf[i].maxAdSlotDuration)}return t}getCurrentSlotIndex(){return this.pf.totalNumberOfAdSlots-this.pf.currentPodNumber}getNextSlotIndex(){const t=this.getCurrentSlotIndex();return this.pf.totalNumberOfAdSlots>t?t+1:1}getTotalNumberOfSlots(){return this.pf.totalNumberOfAdSlots}isInPodTimeout(){return!!this.ff}getAdBreakState(t){if(!(0,n.$K)(t))return this.gf();const{adSlotDuration:i,adBreakType:e}=t;return{isAdPodBreak:this.isCurrentBreakInPod(),adPodSlotIndex:this.isCurrentBreakInPod()?this.getNextSlotIndex():0,maxAdDuration:Math.round(this.getMaxAdSlotDuration()/J.s_||Y.DEFAULT_MAX_AD_DURATION),remainingAdDuration:Math.round(i/J.s_),sessionMaxAdDuration:Math.round(this.getMaxAdSlotPossibleDuration()/J.s_),adBreakType:e}}gf(){let t=m.ProtoAdBreakTypeEnum.MidRoll;this.adBreaks.forEach((i=>{i.types.some((t=>t===m.ProtoAdBreakTypeEnum.PreRoll))&&(t=m.ProtoAdBreakTypeEnum.PreRoll)}));const i=this.getMaxAdSlotDuration();return this.getAdBreakState({adSlotDuration:i,adBreakType:t})}vf(){clearTimeout(this.ff),this.ff=null}}!function(t){t.ShowLinearEvent="showLinearEvent",t.HideLinearEvent="hideLinearEvent",t.PauseLinearEvent="pauseLinearEvent",t.ResumeLinearEvent="resumeLinearEvent",t.SkipLinearEvent="skipLinearEvent"}(K||(K={})),function(t){t.ShowNonLinearEvent="showNonLinearEvent",t.HideNonLinearEvent="hideNonLinearEvent"}(Z||(Z={}));const et="midRollCapped",st="totalAdBreakDurationExpired",nt="enableLinearAds",rt="disableLinearAds",ot="ForceStopAdSlot",ht="ForceStopAdPod",at="linearAdOpportunity",ct="AdPodRemainingTime",dt="disableNonLinearAds",lt="enableNonLinearAds",ut="disableAdvertising",pt="enableAdvertising",ft="enterCuePoint",mt="exitCuePoint",vt="canPrefetchAds";class gt{constructor(t,i,e,s){this.yf=t,this.bf=s,this.If=this.wf(e,i)}wf(t,i){return Object.assign({},t[i]||t[m.ProtoDeviceType.Smartphone])}updateWidth(t){const i=this.Sf(t);i!==this.currentBreakpointClass&&((0,r.IV)(this.yf,this.currentBreakpointClass),(0,r.cn)(this.yf,i),this.currentBreakpointClass=i)}Sf(t){switch(!0){case t>=this.If.xxl:return this.bf.Xxl;case t>=this.If.xl:return this.bf.Xl;case t>=this.If.lg:return this.bf.Lg;case t>=this.If.md:return this.bf.Md;case t>=this.If.sm:return this.bf.Sm;case t>=this.If.xs:return this.bf.Xs;default:return this.bf.Xxs}}}class yt{constructor(t,i,e,s,n,r=0){this.Pf=t,this.vi=i,this.yf=e,this.Af=s,this.In=n,this.xf=r,this.kf=void 0,this.Tf=null,this.Cf=!1,this.Ef=()=>{if(!this.kf||!this.Mf)return;const t=this.Lf(),i=!!this.Mf;this.Bf(t,i)},this.Rf=()=>{var t;if(this.Df()&&(this.vi.width=null===(t=this.Mf)||void 0===t?void 0:t.clientWidth),this.Vf(),this.kf){const t=!1,i=this.Lf();this.Bf(i,t)}},this.Vf=()=>{this.jf()?!this.Ff||this.kf||this.Cf?this.Nf():this.Uf():this.kf&&this.$f()},this.qf=t=>{if(this.Hf(t.propertyName))switch(this.transitionState){case $.DirectionIn:this.transitionState=void 0,this.zf();break;case $.DirectionOut:this.transitionState=void 0,this.Wf();break;case $.FadeIn:this.transitionState=void 0,this.Gf()}},this.Qf=i.floatingScrollPosition}get transitionState(){return this.Jf}set transitionState(t){this.Jf===$.FadeIn&&this.Yf(I.jG.FadeInBase,I.jG.FadeIn),this.Jf=t}Kf(...t){(0,r.cn)(this.yf,...t)}Yf(...t){(0,r.IV)(this.yf,...t)}Nf(){this.Af!==m.ProtoDeviceType.Smartphone&&(this.yf.style.width=`${this.vi.width}px`);let t=this.yf.getBoundingClientRect().width;if(this.vi.isPinnedFloating){const i=.65*t;t=Math.min(i,435)}this.yf.style.height=this.vi.getHeight(t)}Zf(){return(0,b.d3)(this.Af,this.vi.floatingDeviceMode)}tm(){this.In.addEventListenerOnGlobal("scroll",this.Ef)}im(){this.In.removeEventListenerOnGlobal("scroll",this.Ef)}nm(){this.Mf=this.In.querySelector(this.vi.pageElement),this.Mf&&(clearInterval(this.Tf),this.vi.width=this.Mf.clientWidth,this.Vf(),this.Pf.on(this.Mf,this.Rf))}rm(){var t,i;const e=null===(t=this.Mf)||void 0===t?void 0:t.getBoundingClientRect().top;return this.vi.appendLocation===m.ProtoFloatingAppendLocationEnum.Above?e-this.yf.offsetHeight-this.vi.floatingYAxisPadding:this.vi.appendLocation===m.ProtoFloatingAppendLocationEnum.Below?e+(null===(i=this.Mf)||void 0===i?void 0:i.offsetHeight)+this.vi.floatingYAxisPadding:e}om(){this.Tf=setInterval((()=>{this.nm()}),500),this.nm()}Df(){return this.vi.floatingPosition===m.ProtoFloatingFixedPositionMode.Element}Hf(t){switch(this.transitionState){case $.DirectionIn:case $.DirectionOut:if("transform"===t)return!0;break;case $.FadeIn:if("opacity"===t)return!0}return!1}hm(){this.yf.style.top="",this.yf.style.bottom="",this.yf.style.left="",this.yf.style.right="",this.yf.style.width="",this.yf.style.height="",this.yf.style.transform=""}Wf(){this.kf=!1,this.Yf(I._7.MainClass,I._7.TransitionClass),this.hm(),this.am()}Bf({x:t,y:i},e){this.dm(e);const s=()=>this.yf.style.transform=`translate(${t}px, ${i}px)`;e?(this.In.cancelRequestAnimationFrame(this.lm),this.lm=null,this.lm=this.In.requestAnimationFrameHelper((()=>{s()}))):s()}dm(t){t?this.Kf(I._7.TransitionClass):this.Yf(I._7.TransitionClass)}Lf(){let t,i;if(this.Df()&&this.Mf){this.um();const e=this.vi.isPositionedLeft?this.vi.floatingGutterX:-this.vi.floatingGutterX;t=this.In.getElementCoordinates(this.Mf).clientX+e;const s=this.rm();return i=s<this.vi.floatingGutterY?this.vi.floatingGutterY:s,{x:t,y:i}}if(this.vi.isPinnedFloating)t=0,i=this.vi.isPositionedPinnedTop?this.vi.floatingGutterY:-this.vi.floatingGutterY;else{if(this.vi.isPositionedLeft)t=this.vi.floatingGutterX;else{t=this.In.getViewportWidth()-this.yf.offsetWidth-this.vi.floatingGutterX}if(this.vi.isPositionedTop)i=this.vi.floatingGutterY;else{i=this.In.getViewportHeight()-this.yf.offsetHeight-this.vi.floatingGutterY}}return{x:t,y:i}}pm(){const t=(this.vi.floatingWidth||1e3)+20,i=this.In.getViewportWidth();return this.vi.isPositionedLeft?-t:i+t}jf(){return(0,r.LT)(this.yf).document.body.getBoundingClientRect().width>=this.xf}Uf(){if(!this.fm())return;this.Df()&&this.tm(),this.kf=!0,this.transitionState=$.DirectionIn,this.Kf(I._7.MainClass),this.Nf(),this.addPinnedCssClasses();const t=this.Lf(),i=this.pm();this.vm(),this.Bf({x:i,y:t.y},!1),(0,r.Tp)(this.yf);this.Bf(t,!0)}addPinnedCssClasses(){this.Yf(I._7.PinnedFloating),this.Yf(I._7.PinnedTopFloating),this.Yf(I._7.PinnedBottomFloating),this.vi.isPinnedFloating&&(this.Kf(I._7.PinnedFloating),this.Kf(this.Qf===m.ProtoPositionMode.PinnedTop?I._7.PinnedTopFloating:I._7.PinnedBottomFloating))}fm(){return!!this.jf()&&!(this.Df()&&(!this.Mf||this.Mf&&0===this.Mf.clientWidth))}um(){this.Mf&&(this.In.getElementCoordinates(this.Mf).clientX<this.In.getBodyDimensions().width/2?(this.vi.isPositionedLeft=!0,this.vi.isPositionedRight=!1):(this.vi.isPositionedLeft=!1,this.vi.isPositionedRight=!0))}$f(t=!0){t&&(this.transitionState=$.DirectionOut),this.Df()&&this.im(),this.gm();const{y:i}=this.Lf(),e=this.pm();this.Bf({y:i,x:e},t),t||this.Wf()}bm(){this.yf.addEventListener("transitionend",this.qf);const t=this.In.getGlobalClosestTop().topFrame;this.Pf.on(this.yf,this.Vf),this.Pf.on(t.document.body,this.Rf),t.addEventListener("resize",this.Rf),this.Df()&&this.om()}Im(){this.Pf.off(this.yf,this.Vf),this.yf.removeEventListener("transitionend",this.qf);const t=this.In.getGlobalClosestTop().topFrame;this.Pf.off(t.document.body,this.Rf),t.removeEventListener("resize",this.Rf),this.Mf&&(this.Pf.off(this.Mf,this.Rf),this.im(),clearInterval(this.Tf))}wm(t){this.Qf=t.scrollPosition,this.addPinnedCssClasses(),void 0!==t.scrollPosition&&(this.vi.setScrollPosition(t.scrollPosition),this.vi.isPositionedPinnedBottom||this.vi.isPositionedPinnedTop?this.vi.setExtraHeight(0):this.vi.setExtraHeight(this.vi.cachedExtraHeight)),(null==t?void 0:t.floatingWidth)&&(this.vi.width=t.floatingWidth),(null==t?void 0:t.floatingGutterX)&&(this.vi.gutterX=t.floatingGutterX),(null==t?void 0:t.floatingGutterY)&&(this.vi.gutterY=t.floatingGutterY)}getFloatingSettings(){return this.vi.getFloatingSettings()}get isInFloating(){return this.kf}get scrollPosition(){return this.Qf}}class bt extends yt{constructor(t,i,e,s,n,r=0){super(t,e,i,s,n,r),this.Ff=!0,this._m=new R.x}get onFloatingEnterStop(){return this._m.asObservable()}vm(){}zf(){this._m.next()}gm(){}am(){}Gf(){}start(){this.Zf()&&(this.Kf(I._7.AlwaysFloating),super.bm(),super.Uf())}setFloatingSettings(t){this.wm(t),this.start()}getFloatingSettings(){return super.getFloatingSettings()}}class It extends yt{constructor(t,i,e,s,n,r,o,h=0){super(e,n,s,r,o,h),this.Pm=t,this.sl=i,this.Am=!0,this.km=!0,this.Tm=!0,this.Cm=!1,this.Em=!1,this.Ff=!1,this.Mm=new R.x,this._m=new R.x,this.Lm=new R.x,this.Bm=new R.x,this.Om=t=>{const i=this.sl.isPageInFocus;t&&this.isInFloating&&(this.Ff=!1,this.$f()),this.Am&&this.vi.floatingMode===m.ProtoPlayerFloatingMode.AfterInView&&t&&(this.Am=!1),!t&&!this.Am&&this.km&&i&&(this.Ff=!0,super.Uf())},this.Nf=()=>{this.isInFloating&&super.Nf()}}get onFloatingEnterStart(){return this.Mm.asObservable()}get onFloatingEnterStop(){return this._m.asObservable()}get onFloatingExitStart(){return this.Lm.asObservable()}get onFloatingExitStop(){return this.Bm.asObservable()}isFloatingModeEnabled(){return this.Am&&(this.enabled=!1),this.enabled}enableFloatingMode(){this.Tm=!0,this.Em=!1,this.forceEnableFloatingMode()}disableFloatingMode(){this.Tm=!1,this.forceDisableFloatingMode()}forceEnableFloatingMode(){this.Em||(this.Am=!1,this.km=!0,this.start())}forceDisableFloatingMode(){this.km=!1,this.destroy()}setFloatingSettings(t){this.wm(t),this.start()}getFloatingSettings(){return super.getFloatingSettings()}$f(){const t=!this.Cm;super.$f(t)}gm(){this.Lm.next()}am(){this.Rm()}vm(){this.Mm.next()}Rm(){this.transitionState=$.FadeIn,this.Yf(I.jG.FadeIn),this.Kf(I.jG.FadeInBase),(0,r.Tp)(this.yf),this.Kf(I.jG.FadeIn)}zf(){this._m.next()}Gf(){this.Yf(I.jG.FadeInBase,I.jG.FadeIn),this.Bm.next(),this.Cf&&super.Im()}Dm(){this.Pm.on(this.yf.parentElement,this.Om,{threshold:G})}jm(){this.Pm.off(this.yf.parentElement,this.Om)}start(){this.Zf()&&(super.bm(),this.vi.floatingMode===m.ProtoPlayerFloatingMode.OnPageLoad&&(this.Am=!1),this.Dm(),this.Om(this.Pm.check({element:this.yf.parentElement,threshold:G})))}canFloat(){return this.Zf()&&this.vi.floatingMode!==m.ProtoPlayerFloatingMode.Off}destroy(t=!1){t&&(this.Em=t),this.isInFloating?(this.Wf(),this.Cf=!0):super.Im(),this.jm()}get enabled(){return this.km}set enabled(t){this.km=t}get forceEnabled(){return this.Tm}set forceEnabled(t){this.Tm=t}fullscreenStateChange(t){this.Cm=t,t?this.jm():this.Dm(),this.Om(t)}}var wt,_t;!function(t){t[t.EmbededState=0]="EmbededState",t[t.FloatingState=1]="FloatingState"}(wt||(wt={}));class St{constructor(t,i){this.Fm=t,this.Nm=i,this.Um=!1,this.$m(),this.qm()}$m(){this.Nm!==m.ProtoPlayerFloatingMode.Off&&this.Nm!==m.ProtoPlayerFloatingMode.AfterInView||(this.Hm=wt.EmbededState),this.Nm===m.ProtoPlayerFloatingMode.OnPageLoad&&this.Fm.isInFloating&&(this.Hm=wt.FloatingState),this.Nm!==m.ProtoPlayerFloatingMode.OnPageLoad||this.Fm.isInFloating||(this.Hm=wt.EmbededState),(this.zm&&!this.Wm||this.Gm)&&this.Nm!==m.ProtoPlayerFloatingMode.Off&&(this.Hm=wt.EmbededState),this.Qm=this.Hm}Jm(){(this.Xm||this.Ym)&&this.Fm.isInFloating&&this.Nm!==m.ProtoPlayerFloatingMode.Off&&(this.Hm=wt.FloatingState),(this.zm&&!this.Wm||this.Gm)&&this.Nm!==m.ProtoPlayerFloatingMode.Off&&(this.Fm.isInFloating&&(this.Hm=wt.FloatingState),(!this.Fm.forceEnabled||!this.Fm.isInFloating&&this.Zm)&&(this.Hm=wt.EmbededState)),(this.tv||this.Wm||this.iv)&&this.Nm!==m.ProtoPlayerFloatingMode.Off&&(this.Hm=wt.FloatingState),this.sv()&&(this.Hm=wt.EmbededState),this.sv()&&this.Fm.isInFloating&&(this.Hm=wt.FloatingState),this.Hm!==this.Qm&&(this.Qm=this.Hm,this.qm())}qm(){this.Fm.forceEnabled||this.Fm.forceDisableFloatingMode(),this.Fm.forceEnabled&&(this.Hm===wt.EmbededState&&this.Fm.forceDisableFloatingMode(),this.Hm===wt.FloatingState&&this.Fm.forceEnableFloatingMode())}sv(){return this.Nm===m.ProtoPlayerFloatingMode.AfterInView&&!this.Um}setViewabilityFlag(t){t&&(this.Um=t),this.Zm!==t&&this.Fm.forceEnabled&&(this.Zm=t,this.Jm())}setAdPlay(t){this.Wm!==t&&this.Fm.forceEnabled&&(this.Wm=t,this.Gm=!1,this.iv=!1,this.tv=!1,this.zm=!0,this.Jm())}setAdResumed(t){this.iv!==t&&this.Fm.forceEnabled&&(this.iv=t,this.Wm=!1,this.Gm=!1,this.tv=!1,this.zm=!0,this.Jm())}setAdPaused(t){this.Gm!==t&&this.Fm.forceEnabled&&(this.Gm=t,this.Wm=!1,this.iv=!1,this.zm=!1,this.tv=!1,this.Jm())}setPlayerPlay(t){this.tv!==t&&this.Fm.forceEnabled&&(this.tv=t,this.zm=!1,this.Gm=!1,this.Wm=!1,this.iv=!1,this.Jm())}setPlayerPause(t){this.zm!==t&&this.Fm.forceEnabled&&(this.zm=t,this.tv=!1,this.Gm=!1,this.Wm=!1,this.iv=!1,this.Jm())}setNonlinearEnable(t){this.Xm!==t&&this.Fm.forceEnabled&&(this.Xm=t,this.Ym=!1,this.Jm())}setNonlinearDisable(t){this.Ym!==t&&this.Fm.forceEnabled&&(this.Ym=t,this.Xm=!1,this.Jm())}}!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}(_t||(_t={}));const Pt=_t;class At{constructor(t){this.urlSuffixerService=t,this.nv={},this.rv=[]}getImage(t,i,e,s,r="",o=!1){return this.ov=t,this.hv=(0,n.QM)(i)?i:"",this.av=e,this.dv=s,this.lv=r,this.uv=o,this.fv()}fv(){const t=this.mv();if(t)return t;const i=this.ov+this.lv,e=new Image;return e.src=this.urlSuffixerService.appendParamsToUrl(i),e.alt=this.hv,this.nv[this.ov]=this.nv[this.ov]||{},this.nv[this.ov][this.av]=this.nv[this.ov][this.av]||{},this.nv[this.ov][this.av][this.dv]=this.nv[this.ov][this.av][this.dv]||{},this.nv[this.ov][this.av][this.dv][this.lv]=e,e}mv(){const t=this.vv();if(t)return t;if(!this.uv)return;this.gv();const i=this.yv();if(i)return i;const e=this.bv();return e||void 0}gv(){const t=[];if(!this.nv[this.ov])return void(this.rv=[]);const i=this.nv[this.ov],e=this.av>this.dv?Pt.Landscape:Pt.Portrait;Object.keys(i).forEach((s=>{const n=parseInt(s,10);Object.keys(i[s]).filter((t=>!!i[s][t])).forEach((i=>{const s=parseInt(i,10);if((n>s?Pt.Landscape:Pt.Portrait)!==e)return;const r={area:n*s,img:this.Iv(this.ov,n,s)};t.push(r)}))})),this.rv=[...t]}Iv(t,i,e){if(this.nv[t]&&this.nv[t][i]&&this.nv[t][i][e])return this.nv[t][i][e][Object.keys(this.nv[t][i][e])[0]]}vv(){return this.nv[this.ov]&&this.nv[this.ov][this.av]&&this.nv[this.ov][this.av][this.dv]&&this.nv[this.ov][this.av][this.dv][this.lv]}yv(){if(0===this.rv.length)return;const t=this.av*this.dv,i=this.rv.filter((({area:i})=>i>t)).sort(((t,i)=>t.area-i.area));return 0!==i.length?i[0].img:void 0}bv(){if(0===this.rv.length)return;const t=this.av*this.dv,i=this.rv.filter((({area:i})=>i<t&&t/i<=1.3)).sort(((t,i)=>i.area-t.area));return 0!==i.length?i[0].img:void 0}}var xt;!function(t){t.LINEAR="LINEAR",t.NONLINEAR="NONLINEAR"}(xt||(xt={}));const kt={[xt.LINEAR]:[m.ProtoAdType.Video,m.ProtoAdType.Overlay],[xt.NONLINEAR]:[m.ProtoAdType.Nonlinear]};function Tt(t,i){return t.filter((t=>kt[i].includes(t.adType)))}function Ct(t,i){return t.find((t=>t.adManagerLineItem.protoLineItem.advertiserLineItemId===i)).adManagerLineItem}const Et=({playerSkippability:t,playerSkipMin:i,playerSkipAfter:e,lineItemSkippability:s,lineItemSkipMin:n})=>{let r={skippable:!0,skipafter:e};switch(t){case m.ProtoPlayerSkippabilityType.AllowNonSkipAdsIfTheyAreShorterThan:r=function({skippabitySettings:t,playerSkipMin:i,lineItemSkippability:e,lineItemSkipMin:s}){if(e===m.ProtoLineItemSkippabilityType.RequirePublisherToAllowNonSkipAdsShorterThan)s<i?t.skipmin=i:(t.skipmin=s,t.minDuration=s);else t.skipmin=i;return t}({skippabitySettings:r,playerSkipMin:i,lineItemSkippability:s,lineItemSkipMin:n});break;case m.ProtoPlayerSkippabilityType.RequireAdsToBeSkippable:s===m.ProtoLineItemSkippabilityType.RequirePublisherToAllowNonSkipAdsShorterThan&&(r.skipmin=n,r.minDuration=n)}return r};function Mt(t,i){return t===m.ProtoAdType.Nonlinear&&i===m.ProtoNonlinearRequestType.Banner}var Lt=h(1703),Bt=h(7332),Ot=h(4975),Rt=h(8474),Dt=h(6798),Vt=h(2566),jt=h(278);function Ft(t,i,e){var s=(0,Rt.m)(t)||i||e?{next:t,error:i,complete:e}:t;return s?(0,Dt.e)((function(t,i){var e;null===(e=s.subscribe)||void 0===e||e.call(s);var n=!0;t.subscribe((0,Vt.x)(i,(function(t){var e;null===(e=s.next)||void 0===e||e.call(s,t),i.next(t)}),(function(){var t;n=!1,null===(t=s.complete)||void 0===t||t.call(s),i.complete()}),(function(t){var e;n=!1,null===(e=s.error)||void 0===e||e.call(s,t),i.error(t)}),(function(){var t,i;n&&(null===(t=s.unsubscribe)||void 0===t||t.call(s)),null===(i=s.finalize)||void 0===i||i.call(s)})))})):jt.y}var Nt=h(4978),Ut=h(4865);function $t(t){return t[t.length-1]}function qt(t){return(0,Ut.K)($t(t))?t.pop():void 0}var Ht=h(7878);function zt(t,i,e,s,n){void 0===s&&(s=0),void 0===n&&(n=!1);var r=i.schedule((function(){e(),n?t.add(this.schedule(null,s)):this.unsubscribe()}),s);if(t.add(r),!n)return r}function Wt(t,i){return void 0===i&&(i=0),(0,Dt.e)((function(e,s){e.subscribe((0,Vt.x)(s,(function(e){return zt(s,t,(function(){return s.next(e)}),i)}),(function(){return zt(s,t,(function(){return s.complete()}),i)}),(function(e){return zt(s,t,(function(){return s.error(e)}),i)})))}))}function Gt(t,i){return void 0===i&&(i=0),(0,Dt.e)((function(e,s){s.add(t.schedule((function(){return e.subscribe(s)}),i))}))}var Qt=h(1480);var Jt=h(9768);function Xt(t,i){if(!t)throw new Error("Iterable cannot be null");return new Qt.y((function(e){zt(e,i,(function(){var s=t[Symbol.asyncIterator]();zt(e,i,(function(){s.next().then((function(t){t.done?e.complete():e.next(t.value)}))}),0,!0)}))}))}var Yt,Kt=h(1764),Zt=h(3841),ti=h(5685),ii=h(1837),ei=h(8430),si=h(8729),ni=h(8671);function ri(t,i){if(null!=t){if((0,Kt.c)(t))return function(t,i){return(0,Ht.Xf)(t).pipe(Gt(i),Wt(i))}(t,i);if((0,ti.z)(t))return function(t,i){return new Qt.y((function(e){var s=0;return i.schedule((function(){s===t.length?e.complete():(e.next(t[s++]),e.closed||this.schedule())}))}))}(t,i);if((0,Zt.t)(t))return function(t,i){return(0,Ht.Xf)(t).pipe(Gt(i),Wt(i))}(t,i);if((0,ei.D)(t))return Xt(t,i);if((0,ii.T)(t))return function(t,i){return new Qt.y((function(e){var s;return zt(e,i,(function(){s=t[Jt.h](),zt(e,i,(function(){var t,i,n;try{i=(t=s.next()).value,n=t.done}catch(t){return void e.error(t)}n?e.complete():e.next(i)}),0,!0)})),function(){return(0,Rt.m)(null==s?void 0:s.return)&&s.return()}}))}(t,i);if((0,ni.L)(t))return function(t,i){return Xt((0,ni.Q)(t),i)}(t,i)}throw(0,si.z)(t)}function oi(t,i){return i?ri(t,i):(0,Ht.Xf)(t)}class hi{constructor(){this.wv=(0,e.qs)()}get id(){return this.wv}get timestamp(){return this._v}set timestamp(t){this._v=t}}!function(t){t.ForceStopAdSlot="forceStopAdSlot",t.ForceStopAdPod="forceStopAdPod",t.ChangeVideo="changeVideo"}(Yt||(Yt={}));var ai=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};const ci=["com.accuweather.android"],di=.05*J.s_;class li extends g._{constructor(t,i,e,s,o,h,a,c){super(),this.mediator=t,this._appSettings=i,this.Sv=e,this.Ud=s,this.th=o,this.ih=h,this.sl=a,this.sp=c,this.Pv=.01,this.xv=.5,this.kv=.5,this.Tv=2e3,this.Cv=0,this.Ev=!1,this.Mv=!1,this.Bv=!1,this.Ov=!1,this.Rv=!1,this.Dv=!1,this.Zm=!1,this.nh=m.ProtoAdSlotsEnum.PreRoll,this.Fp=!1,this.Vv=!1,this.jv=!1,this.Fv=!1,this.Nv=!0,this.Uv=[],this.$v=[],this.qv=[],this.Hv=[],this.zv=0,this.Wv={[z.d.togglePlay]:()=>{var t;return null===(t=this.adHandler)||void 0===t?void 0:t.togglePlay(this.Nv)},[z.d.toggleMute]:()=>{var t;return null===(t=this.adHandler)||void 0===t?void 0:t.toggleMute(this.Nv)},[z.d.increaseVolume]:()=>{var t;return null===(t=this.adHandler)||void 0===t?void 0:t.increaseVolume(.1,this.Nv)},[z.d.decreaseVolume]:()=>{var t;return null===(t=this.adHandler)||void 0===t?void 0:t.decreaseVolume(.1,this.Nv)}},this.Gv=t=>{this.Vv=t,t&&(this.app.services.ViewabilityService.off(this.$playerContainer,this.Gv),this.Qv())},this.Jv=t=>{t&&this.adHandler&&!this.Fv&&setTimeout((()=>{this.adHandler.resumeWithoutUserInteraction(this.nh)}),di)},this.Xv=()=>{this.isBelowSmBreakpoint(this.$experienceContainer.clientWidth)||(0,r.IV)(this.$experienceContainer,I.Gj.NoHeight),!this.Mv&&this.Yv()&&(this.mediator.publish(this,y.Uh.CanStart),this.app.services.ResizeObserver.off(this.$experienceContainer,this.Xv))},this.Kv=t=>{const{playback:i,isFullscreenClose:e}=t;this.floatingModule&&(0,n.$K)(i)&&!e&&(this.floatingModule.enabled=i)},this.Zv=()=>{this.tg(1)},this.ig=()=>{this.tg(0)},this.eg=t=>{this.Kv(t);const{playback:i}=t;(0,n.$K)(i)&&(i?(this.app.services.EventsStorageService.emitAdPlay(),this.Fv=!1):(this.app.services.EventsStorageService.emitAdPause(),this.Fv=!0))},this.sg=new At(e)}ng(){}rg(t,i,e){this.app.services.EventsStorageService.emitAdImpression(t,i,e)}hg(t){this.app.services.EventsStorageService.emitAdComplete(t)}ag(){}cg(){}dg(){}ug(){}pg(){}fg(){}vg(){}gg(t){const i={state:t};this.app.services.EventsStorageService.emitAdStateChange(i)}yg(){const{clientWidth:t,clientHeight:i}=this.$playerContainer,e={width:t,height:i};this.app.services.EventsStorageService.emitPlayerResized(e)}bg(){this.app.services.EventsStorageService.emitOnEnterFullscreen()}wg(){this.app.services.EventsStorageService.emitOnExitFullscreen()}_g(){this.app.services.EventsStorageService.emitOnPlayerCollapsed()}Sg(){this.app.services.EventsStorageService.emitOnPlayerExpanded()}Pg(t){this.Ag(t),this.xg(t),this.kg(t),this.nh=t,this.Tg(t)}xg(t){this.adHandler&&this.adHandler.adStateChange(t,this.Cg.getMaxAdSlotDuration())}kg(t){this.Eg.onAdStateChange(t,{maxAdPodDuration:this.Cg.getMaxAdPodDuration(),maxAdSlotDuration:this.Cg.getMaxAdSlotDuration()})}Ag(t){this.Cg.setNewBreak(t)}Tg(t){this.gg(Lt.V[t])}Mg(){var t;null===(t=this.adHandler)||void 0===t||t.contentChanged(),this.Eg.contentChanged()}Bg(){var t;null===(t=this.adHandler)||void 0===t||t.contentEnded()}Og(){var t,i,e,s,n,r;this.adHandler=this.Rg(),this.Dg(),null===(t=this.adHandler)||void 0===t||t.onLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,x.Km.ImpressionPrice,{payload:t})})),null===(i=this.adHandler)||void 0===i||i.onNonLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,x.Km.ImpressionPrice,{payload:t})})),null===(e=this.adHandler)||void 0===e||e.onLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,x.Km.ImpressionRevenue,{payload:t})})),null===(s=this.adHandler)||void 0===s||s.onNonLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,x.Km.ImpressionRevenue,{payload:t})})),null===(n=this.adHandler)||void 0===n||n.onLinearExperienceEvent.subscribe((t=>{y.Uh.UserInteraction===t.type&&this.eg(t.payload)}));const o=()=>{this.Ud.adsEnabled.next(),this.jv=!0,this.Fv=!1,this.Qv(),this.Vg.unsubscribe()};this.Vg=null===(r=this.adHandler)||void 0===r?void 0:r.onAdsEnable.subscribe((()=>{o()})),this.Eg.setAdHandler(this.adHandler)}Co(t){this.mediator.publish(this,x.Km.AdImpression,t.payload);const{adSourceData:i,customAdData:e,adType:s}=t.payload.payload;this.rg(i,e,s)}Dg(){this.jg(),this.Fg(),this.Ug()}jg(){this.Hv.push(this.adHandler.onVpaidEvent.subscribe((t=>{switch(t.type){case X.fI.AdStarted:this.mediator.publish(this,x.Km.AdStarted,t.payload);break;case X.fI.AdImpression:this.Co(t);break;case X.fI.AdStopped:{if(this.mediator.publish(this,x.Km.AdStopped,t.payload),this.Zm&&this.cg(),!t.payload)return;const{adType:i}=t.payload.payload;this.hg(i),this.app.services.EventsStorageService.emitAdStopped(i);break}case X.fI.AdError:{const{adType:i}=t.payload;this.mediator.publish(this,x.Km.AdError,t),this.app.services.EventsStorageService.emitAdError(i);break}case X.fI.AdSkipped:{const{adType:i}=t.payload.payload;this.mediator.publish(this,x.Km.AdSkipped,t.payload),this.app.services.EventsStorageService.emitAdSkipped(i),this.hg(i),this.Zm&&this.cg();break}case X.fI.AdPaused:{const{adType:i}=t.payload.payload;this.Ud.sessionPlaybackChanged.next({isPlaying:!1}),this.app.services.EventsStorageService.emitAdPaused(i),this.mediator.publish(this,x.Km.AdPause,t.payload);break}case X.fI.AdPlaying:{const{adType:i}=t.payload.payload;this.Ud.sessionPlaybackChanged.next({isPlaying:!0}),this.app.services.EventsStorageService.emitAdPlaying(i),this.mediator.publish(this,x.Km.AdPlay,t.payload);break}case X.fI.AdVideoFirstQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,x.Km.AdCompleted25,t.payload),this.app.services.EventsStorageService.emitAdVideoFirstQuartile(i);break}case X.fI.AdVideoMidpoint:{const{adType:i}=t.payload.payload;this.mediator.publish(this,x.Km.AdCompleted50,t.payload),this.app.services.EventsStorageService.emitAdVideoMidpoint(i);break}case X.fI.AdVideoThirdQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,x.Km.AdCompleted75,t.payload),this.app.services.EventsStorageService.emitAdVideoThirdQuartile(i);break}case X.fI.AdVideoComplete:{const{adType:i}=t.payload.payload;this.mediator.publish(this,x.Km.AdCompleted100,t.payload),this.app.services.EventsStorageService.emitAdVideoComplete(i);break}case X.fI.AdClickThru:{const{adType:i}=t.payload.payload;this.mediator.publish(this,x.Km.AdClick,t.payload),this.app.services.EventsStorageService.emitAdClickThru(i);break}case X.fI.AdInteraction:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case X.fI.AdUserAcceptInvitation:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case X.fI.AdUserClose:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case X.fI.AdUserMinimize:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case X.fI.AdVideoStart:{const{adSourceData:i,adType:e}=t.payload,s={duration:i&&i.length,mediaPlayerVolume:this.getVolume()};this.app.services.EventsStorageService.emitAdVideoStart(s,e);break}case X.fI.AdLoaded:{const{payload:i}=t.payload,{adType:e,adLoadedData:s}=i;this.mediator.publish(this,x.Km.AdLoaded,t.payload),(null==s?void 0:s.skipOffset)<0&&(s.skipOffset=void 0);const n=this.$g(s);this.app.services.EventsStorageService.emitAdLoaded(n,e);break}case X.fI.AdVolumeChange:{const{adType:i}=t.payload.payload;this.mediator.publish(this,x.Km.AdVolumeChange,t.payload),this.app.services.EventsStorageService.emitAdVolumeChange(i);break}case X.fI.AdLog:}})))}Fg(){this.Hv.push(this.adHandler.onMissedImpression.subscribe((t=>{const i=Math.round(this.Eg.getTheoreticalDurationUntilNextOpportuinity()*J.s_);t.setTimeUntilNextOpportunity(i),this.th.missedImpressionOutOfView.next(t.missedImpressionsLogs)})),this.adHandler.onLinearEvent.subscribe((t=>{var i,e,s;switch(t.type){case K.ShowLinearEvent:this.Eg.onAdImpression(t.payload,xt.LINEAR),this.qg(),null===(i=this.floatingStateMachine)||void 0===i||i.setAdPlay(!0);break;case K.HideLinearEvent:this.Hg(t.forced);break;case K.PauseLinearEvent:this.Eg.onLinearAdPause(),null===(e=this.floatingStateMachine)||void 0===e||e.setAdPaused(!0);break;case K.ResumeLinearEvent:this.Eg.onLinearAdPlay(),null===(s=this.floatingStateMachine)||void 0===s||s.setAdResumed(!0);break;case K.SkipLinearEvent:const n=!0;this.floatingModule&&(this.floatingModule.enabled=!0),this.Hg(n)}})))}Ug(){this.Hv.push(this.adHandler.onNonLinearEvent.subscribe((t=>{switch(t.type){case Z.ShowNonLinearEvent:this.Eg.onAdImpression(t.payload,xt.NONLINEAR);break;case Z.HideNonLinearEvent:const i=!1;this.Eg.onAdFinished(this.adHandler.nonLinearInImpression,xt.NONLINEAR,i)}})))}qg(){this.Cg.adStarted(),this.adHandler.showLinear(),(0,r.cn)(this.$playerWrapper,I._7.HidePinnedTitle)}zg(){this.adHandler.hideLinear(),(0,r.IV)(this.$playerWrapper,I._7.HidePinnedTitle)}Hg(t=!1){this.sp.processAdUserInteraction(t);let i=this.Cg.isInAdPod();t&&(i=!1,this.Cg.endPod()),this.Eg.onAdFinished(this.adHandler.linearInImpression,xt.LINEAR,i),this.zg(),this.Wg.isCloseButton&&this.adHandler&&this.adHandler.firstLinearAdShown&&(this.Wg.closeButtonMode!==m.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,r.pv)(this.$playerContainer,I.s6.CloseHover)||(0,r.cn)(this.$playerContainer,I.s6.CloseHover),this.Wg.floatingSettings.floatingCloseButtonMode!==m.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,r.pv)(this.$playerContainer,I.s6.CloseFloatHover)||(0,r.cn)(this.$playerContainer,I.s6.CloseFloatHover))}Jg(t){this.adHandler.enterAdPodLoadingState(),this.Cg.enterPodTimeout((()=>{this.Cg.endPod(),t()}))}Xg(){(0,b.BZ)(Tt(this.Wg.lineItemSettings.lineItems,xt.LINEAR))||this.Eg.onLinearNoDemand(),this.subscribe(lt,this.Eg,(()=>{var t,i;null===(t=this.adHandler)||void 0===t||t.enableAds(xt.NONLINEAR),null===(i=this.floatingStateMachine)||void 0===i||i.setNonlinearEnable(!0)})),this.subscribe(dt,this.Eg,(t=>{var i,e;const s=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(xt.NONLINEAR,s),null===(e=this.floatingStateMachine)||void 0===e||e.setNonlinearDisable(!0)})),this.subscribe(nt,this.Eg,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(xt.LINEAR)})),this.subscribe(rt,this.Eg,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(xt.LINEAR,e)})),this.subscribe(ot,this.Eg,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.stopAd(Yt.ForceStopAdSlot)})),this.subscribe(ht,this.Eg,(()=>{if(this.adHandler)if(this.adHandler.linearInImpression)this.Cg.endPod(),this.adHandler.stopAd(Yt.ForceStopAdPod);else{const t=!0;this.Hg(t)}})),this.subscribe(ut,this.Eg,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.disableAdvertising()})),this.subscribe(pt,this.Eg,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAdvertising()})),this.subscribe(ct,this.Eg,(t=>{var i;null===(i=this.adHandler)||void 0===i||i.updateLinearPodRemainingTime(t.payload.remainingTime)})),this.subscribe(vt,this.Eg,(t=>{var i;const e=t.payload.linearity;null===(i=this.adHandler)||void 0===i||i.canPrefetchAds(e)})),this.subscribe(at,this.Eg,(t=>{var i,e;const s=t.payload.adBreakType,r=null===(i=this.adHandler)||void 0===i?void 0:i.getLinearAdContainerWidth(),o=this.Yg(),h=(0,n.$K)(r)?r:this.$playerContainer.clientWidth;this.Ud.adOpportunity.next({adBreak:w.EN.fromProtoAdBreakType(s),playerWidth:h,opportunityId:o.id}),null===(e=this.adHandler)||void 0===e||e.newLinearAdOpportunity(o)}))}Yg(){return(0,n.$K)(this.adHandler)?this.adHandler.getNewLinearAdOpportunity():new hi}Kg(){this.app.services.ViewabilityService.on(this.$playerContainer,this.Gv,{threshold:this.xv,callbackDelay:this.Tv}),this.app.services.ViewabilityService.on(this.$playerContainer,((t,i)=>this.Om(t,i)),{threshold:this.Pv}),this.app.services.ViewabilityService.on(this.$playerContainer,(t=>{var i;null===(i=this.floatingStateMachine)||void 0===i||i.setViewabilityFlag(t)}),{threshold:this.kv}),this.app.services.ViewabilityService.subscribe(x.rl.OmidViewabilityThreshold,(t=>{this.mediator.publish(this,x.rl.OmidViewabilityThreshold,{payload:{threshold:t}})})),this.app.config.os.os===L.M.Ios&&this.app.services.PageFocusService.on(this.Jv)}Qv(){this.Vv&&this.jv&&this.mediator.publish(this,y.Xh.SessionView)}Om(t,i=!1){this.Eg.setToggleAdsReason({isAppBackgrounded:i}),this.app.config.isInApp&&(i?(this.lf=this.getVolume(),this.setVolume(0)):this.lf&&(this.setVolume(this.lf),this.lf=null)),this.Zm=t,this.mediator.publish(this,x.Km.IsViewable,{payload:t}),this.Eg.viewabilityStateChanged(this.checkFloatingViewability(t),this.Cg.isInAdPod(),this.Cg.isInPodTimeout()),this.Ud.sessionViewabilityChanged.next({isInView:t})}checkFloatingViewability(t){const i=this.sl.isPageInFocus;return!(t||!this.floatingModule||!this.floatingModule.isInFloating||!i)||t}Go(){var t,i,e;const s=this.$playerContainer.clientWidth,n=this.$playerContainer.clientHeight;this.sl.playerDimensions={height:n,width:s};const r=this.Fp?X.zc.Fullscreen:X.zc.Normal;null===(t=this.adHandler)||void 0===t||t.resizeAd(s,n,r,this.nh);try{null===(i=this.Eg)||void 0===i||i.onResize(s,n)}catch(t){(0,o.n)({message:"BaseExperience_onResize_player",callStack:t.stack,exception:t.message,level:o.D.WARN})}null===(e=this.adHandler)||void 0===e||e.setPlayerOrientation(this.Zg(s,n)),this.ty(),setTimeout((()=>{this.mediator.publish(this,x.Km.SizeChanged,{payload:{width:s,height:n}}),this.iy()}))}isBelowSmBreakpoint(t){return t<this.zv}Zg(t,i){return t<i?Q.Portrait:t>i?Q.Landscape:Q.None}iy(){this.Fp||this.yg()}ey(){this.app.services.ResizeObserver.on(this.$playerContainer,(()=>{this.Go()}))}sy(){var t;this.Fp=!0,this.app.services.InteractionService.disableScrollEvent(),this.bg(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(X.zc.Fullscreen)}ny(){var t;this.Fp=!1,this.app.services.InteractionService.enableScrollEvent(),this.wg(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(X.zc.Normal)}oy(){const t=`<cnx class='${I.oV}'></cnx>`,i=this.app.services.GlobalDomUtilsService.createElementByString(t);return this.hy(i),i}hy(t){(0,r.T7)(t,{"padding-bottom":`${this.ly()}%`})}ly(){return this.Wg.playerSize.ratioHeight/this.Wg.playerSize.ratioWidth*100}uy(t){var i;(null===(i=this.adHandler)||void 0===i?void 0:i.linearInImpression)?this.py(t.action):this.my(t.action)}my(t){}py(t){const i=this.Wv[t];i&&i()}vy(){this.$v.push(this.floatingModule.onFloatingEnterStart.subscribe((()=>{var t;this.mediator.publish(this,x.Zr.PlayerFloatChanged,{payload:q.Float}),this.mediator.publish(this,x.Zr.FloatingEnterStart,{payload:!0}),null===(t=this.adHandler)||void 0===t||t.inFloatingChanged(!0)})),this.floatingModule.onFloatingExitStart.subscribe((()=>{this.mediator.publish(this,x.Zr.FloatingExitStart,{payload:!0})})),this.floatingModule.onFloatingExitStop.subscribe((()=>{var t;this.mediator.publish(this,x.Zr.PlayerFloatChanged,{payload:q.Embed}),this.mediator.publish(this,x.Zr.FloatingExitStop,{payload:!0}),null===(t=this.adHandler)||void 0===t||t.inFloatingChanged(!1)})),this.floatingModule.onFloatingEnterStop.subscribe((()=>{this.mediator.publish(this,x.Zr.FloatingEnterStop,{payload:!0}),this.Om(!0)})))}gy(){this.floatingModule=new It(this.app.services.ViewabilityService,this.sl,this.app.services.ResizeObserver,this.$playerContainer,this.Wg.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService,this.yy),this.vy(),this.floatingModule.start(),this.floatingStateMachine=new St(this.floatingModule,this.Wg.floatingSettings.floatingMode)}by(){this.alwaysFloatingModule=new bt(this.app.services.ResizeObserver,this.$experienceContainer,this.Wg.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService),this.$v.push(this.alwaysFloatingModule.onFloatingEnterStop.subscribe((()=>{var t;null===(t=this.adHandler)||void 0===t||t.inFloatingChanged(!0),this.app.services.ViewabilityService.triggerRecheck(this.$playerContainer)}))),this.alwaysFloatingModule.start()}setNewVolume(t){var i;null===(i=this.adHandler)||void 0===i||i.setLinearVolume(t)}_y(){var t;this.Sy(),null===(t=this.adHandler)||void 0===t||t.onLinearExperienceEvent.subscribe((t=>{var i;t.type===y.Uh.UserInteraction&&(null===(i=t.payload)||void 0===i?void 0:i.volume)&&this.Py()}))}Ay(t){this.subscribe(y.Uh.UserInteraction,t,(({payload:{volume:t}})=>{t&&this.Py()}))}Do(t){this.mediator.publish(this,x.Km.VolumeChanged,{payload:t}),this.app.services.EventsStorageService.emitVolumeChange(t)}tg(t){this.getVolume()!==t&&this.setNewVolume(t)}Sy(){this.Ev=!0,this.$playerContainer.addEventListener("mouseover",this.Zv),this.$playerContainer.addEventListener("mouseout",this.ig)}Py(){this.Ev&&(this.Ev=!1,this.$playerContainer.removeEventListener("mouseover",this.Zv),this.$playerContainer.removeEventListener("mouseout",this.ig))}xy(){this.breakPointsHandler=new gt(this.$playerContainer,this.app.config.device,this.ky,this.Ty),this.ty()}Cy(){if(this.Wg.isCloseButton){switch(this.adHandler&&this.qv.push(this.adHandler.onLinearUiComponentEvent.subscribe((t=>{t.type===F.C.Close&&this.handleClose()}))),this.Wg.closeButtonMode){case m.ProtoPlayerCloseButtonMode.AlwaysOn:(0,r.cn)(this.$playerContainer,I.s6.CloseOn);break;case m.ProtoPlayerCloseButtonMode.Off:(0,r.cn)(this.$playerContainer,I.s6.CloseOff);break;case m.ProtoPlayerCloseButtonMode.OnHover:(0,r.cn)(this.$playerContainer,I.s6.CloseHover)}switch(this.Wg.floatingSettings.floatingCloseButtonMode){case m.ProtoPlayerCloseButtonMode.AlwaysOn:(0,r.cn)(this.$playerContainer,I.s6.CloseFloatOn);break;case m.ProtoPlayerCloseButtonMode.Off:(0,r.cn)(this.$playerContainer,I.s6.CloseFloatOff);break;case m.ProtoPlayerCloseButtonMode.OnHover:(0,r.cn)(this.$playerContainer,I.s6.CloseFloatHover)}}}$g(t){const{skipOffset:i}=t;return{isAutoPlay:this.Wg.playbackMode===m.ProtoPlayerPlaybackModeEnum.Autoplay,skipOffset:i,isSkippable:(0,n.hj)(i)}}Ey(){this.jv=!0,this.Ud.contentStart.next(),this.Qv()}ty(){this.breakPointsHandler.updateWidth(this.$playerContainer.clientWidth)}Yv(){const{clientWidth:t,clientHeight:i}=this.$experienceContainer;return!(0,Bt.ON)({width:t,height:i})&&!this.isBelowSmBreakpoint(t)||((0,r.cn)(this.$experienceContainer,I.Gj.NoHeight),this.My())}My(){return ci.includes(this.app.config.bundleID)}Ly(t){try{const{display:i,width:e,height:s,flex:n,maxWidth:r,minWidth:o}=this.app.services.GlobalDomUtilsService.getComputedStyle(t),{width:h,height:a}=t.getBoundingClientRect(),c={display:i,compWidth:e,boundWidth:h,compHeight:s,boundHeight:a,flex:n,maxWidth:r,minWidth:o};return{type:t.nodeName,styles:JSON.stringify(c)}}catch(t){return{err:"BaseExperience_getElementInfo_error"}}}By(){if(!(0,e.Vm)([95,5]))return;const t={parent:this.Ly(this.$experienceContainer.parentElement),main:this.Ly(this.$experienceContainer)};(0,o.n)({message:"BaseExperience_invalid_dimensions",level:o.D.INFO,exception:JSON.stringify(t)})}Oy(){this.Cg=new it(this.Wg.adBreaks)}Ry(){(0,r.cn)(this.$experienceContainer,I.s6.ClickToPlayThumbnail)}renderExperience(t,i,e,s){this.Wg=t,this.app=i,this.$experienceContainer=e,s&&s(),this.ng(),this.app.services.ViewabilityService.setViewableThreshold(this.Cv),this.generateHTML(),this.Oy(),this.app.services.ResizeObserver.on(this.$experienceContainer,this.Xv),this.Yv()?this.mediator.publish(this,y.Uh.CanStart):this.By()}start(){return ai(this,void 0,void 0,(function*(){this.Mv=!0,this.sl.playerDimensions={height:this.$playerContainer.clientHeight,width:this.$playerContainer.clientWidth},(0,r.cn)(this.$experienceContainer,I.sN.MainContainerFlex),this.mediator.publish(this,y.Xh.SessionRendered),this.xy(),this.ey(),this.Wg.floatingSettings.floatingMode===m.ProtoPlayerFloatingMode.Always?this.by():(this.yg(),this.gy()),(0,r.Tp)(this.$playerContainer),this.Eg=this.Dy(),(0,b.BZ)(this.Wg.lineItemSettings.lineItems)&&this.Og(),this.Wg.disableAdvertising||S._.isBannerBlocked?this.Eg.adBlockerStatusChange(S._.isBannerBlocked):this.app.config.isOVPDomain?this.qv.push(S._.onAdBlockerDetected().subscribe((t=>{this.Eg.adBlockerStatusChange(t)}))):this.Eg.adBlockerStatusChange(S._.isBannerBlocked),this.app.config.isMobile||this.Wg.soundMode!==m.ProtoPlayerSoundMode.Hover||this._y(),this.Wg.isCloseButton&&this.Cy(),this.Wg.displayAdCountdown&&(0,r.cn)(this.$playerContainer,I.s6.AdShowCountdown),this.Wg.playbackMode===m.ProtoPlayerPlaybackModeEnum.ClickToPlay&&this.Ry();try{this.Xg()}catch(t){(0,o.n)({message:"BaseExperience_initAdsController",exception:t.message,callStack:t.stack,level:o.D.INFO})}S._.isBannerBlocked||S._.detectUsingScript().then((t=>{t&&(this.Ud.sessionAdBlocked.next({adBlockDetectionType:W.ev.Network}),this.Eg.disableAdvertising())})),this.app.config.isMobile||this.Uv.push(this.onReady().pipe((0,Ot.h)((t=>!!t)),Ft((()=>{this.sp.start(this.$playerContainer)})),(0,Nt.w)((()=>{var t;return null===(t=this.sp)||void 0===t?void 0:t.getShortcutsObservable()}))).subscribe((t=>this.uy(t))))}))}play(){var t;null===(t=this.adHandler)||void 0===t||t.play()}pause(){var t;null===(t=this.adHandler)||void 0===t||t.pause()}setVolume(t){this.setNewVolume(t),this.Py()}getSize(){return{width:this.$experienceContainer.clientWidth,height:this.$experienceContainer.clientHeight}}setSize(t,i){(0,Bt.ON)({width:t,height:i})||(0,r.T7)(this.$experienceContainer,{width:`${t}px`,height:`${i}px`})}setCustomMacros(t){var i;this.app.services.MacrosService.addExtraMacros(t),null===(i=this.adHandler)||void 0===i||i.setCustomMacros(t)}isViewable(){return this.app.services.ViewabilityService.check({element:this.$playerContainer,threshold:this.Pv})}setViewableThreshold(t){this.app?this.app.services.ViewabilityService.setViewableThreshold(t):this.Cv=t}setAmpUserConsent(t){this.app.services.UserManagerService.setAmpUserConsent(t)}triggerDestroy(){this.app.services.EventsStorageService.destroy(),this.mediator.publish(this,y.Uh.Destroy)}disableAdvertising(){this.Eg.disableAdvertising()}enableAdvertising(){this.Eg.enableAdvertising()}enableFloatingMode(){var t;null===(t=this.floatingModule)||void 0===t||t.enableFloatingMode()}disableFloatingMode(){var t;null===(t=this.floatingModule)||void 0===t||t.disableFloatingMode()}isFloatingModeEnabled(){return this.floatingModule?this.floatingModule.isFloatingModeEnabled():!!this.alwaysFloatingModule}setFloatingSettings(t){this.floatingModule?this.floatingModule.setFloatingSettings(t):this.alwaysFloatingModule.setFloatingSettings(t)}getFloatingSettings(){var t;return this.floatingModule?this.floatingModule.getFloatingSettings():null===(t=this.alwaysFloatingModule)||void 0===t?void 0:t.getFloatingSettings()}onReady(){return this.wp?this.wp.onReady():function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=qt(t);return oi(t,e)}(!0)}destroy(){var t;(0,H.i)(this.Uv),(0,H.i)(this.qv),this.adHandler&&((0,H.i)(this.Hv),this.Vg.unsubscribe(),this.adHandler.destroy()),this.Eg&&this.Eg.destroy(),this.floatingModule&&(this.floatingModule.destroy(!0),this.floatingModule=null,(0,H.i)(this.$v)),null===(t=this.sp)||void 0===t||t.destroy()}}var ui;!function(t){t[t.Unknown=0]="Unknown",t[t.TimeoutBetweenAds=1]="TimeoutBetweenAds",t[t.InImpression=2]="InImpression",t[t.LinearDemandMissing=3]="LinearDemandMissing",t[t.ForceDisable=4]="ForceDisable"}(ui||(ui={}));var pi,fi,mi=h(9906),vi=h(5204);!function(t){t[t.NoPrefetch=0]="NoPrefetch",t[t.StartSessionPrefetch=1]="StartSessionPrefetch",t[t.MidSessionPrefetch=2]="MidSessionPrefetch"}(pi||(pi={})),function(t){t[t.ON_BID=0]="ON_BID",t[t.ON_BID_LOADING=1]="ON_BID_LOADING",t[t.ON_BID_LOADING_CONSUMED=2]="ON_BID_LOADING_CONSUMED",t[t.ON_BID_LOADED=3]="ON_BID_LOADED",t[t.ON_BID_STARTING=4]="ON_BID_STARTING",t[t.ON_BID_IN_IMPRESSION=5]="ON_BID_IN_IMPRESSION",t[t.ON_BID_LOADED_CONSUMED=6]="ON_BID_LOADED_CONSUMED"}(fi||(fi={}));function gi(t){return 2*(t+41)}function yi(t){return t/2-41}class bi{constructor(){this.Vy=Date.now(),this.jy={advertiser:{}}}addPrebid(t){(0,n.$K)(this.jy.advertiser[t])||this.Fy(t),this.jy.advertiser[t].prebidData.push({timestamp:Date.now()})}addBid(t,i){(0,n.$K)(this.jy.advertiser[t])||this.Fy(t),this.jy.advertiser[t].bidsFloorPriceList.push({timestamp:Date.now(),floorPrice:i})}addImpression(t,i){(0,n.$K)(this.jy.advertiser[t])||this.Fy(t),this.jy.advertiser[t].impressionRevenueList.push({timestamp:Date.now(),obfuscatedPrice:i})}shouldRequestLineItem(t){const i=Date.now();return!(this.Ny(i,3)&&this.Uy(t,i,5)<-.5&&this.$y(t,i,3)>=11.5&&this.Hy(t,i,10,.1)<.35)}Ny(t,i){return t-this.Vy>=i*J.uD}Uy(t,i,e){const s=this.jy.advertiser[t];if(!(0,n.$K)(s))return-1;const r=this.zy(s.impressionRevenueList,i,e).map((t=>t.obfuscatedPrice));let o=0;return(0,b.BZ)(r)&&(o=r.reduce(((t,i)=>t+gi(i)))),this.Wy(o)}$y(t,i,e){const s=this.jy.advertiser[t];if(!(0,n.$K)(s))return-1;const r=this.zy(s.prebidData,i,e).length;return this.Wy(r)}Hy(t,i,e,s){const r=this.jy.advertiser[t];if(!(0,n.$K)(r))return-1;const o=this.zy(r.impressionRevenueList,i,e).map((t=>t.floorPrice)),h=this.Gy(o,s);return this.Wy(h)}zy(t,i,e){const s=i-J.s_,n=i-e*J.uD,r=[];for(let i=t.length-1;i>=0&&t[i].timestamp>=n;i--)t[i].timestamp<=s&&r.push(t[i]);return r}Wy(t){return 0===t?-1:t}Fy(t){this.jy.advertiser[t]={prebidData:[],bidsFloorPriceList:[],impressionRevenueList:[]}}Gy(t,i){if(0===t.length)return 0;if(i<=0)return t[0];if(i>=1)return t[t.length-1];const e=((t=t.sort(((t,i)=>t-i))).length-1)*i,s=Math.floor(e),n=s+1,r=e%1;return n>=t.length?t[s]:t[s]*(1-r)+t[n]*r}}var Ii=h(3775);class wi{constructor(){this.creativeView=[],this.start=[],this.firstQuartile=[],this.midpoint=[],this.thirdQuartile=[],this.impression=[],this.viewable_impression=[],this.complete=[],this.mute=[],this.unmute=[],this.pause=[],this.rewind=[],this.resume=[],this.fullscreen=[],this.exitFullscreen=[],this.expand=[],this.collapse=[],this.close=[],this.closeLinear=[],this.acceptInvitationLinear=[],this.acceptInvitation=[],this.skip=[],this.progress=[],this.playerExpand=[],this.playerCollapse=[],this.adExpand=[],this.adCollapse=[],this.fullScreen=[],this.canPlayThrough=[],this.stalled=[],this.waiting=[],this.otherAdInteraction=[]}}class _i{constructor(t){this.clickTrackings=[],this.customClicks=[],this.errorUrls=[],this.impressions=[],this.trackingEvents=new wi,t.inLine?this.Qy(t.inLine):this.Jy(t.wrapper)}Qy(t){this.Xy(t.errors),this.Yy(t.impressions),this.Ky(t.creatives)}Jy(t){this.Xy(t.errors),this.Yy(t.impressions),this.Ky(t.creatives)}Zy(t){this.tb(t.trackingEvents),this.ib(t.videoClicks)}ib(t){t&&(this.eb(t.clickTrackings),this.sb(t.customClicks))}eb(t){this.clickTrackings.push(...t)}sb(t){this.customClicks.push(...t)}tb(t){t.forEach((t=>{try{this.trackingEvents[t.name].push(t.uri)}catch(i){(0,o.n)({message:"AdManager_VastResponse_tracker",exception:`${t.name}`,callStack:i.stack,level:o.D.INFO})}}))}Ky(t){t.forEach((t=>{t.linear?this.Zy(t.linear):t.nonLinear&&this.tb(t.nonLinear.trackingEvents)}))}Xy(t){this.errorUrls.push(...t)}Yy(t){this.impressions.push(...t)}}const Si={[m.ProtoTrackerTriggerType.Impression]:"adImpression",[m.ProtoTrackerTriggerType.Complete25Pc]:"adQuartileFirst",[m.ProtoTrackerTriggerType.Complete50Pc]:"adQuartileSecond",[m.ProtoTrackerTriggerType.Complete75Pc]:"adQuartileThird",[m.ProtoTrackerTriggerType.ViewCompletion]:"adQuartileFourth",[m.ProtoTrackerTriggerType.VideoClick]:"adClick",[m.ProtoTrackerTriggerType.Pause]:"adPause",[m.ProtoTrackerTriggerType.Resume]:"adResume",[m.ProtoTrackerTriggerType.Mute]:"adMute",[m.ProtoTrackerTriggerType.Unmute]:"adUnmute"};class Pi{constructor(){this.adError=[],this.adWin=[],this.adImpression=[],this.adViewableImpression=[],this.adStarted=[],this.adVideoStart=[],this.adQuartileFirst=[],this.adQuartileSecond=[],this.adQuartileThird=[],this.adQuartileFourth=[],this.adClick=[],this.adPause=[],this.adResume=[],this.adSkip=[],this.adMute=[],this.adUnmute=[],this.adUserClose=[],this.adUserAcceptInvitation=[],this.adUserMinimize=[]}static track(t,i,s,n,o=window.document.head){if(!Array.isArray(t))return;const{width:h,height:a}=n.adContainerState.get(s.adType),{adBreakType:c}=n.adBreakState,{mediaDescription:d,mediaDuration:l,mediaId:u,mediaUrl:p,mediaTitle:f}=n.media;t.forEach((t=>{if(t.url)try{const n=i.replace(t.url,s.vendorId,{adMacros:{adWidth:h,adHeight:a,adPostion:c},mediaMacros:{mediaDescription:d,mediaDuration:l,mediaId:u,mediaUrl:p,mediaTitle:f}});switch(t.type){case m.ProtoTrackerType.Image:(0,e.Hh)([n],window);break;case m.ProtoTrackerType.Javascript:(0,r.dZ)({src:n},window.document.head,window);break;case m.ProtoTrackerType.IAS:(0,r.dZ)({src:n,attributes:[{name:Ii.b.GarbageCollector,value:""}]},o,window)}}catch(t){}}))}}function Ai(t,i){t.forEach((t=>function(t,i){(function(t,i){return i[Si[t]]})(t.trigger,i).push({type:t.type,url:t.url})}(t,i)))}function xi(t){return{type:m.ProtoTrackerType.Image,url:t}}function ki(t){return t.map((t=>xi(t)))}var Ti,Ci=h(5885);!function(t){t[t.HandlingSdkUrl=0]="HandlingSdkUrl",t[t.NetworkRequestUrl=1]="NetworkRequestUrl",t[t.XmlInvalidString=2]="XmlInvalidString",t[t.XmlParseGeneral=3]="XmlParseGeneral",t[t.XmlInvalidTree=4]="XmlInvalidTree",t[t.XmlInvalidAd=5]="XmlInvalidAd",t[t.XmlAdaptorWrapperLimit=6]="XmlAdaptorWrapperLimit",t[t.HTMLUnknownMimeType=7]="HTMLUnknownMimeType",t[t.ImaAdsManagerInit=8]="ImaAdsManagerInit",t[t.ImaVastEmptyResponse=9]="ImaVastEmptyResponse",t[t.ImaRequestException=10]="ImaRequestException",t[t.ImaTimeout=11]="ImaTimeout",t[t.ImaInvalidResponse=12]="ImaInvalidResponse",t[t.InvalidCreativeUrl=13]="InvalidCreativeUrl",t[t.BidIsNotTargetingAllowedEver=14]="BidIsNotTargetingAllowedEver"}(Ti||(Ti={}));const Ei={[Ti.HandlingSdkUrl]:m.ConnatixNoBidReasonEnum.CsRequestException,[Ti.NetworkRequestUrl]:m.ConnatixNoBidReasonEnum.CsRequestException,[Ti.XmlInvalidString]:m.ConnatixNoBidReasonEnum.CsEmptyResponse,[Ti.XmlParseGeneral]:m.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ti.XmlInvalidTree]:m.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ti.XmlInvalidAd]:m.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ti.XmlAdaptorWrapperLimit]:m.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ti.HTMLUnknownMimeType]:m.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ti.ImaAdsManagerInit]:m.ConnatixNoBidReasonEnum.CsRequestException,[Ti.ImaVastEmptyResponse]:m.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ti.ImaRequestException]:m.ConnatixNoBidReasonEnum.CsRequestException,[Ti.ImaTimeout]:m.ConnatixNoBidReasonEnum.Timeout,[Ti.ImaInvalidResponse]:m.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ti.InvalidCreativeUrl]:m.ConnatixNoBidReasonEnum.CsRequestException,[Ti.BidIsNotTargetingAllowedEver]:m.ConnatixNoBidReasonEnum.BidIsNotTargetingAllowedEver};class Mi{}Mi.getBidPriceByCreative={[m.ProtoCreativeTypeEnum.External]:t=>t.floorPrice||t.customCpm,[m.ProtoCreativeTypeEnum.ThirdParty]:t=>t.floorPrice||t.customCpm,[m.ProtoCreativeTypeEnum.MediaFile]:t=>t.floorPrice||t.customCpm,[m.ProtoCreativeTypeEnum.HeaderBidder]:t=>t.cpm,[m.ProtoCreativeTypeEnum.Rtb]:t=>gi(t.obfuscatedPrice),[m.ProtoCreativeTypeEnum.Tam]:t=>gi(t.obfuscatedPrice),[m.ProtoCreativeTypeEnum.TamDeal]:t=>gi(t.obfuscatedPrice),[m.ProtoCreativeTypeEnum.TamPrivateAuction]:t=>gi(t.obfuscatedPrice)};class Li{constructor(t){this.settings=t,this.metrics={created:Date.now()},this.bidPrice=this.nb(),this.yoScore=this.rb()}nb(){const{creativeType:t,floorPrice:i,customCpm:e}=this.settings.adManagerLineItem.protoLineItem,s=Mi.getBidPriceByCreative[t]({floorPrice:i,customCpm:e,obfuscatedPrice:this.settings.obfuscatedPrice,cpm:this.settings.cpm});return(0,n.r)(s)?s:((0,o.n)({message:"AdManager_ABaseCallAdaptor_no_cpm_on_bid",level:o.D.ERROR},{throttle:1,shouldSendMaxLog:!1}),0)}rb(){const{advertiserLineItemId:t,lineItemPriority:i}=this.settings.adManagerLineItem.protoLineItem;return this.settings.yoScoreCalculator.calculateBidYoScore(t,{priority:i,cpm:this.bidPrice})}}var Bi,Oi;!function(t){t.VOLUME_DETECTED="volume_detected",t.MALWARE_DETECTED="malware_detected",t.BADURI_DETECTED="baduri_detected"}(Bi||(Bi={})),function(t){t[t.None=0]="None",t[t.Mute=1]="Mute",t[t.ScrollHijack=2]="ScrollHijack",t[t.MemoryLeak=4]="MemoryLeak",t[t.Malware=8]="Malware",t[t.All=15]="All"}(Oi||(Oi={}));class Ri{constructor(){this.ob=new R.x}get onVpaidEvent(){return this.ob.asObservable()}handshakeVersion(t="2.0"){return"2.0"}}var Di,Vi,ji=h(9022);h(7129);!function(t){t.Timeout="timeout",t.TimeoutLoaded="timeout_loaded",t.ImaError="imaError",t.ImaScriptFailure="imaScriptFailure",t.ImaObjectNotFound="imaObjectNotFound",t.ImaManagerInit="imaManagerInit",t.ImaInitSdkError="initImasdkError",t.ImaLoadInitError="imaLoadInitError",t.ImaCreateWrapperError="imaCreateWrapperError",t.ImaInitWrapperError="imaInitWrapperError",t.VastVideoTagEventError="vastVideoTagEventError",t.VastUnsupportedMedia="vastUnsupportedMedia",t.VastPlayPromiseReject="playPromiseReject",t.VastNonLinearImageLoadFailure="nonLinearVastImageLoadFailure",t.AdStopped="adStopped",t.MuteEnforce="muteEnforce",t.VpaidOnLoad="vpaidOnLoad",t.VpaidInvalid="vpaidInvalid",t.VpaidGetVpaidAdError="vpaidGetVpaidAdError",t.CnxMediaNoRenditions="noRenditions",t.CnxMediaSrcNotSupported="srcNotSupported",t.InvalidVpaidEvent="invalidVpaidEvent",t.AdxOverlayNoFill="adxOverlayNoFill",t.AdxOverlayGptScriptLoad="adxOverlayGptScriptLoad",t.DisplayIntegratorIframeLoad="displayIntegratorIframeLoad",t.EnforcementMalware="malwareDetected",t.EnforcementVolume="volumeDetected",t.Cancelled="adManagerRemoved",t.DomainBlocked="domainBlocked",t.AdaptorStartAdError="adaptorStartAdError",t.AdaptorInitAdError="adaptorInitAdError",t.WrapperStartAdError="wrapperStartAdError",t.WrapperInitAdError="wrapperInitAdError",t.NonLinearZeroDimensions="nonLinearzeroDimensions",t.NonLinearImageToLarge="nonLinearImageToLarge",t.NonLinearUnsupportedMedia="nonLinearUnsupportedMedia"}(Di||(Di={})),function(t){t[t.Win=0]="Win",t[t.AdLoaded=1]="AdLoaded",t[t.AdStarted=2]="AdStarted",t[t.AdImpression=3]="AdImpression"}(Vi||(Vi={}));class Fi{constructor(t){this.hb=t,this.ab=new Map,(0,n.$K)(this.hb.settings.bidLifecycle)||(this.hb.settings.bidLifecycle={})}onTrackingLifecycleEvent(t){switch(this.ab.set(t,Date.now()),t){case Vi.AdLoaded:this.cb();break;case Vi.AdImpression:this.lb()}}cb(){this.hb.settings.bidLifecycle.winToAdLoadedTime=this.ub}lb(){this.hb.settings.bidLifecycle.startAdToImpressionTime=this.pb}get pb(){return this.ab.get(Vi.AdImpression)&&this.ab.get(Vi.AdStarted)?this.ab.get(Vi.AdImpression)-this.ab.get(Vi.AdStarted):0}get ub(){return this.ab.get(Vi.AdLoaded)&&this.ab.get(Vi.Win)?this.ab.get(Vi.AdLoaded)-this.ab.get(Vi.Win):0}}var Ni,Ui,$i=h(2239);!function(t){t[t.IDLE=0]="IDLE",t[t.LOADING=1]="LOADING",t[t.CONSUMED_LOADING=2]="CONSUMED_LOADING",t[t.LOADED=3]="LOADED",t[t.STARTING=4]="STARTING",t[t.IMPRESSION=5]="IMPRESSION",t[t.CONSUMED_LOADED=6]="CONSUMED_LOADED",t[t.INVALIDATED=7]="INVALIDATED"}(Ni||(Ni={})),function(t){t.IMPRESSION_TIMEOUT="IMPRESSION_TIMEOUT",t.VIEWABLE_IMPRESSION_TIMEOUT="VIEWABLE_IMPRESSION_TIMEOUT",t.SKIP_AD_TIMEOUT="SKIP_AD_TIMEOUT",t.STOP_AD_TIMEOUT="STOP_AD_TIMEOUT",t.AD_LOADED_TIMEOUT="AD_LOADED_TIMEOUT"}(Ui||(Ui={}));const qi=[X.fI.AdImpression,X.fI.AdSkipped,X.fI.AdStopped,X.fI.AdError,X.fI.AdVideoFirstQuartile,X.fI.AdVideoMidpoint,X.fI.AdVideoThirdQuartile,X.fI.AdVideoComplete],Hi="cnx-ad-bid-slot-selected",zi="Connatix Ad";class Wi extends Ri{constructor(t,i){super(),this.Qs=t,this.settings=i,this.fb=null,this.vb=null,this.gb=null,this.yb=null,this.bb=void 0,this.Ib=!1,this.wb=!1,this._b=!1,this.Cf=!1,this.Sb=!1,this.Pb=!1,this.Ab=!1,this.xb=[],this.kb=null,this.Tb=new R.x,this.Cb=new R.x,this.Eb=new R.x,this.Pd=[],this.Mb=!1,this.Lb=()=>{this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.Timeout}}),this.xb.length&&(0,o.n)({message:"BidAdaptor_ImpressionTimeout",exception:`advertiserLineItemId:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId}_creativeId:${this.creativeId}_bidid:${this.settings.id}`,callStack:JSON.stringify(this.xb),level:o.D.WARN}),this.Ob()},this.Rb=()=>{this.Db(),this.Vb(Ui.VIEWABLE_IMPRESSION_TIMEOUT).clearTimeout(),this.settings.viewabilityService.off(this.fb,this.jb)},this.jb=t=>{const i=this.Vb(Ui.VIEWABLE_IMPRESSION_TIMEOUT);this.Eb.next(t),t?i.timeoutHandle.timeoutId||i.setTimeout():i.clearTimeout()},this.Fb=()=>{this.Bb({type:X.fI.AdSkipped}),this.Ob()},this.Ub=()=>{this.Bb({type:X.fI.AdStopped,payload:{shouldTrackPostBid:!0}}),this.Ob()},this.qb=()=>{this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.TimeoutLoaded}}),this.Ob()},this.Vb=t=>{const i=this.Hb[t];return{timeoutHandle:i,setTimeout:()=>{i.timeoutId=this.Qs.setTimeout((()=>{i.callback()}),i.timeout)},clearTimeout:()=>{null!==i.timeoutId&&(this.Qs.clearTimeout(i.timeoutId),i.timeoutId=null)}}},this.status=Ni.IDLE,this.price=this.settings.price,this.yoScore=this.settings.yoScore,this.zb=mi.h.getSessionChildContainer(this.settings.sessionId).resolve(Ci.P),this.Gb=Date.now(),this.creativeId=this.settings.externalCreativeId,this.Qb=`cnx-ad-bid-slot-id-${this.settings.requestMetadata.data.cnxBidId}`,this.Jb=`cnx-ad-slot-${this.settings.id}`;const{adType:e}=this.settings.adManagerLineItem.protoLineItem;this.Hb={[Ui.IMPRESSION_TIMEOUT]:{callback:this.Lb,timeout:25e3,timeoutId:null},[Ui.VIEWABLE_IMPRESSION_TIMEOUT]:{callback:this.Rb,timeout:ji.xs[e],timeoutId:null},[Ui.SKIP_AD_TIMEOUT]:{callback:this.Fb,timeout:500,timeoutId:null},[Ui.STOP_AD_TIMEOUT]:{callback:this.Ub,timeout:500,timeoutId:null},[Ui.AD_LOADED_TIMEOUT]:{callback:this.qb,timeout:25e3,timeoutId:null}},this.Sv=i.urlSuffixerService}set status(t){this.Xb=t,this.Tb.next(t)}get status(){return this.Xb}get onStatusChanged(){return this.Tb.asObservable()}get createdTimestamp(){return this.Gb}get loadingTimeMs(){return this.Yb}get startingTimeMs(){return this.Kb}get started(){return this._b}get errorReason(){return this.Zb}get shouldTrackPostbid(){return this.Mb}get onAdSlotViewabilityChanged(){return this.Eb.asObservable()}invalidate(){this._b||(this.status=Ni.INVALIDATED)}skipAd(){this.Vb(Ui.SKIP_AD_TIMEOUT).setTimeout()}stopAd(t){if((0,e.Vm)([95,5])){const i=mi.h.getSessionChildContainer(this.settings.sessionId).resolve($i.B);(0,o.n)({message:"META_LOW_VCR_"+(i.implementationType===m.ProtoImplementationType.Amp?"AMP":"NOT_AMP"),level:o.D.INFO,callStack:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,exception:t})}this.Vb(Ui.STOP_AD_TIMEOUT).setTimeout(),this.tI()}startAd(){const{adManagerLineItem:t,id:i,requestMetadata:e}=this.settings;this.iI=Date.now(),this._b=!0,this.status=Ni.STARTING,this.Pb&&(0,o.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"startAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.Jb}`,level:o.D.CRITICAL}),this.Pb=!0,this.Vb(Ui.IMPRESSION_TIMEOUT).setTimeout(),this.tI()}initAd(t,i,e,s,n,r,h){this.eI=Date.now(),this.status=Ni.LOADING,this.Sb&&(0,o.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"initAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.Jb}`,level:o.D.CRITICAL}),this.Sb=!0,this.Vb(Ui.AD_LOADED_TIMEOUT).setTimeout(),this.sI(h),this.nI=new Fi(this),this.nI.onTrackingLifecycleEvent(Vi.Win)}setAdVolume(t){this.vb.volume=t,(0,r.Q1)(this.vb,t),this.zb.isImaTestCaseForSS()||(t<=0?this.settings.adEnforcer.start(Oi.Mute):this.settings.adEnforcer.stop(Oi.Mute))}getTrackerSlot(){return this.gb}get impressionStarted(){return this.Ib}get creativeId(){return this.bb}set creativeId(t){(0,n.QM)(this.creativeId)||(this.bb=t)}get onAdViewableImpression(){return this.Cb.asObservable()}oI(t){let i;(0,n.hj)(t.payload.skipOffset)&&(i=t.payload.skipOffset);const e={type:X.fI.AdLoaded,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adLoadedData:{skipOffset:i},adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode}};return this.settings.adLoadedPayload=e,e}tI(){if(this.vb){const t=this.vb.getAttribute("aria-hidden");this.vb.setAttribute("aria-hidden","true"===t?"false":"true")}}hI(t){return{type:X.fI.AdImpression,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode,adSourceData:{moatTrackingEnabled:this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled,creativeId:this.settings.adManagerLineItem.protoLineItem.cnxCreativeId,adId:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,length:this.getAdDuration(),adVideoUrl:this.adVideoUrl,name:zi,skipOffset:this.skipOffset},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId}}}}get skipOffset(){var t,i,e;return null===(e=null===(i=null===(t=this.settings.adLoadedPayload)||void 0===t?void 0:t.payload)||void 0===i?void 0:i.adLoadedData)||void 0===e?void 0:e.skipOffset}aI(t){return{type:X.fI.AdVideoStart,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode,adSourceData:{moatTrackingEnabled:this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled,creativeId:this.settings.adManagerLineItem.protoLineItem.cnxCreativeId,adId:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,length:this.getAdDuration(),name:zi},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId},logInMobiInfo:t.payload.logInMobiInfo}}}Bb(t){if(t.payload||(t.payload={}),this.cI(t.type),t.payload.adType=this.settings.adManagerLineItem.protoLineItem.adType,!this.dI(t))return void this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.InvalidVpaidEvent}});const{adManagerLineItem:i,id:e,requestMetadata:s}=this.settings,{cnxBidId:o}=s.data;switch(t.type){case X.fI.AdLoaded:0,this.nI.onTrackingLifecycleEvent(Vi.AdLoaded),this.Vb(Ui.AD_LOADED_TIMEOUT).clearTimeout(),this.ob.next(this.oI(t)),this.wb=!0,this.Yb=(0,n.hj)(this.eI)?Date.now()-this.eI:0,this.status=Ni.LOADED;break;case X.fI.AdImpression:this.Kb=(0,n.hj)(this.iI)?Date.now()-this.iI:0,this.nI.onTrackingLifecycleEvent(Vi.AdImpression),this.Vb(Ui.IMPRESSION_TIMEOUT).clearTimeout(),this.uI(),(0,r.cn)(this.gb,Hi),this.ob.next(this.hI(t)),this.Ib=!0,this.status=Ni.IMPRESSION;break;case X.fI.AdVideoStart:this.nI.onTrackingLifecycleEvent(Vi.AdStarted),this.ob.next(this.aI(t));break;case X.fI.AdStopped:case X.fI.AdSkipped:case X.fI.AdError:this.pI(t);break;default:this.ob.next(t)}}pI(t){var i;this.tI(),this.Cf?(0,o.n)({message:"AdManager_ABaseBidAdaptor_double_destroy",exception:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,level:o.D.WARN}):((0,n.hj)(this.Yb)||((0,n.hj)(this.eI)?this.Yb=Date.now()-this.eI:this.Yb=0),(0,n.hj)(this.Kb)||((0,n.hj)(this.iI)?this.Kb=Date.now()-this.iI:this.Kb=0),X.fI.AdError===t.type&&(this.Zb=t.payload.errorMessage,this.Mb=!0),X.fI.AdStopped===t.type&&(this.Zb=Di.AdStopped,this.Mb=!!(null===(i=t.payload)||void 0===i?void 0:i.shouldTrackPostBid)),X.fI.AdSkipped===t.type&&(this.Zb=Di.AdStopped,this.Mb=!1),this.Im(),this.ob.next(t),this.Xb!==Ni.INVALIDATED&&(this.wb?this.status=Ni.CONSUMED_LOADED:(this.Xb!==Ni.LOADING&&(0,o.n)({message:"Bid_idle_consumed",level:o.D.WARN},{throttle:1,shouldSendMaxLog:!1}),this.status=Ni.CONSUMED_LOADING)))}sI(t){this.yb=this.mI(),this.gb=this.yb.slotsContainer,(0,r.cn)(this.gb,this.Qb),this.fb=this.yb.adSlot,this.fb.id=this.Jb,this.gb.id=this.settings.bidSlotId,this.vb=this.yb.videoSlot,this.vb.volume=t,(0,r.Q1)(this.vb,t),this.zb.isImaTestCaseForSS()||(this.settings.adEnforcer.registerContainer(this.gb,this.Jb),this.Pd.push(this.settings.adEnforcer.onEnforcerEvent.subscribe((t=>{this.vI(t)}))),this.settings.adEnforcer.start(Oi.All))}mI(){return this.settings.adSlotContainerRecycler.requestAdSlot(this.settings.adContainer)}Im(){this.Cf=!0,(0,r.IV)(this.gb,Hi),(0,r.IV)(this.gb,this.Qb),this.fb.removeAttribute("id"),this.gb.removeAttribute("id"),(0,H.i)(this.Pd),this.Ob(),this.settings.adEnforcer.deregisterContainer(this.gb),this.settings.viewabilityService.off(this.fb,this.jb),null!==this.kb&&this.Qs.clearTimeout(this.kb),this.gI()}gI(){this.kb=this.Qs.setTimeout((()=>{this.settings.adSlotContainerRecycler.destroyAdSlot(this.yb)}),500)}Db(){const{advertiserLineItemId:t,publisherLineItemId:i}=this.settings.adManagerLineItem.protoLineItem;this.Cb.next({advertiserLineItemId:t,publisherLineItemId:i,rtbSeatId:this.settings.requestMetadata.data.rtbSeatId,dspId:this.settings.requestMetadata.data.dspId,rtbAdomain:this.settings.requestMetadata.data.rtbAdomain})}uI(){const t=ji.fJ,i=this.fb;this.settings.viewabilityService.on(i,this.jb,{threshold:t}),this.jb(this.settings.viewabilityService.check({threshold:t,element:i}))}Ob(){Object.keys(this.Hb).forEach((t=>{this.Vb(t).clearTimeout()}))}dI(t){return!(!this.Ib&&(t.type===X.fI.AdStopped||t.type===X.fI.AdSkipped))}vI(t){if(t.detectedContainer!==this.gb)return;let i;switch(t.type){case Bi.BADURI_DETECTED:i="AdManager_enforcer_BadUri";break;case Bi.MALWARE_DETECTED:i="AdManager_enforcer_malware",this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.EnforcementMalware}});break;case Bi.VOLUME_DETECTED:i="AdManager_enforcer_soundBlock",this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.EnforcementVolume}})}(0,o.n)({message:i,exception:t.message,level:o.D.WARN})}cI(t){if(!this.Sb&&(qi.includes(t)||t===X.fI.AdLoaded)){if(this.xb.push(t),this.Ab)return;this.Ab=!0,(0,o.n)({message:`${this.adMediaType?this.adMediaType:""}BidAdaptor_AdIdle_${t}BeforeInitAd`,exception:`advertiserLineItemId:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId}_creativeId:${this.creativeId}_bidid:${this.settings.id}`,callStack:"PostBidInitAd",level:o.D.WARN})}if(this.wb&&!this.Pb&&qi.includes(t)){if(this.xb.push(t),this.Ab)return;this.Ab=!0,(0,o.n)({message:`${this.adMediaType?this.adMediaType:""}BidAdaptor_AdLoaded_${t}WithoutStartAd`,exception:`advertiserLineItemId:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId}_creativeId:${this.creativeId}_bidid:${this.settings.id}`,callStack:"PostBidStartAd",level:o.D.WARN})}}yI(t,i,e){const s=this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,n=this.creativeId;(0,o.n)({message:`AdManager_${t}_${i}`,exception:`advertiserLineItemId:${s}_creativeId:${n}_errorMessage:${null==e?void 0:e.message}`,callStack:null==e?void 0:e.stack,level:o.D.WARN},{throttle:5})}}var Gi;!function(t){t.BANNED_IMA_ADS_ID=["9026814","9053547"],t.KEYWORDS_FOR_BANNED_VAST=[]}(Gi||(Gi={}));var Qi=h(3326);class Ji extends Ri{constructor(t,i,e,s,n,r,o,h){super(),this.bI=t,this.Si=i,this.II=e,this.wI=s,this._I=n,this.SI=r,this.AI=o,this.xI=h,this.kI=new R.x,this.TI=!1,this.CI=t=>{if(!this.EI(t))return;let i="";try{i=t.getError().getMessage()+"_"+t.getError().getErrorCode()+"_"+t.getError().getVastErrorCode()}catch(t){}this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.ImaError+"_"+i}})},this.MI=t=>{const i=this.bI.AdEvent.Type;switch(t.type){case i.CLICK:this.ob.next({type:X.fI.AdClickThru,payload:{}});break;case i.LOADED:this.zo(t);break;case i.IMPRESSION:const e={adsManager:this._I,adContainer:this.LI,viewMode:this.BI(this.OI),adTag:this.wI};this.ob.next({type:X.fI.AdVideoStart}),this.ob.next({type:X.fI.AdImpression,payload:{imaMetadata:e}});break;case i.STARTED:this.ob.next({type:X.fI.AdStarted});break;case i.FIRST_QUARTILE:this.ob.next({type:X.fI.AdVideoFirstQuartile});break;case i.MIDPOINT:this.ob.next({type:X.fI.AdVideoMidpoint});break;case i.THIRD_QUARTILE:this.ob.next({type:X.fI.AdVideoThirdQuartile});break;case i.COMPLETE:this.ob.next({type:X.fI.AdVideoComplete}),this.ob.next({type:X.fI.AdStopped,payload:{shouldTrackPostBid:!0}});break;case i.ALL_ADS_COMPLETED:break;case i.DURATION_CHANGE:this.ob.next({type:X.fI.AdDurationChange});break;case i.PAUSED:this.ob.next({type:X.fI.AdPaused});break;case i.RESUMED:this.ob.next({type:X.fI.AdPlaying});break;case i.LINEAR_CHANGED:this.ob.next({type:X.fI.AdLinearChange});break;case i.SKIPPABLE_STATE_CHANGED:this.ob.next({type:X.fI.AdSkippableStateChange});break;case i.SKIPPED:this.ob.next({type:X.fI.AdSkipped});break;case i.VOLUME_CHANGED:this.ob.next({type:X.fI.AdVolumeChange});break;case i.USER_CLOSE:this.ob.next({type:X.fI.AdUserClose});break;case i.LOG:this.ob.next({type:X.fI.AdLog})}},this.zb=mi.h.getSessionChildContainer(this.xI).resolve(Ci.P),this.RI()}get onCreativeReceived(){return this.kI.asObservable()}initAd(t,i,e,s,n,r){this.LI=r.slot,this.DI=r.videoSlot,this.OI=e||X.zc.Normal;try{this.zb.isImaTestCaseForSS()||this.zb.isLegacyDotComDomain()||this._I.setVolume(0),this._I.init(t,i,this.BI(this.OI))}catch(t){this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.ImaManagerInit}})}}startAd(){try{this._I.start()}catch(t){this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this._I.stop(),this.ob.next({type:X.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){this._I.resize(t,i,this.BI(e))}pauseAd(){this._I.pause()}resumeAd(){this._I.resume(),this.Si===L.M.Ios&&(0,r.UR)(this.DI)}expandAd(){this._I.expand()}collapseAd(){this._I.collapse()}skipAd(){this._I.skip()}getAdRemainingTime(){return this._I.getRemainingTime()||0}getAdDuration(){return this.VI?this.VI.getDuration():0}getAdVolume(){return this.zb.isImaTestCaseForSS()||this.zb.isLegacyDotComDomain()?this.zb.adManagerSound:this._I.getVolume()}getAdMediaWidth(){return this.VI?this.VI.getVastMediaWidth():0}getAdMediaHeight(){return this.VI?this.VI.getVastMediaHeight():0}setAdVolume(t){(!this.zb.isImaTestCaseForSS()&&!this.zb.isLegacyDotComDomain()||t!==this.zb.adManagerSound||!this.TI&&0!==t)&&(this.TI=!0,this._I.setVolume(t))}getMediaFile(){return this.VI?this.VI.getMediaUrl():void 0}RI(){this.II.addEventListener(this.bI.AdErrorEvent.Type.AD_ERROR,this.CI),this._I.addEventListener(this.bI.AdErrorEvent.Type.AD_ERROR,this.CI),Object.keys(this.bI.AdEvent.Type).forEach((t=>{this._I.addEventListener(this.bI.AdEvent.Type[t],this.MI,!1)}))}FI(){this.II.removeEventListener(this.bI.AdErrorEvent.Type.AD_ERROR,this.CI),this._I.removeEventListener(this.bI.AdErrorEvent.Type.AD_ERROR,this.CI),Object.keys(this.bI.AdEvent.Type).forEach((t=>{this._I.removeEventListener(this.bI.AdEvent.Type[t],this.MI,!1)}))}BI(t){return t===X.zc.Fullscreen?this.bI.ViewMode.FULLSCREEN:this.bI.ViewMode.NORMAL}NI(t){return Gi.BANNED_IMA_ADS_ID.some((i=>i===t))}EI(t){const i=t.getUserRequestContext();return!i||i.id===this.SI.id}zo(t){if(this.VI=t.getAd(),this.NI(this.VI.getAdId()))return void this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.VpaidInvalid}});this.kI.next(this.VI.getCreativeId());let i=-1,e="";try{i=this.VI.getSkipTimeOffset();const s=t.getAdData().clickThroughUrl;e=(0,n.QM)(s)?s:void 0}catch(t){}(0,Qi.A)(this.AI,e).then((t=>{t?this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.DomainBlocked}}):this.ob.next({type:X.fI.AdLoaded,payload:{skipOffset:i}})}))}destroy(){try{this.FI(),setTimeout((()=>{this._I.destroy()}))}catch(t){}}}const Xi={ImaObjectNotFound:Di.ImaObjectNotFound,ImaScriptFailure:Di.ImaScriptFailure},Yi="//imasdk.googleapis.com/js/sdkloader/ima3.js";class Ki{static preloadImaSdk(t){(0,r._w)(Yi,t)}static fetchImaSdk(t,i){return new Promise(((s,n)=>{const h=Ki.UI(t);if(h)return void s(h);const a=i&&1===(0,e.Vm)([99,1]);(0,r.dZ)({src:Yi},t.document.head,t,(()=>{const i=Ki.UI(t);i?s(i):(a&&(0,o.n)({message:"AdManager_ImaIntegrator_no_image_object_found_after_loading_script",level:o.D.CRITICAL},{throttle:2,shouldSendMaxLog:!1}),n(Xi.ImaObjectNotFound))}),(()=>{n(Xi.ImaScriptFailure)}),a,"AdManager_ImaIntegrator_unable_to_insert_ima_sdk_script")}))}static UI(t){return t.google&&t.google.ima}}class Zi extends Wi{constructor(t,i){super(t,i),this.Qs=t,this.settings=i,this.yb=null,this.adMediaType="ima",this.adSourceType=m.ProtoAdsourceTypeEnum.Ima,this.$I=[],this.yb=this.settings.imaAdSlotContainer,this.qI=new Ji(this.settings.imaSdk,this.settings.os,this.settings.imaAdsLoader,this.settings.url,this.settings.imaAdsManager,this.settings.requestAdsContext,this.settings.adManagerLineItem.protoLineItem.publisherLineItemId,this.settings.sessionId)}initAd(t,i,e,s,n,r,o){try{super.initAd(t,i,e,s,n,r,o),this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled&&this.HI(),this.$I.push(this.qI.onVpaidEvent.subscribe((t=>{this.Bb(t)})),this.qI.onCreativeReceived.subscribe((t=>{this.creativeId=t}))),this.qI.initAd(t,i,e,s,n,{slot:this.fb,videoSlot:this.vb})}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.qI.startAd()}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.qI.stopAd(t)}catch(t){this.yI("ImaBidAdaptor","stopAd",t)}}resizeAd(t,i,e){try{this.qI.resizeAd(t,i,e)}catch(t){this.yI("ImaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.qI.pauseAd()}catch(t){this.yI("ImaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.qI.resumeAd()}catch(t){this.yI("ImaBidAdaptor","resumeAd",t)}}expandAd(){try{this.qI.expandAd()}catch(t){this.yI("ImaBidAdaptor","expandAd",t)}}collapseAd(){try{this.qI.collapseAd()}catch(t){this.yI("ImaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.qI.skipAd()}catch(t){this.yI("ImaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.qI.getAdRemainingTime()}catch(t){return this.yI("ImaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.qI&&this.qI.getAdDuration()||this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.yI("ImaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.qI.getAdVolume()}catch(t){return this.yI("ImaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.qI.getAdMediaWidth(),height:this.qI.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.qI.setAdVolume(t)}catch(t){this.yI("ImaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.qI.getMediaFile()}get declaredDurationInSeconds(){return this.qI.getAdDuration()}hI(t){const i=super.hI(t);return i.payload.adSourceData.imaMetadata=t.payload.imaMetadata,i}mI(){return this.yb}gI(){this.settings.adSlotContainerRecycler.recycleAdSlot(this.yb)}HI(){Ki.fetchImaSdk(this.settings.globalDomUtilsService.getGlobalClosestTop().topFrame,!1)}Im(){try{super.Im(),(0,H.i)(this.$I),this.qI.destroy()}catch(t){this.yI("ImaBidAdaptor","_destroy",t)}}}class te{constructor(t,i,s,n,r,h=null,a,c,d,l,u=!1){this.bI=t,this.II=i,this.av=s,this.dv=n,this.wI=r,this.zI=h,this.DI=a,this.Ds=c,this.xI=d,this.WI=l,this.GI=u,this.JI=new R.x,this.XI=new R.x,this.YI={id:(0,e.qs)()},this._I=null,this.CI=t=>{if(!this.EI(t))return;const i=t.getError().getErrorCode();switch(this.GI&&(0,o.n)({message:"Ima_Error_Code",exception:t.getError().getMessage(),level:o.D.INFO},{throttle:5}),i){case this.bI.AdError.ErrorCode.VAST_EMPTY_RESPONSE:this.KI(Ti.ImaVastEmptyResponse);break;case this.bI.AdError.ErrorCode.VAST_WRAPPER_ERROR:case this.bI.AdError.ErrorCode.VAST_MALFORMED_RESPONSE:this.KI(Ti.ImaInvalidResponse);break;default:this.KI(Ti.ImaRequestException)}},this.ZI=t=>{this.EI(t)&&(this._I=t.getAdsManager(this.DI,{loadVideoTimeout:25*J.s_}),this.tw(),this.JI.next({imaAdsManager:this._I,requestAdsContext:this.YI}))},this.II.addEventListener(this.bI.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.ZI),this.II.addEventListener(this.bI.AdErrorEvent.Type.AD_ERROR,this.CI)}get onSuccess(){return this.JI.asObservable()}get onError(){return this.XI.asObservable()}loadAd(){const t=new this.bI.AdsRequest;["3ebdd57e-b5b8-4fd8-8887-6ae94a978a12","fe9242a7-7f5a-40f0-84ad-0d1cb921dbbe","5ee7c0e2-db41-417d-a2f2-4d91037b85bd","a28964ae-afa3-45d3-9f00-fa228cf89d74"].includes(this.WI)&&(t.omidAccessModeRules={},t.omidAccessModeRules[google.ima.OmidVerificationVendor.OTHER]=google.ima.OmidAccessMode.DOMAIN,t.omidAccessModeRules[google.ima.OmidVerificationVendor.INTEGRAL_AD_SCIENCE]=google.ima.OmidAccessMode.DOMAIN,t.omidAccessModeRules[google.ima.OmidVerificationVendor.MOAT]=google.ima.OmidAccessMode.DOMAIN,t.omidAccessModeRules[google.ima.OmidVerificationVendor.DOUBLEVERIFY]=google.ima.OmidAccessMode.DOMAIN,t.omidAccessModeRules[google.ima.OmidVerificationVendor.PIXELATE]=google.ima.OmidAccessMode.DOMAIN,t.omidAccessModeRules[google.ima.OmidVerificationVendor.NIELSEN]=google.ima.OmidAccessMode.DOMAIN,t.omidAccessModeRules[google.ima.OmidVerificationVendor.COMSCORE]=google.ima.OmidAccessMode.DOMAIN,t.omidAccessModeRules[google.ima.OmidVerificationVendor.MEETRICS]=google.ima.OmidAccessMode.DOMAIN,t.omidAccessModeRules[google.ima.OmidVerificationVendor.GOOGLE]=google.ima.OmidAccessMode.FULL);const i=mi.h.getSessionChildContainer(this.xI).resolve(Ci.P);if((0,n.QM)(this.zI)?t.adsResponse=this.zI:t.adTagUrl=this.wI,i.isImaTestCaseForSS()||i.isLegacyDotComDomain()){const e=i.adManagerSound<=0;t.setAdWillPlayMuted(e)}t.linearAdSlotWidth=t.nonLinearAdSlotWidth=this.av,t.linearAdSlotHeight=t.nonLinearAdSlotHeight=this.dv,t.pageUrl=this.Ds,this.II.requestAds(t,this.YI)}KI(t){this.XI.next(t)}tw(){this.II.removeEventListener(this.bI.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.ZI),this.II.removeEventListener(this.bI.AdErrorEvent.Type.AD_ERROR,this.CI)}EI(t){const i=t.getUserRequestContext();return!i||i.id===this.YI.id}destroy(){var t;try{this.tw(),null===(t=this._I)||void 0===t||t.destroy()}catch(t){}}}var ie=h(8395);class ee extends Li{constructor(t){super(t),this.settings=t,this.iw=!1,this.ew=[]}fetchBid(){this.metrics.fetchStart=(new Date).getTime(),this.rw=this.settings.adSlotContainerRecycler.requestAdSlotIma(this.settings.adContainer);const t=new Promise(((t,i)=>{setTimeout((()=>{i(Ti.ImaTimeout)}),25e3)})),i=this.ow(this.rw);return Promise.race([i,t]).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),this.iw=!0,this.hw&&(0,H.i)(this.ew),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),this.iw=!0,this.hw&&((0,H.i)(this.ew),this.hw.destroy(),this.settings.adSlotContainerRecycler.recycleAdSlot(this.rw)),t}))}ow(t){return t.fetchImaDependencies().then((t=>(this.aw=t,this.cw(t)))).then((t=>this.dw(t))).catch((t=>{throw(0,n.$K)(t)?t:Ti.ImaRequestException}))}cw(t){return this.iw?Promise.reject():new Promise(((i,e)=>{const s=this.lw();this.hw=new te(t.imaSdk,t.imaAdsLoader,s.width,s.height,this.settings.url,this.settings.xml,this.rw.videoSlot,this.settings.pageUrl,this.settings.sessionId,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId),this.ew.push(this.hw.onSuccess.subscribe((t=>{i(t)})),this.hw.onError.subscribe((t=>{e(t)}))),this.hw.loadAd()}))}lw(){return this.settings.callingState.adContainerState.get(this.settings.adManagerLineItem.protoLineItem.adType)}dw(t){const i=mi.h.getGlobalContainer().resolve(ie.f);return new Zi(i,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,url:this.settings.url,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,externalCreativeId:this.settings.creativeId,imaSdk:this.aw.imaSdk,imaAdsLoader:this.aw.imaAdsLoader,imaAdsManager:t.imaAdsManager,requestAdsContext:t.requestAdsContext,imaAdSlotContainer:this.rw,bidSlotId:this.settings.bidSlotId,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService,sessionId:this.settings.sessionId,isIma:!0,yoScore:this.yoScore,price:this.bidPrice})}}class se extends Wi{constructor(t,i){super(t,i),this.Qs=t,this.settings=i,this.yb=null,this.adMediaType="ima",this.adSourceType=m.ProtoAdsourceTypeEnum.Ima,this.$I=[],this.iw=!1,this.ew=[]}initAd(t,i,e,s,n,r,o){try{super.initAd(t,i,e,s,n,r,o),this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled&&this.HI(),this.uw().then((r=>{try{this.pw(r)}catch(t){return void this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.ImaCreateWrapperError+`_${t.message}`}})}this.$I.push(this.qI.onVpaidEvent.subscribe((t=>{this.Bb(t)})),this.qI.onCreativeReceived.subscribe((t=>{this.creativeId=t})));try{this.qI.initAd(t,i,e,s,n,{slot:this.fb,videoSlot:this.vb})}catch(t){return void this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.ImaInitWrapperError+`_${t.message}`}})}})).catch((t=>{this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.ImaLoadInitError+`_${t}`}})}))}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.qI.startAd()}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.qI.stopAd(t)}catch(t){this.yI("ImaBidAdaptor","stopAd",t)}}resizeAd(t,i,e){try{this.qI.resizeAd(t,i,e)}catch(t){this.yI("ImaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.qI.pauseAd()}catch(t){this.yI("ImaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.qI.resumeAd()}catch(t){this.yI("ImaBidAdaptor","resumeAd",t)}}expandAd(){try{this.qI.expandAd()}catch(t){this.yI("ImaBidAdaptor","expandAd",t)}}collapseAd(){try{this.qI.collapseAd()}catch(t){this.yI("ImaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.qI.skipAd()}catch(t){this.yI("ImaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.qI.getAdRemainingTime()}catch(t){return this.yI("ImaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.qI&&this.qI.getAdDuration()||this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.yI("ImaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.qI.getAdVolume()}catch(t){return this.yI("ImaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.qI.getAdMediaWidth(),height:this.qI.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.qI.setAdVolume(t)}catch(t){this.yI("ImaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.qI.getMediaFile()}get declaredDurationInSeconds(){return this.qI.getAdDuration()}hI(t){const i=super.hI(t);return i.payload.adSourceData.imaMetadata=t.payload.imaMetadata,i}mI(){return this.settings.adSlotContainerRecycler.requestAdSlotIma(this.settings.adContainer)}pw(t){this.qI=new Ji(this.fw.imaSdk,this.settings.os,this.fw.imaAdsLoader,this.settings.url,t.imaAdsManager,t.requestAdsContext,this.settings.adManagerLineItem.protoLineItem.publisherLineItemId,this.settings.sessionId)}uw(){return this.ow(this.yb).then((t=>(this.iw=!0,this.hw&&(0,H.i)(this.ew),Promise.resolve(t)))).catch((t=>(this.iw=!0,this.hw&&((0,H.i)(this.ew),this.hw.destroy()),Promise.reject(t))))}ow(t){return t.fetchImaDependencies().then((t=>(this.fw=t,this.cw(t)))).then((t=>Promise.resolve(t))).catch((t=>(0,n.$K)(t)?Promise.reject(t):Promise.reject(Ti.ImaRequestException)))}cw(t){return this.iw?Promise.reject():new Promise(((i,e)=>{const s=this.lw();this.hw=new te(t.imaSdk,t.imaAdsLoader,s.width,s.height,this.settings.url,this.settings.xml,this.yb.videoSlot,this.settings.pageUrl,this.settings.sessionId,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,!0),this.ew.push(this.hw.onSuccess.subscribe((t=>{i(t)})),this.hw.onError.subscribe((t=>{e(t)}))),this.hw.loadAd()}))}lw(){return this.settings.callingState.adContainerState.get(this.settings.adManagerLineItem.protoLineItem.adType)}HI(){Ki.fetchImaSdk(this.settings.globalDomUtilsService.getGlobalClosestTop().topFrame,!1)}Im(){var t;try{super.Im(),(0,H.i)(this.$I),null===(t=this.qI)||void 0===t||t.destroy()}catch(t){this.yI("ImaBidAdaptor","_destroy",t)}}}var ne=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class re extends Li{constructor(t){super(t),this.settings=t}fetchBid(){return ne(this,void 0,void 0,(function*(){this.metrics.fetchStart=(new Date).getTime();const t=mi.h.getGlobalContainer().resolve(ie.f),i=new se(t,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,url:this.settings.url,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,externalCreativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService,sessionId:this.settings.sessionId,xml:this.settings.xml,yoScore:this.yoScore,price:this.bidPrice});return this.metrics.fetchEnd=(new Date).getTime(),i}))}}class oe{constructor(t){this.type=t.keyAttributes.type}}var he,ae,ce,de=h(1310);!function(t){t[t.Javascript=0]="Javascript",t[t.Video=1]="Video"}(he||(he={})),function(t){function i(t){return/^\s*$/.test(t)?null:/^(?:true|false)$/i.test(t)?"true"===t.toLowerCase():isFinite(t)?parseFloat(t):isFinite(Date.parse(t))?new Date(t):"string"==typeof t?t.trim():t}t.JXONTree=function t(e){let s=0,n="";if(this.keyAttributes||(this.keyAttributes={}),e.hasChildNodes()){for(let i,s,r,o=0;o<e.childNodes.length;o++)i=e.childNodes.item(o),(i.nodeType-1|1)===Node.TEXT_NODE?n+=i.nodeType===Node.TEXT_NODE?i.nodeValue.trim():i.nodeValue:1!==i.nodeType||i.prefix||(s=i.nodeName.toLowerCase(),r=new t(i),this.hasOwnProperty(s)?(this[s].constructor!==Array&&(this[s]=[this[s]]),this[s].push(r)):this[s]=r);this.keyValue=n?i(n):null}if(void 0===e.hasAttributes?e.attributes.length>0:e.hasAttributes()){let t;for(;s<e.attributes.length;s++)t=e.attributes.item(s),this.keyAttributes[t.name.toLowerCase()]=i(t.value.trim())}},t.getKeyValue=function(t){if(t&&t.keyValue)return t.keyValue},t.decodeXMLText=function(t){if("string"==typeof t)return t.replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}}(ae||(ae={}));class le{constructor(t){this.mw=["text/javascript","text/javascript1.0","text/javascript1.2","text/javascript1.4","text/jscript","application/javascript","application/x-javascript","text/ecmascript","text/ecmascript1.0","text/ecmascript1.2","text/ecmascript1.4","text/livescript","application/ecmascript","application/x-ecmascript"],this.gw="VPAID",this.delivery=void 0,this.type=void 0,this.width=0,this.height=0,this.codec=void 0,this.id=void 0,this.bitrate=void 0,this.minBitrate=void 0,this.maxBitrate=void 0,this.scalable=void 0,this.maintainAspectRatio=void 0,this.apiFramework=void 0,this.src=void 0,this.delivery=t.keyAttributes.delivery,this.type=t.keyAttributes.type,this.width=t.keyAttributes.width,this.height=t.keyAttributes.height,this.codec=t.keyAttributes.codec,this.id=t.keyAttributes.id,this.bitrate=t.keyAttributes.bitrate,this.minBitrate=t.keyAttributes.minbitrate,this.maxBitrate=t.keyAttributes.maxbitrate,this.scalable=t.keyAttributes.scalable,this.maintainAspectRatio=t.keyAttributes.maintainaspectratio,this.apiFramework=t.keyAttributes.apiframework,this.src=ae.getKeyValue(t)}isSupported(){return!("application/x-shockwave-flash"===this.type||"video/x-flv"===this.type)}getMediaFileType(){return this.apiFramework===this.gw||(0,b.d3)(this.type,this.mw)?he.Javascript:he.Video}}class ue{constructor(t){this.clickThrough=void 0,this.clickTrackings=[],this.customClicks=[],this.clickThrough=ae.getKeyValue(t.clickthrough),this.clickTrackings=this.yw((0,b.qo)(t.clicktracking)),this.customClicks=this.yw((0,b.qo)(t.customclick))}yw(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(ae.getKeyValue(t))})),i}}class pe{constructor(t){this.duration=void 0,this.mediaFiles=[],this.trackingEvents=[],this.skipoffset=void 0,this.videoClicks=void 0,this.duration=(0,de.pP)(ae.getKeyValue(t.duration)),this.skipoffset=(0,de.QI)(t.keyAttributes.skipoffset,this.duration),t.mediafiles&&(this.mediaFiles=this.bw((0,b.qo)(t.mediafiles.mediafile))),t.trackingevents&&(this.trackingEvents=ce.parseTrackingEvents((0,b.qo)(t.trackingevents.tracking),this.duration)),t.videoclicks&&(this.videoClicks=new ue(t.videoclicks)),t.adparameters&&(this.adParameters=ae.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=ae.decodeXMLText(this.adParameters)))}bw(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{const e=new le(t);e.isSupported()&&i.push(e)})),i}isSupported(){return!0}}class fe{constructor(t){var i;this.minSuggestedDuration=void 0,this.staticResource={},this.htmlResource={},this.iframeResource={},this.nonLinearClickTracking={},this.id=t.keyAttributes.id,this.width=t.keyAttributes.width,this.height=t.keyAttributes.height,this.expandedWidth=t.keyAttributes.expandedheight,this.expandedHeight=t.keyAttributes.expandedwidth,this.scalable=t.keyAttributes.scalable,this.maintainAspectRatio=t.keyAttributes.maintainaspectratio,this.apiFramework=t.keyAttributes.apiframework,this.minSuggestedDuration=(0,de.pP)(t.keyAttributes.minsuggestedduration),this.nonLinearClickThrough=null===(i=t.nonlinearclickthrough)||void 0===i?void 0:i.keyValue,t.nonlinearclicktracking&&(this.nonLinearClickTracking.id=t.nonlinearclicktracking.keyAttributes.id,this.nonLinearClickTracking.uri=t.nonlinearclicktracking.keyValue),t.staticresource&&(this.staticResource.creativeType=t.staticresource.keyAttributes.creativetype,this.staticResource.uri=t.staticresource.keyValue),t.iframeresource&&(this.iframeResource.uri=t.iframeresource.keyValue),t.htmlresource&&(this.htmlResource.uri=t.htmlresource.keyValue)}isSupported(){return"VPAID"===this.apiFramework?((0,o.n)({message:"AdManager_NonLinearAd_VPAID_found",level:o.D.INFO},{pacing:10,shouldSendMaxLog:!1}),!1):this.width&&this.height?!(!this.staticResource.creativeType||!this.staticResource.uri)||(this.htmlResource.uri&&(0,o.n)({message:"AdManager_NonLinearAd_htmlResource_found",level:o.D.INFO},{pacing:10,shouldSendMaxLog:!1}),this.iframeResource.uri&&(0,o.n)({message:"AdManager_NonLinearAd_iframeResource_found",level:o.D.INFO},{pacing:10,shouldSendMaxLog:!1}),!1):((0,o.n)({message:"AdManager_NonLinearAd_no_dimensions",level:o.D.INFO},{pacing:10,shouldSendMaxLog:!1}),!1)}}class me{constructor(t){this.nonLinearAdList=[],this.trackingEvents=[],t.nonlinear&&(this.nonLinearAdList=this.Iw((0,b.qo)(t.nonlinear))),t.trackingevents&&(this.trackingEvents=ce.parseTrackingEvents((0,b.qo)(t.trackingevents.tracking))),t.adparameters&&(this.adParameters=ae.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=ae.decodeXMLText(this.adParameters)))}isSupported(){return!0}Iw(t){const i=[];return t.forEach((t=>{const e=new fe(t);e.isSupported()&&i.push(e)})),i}}class ve{constructor(t){if(this.id=void 0,this.sequence=void 0,this.adId=void 0,this.linear=void 0,this.nonLinear=void 0,this.id=t.keyAttributes.id,this.sequence=t.keyAttributes.sequence,this.adId=t.keyAttributes.adid,t.linear)try{this.linear=new pe(t.linear)}catch(t){(0,o.n)({callStack:t.stack,level:o.D.WARN,exception:t.message,message:"Creative_Linear"})}if(t.nonlinearads)try{this.nonLinear=new me(t.nonlinearads)}catch(t){(0,o.n)({callStack:t.stack,level:o.D.WARN,exception:t.message,message:"Creative_NonLinear"})}}isSupported(){return!0}}class ge{constructor(t,i){this.name=t.keyAttributes.event,this.uri=ae.getKeyValue(t),"progress"===this.name&&(this.offset=(0,de.QI)(t.keyAttributes.offset,i))}}class ye{constructor(t){var i;this.javaScriptResource=ae.getKeyValue(t.javaScriptResource),this.verificationParameters=ae.getKeyValue(t.verificationParameters),this.executableResource=ae.getKeyValue(t.executableResource),this.trackingEvents=(null===(i=t.trackingEvents)||void 0===i?void 0:i.tracking)?ce.parseTrackingEvents((0,b.qo)(t.trackingEvents.tracking)):[]}}!function(t){function i(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(ae.getKeyValue(t))})),i}t.parseImpressions=function(t){return i(t)},t.parseCretives=function(t){const i=[];return t.forEach((t=>{i.push(new ve(t))})),i},t.parseExtensions=function(t){return t.map((t=>new oe(t)))},t.parseVerifications=function(t){return t.map((t=>new ye(t)))},t.parseErrors=function(t){return i(t)},t.parseTrackingEvents=function(t,i){const e=[];return void 0!==t[0]&&t.forEach((t=>{e.push(new ge(t,i))})),e}}(ce||(ce={}));class be{constructor(t){var i,e,s;this.description=void 0,this.advertiser=void 0,this.surveys=void 0,this.errors=void 0,this.pricing=void 0,this.extensions=void 0,this.adVerifications=void 0,this.adTitle=ae.getKeyValue(t.adtitle),this.adSystem=ae.getKeyValue(t.adsystem),this.impressions=ce.parseImpressions((0,b.qo)(t.impression)),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?ce.parseCretives((0,b.qo)(t.creatives.creative)):[],this.description=ae.getKeyValue(t.description),this.advertiser=ae.getKeyValue(t.advertiser),this.surveys=ae.getKeyValue(t.survey),this.errors=ce.parseErrors((0,b.qo)(t.error)),this.pricing=ae.getKeyValue(t.pricing),this.extensions=(null===(e=t.extensions)||void 0===e?void 0:e.extension)?ce.parseExtensions((0,b.qo)(t.extensions.extension)):[],this.adVerifications=(null===(s=t.adverifications)||void 0===s?void 0:s.verification)?ce.parseVerifications((0,b.qo)(t.adverifications.verification)):[]}isSupported(){return!0}}class Ie{constructor(t){var i;this.adSystem=void 0,this.impressions=[],this.VASTAdTagURI=void 0,this.creatives=[],this.errors=void 0,this.extensions=void 0,this.fallowAdditionalWrappers=void 0,this.allowMultipleAds=void 0,this.fallbackOnNoAd=void 0,this.adSystem=ae.getKeyValue(t.adsystem),this.impressions=ce.parseImpressions((0,b.qo)(t.impression)),this.VASTAdTagURI=ae.getKeyValue(t.vastadtaguri),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?ce.parseCretives((0,b.qo)(t.creatives.creative)):[],this.errors=ce.parseErrors((0,b.qo)(t.error)),this.extensions=t.extensions,this.fallowAdditionalWrappers=!t.keyAttributes.followadditionalwrappers||t.keyAttributes.followadditionalwrappers,this.allowMultipleAds=t.keyAttributes.allowmultipleads,this.fallbackOnNoAd=t.keyAttributes.fallbackonnoad}}class we{constructor(t){Array.isArray(t)?this.ww(t):this.Sw(t)}isSupported(){return!0}Sw(t){this.id=t.keyAttributes.id,this.sequence=t.keyAttributes.sequence,t.inline?this.inLine=new be(t.inline):t.wrapper&&(this.wrapper=new Ie(t.wrapper))}ww(t){const i=t.filter((t=>{const i=this.Pw(t).filter((t=>t.linear));return!!(0,b.BZ)(i)}));(0,b.BZ)(i)&&this.Sw(i[0])}Pw(t){return t.inline?(0,b.qo)(t.inline.creatives.creative):t.wrapper?(0,b.qo)(t.wrapper.creatives.creative):[]}}class _e{constructor(t=2){this.Aw=t}parseVastXml(t){try{if(!this.xw(t))return{error:!0,errorReason:Ti.XmlInvalidString};if(this.Tw(t))return{error:!0,errorReason:Ti.XmlInvalidAd};const i=(new DOMParser).parseFromString(t,"application/xml"),e=new ae.JXONTree(i.documentElement);if(!this.Cw(e,this.Aw))return{error:!0,errorReason:Ti.XmlInvalidTree};const s=new we(e.ad);return this.Ew(s)?{error:!1,result:s}:{error:!0,errorReason:Ti.XmlInvalidAd}}catch(t){return{error:!0,errorReason:Ti.XmlParseGeneral}}}xw(t){return(0,n.QM)(t)}Tw(t){return Gi.KEYWORDS_FOR_BANNED_VAST.some((i=>t.includes(i)))}Cw(t,i){if(!t.ad)return!1;const e=parseInt(t.keyAttributes.version,10);return!(e&&e<i)}Ew(t){const i=t.wrapper,e=t.inLine;if(!e&&!i)return!1;if(i&&!i.VASTAdTagURI)return!1;if(!i){const t=[...e.creatives].filter((t=>{var i;return null===(i=null==t?void 0:t.linear)||void 0===i?void 0:i.mediaFiles.length})),i=[...e.creatives].filter((t=>{var i;return null===(i=null==t?void 0:t.nonLinear)||void 0===i?void 0:i.nonLinearAdList.length}));if(!(0,b.BZ)(t)&&!(0,b.BZ)(i))return!1}return!0}}class Se{constructor(t){this.mediaFiles=[],this.nonLinearFiles=[],this.adTitle=void 0,this.adParameters=void 0,this.linearClickThrough=void 0,this.creativeId=void 0,this.extensions=[],this.verifications=[],t.forEach((t=>{t.inLine?(this.adTitle=t.inLine.adTitle,this.extensions=t.inLine.extensions,this.verifications=t.inLine.adVerifications,this.Ky(t.inLine.creatives)):t.wrapper&&this.Ky(t.wrapper.creatives)}))}Zy(t){this.duration=t.duration,this.Mw(t.mediaFiles),this.Lw(t.skipoffset),this.Bw(t.adParameters),t.videoClicks&&t.videoClicks.clickThrough&&this.Ow(t.videoClicks.clickThrough)}Rw(t){this.Dw(t.nonLinearAdList),this.Bw(t.adParameters)}Dw(t){this.nonLinearFiles=[...this.nonLinearFiles,...t]}Bw(t){this.adParameters=t}Lw(t){this.skipoffset=t}Mw(t){this.mediaFiles=[...this.mediaFiles,...t]}Ow(t){this.linearClickThrough=t}Ky(t){t.forEach((t=>{this.creativeId=t.id,t.linear&&this.Zy(t.linear),t.nonLinear&&this.Rw(t.nonLinear)}))}}var Pe=h(1509);var Ae,xe,ke,Te;!function(t){t.absolute="absolute",t.relative="relative"}(Ae||(Ae={})),function(t){t.auto="auto",t.all="all"}(xe||(xe={})),function(t){t.errorIframe="Error creating iframe"}(ke||(ke={}));class Ce{constructor(t,i,e){this.In=t,this.xI=i,this._h=e}Vw(t,i,e){let s=!1;return n=>{n.contentWindow&&!s&&(s=!0,this.jw(n,this.Nw(t,i),e))}}Uw(t,i,e,s,n,r,o,h,a,c,d=!0){return this.$w(t,this.Vw(i,e,s),n,r,o,h,a,c,d)}$w(t,i,e=Ae.absolute,s=xe.auto,n,r,o,h,a=!0){const c=this.In.createElement("iframe",o);let d="100%",l="100%";return(null==h?void 0:h.scalable)?(d=h.scalable.maxHeightPercent+"%",l=h.scalable.maxWidthPercent+"%"):(null==h?void 0:h.width)&&(null==h?void 0:h.height)&&(d=h.height+"px",l=h.width+"px"),n&&(c.title=n),c.allow="autoplay",c.src="javascript:false",c.srcdoc="",c.width=l,c.height=d,c.style.position=e,c.style.left="0",c.style.top="0",c.style.margin="0px",c.style.padding="0px",c.style.border="0px",c.style.width=l,c.style.height=d,c.style.pointerEvents=s,a||(c.style.display="none"),c.setAttribute("SCROLLING","NO"),null==r||r.forEach((t=>{c.setAttribute(t.key,t.value)})),c.onload=()=>{i(c)},t.appendChild(c),i(c),c}jw(t,i,e){const s=(0,r.LT)(t);(class{static executeAsync(t,i){this.qw(t)(i)}static Hw(t){return!!t.cnxProxyTask}static qw(t){return this.Hw(t)||this.zw(t),t.cnxProxyTask}static zw(t){const i=t.document.head;(0,r.ML)(i,t,"\n    window.cnxProxyTask = function(task) {\n        setTimeout(function(){\n            task();\n        }, 0);\n    }\n")}}).executeAsync(s,(()=>{try{const e=t.contentWindow&&t.contentWindow.document;e.open(),e.write(i)}catch(i){this.Ww(t,i),t=null}e(t)}))}Nw(t,i){return Object.keys(i).forEach((function(e){const s="object"==typeof i[e]?JSON.stringify(i[e]):i[e];t=t.replace(new RegExp(`{{${e}}}`,"g"),s)})),t}loadIframe(t){const i='<!DOCTYPE html><html lang="en"><head>'+(t.customHead?t.customHead:"")+'<meta charset="UTF-8"></head><body style="margin:0;padding:0">'+(t.customHtml?t.customHtml:"")+'<script type="text/javascript">window.postMessage(\'{"event": "ready", "id": "{{iframeID}}"}\', \'*\');<\/script></body></html>',s="cnx-iframe_"+(0,e.qs)();return new Promise(((e,n)=>{const r=i=>{if(null===i)return void n(ke.errorIframe);const r=t=>{let o;try{o=JSON.parse(t.data)}catch(t){return}o.id===s&&(i.contentWindow?(i.contentWindow.document.close(),i.contentWindow.removeEventListener("message",r),e({iframe:i})):n("The Iframe is no longer in the DOM"))};try{if(i.contentWindow.addEventListener("message",r),!t.customReportingLog)return;const{advertiserLineItemId:e,heavyAdBlockTypeEnum:s}=t.customReportingLog,n=mi.h.getSessionChildContainer(this.xI).resolve(vi.k);this.Gw=new _(this.Qw.contentWindow,{advertiserLineItemId:e,heavyAdBlockTypeEnum:s},n)}catch(t){this.Ww(i,t),n("Iframe callback error")}};try{this.Qw=this.Uw(t.container,i,{iframeID:s},r,t.iframePosition,t.iframePointerEvents,t.title,t.customIframeAttributes,this._h,t.iframeCustomDimensions,t.visible)}catch(t){(0,o.n)({message:"IframeLoader_error_creating_iframe",level:o.D.WARN,exception:t.message,callStack:t.stack})}}))}get iframe(){return this.Qw}destroy(){var t;null===(t=this.Gw)||void 0===t||t.destroy(),this.Qw=null}Ww(t,i){this.In.isDetachedFromDOM(t)?(0,o.n)({message:"iframeLoader_(inDom_false)",exception:i.message,callStack:i.stack,level:o.D.WARN},{shouldSendMaxLog:!1,throttle:1}):(0,o.n)({message:"iframeLoader_(inDom_true)",exception:i.message,callStack:i.stack,level:o.D.WARN},{shouldSendMaxLog:!1,throttle:1}),(0,r.bX)(t)}}!function(t){t.Html="text/html",t.Javascript="application/javascript"}(Te||(Te={}));var Ee=h(5522);const Me=`\n            <div id=cnx-htmlBidAdaptor-id class=${I.p0.CloseButton} tabindex='0'>\n                ${Ee}\n            </div>`.trim();class Le{constructor(t,i,e,s,n,r,o,h){this.Xw=t,this.Yw=i,this.Kw=e,this.fb=s,this.In=n,this.xI=r,this.Zw=o,this.t_=h,this.i_="div-cnx-display",this.e_=new R.x,this.n_=new R.x,this.XI=new R.x,this.r_=new R.x,this.o_=t=>{this.n_.next()},this.a_=t=>{this.r_.next()}}get onDisplayAd(){return this.e_.asObservable()}get onError(){return this.XI.asObservable()}get onClickClose(){return this.n_.asObservable()}get onClickAd(){return this.r_.asObservable()}createBanner(t){this.c_=new Ce(this.In,this.xI),this.d_=t?this.l_(this.fb,t):this.fb;let i="";this.Kw===Te.Html&&(i=this.Yw);let e="",s="";switch(this.Xw){case m.ProtoAdType.Overlay:e=`#${this.i_}{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}`,s=`#${this.i_}{border:3px solid white}`;break;case m.ProtoAdType.Nonlinear:e=`#${this.i_}{width: 100%; height: 100%}`}const n="<style>html, body {position:relative;width:100%;height:100%}"+e+s+"#"+this.i_+" iframe{display:block}</style>";this.c_.loadIframe({customHead:n,customHtml:'<div id="'+this.i_+'">'+i+"</div>",container:this.d_,customReportingLog:{heavyAdBlockTypeEnum:m.ProtoHeavyAdBlockTypeEnum.OverlayIframe,advertiserLineItemId:this.Zw},iframePosition:this.Xw===m.ProtoAdType.Nonlinear?Ae.relative:Ae.absolute,iframeCustomDimensions:this.t_?this.t_:void 0,iframePointerEvents:xe.all,title:ji.$b}).then((t=>{this.u_=t.iframe;const i=this.u_.contentWindow;if(this.p_=i.document.getElementById(this.i_),this.Kw===Te.Javascript&&(0,r.ML)(this.p_,i,this.Yw),""===this.u_.contentWindow.document.head.innerHTML){const t=n;this.f_(t)}(0,r.AX)(this.u_.contentWindow,"AdHtmlWrapper"),this.Xw===m.ProtoAdType.Nonlinear&&this.m_(),this.e_.next()})).catch((t=>{this.XI.next()}))}getAdMediaDimensions(){return{width:this.p_.clientWidth||this.u_.contentWindow.document.body.clientWidth,height:this.p_.clientHeight||this.u_.contentWindow.document.body.clientHeight}}destroy(){var t;null===(t=this.p_)||void 0===t||t.removeEventListener("click",this.a_),this.v_&&(this.v_.removeEventListener("click",this.o_),this.d_.removeChild(this.v_)),this.u_&&this.fb&&(0,r.bX)(this.u_),this.c_&&(this.c_.destroy(),this.c_=null)}m_(){var t;this.v_=this.In.createElementByString(Me),this.d_.appendChild(this.v_),this.v_.addEventListener("click",this.o_),null===(t=this.p_)||void 0===t||t.addEventListener("click",this.a_)}f_(t){const i=this.u_.contentWindow.document.createElement("style"),e=this.u_.contentWindow.document.createTextNode(t);i.appendChild(e),this.u_.contentWindow.document.head.appendChild(i)}l_(t,i){if(!i.width||!i.height)return t;let e,s;if(this.Xw===m.ProtoAdType.Nonlinear)e=s="100%";else e=i.width+"px",s=i.height+"px";const n=this.In.createElementByString(`<div class="cnx-iframe-container" style="width: ${e}; height: ${s}"></div>`);return t.appendChild(n),n}}class Be{constructor(t,i,e,s){this.imageUrl=t,this.Lp=i,this.xI=e,this.Zw=s,this.e_=new R.x,this.XI=new R.x,this.r_=new R.x,this.n_=new R.x,this.Pd=[]}get onDisplayAd(){return this.e_.asObservable()}get onError(){return this.XI.asObservable()}get onClickAd(){return this.r_.asObservable()}get onClickClose(){return this.n_.asObservable()}destroy(){var t;null===(t=this.g_)||void 0===t||t.destroy()}initializeAd(t,i,e,s){this.y_=t,this.b_(s,i,e)}getAdMediaDimensions(){var t;return null===(t=this.g_)||void 0===t?void 0:t.getAdMediaDimensions()}b_(t,i,e){this.I_=this.Lp.createElement("img"),this.I_.onload=()=>{this.w_(t,i,e)},this.I_.onerror=()=>{this.XI.next(Di.VastNonLinearImageLoadFailure)},this.I_.src=this.imageUrl}w_(t,i,e){const s=this.__(t,i,e);this.S_(s,t,i)}__(t,i,e){let s;return s=t?this.P_(i,e):`height:${i.height}px; width: ${i.width}px;`,`<img alt='' src="${this.imageUrl}" style="${s} display: block; pointer-events: all; cursor: pointer">`}S_(t,i,e){this.g_=new Le(m.ProtoAdType.Nonlinear,t,Te.Html,this.y_,this.Lp,this.xI,this.Zw,{height:e.height,width:e.width,scalable:i?{maxHeightPercent:Y.NON_LINEAR_MAX_HEIGHT_PERCENT,maxWidthPercent:Y.NON_LINEAR_MAX_WIDTH_PERCENT}:null}),this.Pd.push(this.g_.onDisplayAd.subscribe((()=>{this.e_.next()})),this.g_.onClickClose.subscribe((()=>{this.n_.next()})),this.g_.onClickAd.subscribe((()=>{this.r_.next()})),this.g_.onError.subscribe((()=>{this.XI.next(Di.DisplayIntegratorIframeLoad)}))),this.g_.createBanner(e)}P_(t,i){const e=(0,Bt.Tc)(i.height,Y.NON_LINEAR_MAX_HEIGHT_PERCENT),s=(0,Bt.Tc)(i.width,Y.NON_LINEAR_MAX_WIDTH_PERCENT),n=t.height/e;return t.width/s>n?"width: 100%;":"height: 100%;"}}var Oe=h(4065);const Re={[Pe.n.FirstQuartile]:X.fI.AdVideoFirstQuartile,[Pe.n.SecondQuartile]:X.fI.AdVideoMidpoint,[Pe.n.ThirdQuartile]:X.fI.AdVideoThirdQuartile,[Pe.n.FourthQuartile]:X.fI.AdVideoComplete};class De extends Wi{constructor(t,i){super(t,i),this.Qs=t,this.settings=i,this.adMediaType="nonLinearVast",this.adSourceType=m.ProtoAdsourceTypeEnum.VastMedia,this.A_=[],this.Js=500,this.x_=0,this.nonLinearOnClick=()=>{this.k_.nonLinearClickTracking.uri&&this.settings.globalDomUtilsService.trackWithImages([this.k_.nonLinearClickTracking.uri]),this.k_.nonLinearClickThrough&&this.settings.globalDomUtilsService.open(this.k_.nonLinearClickThrough,O.bS.Blank),this.Bb({type:X.fI.AdClickThru,payload:{}})}}initAd(t,i,e,s,n,r,o){try{if(super.initAd(t,i,e,s,n,r,o),this.k_=this.T_(),!this.k_)return void this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.NonLinearUnsupportedMedia}});this.C_(),this.E_(),this.Bb({type:X.fI.AdLoaded,payload:{}})}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorInitAdError+`_${t.message}`}})}}startAd(){super.startAd(),this.M_.start(),this.A_.push(this.B_.onDisplayAd.subscribe((()=>{this.Bb({type:X.fI.AdStarted}),this.Bb({type:X.fI.AdVideoStart}),this.Bb({type:X.fI.AdImpression,payload:{}})})),this.B_.onError.subscribe((t=>{this.Bb({type:X.fI.AdError,payload:{errorMessage:t}})})),this.B_.onClickAd.subscribe((()=>this.nonLinearOnClick())),this.B_.onClickClose.subscribe((()=>{this.Bb({type:X.fI.AdUserClose,payload:{}}),this.stopAd(X.r5)})));const t={height:this.k_.height,width:this.k_.width},i={height:this.vb.clientHeight,width:this.vb.clientWidth};this.B_.initializeAd(this.fb,t,i,this.k_.scalable)}get adVideoUrl(){return this.O_}get declaredDurationInSeconds(){return this.x_/J.s_}getAdMediaSize(){var t;return null===(t=this.B_)||void 0===t?void 0:t.getAdMediaDimensions()}resizeAd(t,i,e){}pauseAd(){try{this.M_.stop(),this.Bb({type:X.fI.AdPaused}),this.tI()}catch(t){this.yI("NonLinearVastBidAdaptor","pauseAd",t)}}resumeAd(){this.M_.start(),this.tI()}expandAd(){}collapseAd(){}getAdRemainingTime(){return this.M_.timeRemaining}getAdDuration(){return this.x_/J.s_}getAdVolume(){return 0}C_(){this.k_.staticResource&&(this.B_=new Be(this.k_.staticResource.uri,this.settings.globalDomUtilsService,this.settings.sessionId,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId),this.O_=this.k_.staticResource.creativeType,this.R_())}R_(){this.vb.style.visibility="hidden"}E_(){var t;this.x_=(null===(t=this.settings.adManagerLineItem.protoLineItem.nonlinearLineItemSettings)||void 0===t?void 0:t.nonLinearAdTimeSeconds)*J.s_,this.M_=new Oe.B(this.Qs,this.x_,this.Js),this.A_.push(this.M_.onTimeUpdate.subscribe((()=>{this.Bb({type:X.fI.AdRemainingTimeChange})})),this.M_.onTimeElapsed.subscribe((()=>{this.stopAd("nonLinearTimerElapsed")})),this.M_.onQuartile.subscribe((t=>{this.Bb({type:Re[t],payload:{}})})))}Im(){var t,i;try{super.Im(),null===(t=this.M_)||void 0===t||t.stop(),(0,H.i)(this.A_),null===(i=this.B_)||void 0===i||i.destroy()}catch(t){this.yI("NonLinearBidAdaptor","_destroy",t)}}T_(){let t;if(t=this.settings.vastResponse.nonLinearFiles.find((t=>!0===t.scalable)),!t){const i=(0,Bt.Tc)(this.vb.clientHeight,Y.NON_LINEAR_MAX_HEIGHT_PERCENT);t=this.settings.vastResponse.nonLinearFiles.find((t=>t.height<=i&&t.width<=this.vb.clientWidth))}return t}}function Ve(t,i){t.sort(((t,i)=>t.width===i.width?t.bitrate-i.bitrate:t.width-i.width));for(let e=0;e<t.length;e++)if(t[e].width>=i)return t[e-1]||t[e];return t[t.length-1]}const je=()=>`cnx_bid_slot_${(0,e.qs)()}`,Fe={enableWorker:!1,capLevelToPlayerSize:!0,cnxRenderWindow:window,maxBufferSize:5e6,maxBufferLength:5,maxMaxBufferLength:10,liveBackBufferLength:0};class Ne{constructor(t,i,e,s,n){this.D_=t,this.V_=i,this.j_=e,this.Lp=s,this.F_=n,this.N_=[],this.U_=(t,i)=>{if(i.fatal)switch(i.type){case this.D_.ErrorTypes.NETWORK_ERROR:if(i.details===this.D_.ErrorDetails.MANIFEST_PARSING_ERROR||i.details===this.D_.ErrorDetails.MANIFEST_LOAD_ERROR)return void this.q_();this.H_.startLoad();break;case this.D_.ErrorTypes.MEDIA_ERROR:this.H_.recoverMediaError();break;default:this.q_()}},this.z_=()=>{this.H_.off(this.D_.Events.MEDIA_ATTACHED,this.z_),this.H_.loadSource(this.V_),this.H_.once(this.D_.Events.MANIFEST_PARSED,this.W_)},this.W_=()=>{this.H_.off(this.D_.Events.MANIFEST_PARSED,this.W_),this.G_(),this.F_.forceMaxLevel&&this.Q_(),this.F_.forceResolutionHeight&&this.J_(this.F_.forceResolutionHeight),this.X_()},(this.F_.forceMaxLevel||this.F_.forceResolutionHeight)&&(Fe.capLevelToPlayerSize=!1)}start(t,i){this.X_=t,this.q_=i,this.D_&&this.D_.isSupported()?(this.H_=new this.D_(Object.assign(Object.assign({},Fe),{cnxRenderWindow:this.Lp.global})),this.Y_()):this.q_()}destroy(){this.H_&&(this.H_.destroy(),this.H_=null)}Y_(){this.H_.on(this.D_.Events.ERROR,this.U_),this.H_.attachMedia(this.j_),this.H_.once(this.D_.Events.MEDIA_ATTACHED,this.z_)}Q_(){const t=this.H_.levels.length-1;this.K_(t)}J_(t){const i=this.N_.find((i=>i.height===t));i&&this.K_(i.level)}K_(t){this.H_.currentLevel=t,this.H_.startLevel=t,this.H_.nextLevel=t}G_(){this.H_.levels.forEach(((t,i)=>{this.N_.push({level:i,height:t.height})}))}}var Ue=h(5292);const $e="huffpost",qe=540,He=["d426a992-f367-434b-827b-d3561b6af50c","e3bcb71c-7486-4955-a5fe-c94bade4948d"];class ze extends Ri{constructor(t,i,e,s,n,r,h,a,c,d,l=!1,u){super(),this.In=t,this.Z_=i,this.DI=e,this.Si=s,this.Zw=n,this.tS=r,this.iS=h,this.eS=a,this.sS=c,this.D_=d,this.nS=l,this.ki=u,this.rS=!1,this.pageFocus=new Ue.v(this.In),this.oS=Object.values(k.wB),this.hS=!1,this.aS=!1,this.cS=!0,this.dS=!1,this.lS=[{event:X.fI.AdVideoStart,position:0},{event:X.fI.AdVideoFirstQuartile,position:25},{event:X.fI.AdVideoMidpoint,position:50},{event:X.fI.AdVideoThirdQuartile,position:75},{event:X.fI.AdVideoComplete,position:100}],this.uS=this.lS[0],this.pS=t=>{try{switch(t.type){case k.wB.Pause:if(this.iS&&!this.cS)return this.cS=!0,void this.fS("pause_event_loopAd");this.aS=!1;break;case k.wB.Play:if(!this.aS&&this.nS)return void this.DI.pause();break;case k.wB.Canplay:case k.wB.Durationchange:this.mS();break;case k.wB.Timeupdate:this.vS();break;case k.wB.Error:this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.VastVideoTagEventError}});break;case"click":this.ob.next({type:X.fI.AdClickThru,payload:{}})}}catch(t){(0,o.n)({level:o.D.CRITICAL,callStack:t.stack,message:"AdManager_VastIntegrator_onVideoEvent",exception:t.message},{throttle:10,shouldSendMaxLog:!1})}}}initAd(t,i,e,s,n,r){try{this.DI=r.videoSlot,this.width=t,this.height=i,this.Ow(this.tS,this.DI.parentElement),this.resizeAd(t,i,e),this.addVideoEvents(this.DI),this.sS&&this.D_&&this.D_.isSupported()?this.gS(this.D_):(this.DI.setAttribute("src",this.Z_),this.DI.setAttribute("preload","metadata"),this.DI.load()),this.pageFocus.isDocumentVisible()||this.mS()}catch(t){this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.WrapperInitAdError+`_${t.message}`}})}}yS(t){if(this.hS){const i=t?"INMOBI_IMPRESSION_EVENT_DOCUMENT_VISIBLE":"INMOBI_IMPRESSION_EVENT_DOCUMENT_NOT_VISIBLE";(0,o.n)({level:o.D.INFO,exception:`advLineItemId: ${this.Zw}`,message:i},{throttle:1e3})}}startAd(){try{(0,r.cn)(this.DI,"cnx-ad-video-slot"),this.aS=!0,this.Zw&&He.includes(this.Zw)&&(this.hS=!0),this.pageFocus.isDocumentVisible()?this.DI.play().then((()=>{this.ob.next({type:X.fI.AdStarted}),this.ob.next({type:X.fI.AdImpression,payload:{}}),this.yS(!0)})).catch((t=>{this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.VastPlayPromiseReject}}),this.hS&&(0,o.n)({level:o.D.INFO,message:"INMOBI_DOCUMENT_VISIBLE_REJECTED_PLAY_EVENT",exception:`advLineItemId: ${this.Zw}, promiseError: ${t.message}`,callStack:t.stack},{throttle:1e3})})):(this.ob.next({type:X.fI.AdStarted}),this.ob.next({type:X.fI.AdImpression,payload:{}}),this.yS(!1),this.DI.play().then((()=>{this.wS(),this.hS&&(0,o.n)({level:o.D.INFO,message:"INMOBI_DOCUMENT_NOT_VISIBLE_RESOLVED_PLAY_EVENT",exception:`advLineItemId: ${this.Zw}`},{throttle:1e3})})).catch((t=>{this.hS&&(0,o.n)({level:o.D.INFO,message:"INMOBI_DOCUMENT_NOT_VISIBLE_REJECTED_PLAY_EVENT",exception:`advLineItemId: ${this.Zw}, promiseError: ${t.message}`,callStack:t.stack},{throttle:1e3})})))}catch(t){this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.nS&&this.DI.pause(),"videoComplete"===t&&this.iS?this.ob.next({type:X.fI.AdStopped,payload:{shouldTrackPostBid:!1}}):this.ob.next({type:X.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){(0,r.T7)(this.DI,{width:`${t}px`,height:`${i}px`}),this.ob.next({type:X.fI.AdSizeChange})}pauseAd(){this.aS=!1,this.eS&&void 0===this.uS&&(this.uS=this.lS[0]),this.DI.pause(),this.ob.next({type:X.fI.AdPaused})}resumeAd(){this.iS&&void 0===this.uS&&(this.uS=this.lS[0]),this.aS=!0,this.fS("resumeAd"),this.wS(),this.ob.next({type:X.fI.AdPlaying})}expandAd(){}collapseAd(){}skipAd(){this.ob.next({type:X.fI.AdSkipped})}getAdRemainingTime(){return this.DI.duration-this.DI.currentTime}getAdDuration(){return this.DI.duration?this.DI.duration:0}getAdVolume(){return this.DI.volume}setAdVolume(t){this.DI.volume=t}getAdMediaWidth(){return this.DI.videoWidth}getAdMediaHeight(){return this.DI.videoHeight}destroy(){if(!this.eS&&!this.iS)try{(0,r.IV)(this.DI,"cnx-ad-video-slot"),this.SS(this.DI),this.DI.removeAttribute("src"),this.PS&&(this.PS.destroy(),this.PS=null)}catch(t){(0,o.n)({level:o.D.WARN,message:"AdManager_VastIntegrator_destroyAd",exception:t.message,callStack:t.stack})}}wS(){this.Si===L.M.Ios&&(0,r.UR)(this.DI)}gS(t){let i={forceMaxLevel:!0};this.ki&&this.ki.includes($e)&&(i={forceMaxLevel:!1,forceResolutionHeight:qe}),this.PS=new Ne(t,this.Z_,this.DI,this.In,i),this.PS.start((()=>{this.mS()}),(()=>{this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.CnxMediaSrcNotSupported}})}))}Ow(t,i){this.AS=this.In.createElement("a"),t&&(this.AS.href=t,this.AS.target="_blank"),(0,r.cn)(this.AS,"cnx-ad-slot"),i.appendChild(this.AS),this.AS.addEventListener("click",this.pS)}addVideoEvents(t){this.oS.forEach((i=>{t.addEventListener(i,this.pS)})),this.AS&&this.AS.addEventListener("click",this.pS)}SS(t){this.oS.forEach((i=>{t.removeEventListener(i,this.pS)})),this.AS&&this.AS.removeEventListener("click",this.pS)}mS(){this.rS||(this.rS=!0,this.ob.next({type:X.fI.AdLoaded,payload:{}}))}vS(){this.ob.next({type:X.fI.AdRemainingTimeChange});const t=(0,Bt.dQ)(0,this.DI.duration,0,100,this.DI.currentTime);if(this.uS&&t>=this.uS.position){this.uS.event===X.fI.AdVideoStart&&this.hS&&(0,o.n)({level:o.D.INFO,message:"INMOBI_AD_VIDEO_START_EVENT_FIRED",exception:`advLineItemId: ${this.Zw}`},{throttle:1e3}),this.dS||(this.uS.event===X.fI.AdVideoStart&&this.hS?this.ob.next({type:X.fI.AdVideoStart,payload:{logInMobiInfo:this.hS}}):this.ob.next({type:this.uS.event}));const t=this.uS;this.uS=this.lS[this.lS.indexOf(this.uS)+1],t.event===X.fI.AdVideoComplete&&(this.iS&&(this.DI.currentTime=.01),this.cS=!1,this.stopAd("videoComplete"),this.dS=!0)}}fS(t){try{this.DI.play().catch((i=>(0,o.n)({level:o.D.WARN,message:`AdManager_VastIntegrator_play_${t}`,exception:`playError: ${i.message}`,callStack:i.stack})))}catch(i){(0,o.n)({level:o.D.WARN,message:`AdManager_VastIntegrator__play_${t}`,exception:`promiseError: ${i.message}`,callStack:i.stack})}}}class We{constructor(t,i,e,s,n){this.xS=t,this.In=i,this.xI=e,this.Ii=s,this.Zw=n,this.kS={bodyTamplate:`<div class="ad-element" id="cnx-ad-element"></div><script type="text/javascript" src="${this.xS}"><\/script>'\n        <script type="text/javascript">\n            window.Object.defineProperty(Object.prototype, 'cnxInnerTag', { enumerable: !1, writable: !0, value: '${this.Ii}' });\n            window.Object.defineProperty(Function.prototype, 'cnxInnerTag',\n            { enumerable: !1, writable: !0, value: '${this.Ii}' });\n            cnxtimeouts = [];\n            cnxintervals = [];\n            oldSetTimeout = setTimeout;\n            setTimeout = function (e, t) { var n = oldSetTimeout.apply(null, arguments); return cnxtimeouts.push(n), n };\n            oldSetInterval = setInterval;\n            setInterval = function (e, t) { var n = oldSetInterval.apply(null, arguments); return cnxintervals.push(n), n };\n            clearAll = function () {\n                setTimeout = function () { };\n                setInterval = function () { };\n                for (var e = 0; e < cnxtimeouts.length; e++) {\n                    clearTimeout(cnxtimeouts[e]);\n                }\n                for (e = 0; e < cnxintervals.length; e++) {\n                    clearInterval(cnxintervals[e]);\n                }\n            };\n        <\/script>`,headTamplate:" <style>\n            html,\n            body,\n            .ad-element {\n                width: 100%;\n                height: 100%;\n            }\n            </style>"},this.c_=new Ce(this.In,this.xI)}TS(t){return this.c_.loadIframe({customHead:this.kS.headTamplate,customHtml:this.kS.bodyTamplate,container:t,customReportingLog:{heavyAdBlockTypeEnum:m.ProtoHeavyAdBlockTypeEnum.VpaidIframe,advertiserLineItemId:this.Zw},title:ji.$b})}loadAdUnitIframe(t){return new Promise(((i,e)=>{this.TS(t).then((t=>{t.adContainer=t.iframe.contentWindow.document.querySelector(".ad-element"),i(t)})).catch((t=>{e(t)}))}))}destroyAdUnit(){try{const t=this.c_.iframe.contentWindow.clearAll;t&&t()}catch(t){(0,o.n)({message:"AdManager_VPAIClient_destroyAdUnit",exception:null==t?void 0:t.message,callStack:null==t?void 0:t.stack,level:o.D.WARN},{throttle:2,shouldSendMaxLog:!0})}this.c_.destroy(),this.c_=null}}var Ge,Qe;!function(t){t[t.handshakeVersion=0]="handshakeVersion",t[t.initAd=1]="initAd",t[t.startAd=2]="startAd",t[t.stopAd=3]="stopAd",t[t.skipAd=4]="skipAd",t[t.resizeAd=5]="resizeAd",t[t.pauseAd=6]="pauseAd",t[t.resumeAd=7]="resumeAd",t[t.expandAd=8]="expandAd",t[t.collapseAd=9]="collapseAd",t[t.subscribe=10]="subscribe",t[t.unsubscribe=11]="unsubscribe"}(Ge||(Ge={}));class Je extends Ri{constructor(t,i,e,s,r,h,a){super(),this.Z_=t,this.In=i,this.xI=e,this.CS=s,this.Zw=r,this.bb=h,this.Si=a,this.ES=[],this.MS=new Set,this.LS=new Set,this.BS=(t,i,e)=>{const s={url:t,playerHandles:e};this.OS(X.fI.AdClickThru,s)},this.OS=(t,i)=>{if(this.LS.add(t),!this.MS.has(t))return t!==X.fI.AdImpression||this.LS.has(X.fI.AdLoaded)?void this.RS(t,i):((0,o.n)({message:"AdManager_AdVpaidWrapper_ImpressionBeforeAdLoaded",exception:`advertiserLineItemId:${this.Zw}_creativeId:${this.bb}_vpaidSrc:${this.Z_}`,callStack:JSON.stringify((0,b.ee)(this.LS)),level:o.D.WARN},{throttle:1e3}),this.MS.add(X.fI.AdLoaded),void this.RS(X.fI.AdLoaded,i))},this.RS=(t,i)=>{switch(t){case X.fI.AdError:this.ob.next({type:X.fI.AdError,payload:{errorMessage:(0,n.HD)(i)?i:JSON.stringify(i)}});break;case X.fI.AdLoaded:this.ob.next({type:X.fI.AdLoaded,payload:{skipOffset:(0,n.as)(i)?i.skipOffset:void 0}});break;case X.fI.AdImpression:this.ob.next({type:X.fI.AdImpression,payload:{}});break;case X.fI.AdClickThru:this.ob.next({type:X.fI.AdClickThru,payload:(0,n.as)(i)?i:{}});break;default:this.ob.next({type:X.fI[t]})}}}initAd(t,i,e,s,n,r){try{this.av=t,this.dv=i,this.OI=e,this.DS=s,this.VS=n,this.jS=r,this.FS=new We(this.Z_,this.In,this.xI,this.CS,this.Zw),this.$S=this.FS.loadAdUnitIframe(r.slot).then((t=>{this.qS(t)})).catch((t=>{this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.VpaidOnLoad}})}))}catch(t){this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.VpaidOnLoad}})}}startAd(){try{this.LS.has(X.fI.AdImpression)&&!this.MS.has(X.fI.AdImpression)&&((0,o.n)({message:"AdManager_AdVpaidWrapper_brokenImpressionHandle",exception:`advertiserLineItemId:${this.Zw}_creativeId:${this.bb}_vpaidSrc:${this.Z_}`,callStack:JSON.stringify((0,b.ee)(this.LS)),level:o.D.WARN},{throttle:1e3}),this.MS.add(X.fI.AdImpression),this.ob.next({type:X.fI.AdImpression,payload:{}})),this.HS.startAd()}catch(t){this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.WrapperStartAdError}})}}stopAd(t){var i;null===(i=this.$S)||void 0===i||i.then((()=>{this.HS?this.HS.stopAd(t):(0,o.n)({message:"stopAd",exception:t,level:o.D.WARN})}))}resizeAd(t,i,e){this.HS.resizeAd(t,i,e)}pauseAd(){this.HS.pauseAd()}resumeAd(){this.HS.resumeAd(),this.Si===L.M.Ios&&(0,r.UR)(this.jS.videoSlot)}expandAd(){this.HS.expandAd()}collapseAd(){this.HS.collapseAd()}skipAd(){this.HS.skipAd()}getAdRemainingTime(){return this.HS.getAdRemainingTime()}getAdDuration(){var t;return null===(t=this.HS)||void 0===t?void 0:t.getAdDuration()}getAdVolume(){return this.HS.getAdVolume()}setAdVolume(t){this.HS.setAdVolume(t)}destroy(){var t;this.zS(),this.ES.length=0,this.HS=null,null===(t=this.FS)||void 0===t||t.destroyAdUnit()}qS(t){const i=t.iframe.contentWindow.getVPAIDAd;if("function"==typeof i){const e=i();this.HS=e,this.WS(),this.GS(e)?e.initAd(this.av,this.dv,this.OI,this.DS,this.VS,{slot:t.adContainer,videoSlot:this.jS.videoSlot}):this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.VpaidInvalid}})}else this.ob.next({type:X.fI.AdError,payload:{errorMessage:Di.VpaidGetVpaidAdError}})}WS(){Object.keys(X.fI).forEach((t=>{let i=this.OS.bind(this,X.fI[t]);X.fI[t]===X.fI.AdClickThru&&(i=this.BS),this.ES.push({handler:i,event:t}),this.HS.subscribe(i,t)}))}zS(){this.ES.forEach((t=>{this.HS.unsubscribe(t.handler,t.event)}))}GS(t){return Object.keys((0,b.ti)(Ge)).every((i=>(0,n.mf)(t[Ge[i]])))}}!function(t){t.AdVerifications="AdVerifications"}(Qe||(Qe={}));var Xe=h(6153);const Ye=["fb1bdb1d-9743-4237-94e3-35d254e13564","e9d12322-f412-4a4a-aacc-a0d36f91544c","cbee7f7d-b0ba-453b-a28f-a23bc304481e"];class Ke extends Wi{constructor(t,i){super(t,i),this.Qs=t,this.settings=i,this.adSourceType=m.ProtoAdsourceTypeEnum.Unknown,this.QS=[],this.creativeId=i.vastResponse.creativeId}initAd(t,i,e,s,n,r,o){try{super.initAd(t,i,e,s,n,r,o),(0,Qi.A)(this.settings.adManagerLineItem.protoLineItem.publisherLineItemId,this.settings.vastResponse.linearClickThrough).then((n=>{var r;if(n)return void this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.DomainBlocked}});if(this.JS=this.XS(t,this.vb),null===this.JS)return void this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.VastUnsupportedMedia}});(null===(r=this.JS.src)||void 0===r?void 0:r.includes(Xe.n.endPoints.base.video))&&(this.JS.src=this.Sv.appendParamsToUrl(this.JS.src)),this.adMediaType=this.JS.type,this.JS.getMediaFileType()===he.Video?(this.YS=new ze(this.settings.globalDomUtilsService,this.JS.src,this.vb,this.settings.os,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,this.settings.vastResponse.linearClickThrough,this.settings.loopAdWhenFinished),this.adSourceType=m.ProtoAdsourceTypeEnum.VastMedia):(this.YS=new Je(this.JS.src,this.settings.globalDomUtilsService,this.settings.sessionId,this.Jb,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,this.creativeId,this.settings.os),this.adSourceType=m.ProtoAdsourceTypeEnum.Vpaid),this.QS.push(this.YS.onVpaidEvent.subscribe((t=>{if(t.type===X.fI.AdLoaded&&(t.payload.skipOffset=this.settings.vastResponse.skipoffset),t.type===X.fI.AdClickThru){this.KS=t.payload.url;const i=t.payload.url||this.settings.vastResponse.linearClickThrough;i&&t.payload.playerHandles&&this.settings.globalDomUtilsService.open(i,O.bS.Blank)}this.Bb(t)})));const o={AdParameters:this.settings.vastResponse.adParameters,adParameters:this.settings.vastResponse.adParameters};this.YS.initAd(t,i,e,s,o,{slot:this.fb,videoSlot:this.vb})})).catch((t=>this.ZS(t)))}catch(t){this.ZS(t)}}startAd(){try{super.startAd(),this.YS.startAd()}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){super.stopAd(t),this.YS?this.YS.stopAd(t):(0,o.n)({message:"stopAd",exception:t,level:o.D.WARN})}resizeAd(t,i,e){try{this.YS.resizeAd(t,i,e)}catch(t){this.yI("VastBidAdaptor","resizeAd",t)}}pauseAd(){try{this.YS.pauseAd()}catch(t){this.yI("VastBidAdaptor","pauseAd",t)}}resumeAd(){try{this.YS.resumeAd()}catch(t){this.yI("VastBidAdaptor","resumeAd",t)}}expandAd(){try{this.YS.expandAd()}catch(t){this.yI("VastBidAdaptor","expandAd",t)}}collapseAd(){try{this.YS.collapseAd()}catch(t){this.yI("VastBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.YS.skipAd()}catch(t){this.yI("VastBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.YS.getAdRemainingTime()}catch(t){return this.yI("VastBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.YS&&this.YS.getAdDuration()||Math.round(this.settings.vastResponse.duration/J.s_)}catch(t){return this.yI("VastBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.YS.getAdVolume()}catch(t){return this.yI("VastBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){let t=0,i=0;return this.YS instanceof ze?(t=this.YS.getAdMediaWidth(),i=this.YS.getAdMediaHeight()):(t=this.JS.width,i=this.JS.height),{width:t,height:i}}setAdVolume(t){try{super.setAdVolume(t),this.YS.setAdVolume(t)}catch(t){this.yI("VastBidAdaptor","setAdVolume",t)}}get adVideoUrl(){var t;return null===(t=this.JS)||void 0===t?void 0:t.src}get declaredDurationInSeconds(){return this.settings.vastResponse.duration/J.s_}aI(t){const i=super.aI(t);return this.tP(i)}hI(t){const i=super.hI(t);return this.tP(i)}Im(){var t;if(!this.settings.loopAdWhenFinished)try{super.Im(),(0,H.i)(this.QS),null===(t=this.YS)||void 0===t||t.destroy()}catch(t){this.yI("VastBidAdaptor","_destroy",t)}}tP(t){var i;return t.payload.adSourceData.name=null===(i=this.settings.vastResponse)||void 0===i?void 0:i.adTitle,t.payload.clickThroughUrl=this.KS||this.settings.vastResponse.linearClickThrough,t}iP(t,i){return t.filter((t=>t.getMediaFileType()===he.Video&&i.canPlayType(t.type)))}XS(t,i){const e=this.iP(this.settings.vastResponse.mediaFiles,i),s=e.filter((t=>"video/mp4"===t.type)),n=this.settings.vastResponse.mediaFiles.filter((t=>t.getMediaFileType()===he.Javascript));return this.eP()&&this.sP()&&n.length?Ve(n,t):s.length?Ve(s,t):e.length?Ve(e,t):n.length?Ve(n,t):null}sP(){const{advertiserLineItemId:t}=this.settings.adManagerLineItem.protoLineItem;return Ye.includes(t)}eP(){const t=this.settings.vastResponse.extensions.filter((t=>t.type===Qe.AdVerifications));return(0,b.BZ)(t)||(0,b.BZ)(this.settings.vastResponse.verifications)}ZS(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorInitAdError+`_${t.message}`}})}}class Ze extends Li{constructor(t){super(t),this.settings=t,this.settings.vastAdsChain||(this.settings.vastAdsChain=[]),void 0===this.settings.maxWrapperLimit&&(this.settings.maxWrapperLimit=10)}fetchBid(){return this.metrics.fetchStart=(new Date).getTime(),this.nP(this.settings.xml).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),t}))}nP(t){return new Promise(((i,e)=>{const s=new _e(2).parseVastXml(t);if(!0===s.error){return["12da08f0-7c57-4da9-aca2-f27978241b8f","744271e4-f4b7-4114-a93c-587a38098b01"].includes(this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId)&&(0,o.n)({message:"Pubmatic_parse_error",exception:Ti[s.errorReason],level:o.D.INFO}),void e(s.errorReason)}this.rP(s.result),i(this.oP(s.result))}))}oP(t){return new Promise(((i,e)=>{if(t.wrapper){this.settings.maxWrapperLimit<=0&&e(Ti.XmlAdaptorWrapperLimit);const s=this.settings.maxWrapperLimit-1;i(new ss({id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackersInformation:this.settings.trackersInformation,maxWrapperLimit:s,url:t.wrapper.VASTAdTagURI,replaceTrackingMacros:!1,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adMacroReplacer:this.settings.adMacroReplacer,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,sessionId:this.settings.sessionId,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,requestWithCredentials:this.settings.requestWithCredentials,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,creativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,loopAdWhenFinished:this.settings.loopAdWhenFinished,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService,yoScoreCalculator:this.settings.yoScoreCalculator}).fetchBid())}else{let t;const e={id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,externalCreativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,urlSuffixerService:this.settings.urlSuffixerService,sessionId:this.settings.sessionId,yoScore:this.yoScore,price:this.bidPrice},s=mi.h.getGlobalContainer().resolve(ie.f);if(this.settings.adManagerLineItem.protoLineItem.adType===m.ProtoAdType.Nonlinear){const i=Object.assign(Object.assign({},e),{sessionId:this.settings.sessionId,vastResponse:new Se(this.settings.vastAdsChain)});t=new De(s,i)}else{const i=Object.assign(Object.assign({},e),{vastResponse:new Se(this.settings.vastAdsChain),sessionId:this.settings.sessionId,loopAdWhenFinished:this.settings.loopAdWhenFinished});t=new Ke(s,i)}i(t)}}))}rP(t){!function(t,i){const e=new _i(t);i.adError.push(...ki(e.errorUrls)),i.adImpression.push(...ki(e.impressions)),i.adViewableImpression.push(...ki(e.trackingEvents.viewable_impression)),i.adClick.push(...ki(e.clickTrackings)),i.adMute.push(...ki(e.trackingEvents.mute)),i.adPause.push(...ki(e.trackingEvents.pause)),i.adQuartileFirst.push(...ki(e.trackingEvents.firstQuartile)),i.adQuartileSecond.push(...ki(e.trackingEvents.midpoint)),i.adQuartileThird.push(...ki(e.trackingEvents.thirdQuartile)),i.adQuartileFourth.push(...ki(e.trackingEvents.complete)),i.adResume.push(...ki(e.trackingEvents.resume)),i.adSkip.push(...ki(e.trackingEvents.skip)),i.adStarted.push(...ki(e.trackingEvents.creativeView)),i.adVideoStart.push(...ki([...e.trackingEvents.start])),i.adUnmute.push(...i.adUnmute,...ki(e.trackingEvents.unmute)),i.adUserAcceptInvitation.push(...ki([...e.trackingEvents.acceptInvitation,...e.trackingEvents.acceptInvitationLinear])),i.adUserClose.push(...ki(e.trackingEvents.close)),i.adUserMinimize.push(...i.adUserMinimize,...ki([...e.trackingEvents.collapse,...e.trackingEvents.playerCollapse,...e.trackingEvents.adCollapse]))}(t,this.settings.trackersInformation),this.settings.vastAdsChain.push(t)}}var ts,is=h(9831);!function(t){t[t.None=0]="None",t[t.Ima=1]="Ima"}(ts||(ts={}));const es={[ts.Ima]:".g.doubleclick.net"};class ss extends Li{constructor(t){super(t),this.settings=t,void 0===this.settings.requestWithCredentials&&(this.settings.requestWithCredentials=true)}fetchBid(){return this.metrics.fetchStart=(new Date).getTime(),this.hP(this.settings.url).then((t=>t.fetchBid())).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),t}))}aP(t){let i=ts.None;return Object.keys(es).forEach((e=>{t.includes(es[e])&&(i=parseInt(e,10))})),i}hP(t){let i;try{i=this.cP(t)}catch(t){return Promise.reject(Ti.InvalidCreativeUrl)}let e=this.aP(t);switch(this.settings.adManagerLineItem.protoLineItem.adType===m.ProtoAdType.Nonlinear&&(e===ts.Ima&&(0,o.n)({message:"AdManager_VastUrlCallAdaptor_found_ima_in_nonLinear",level:o.D.INFO}),e=ts.None),e){case ts.None:return this.lP(i);case ts.Ima:return this.uP(i);default:return Promise.reject(Ti.HandlingSdkUrl)}}uP(t){const i={url:t,id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackersInformation:this.settings.trackersInformation,replaceTrackingMacros:!1,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,sessionId:this.settings.sessionId,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,creativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService,isIma:!0,yoScoreCalculator:this.settings.yoScoreCalculator},e=mi.h.getSessionChildContainer(this.settings.sessionId).resolve(Ci.P);return e.isImaTestCaseForSS()||e.isMarriageDotComDomain()||e.isDailykosDotComDomain()?Promise.resolve(new re(i)):Promise.resolve(new ee(i))}lP(t){return is.n.fetchXMLRequest(t,this.settings.requestWithCredentials).catch((()=>!1===this.settings.requestWithCredentials?Promise.reject(Ti.NetworkRequestUrl):is.n.fetchXMLRequest(t,!1))).catch((()=>Promise.reject(Ti.NetworkRequestUrl))).then((t=>new Ze({id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackersInformation:this.settings.trackersInformation,vastAdsChain:this.settings.vastAdsChain,xml:t,replaceTrackingMacros:!1,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adMacroReplacer:this.settings.adMacroReplacer,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,sessionId:this.settings.sessionId,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,requestWithCredentials:this.settings.requestWithCredentials,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,creativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,loopAdWhenFinished:this.settings.loopAdWhenFinished,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService,interactionService:this.settings.interactionService,yoScoreCalculator:this.settings.yoScoreCalculator})))}cP(t){const{width:i,height:e}=this.settings.callingState.adContainerState.get(this.settings.adManagerLineItem.protoLineItem.adType),s={adHeight:e,adWidth:i,adPostion:this.settings.callingState.adBreakState.adBreakType},n={mediaDescription:this.settings.callingState.media.mediaDescription,mediaDuration:this.settings.callingState.media.mediaDuration,mediaId:this.settings.callingState.media.mediaId,mediaTitle:this.settings.callingState.media.mediaTitle,mediaUrl:this.settings.callingState.media.mediaUrl};return this.settings.adMacroReplacer.replace(t,this.settings.adManagerLineItem.protoLineItem.vendorId,{adMacros:s,mediaMacros:n})}}class ns{constructor(t){this.data=t,(0,n.QM)(this.data.cnxBidId)||(this.data.cnxBidId=(0,e.qs)())}}var rs=h(307);class os{constructor(t,i,e,s,n,r,o){this.fP=t,this.mP=i,this.Zw=e,this.In=s,this.xI=n,this.Xw=r,this.vP=o,this.e_=new R.x,this.n_=new R.x,this.XI=new R.x,this.Pd=[]}get onDisplayAd(){return this.e_.asObservable()}get onError(){return this.XI.asObservable()}get onClickClose(){return this.n_.asObservable()}initializeAd(t,i){try{let e;if(this.Xw===m.ProtoAdType.Nonlinear){const{width:t,height:i}=this.vP;e={width:t,height:i}}this.g_=new Le(this.Xw,this.mP,this.fP,t,this.In,this.xI,this.Zw,e),this.Pd.push(this.g_.onDisplayAd.subscribe((()=>{this.e_.next()})),this.g_.onError.subscribe((()=>{this.XI.next(Di.DisplayIntegratorIframeLoad)})),this.g_.onClickClose.subscribe((()=>{this.n_.next()}))),this.g_.createBanner(i)}catch(t){this.XI.next(Di.WrapperInitAdError)}}getAdMediaDimensions(){var t;return null===(t=this.g_)||void 0===t?void 0:t.getAdMediaDimensions()}destroy(){var t;(0,H.i)(this.Pd),null===(t=this.g_)||void 0===t||t.destroy()}}const hs={[Pe.n.FirstQuartile]:X.fI.AdVideoFirstQuartile,[Pe.n.SecondQuartile]:X.fI.AdVideoMidpoint,[Pe.n.ThirdQuartile]:X.fI.AdVideoThirdQuartile,[Pe.n.FourthQuartile]:X.fI.AdVideoComplete};class as extends Wi{constructor(t,i){var e;let s;super(t,i),this.Qs=t,this.settings=i,this.adSourceType=m.ProtoAdsourceTypeEnum.Unknown,this.Js=500,this.gP=[],this.settings.adManagerLineItem.protoLineItem.adType===m.ProtoAdType.Nonlinear?(this.adMediaType="displayHtmlNonLinear",this.O_="htmlNonLinear",s=null===(e=this.settings.adManagerLineItem.protoLineItem.nonlinearLineItemSettings)||void 0===e?void 0:e.nonLinearAdTimeSeconds):(this.adMediaType="displayHtml",this.O_="html",s=this.settings.adManagerLineItem.protoLineItem.overlayTime);const n=s*J.s_;this.M_=new Oe.B(this.Qs,n,this.Js),this.gP.push(this.M_.onTimeUpdate.subscribe((()=>{this.Bb({type:X.fI.AdRemainingTimeChange})})),this.M_.onTimeElapsed.subscribe((()=>{this.stopAd("htmlTimerElapsed")})),this.M_.onQuartile.subscribe((t=>{this.Bb({type:hs[t],payload:{}})})))}get adVideoUrl(){return this.O_}get declaredDurationInSeconds(){return this.settings.adManagerLineItem.protoLineItem.overlayTime}initAd(t,i,e,s,n,r,o){try{super.initAd(t,i,e,s,n,r,o),this.av=t,this.dv=i,this.Bb({type:X.fI.AdLoaded,payload:{}})}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.M_.start(),this.yP=new os(this.settings.mime,this.settings.html,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,this.settings.globalDomUtilsService,this.settings.sessionId,this.settings.adManagerLineItem.protoLineItem.adType,this.settings.dimensions),this.gP.push(this.yP.onDisplayAd.subscribe((()=>{this.Bb({type:X.fI.AdStarted}),this.Bb({type:X.fI.AdVideoStart}),this.Bb({type:X.fI.AdImpression,payload:{}})})),this.yP.onError.subscribe((t=>{this.Bb({type:X.fI.AdError,payload:{errorMessage:t}}),this.M_.stop()})),this.yP.onClickClose.subscribe((()=>{this.Bb({type:X.fI.AdUserClose,payload:{}}),this.stopAd(X.r5)}))),this.yP.initializeAd(this.fb,{width:this.av,height:this.dv})}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.M_.stop(),this.Bb({type:X.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}catch(t){this.yI("HtmlBidAdaptor","stopAd",t)}}skipAd(){try{super.skipAd(),this.Bb({type:X.fI.AdSkipped})}catch(t){this.yI("HtmlBidAdaptor","skipAd",t)}}pauseAd(){try{this.M_.stop(),this.Bb({type:X.fI.AdPaused})}catch(t){this.yI("HtmlBidAdaptor","pauseAd",t)}}resumeAd(){try{this.M_.start(),this.Bb({type:X.fI.AdPlaying})}catch(t){this.yI("HtmlBidAdaptor","resumeAd",t)}}collapseAd(){}expandAd(){}getAdDuration(){return this.M_.timerDuration/J.s_}getAdRemainingTime(){return this.M_.timeRemaining/J.s_}getAdVolume(){return 0}getAdMediaSize(){var t;return null===(t=this.yP)||void 0===t?void 0:t.getAdMediaDimensions()}setAdVolume(t){}resizeAd(t,i,e){this.av=t,this.dv=i}Im(){var t;try{super.Im(),this.M_.stop(),(0,H.i)(this.gP),null===(t=this.yP)||void 0===t||t.destroy()}catch(t){this.yI("HtmlBidAdaptor","_destroy",t)}}}class cs extends Li{constructor(t){super(t),this.settings=t}fetchBid(){if(this.metrics.fetchStart=(new Date).getTime(),!this.bP(this.settings.mime))return Promise.reject(Ti.HTMLUnknownMimeType);const t=mi.h.getGlobalContainer().resolve(ie.f),i=new as(t,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,html:this.settings.html,mime:this.settings.mime,minDimensions:this.settings.dimensions,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,globalDomUtilsService:this.settings.globalDomUtilsService,sessionId:this.settings.sessionId,viewabilityService:this.settings.viewabilityService,adContainer:this.settings.adContainer,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,externalCreativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,urlSuffixerService:this.settings.urlSuffixerService,dimensions:this.settings.dimensions,yoScore:this.yoScore,price:this.bidPrice});return this.metrics.fetchEnd=(new Date).getTime(),Promise.resolve(i)}bP(t){return Object.keys(Te).some((i=>Te[i]===t))}}var ds=h(5742),ls=h(2450);const us=["ddb2f21f-97a6-4efe-b8d3-29187a109f26","6faf989f-40de-4754-ac8e-359574e4b357","a28964ae-afa3-45d3-9f00-fa228cf89d74","5ee7c0e2-db41-417d-a2f2-4d91037b85bd","885d6a6e-3989-4b92-b39d-f27bf95585f6","fb24d42c-879a-4d98-8bc6-037f99e971ed","17db3dde-36f2-4c05-9e37-0c6d6cd2d2b8","3ebdd57e-b5b8-4fd8-8887-6ae94a978a12","4b724681-b6ed-4206-af76-91558dd7ae97","6aef9fe6-a3f3-48a0-ae28-b068a96f45e1","90857b8e-560f-42c0-b0d1-5c4527da610c","14f5a754-5e79-42ff-a5a3-0cbe2300f428","8b29f95e-7663-4825-97c5-85e4b427df2a","3de724ff-efea-4f24-b1a4-5520a0530ee1","fe9242a7-7f5a-40f0-84ad-0d1cb921dbbe","b51de0ac-a3f1-4618-89dc-89111ff5ec62","11d8c7dd-ba90-4bae-9148-e32a7b2fecef","a35dcb98-5f9a-472e-98bf-8fe48d66c86d","5863ca7a-9fea-40e4-a207-0f1e82d07ed7","c8916590-a8b2-4c1c-9616-e251f70bb88b","0ab96a0d-2794-4727-81e7-ca9b1935de68","1bc398f8-c04c-4d33-89c8-af4932b4365c","de0d3790-6d2f-4de3-a99f-c57e4ff48315","fa930c65-1cfa-492a-b774-c32f657d05c3","be8b2598-a065-4d14-8865-4e077b92c65c","98abb9bd-c4dd-413a-bfaf-f79615250a5a","9a4005b0-473d-40be-81d0-ff5d4739b27c","41524015-c77a-4aad-88c8-327e8a55118d","07b3f552-8cd1-4af6-845c-bbc9956d1565","8cd4291c-d6fb-407f-adee-22547cf3d545","66ef0899-eaf6-4bd7-8993-e4d17d730dad","e8ee883f-4058-454c-b198-ebe07884fd42","08d77337-01a3-6602-77df-0366fd684428","dea7fe60-f902-42d0-9aca-9732e064e44e","442ef13a-dec7-4c67-858e-8ae8112c2818"];class ps{constructor(t,i,e,s,n,r,o,h,a,c,d){this.IP=t,this.wP=i,this._P=e,this.sl=s,this.SP=n,this.PP=r,this.AP=o,this.xP=h,this.kP=a,this.Eu=c,this.TP=d,this.CP=new Map}request(t){const{width:i,height:e}=t.callingState,s=this.EP(i,e),n=this.MP(t);return!s||Object.keys(n.lineItems).length<=0?Promise.resolve({bids:[],noBids:[]}):this.LP(n).then((i=>(n.liveRampAtsEnvelope&&ls.$.setEnvelopeStatus(i.liveRampEnvelopeStatus),this.BP(i,t)))).catch((t=>((0,o.n)({message:"RtbCallAggregator",exception:t.message,level:o.D.CRITICAL},{pacing:1}),{bids:[],noBids:[]})))}BP(t,i){const e={bids:[],noBids:[]};return t.lineItemResponses.forEach((s=>{const r=Ct(i.lineItemRequestDataList,s.id);(0,n.$K)(s.cachedFloorPrice)&&this.CP.set(s.id,s.cachedFloorPrice),s.bids.forEach((s=>{const n=r.protoLineItem;if(s=Object.assign(Object.assign({},s),this.OP(n)),this.RP(n,s))return(0,o.n)({level:o.D.WARN,message:"RtbCallAggregator_nonLinear_banner_0_dimensions",exception:`lineItemId:${r.protoLineItem.advertiserLineItemId}`},{throttle:5}),void e.noBids.push(this.DP({connatixReason:m.ConnatixNoBidReasonEnum.InvalidResponse,partnerCustomHeaders:"",partnerReason:m.PartnerNoBidReasonEnum.Unknown,requestedFloorPrice:s.requestedFloorPrice,syncedUser:s.syncedUser},r,t));const h=this.VP(s,r,t,i.callingState);h&&e.bids.push(h)})),s.noBids.forEach((i=>{e.noBids.push(this.DP(i,r,t))}))})),e}OP(t){return{}}RP(t,i){var e;return Mt(t.adType,null===(e=t.nonlinearLineItemSettings)||void 0===e?void 0:e.nonLinearRequestType)&&(!i.height||!i.width)}DP(t,i,e){return{lineItem:i,requestMetadata:new ns({requestedFloorPrice:t.requestedFloorPrice,requestNumber:i.historicalMetrics.requestNumber,isUserSynced:t.syncedUser,partnerCustomHeaders:t.partnerCustomHeaders,partnerReason:t.partnerReason,requestTrackingHandledByServer:!0}),reason:t.connatixReason}}VP(t,i,s,n){const r=t,o=this.jP(r,i),h=new ns({requestedFloorPrice:r.requestedFloorPrice,isUserSynced:r.syncedUser,requestNumber:i.historicalMetrics.requestNumber,encryptedPrice:r.encryptedPrice,dspId:r.dspId,rtbAdomain:r.adomain,rtbSeatId:r.seatId,rtbCampainId:r.campaignId,cnxBidId:r.cnxBidId,requestTrackingHandledByServer:!0,logAuctionInformation:r.logAuctionInformation,auctionBidId:r.auctionBidId,rtbRequestId:r.rtbRequestId,liveRampType:r.liveRampType,floorPriceInformation:r.floorPriceInformation,discount:r.discount}),a=je(),c={id:(0,e.qs)(),adContainer:this.PP.get(i.protoLineItem.adType),adEnforcer:this.xP,adManagerLineItem:i,adSlotContainerRecycler:this.kP,bidSlotId:a,callingState:n,globalDomUtilsService:this._P.services.GlobalDomUtilsService,os:this._P.config.os.os,replaceTrackingMacros:!0,requestMetadata:h,trackersInformation:o,urlSuffixerService:this._P.services.UrlSuffixerService,viewabilityService:this._P.services.ViewabilityService,creativeId:r.creativeId,interactionService:this._P.services.InteractionService,obfuscatedPrice:r.gtkpbp,successRate:r.successRate,sessionId:this._P.config.sessionId,yoScoreCalculator:this.TP};if(this.FP(i.protoLineItem)){if(us.includes(i.protoLineItem.advertiserLineItemId)){const t=mi.h.getSessionChildContainer(this._P.config.sessionId).resolve(Ci.P),i=Object.assign(Object.assign({},c),{xml:r.vastTag,pageUrl:this._P.config.pageUrl,isIma:!0});return t.isImaTestCaseForSS()||t.isMarriageDotComDomain()||t.isDailykosDotComDomain()?new re(i):new ee(i)}return new Ze(Object.assign(Object.assign({},c),{xml:r.vastTag,adMacroReplacer:this.SP,pageUrl:this._P.config.pageUrl}))}return new cs(Object.assign(Object.assign({},c),{dimensions:{width:r.width,height:r.height},html:r.vastTag,mime:r.mime}))}FP(t){var i;return t.adType===m.ProtoAdType.Nonlinear&&(null===(i=t.nonlinearLineItemSettings)||void 0===i?void 0:i.nonLinearRequestType)===m.ProtoNonlinearRequestType.Video||t.adType===m.ProtoAdType.Video}jP(t,i){const e=new Pi;Ai(i.protoLineItem.trackers,e);const s=[...t.billingNoticeUrlList,t.adQualityCheckUrl].filter((t=>(0,n.QM)(t))).map((t=>xi(t)));return e.adImpression.push(...s),(0,n.QM)(t.winNoticeUrl)&&e.adWin.push(xi(t.winNoticeUrl)),e}NP(t,i){if(t.protoLineItem.adType!==m.ProtoAdType.Overlay)return null;const e=i.adContainerState.get(m.ProtoAdType.Video),s=i.adContainerState.get(m.ProtoAdType.Overlay);return e.height!==s.height||e.width!==s.width?{width:s.width,height:s.height}:void 0}UP(t,i){const e={};return t.filter((t=>this.$P(t))).forEach((t=>{const s=t.adManagerLineItem,n=this.NP(s,i);let r;this.CP.has(s.protoLineItem.advertiserLineItemId)&&(r=this.CP.get(s.protoLineItem.advertiserLineItemId));const o=this.qP(s);e[s.protoLineItem.advertiserLineItemId]=Object.assign({availableRequests:t.maxAvailableRequests,gdprConsent:this._P.services.UserManagerService.isConsent(s.protoLineItem.vendorId),cachedFloorPrice:r,publisherLineItemId:s.protoLineItem.publisherLineItemId,slotHeight:null==n?void 0:n.height,slotWidth:null==n?void 0:n.width,requestNumber:s.historicalMetrics.requestNumber},o)})),e}qP(t){const i=Et({playerSkippability:this.wP.skippability,playerSkipMin:this.wP.skipMin,playerSkipAfter:this.wP.skipAdAfter,lineItemSkippability:t.protoLineItem.skippability,lineItemSkipMin:t.protoLineItem.skipMin}),e=i.skippable?m.ProtoSkipEnabledEnum.Yes:m.ProtoSkipEnabledEnum.No;return Object.assign(Object.assign({},i),{skip:e})}$P(t){return!!t.adManagerLineItem.protoLineItem.forceCallingInEveryAO||this.AP.shouldRequestLineItem(t.adManagerLineItem.protoLineItem.advertiserLineItemId)}MP(t){const{width:i,height:n,viewability:r}=t.callingState,{width:o,height:h}=this.sl.playerDimensions;return{metadata:this.sl.trackingRequestMeta,gdprCompliant:this._P.services.UserManagerService.isGDPR(),gdprConsentData:this._P.services.UserManagerService.getConsentPayload(),soundOn:t.callingState.sound,videoHeight:n,videoWidth:i,testMode:"true"===(0,s.Ph)("cnxRtbTest",this._P.config.pageUrl),explorationMode:this._P.config.explorationMode,viewability:r,outstream:this.IP,domainURL:this._P.config.domainURL,isClickToPlay:t.callingState.clickToPlay,appVersion:this._P.config.appVersion,deviceID:this._P.services.UserManagerService.getDeviceId(),isCcpaBlockingUserInfo:!this._P.services.UserManagerService.isSellUserAllowed(),usPrivacyString:this._P.services.UserManagerService.getUsPrivacyString(),gdprConsentMode:this._P.services.UserManagerService.gdprConsentMode,customMacros:this._P.services.MacrosService.getExtraMacros(),maxAdDuration:t.maxAdDuration,lineItems:this.UP(t.lineItemRequestDataList,t.callingState),maxBidPrice:t.maxBidPrice,playerWidth:o,playerHeight:h,useNewSkippability:!0,liveRampAtsEnvelope:this._P.services.UserManagerService.identityEnvelope,lineItemAbTestInformation:this.Eu,connectionType:(0,e.M$)(this._P.config.deviceType)}}LP(t){return is.n.sendProtoRequest({endpoint:Xe.n.endPoints.api.rtb,protoRequest:m.ProtoRtbRequest,protoResponse:m.ProtoRtbResponse,requestData:t,queryParams:Object.assign({[rs.Fk]:i.g.version},ds.f.getCidKeyValueObject()),shouldLogErrors:!1})}EP(t,i){return 0!==t&&0!==i||((0,o.n)({message:"AdManager_BidderCaller_dimensions",exception:`width:${t}_height:${i}_destroyed:${P.S.playerDestroyed}`,level:o.D.CRITICAL},{throttle:5}),!1)}}var fs,ms,vs;!function(t){t.AppNexus="appnexus",t.IndexExchange="ix",t.OpenX="openx",t.Pubmatic="pubmatic",t.RhythmOne="rhythmone",t.Rubicon="rubicon",t.SpotX="spotx",t.Telaria="telaria",t.MediaNet="medianet",t.Adman="adman",t.SynacorMedia="synacormedia",t.Undertone="undertone",t.AmxRTB="amx",t.Smaato="smaato",t.SmartAdServer="smartadserver",t.TheMediaGrid="grid",t.Rise="rise",t.YahooSSP="yahoossp",t.Unruly="unruly",t.Kargo="kargo",t.SmileWanted="smilewanted",t.TrustX="trustx",t.EmxDigital="emx_digital",t.KrushMedia="krushmedia",t.Conversant="conversant",t.Criteo="criteo",t.TripleLift="triplelift",t.PulsePoint="pulsepoint",t.Adtelligent="adtelligent",t.Yieldmo="yieldmo",t.PgamMedia="pgammedia",t.NextMillennium="nextMillennium",t.AdYouLike="adyoulike",t.FreeWheelSSP="freewheel-ssp",t.ColossusSSP="colossusssp",t.ResetDigital="resetdigital",t.MediaFuse="mediafuse"}(fs||(fs={})),function(t){t[t.Instream=1]="Instream",t[t.InBanner=2]="InBanner",t[t.Outstream=3]="Outstream",t[t.InFeed=4]="InFeed",t[t.Floating=5]="Floating"}(ms||(ms={})),function(t){t[t.AutoplaySoundOn=1]="AutoplaySoundOn",t[t.AutoPlaySoundOff=2]="AutoPlaySoundOff",t[t.ClickToPlay=3]="ClickToPlay",t[t.MouseOver=4]="MouseOver",t[t.ScrollToPlaySoundOn=5]="ScrollToPlaySoundOn",t[t.ScrollToPlaySoundOff=6]="ScrollToPlaySoundOff"}(vs||(vs={}));const gs=(t,i)=>({[m.ProtoPlayerPlaybackModeEnum.Autoplay]:i!==m.ProtoPlayerSoundMode.Mute?vs.AutoplaySoundOn:vs.AutoPlaySoundOff,[m.ProtoPlayerPlaybackModeEnum.ClickToPlay]:vs.ClickToPlay,[m.ProtoPlayerPlaybackModeEnum.ScrollToPlay]:i!==m.ProtoPlayerSoundMode.Mute?vs.ScrollToPlaySoundOn:vs.ScrollToPlaySoundOff}[t]),ys=["video/mp4","video/webm","application/javascript","video/ogg","video/mpeg"],bs=[2,3,5,6],Is={VPAID_1:1,VPAID_2:2},ws=[Is.VPAID_1,Is.VPAID_2],_s=[Is.VPAID_1,Is.VPAID_2],Ss=(t,i)=>{const{skip:e,skippable:s,skipmin:n,skipafter:r}=i,{width:o,height:h,isOutstreamContext:a,maxAdDuration:c,inFloating:d,initialSoundMode:l,playbackMode:u}=t;let p=ms.Instream;return a&&(p=ms.Floating),d&&(p=ms.Outstream),{video:{w:Math.floor(o),h:Math.floor(h),playerSize:[Math.floor(o),Math.floor(h)],context:a?"outstream":"instream",mimes:ys,protocols:bs,linearity:1,api:ws,frameworks:_s,maxduration:c,minduration:0,skip:e,skippable:s,skipmin:n,skipafter:r,placement:p,playbackmethod:[gs(u,l)]}}},Ps="https://prebid.adnxs.com/pbc/v1/cache",As=()=>({cmpApi:"iab",timeout:2e3,defaultGdprScope:!0,allowAuctionWithoutConsent:!1,rules:[{purpose:"storage",enforcePurpose:!0,enforceVendor:!0},{purpose:"basicAds",enforcePurpose:!0,enforceVendor:!0},{purpose:"measurement",enforcePurpose:!0,enforceVendor:!0}]}),xs=()=>({cmpApi:"iab",timeout:2e3}),ks=t=>{if(!(0,n.as)(t))return null;return`1.0,1!${(0,n.QM)(t.businessDomain)?encodeURI(t.businessDomain):""},${(0,n.QM)(t.supplyChainId)?encodeURI(t.supplyChainId):""},1`};var Ts;!function(t){t.CACHE_ID="CACHE_ID"}(Ts||(Ts={}));var Cs;!function(t){t.Banner="banner",t.Video="video",t.All="all"}(Cs||(Cs={}));const Es=(t,i,e,s)=>{const r=Object.assign(Object.assign(Object.assign(Object.assign({usePrebidCache:!0},{userSync:{syncEnabled:!0,iframeEnabled:!0,pixelEnabled:!0,filterSettings:{iframe:{bidders:"*",filter:"include"},image:{bidders:"*",filter:"include"}},syncsPerBidder:0,syncDelay:3e3,auctionDelay:0,aliasSyncEnabled:!0,userIds:[{name:"criteo"},{name:"pubCommonId",params:{enableSharedId:!0},storage:{type:"cookie",name:"_pubcid",expires:180}},{name:"uid2"}]}}),{ix:{timeout:900}}),{targetingControls:{addTargetingKeys:[Ts.CACHE_ID]}}),{yahoossp:{mode:Cs.Video}});return r.floors={},(0,n.QM)(s)&&(r.pageUrl=s),r.usePrebidCache&&(r.cache={url:Ps}),e&&(r.schain=(t=>({validation:"strict",config:{ver:"1.0",complete:1,nodes:[{asi:t.businessDomain,hp:1,sid:(0,n.QM)(t.supplyChainId)?t.supplyChainId:null}]}}))(e)),(t||i)&&(r.consentManagement=((t,i)=>t?{gdpr:As()}:i?{usp:xs()}:{})(t,i)),r};class Ms{constructor(t,i){this.In=t,this.xI=i,this.HP=!0,this.c_=new Ce(this.In,this.xI)}loadPrebidJs(t){return new Promise(((i,e)=>{if(this.zP)return i(this.zP);this.insertPrebidJs().then((e=>{this.zP=e,this.zP.setConfig(t),this.zP.setBidderConfig({bidders:[fs.TrustX,fs.TripleLift,fs.Conversant,fs.Criteo,fs.Kargo],config:{localStorageWriteAllowed:!0}},this.HP),i(e)})).catch((t=>e(t)))}))}insertPrebidJs(){return new Promise(((t,i)=>{this.c_.loadIframe({customHead:"<style> html, body {display: none}</style>",customHtml:`<script id='cnx-prebid-loader' type='text/javascript' src='${Xe.n.endPoints.assets.plugins.prebidScript}'><\/script>`,customIframeAttributes:[{key:"class",value:"cnx-prebid-loader"}],container:this.In.querySelector("head"),visible:!1}).then((e=>{if(e.iframe.contentWindow.pbjs)return t(e.iframe.contentWindow.pbjs);i(new Error("pbjs could not be found on the iframe window"))})).catch((t=>{i(t)}))}))}}class Ls{static logMissingRequireParam(t,i,e){(0,o.n)({level:o.D.CRITICAL,message:`PrebidJS_${t}_adapter_missing_${i}_li_${e}`})}static logMissingRequireIntegrationsParams(t,i,e){const s=i.map((t=>t.join("_and_"))).join("_or_");(0,o.n)({level:o.D.CRITICAL,message:`PrebidJS_${t}_adapter_needs_${s}_li_${e}`})}get config(){return this.WP}}var Bs,Os,Rs;!function(t){t.NATIVE="native",t.VIDEO="video",t.BANNER="banner"}(Bs||(Bs={}));!function(t){t.Instream="instream",t.Outstream="outstream"}(Os||(Os={}));!function(t){t[t.Nonsecure=0]="Nonsecure",t[t.Secure=1]="Secure"}(Rs||(Rs={}));const Ds={[fs.AppNexus]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:32,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.hj)(e.placementId))return void Ls.logMissingRequireParam("appnexus","placementId",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.reserve=s),e.video=Object.assign(Object.assign({},e.video||{}),{skippable:!!i.skippabilitySettings.skip,skipoffset:i.skippabilitySettings.skipafter}),e}},[fs.IndexExchange]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:10,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.siteId))return void Ls.logMissingRequireParam("ix","siteId",i.lineItemId);const{floorPrice:s,isOutstream:r}=i;if((0,n.r)(s)&&(e.bidFloor=s,e.bidFloorCur="USD"),r){const{inFloating:t,hasFloatingCapability:s,playerWidth:n,playerHeight:r}=i;e.video.playerConfig={floatOnScroll:s,floatSize:t?[n,r]:void 0}}return e}},[fs.OpenX]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:69,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:s}=i;if(!(0,n.QM)(e.unit))return void Ls.logMissingRequireParam("openx","unit",s);if(!(0,n.QM)(e.delDomain))return void Ls.logMissingRequireParam("openx","delDomain",s);const{floorPrice:r}=i;return(0,n.r)(r)&&(e.customFloor=r),e}},[fs.Pubmatic]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:76,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.publisherId))return void Ls.logMissingRequireParam("pubmatic","publisherId",i.lineItemId);const s=i.floorPrice;return(0,n.r)(s)&&(e.kadfloor=String(s)),i.isOutstream&&(e.outstreamAU=i.adUnitCode),e.kadpageurl=i.pageUrl,e}},[fs.RhythmOne]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:36,gdprSupport:!0,ccpaSupport:!1}}getBidParams(t,i){if((0,n.QM)(t.placementId))return t;Ls.logMissingRequireParam("rhythmone","placementId",i.lineItemId)}},[fs.Rubicon]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:52,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:s}=i;if(!(0,n.hj)(e.accountId))return void Ls.logMissingRequireParam("rubicon","accountId",s);if(!(0,n.hj)(e.siteId))return void Ls.logMissingRequireParam("rubicon","siteId",s);if(!(0,n.hj)(e.zoneId))return void Ls.logMissingRequireParam("rubicon","zoneId",s);const r=i.floorPrice;return(0,n.r)(r)&&(e.floor=r),e}},[fs.SpotX]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:165,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.channel_id))return void Ls.logMissingRequireParam("spotx","channel_id",i.lineItemId);(0,n.QM)(e.ad_unit)||(e.ad_unit=i.isOutstream?Os.Outstream:Os.Instream);const{floorPrice:s,isOutstream:r,bidSlotId:o}=i;return(0,n.r)(s)&&(e.price_floor=s),r&&(e.outstream_options={slot:o}),e.page=i.pageUrl,e}},[fs.Telaria]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:52,gdprSupport:!0,ccpaSupport:!1}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:s,pageUrl:r}=i;if((0,n.QM)(t.adCode)){if((0,n.QM)(t.supplyCode))return e.srcPageUrl=r,t;Ls.logMissingRequireParam("telaria","supplyCode",s)}else Ls.logMissingRequireParam("telaria","adCode",s)}},[fs.MediaNet]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:142,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:s}=i;if(!(0,n.QM)(e.cid))return void Ls.logMissingRequireParam("medianet","cid",s);if(!(0,n.QM)(e.crid))return void Ls.logMissingRequireParam("medianet","crid",s);const{floorPrice:r}=i;return(0,n.r)(r)&&(e.bidFloor=r),e.site=Object.assign(Object.assign({},e.site||{}),{page:i.pageUrl}),e}},[fs.Adman]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:149,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.placementId))return void Ls.logMissingRequireParam("adman","placementId",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.bidfloor=s),e.traffic=Bs.VIDEO,e}},[fs.SynacorMedia]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:void 0,gdprSupport:!1,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:s}=i;if(!(0,n.QM)(e.seatId))return void Ls.logMissingRequireParam("synacormedia","seatId",s);if(!(0,n.QM)(e.tagId))return void Ls.logMissingRequireParam("synacormedia","tagId",s);const{floorPrice:r}=i;return(0,n.r)(r)&&(e.bidfloor=r),e}},[fs.Undertone]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:677,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:s}=i;if((0,n.hj)(e.publisherId)){if((0,n.QM)(e.placementId))return e.video=Object.assign(Object.assign({},e.video||{}),{skippable:!!i.skippabilitySettings.skip}),e;Ls.logMissingRequireParam("undertone","placementId",s)}else Ls.logMissingRequireParam("undertone","publisherId",s)}},[fs.AmxRTB]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:737,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.tagId))return void Ls.logMissingRequireParam("amx","tagId",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.floor=s),e}},[fs.Smaato]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:82,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const{lineItemId:e}=i;if((0,n.QM)(t.publisherId)){if((0,n.QM)(t.adspaceId))return t;Ls.logMissingRequireParam("smaato","adspaceId",e)}else Ls.logMissingRequireParam("smaato","publisherId",e)}},[fs.SmartAdServer]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:18,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:s}=i;if(!(0,n.hj)(e.siteId))return void Ls.logMissingRequireParam("smartadserver","siteId",s);if(!(0,n.hj)(e.pageId))return void Ls.logMissingRequireParam("smartadserver","pageId",s);if(!(0,n.hj)(e.formatId))return void Ls.logMissingRequireParam("smartadserver","formatId",s);const{floorPrice:r}=i;return(0,n.r)(r)&&(e.bidfloor=r),e}},[fs.TheMediaGrid]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:686,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.r)(e.uid))return void Ls.logMissingRequireParam("grid","uid",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.bidFloor=s),e}},[fs.Rise]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:1043,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.org))return void Ls.logMissingRequireParam("rise","org",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.floorPrice=s),e}},[fs.YahooSSP]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:25,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),s=(0,n.QM)(e.pos)&&(0,n.QM)(e.dcn),r=(0,n.QM)(e.pubId);if(!s&&!r)return void Ls.logMissingRequireParam("yahoossp","required",i.lineItemId);const{floorPrice:o}=i;return(0,n.r)(o)&&(e.bidOverride={imp:{bidfloor:o}}),e}},[fs.Unruly]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:36,gdprSupport:!1,ccpaSupport:!1}}getBidParams(t,i){const e=Object.assign({},t);if((0,n.hj)(e.siteId))return i.isOutstream&&(e.featureOverrides={canRunUnmissable:!0}),(0,n.r)(i.floorPrice)&&(e.floor=i.floorPrice),e;Ls.logMissingRequireParam("unruly","siteId",i.lineItemId)}},[fs.Kargo]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:972,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){if((0,n.QM)(t.placementId))return t;Ls.logMissingRequireParam("kargo","placementId",i.lineItemId)}},[fs.SmileWanted]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:639,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.zoneId))return void Ls.logMissingRequireParam("smilewanted","zoneId",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.bidfloor=s),e}},[fs.TrustX]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.hj)(e.uid))return void Ls.logMissingRequireParam("trustx","uid",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.bidFloor=s),e}},[fs.EmxDigital]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:183,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.tagid))return void Ls.logMissingRequireParam("emx_digital","tagid",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.bidfloor=s.toString()),e}},[fs.KrushMedia]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.key))return void Ls.logMissingRequireParam("krushmedia","key",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.bidfloor=s),e.traffic=Bs.VIDEO,e}},[fs.Conversant]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:24,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.site_id))return void Ls.logMissingRequireParam("conversant","site_id",i.lineItemId);e.secure=Rs.Secure;const{floorPrice:s}=i;return(0,n.r)(s)&&(e.bidfloor=s),e}},[fs.Criteo]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:91,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if((0,n.hj)(e.networkId))return e;Ls.logMissingRequireParam("criteo","networkId",i.lineItemId)}},[fs.TripleLift]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:28,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.inventoryCode))return void Ls.logMissingRequireParam("triplelift","inventoryCode",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.floor=s),e}},[fs.PulsePoint]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:81,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.hj)(e.cp))return void Ls.logMissingRequireParam("pulsepoint","cp",i.lineItemId);if(!(0,n.hj)(e.ct))return void Ls.logMissingRequireParam("pulsepoint","ct",i.lineItemId);const{floorPrice:s}=i;return(0,n.r)(s)&&(e.bidfloor=s),e}},[fs.Adtelligent]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:410,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if((0,n.hj)(e.aid))return e;Ls.logMissingRequireParam("adtelligent","aid",i.lineItemId)}},[fs.Yieldmo]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:173,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if(!(0,n.QM)(e.placementId))return void Ls.logMissingRequireParam("yieldmo","placementId",i.lineItemId);const{floorPrice:s,isOutstream:r,adBreakType:o}=i;if((0,n.r)(s)&&(e.bidFloor=s),r)e.video.startdelay=0;else switch(o){case m.ProtoAdBreakTypeEnum.PreRoll:e.video.startdelay=0;break;case m.ProtoAdBreakTypeEnum.MidRoll:e.video.startdelay=1;break;case m.ProtoAdBreakTypeEnum.PostRoll:e.video.startdelay=-2;break;default:e.video.startdelay=0}return e}},[fs.PgamMedia]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if((0,n.QM)(e.AV_PUBLISHERID)){if((0,n.QM)(e.AV_CHANNELID))return e;Ls.logMissingRequireParam("pgammedia","AV_CHANNELID",i.lineItemId)}else Ls.logMissingRequireParam("pgammedia","AV_PUBLISHERID",i.lineItemId)}},[fs.NextMillennium]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:1060,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if((0,n.QM)(e.placement_id)||(0,n.QM)(e.group_id))return e;Ls.logMissingRequireIntegrationsParams("nextMillennium",[["placement_id"],["group_id"]],i.lineItemId)}},[fs.AdYouLike]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:259,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if((0,n.QM)(e.placement))return e;Ls.logMissingRequireParam("adyoulike","placement",i.lineItemId)}},[fs.FreeWheelSSP]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:285,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);if((0,n.QM)(t.zoneId))return e;Ls.logMissingRequireParam("freewheel-ssp","zoneId",i.lineItemId)}},[fs.ColossusSSP]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),s=(0,n.hj)(e.placement_id),r=(0,n.hj)(e.group_id);if(s||r)return e;Ls.logMissingRequireIntegrationsParams("colossusssp",[["placement_id"],["group_id"]],i.lineItemId)}},[fs.ResetDigital]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:void 0,gdprSupport:!0,ccpaSupport:!1}}getBidParams(t,i){const e=Object.assign({},t),s=(0,n.QM)(e.pubId),r=(0,n.QM)(e.zoneId);if(s||r)return e;Ls.logMissingRequireIntegrationsParams("resetdigital",[["pubId"],["zoneId"]],i.lineItemId)}},[fs.MediaFuse]:new class extends Ls{constructor(){super(...arguments),this.WP={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{placementId:s}=e;if(!(0,n.hj)(s))return void Ls.logMissingRequireParam("mediafuse","placementId",i.lineItemId);const{floorPrice:r}=i;return(0,n.r)(r)&&(e.reserve=r),e.video=Object.assign(Object.assign({},e.video||{}),{skippable:!!i.skippabilitySettings.skip,skipoffset:i.skippabilitySettings.skipafter}),e}}};class Vs{constructor(t,i,e,s,n,r,o,h){this.GP=t,this.QP=i,this.Ds=e,this.JP=s,this.XP=n,this.In=r,this.YP=o,this.xI=h,this.KP=new Ms(this.In,this.xI)}requestHeaderBidder(t,i){return new Promise(((e,s)=>{this.ZP().then((s=>{const n=t.map((t=>this.tA(s,t,i).then((t=>t))));Promise.all(n).then((t=>{e(t)}))})).catch((t=>{s(m.ConnatixNoBidReasonEnum.NoBid)}))}))}setMacros(t){this.GP.setMacros(t)}iA(t,i){const e={lineItemSkippability:t,lineItemSkipMin:i,playerSkippability:this.YP.skippability,playerSkipMin:this.YP.skipMin,playerSkipAfter:this.YP.skipAdAfter},s=Et(e),n=s.skippable?1:0;return Object.assign({skip:n},s)}tA(t,i,e){return new Promise((s=>{let r=[];if(i.availableRequests>0)if((0,n.$K)(i.lineItem.floorPricesNew)&&(0,b.BZ)(i.lineItem.floorPricesNew.floorPrices)){const s=i.lineItem.floorPricesNew.floorPrices.map((t=>t.price));r=this.sA(i.lineItem.floorPricesNew,i.availableRequests,i.maxBidPrice).map((n=>this.nA(t,i.lineItem,i.bidderName,i.bidderParams,s,n,e)))}else{const s={requestedFloorPrice:i.lineItem.floorPrice,floorPriceInformation:{floorPrices:[],floorPriceIndexUsed:-1,floorPriceFactorBypassReason:m.FloorPriceBypassReasonEnum.FixedCpm}},n=this.nA(t,i.lineItem,i.bidderName,i.bidderParams,[],s,e);r.push(n)}Promise.all(r).then((t=>{const e=[],n=[],r=i.lineItem.advertiserLineItemId;t.forEach((t=>{t.reason?n.push(t):e.push(t)}));s({bids:e,noBids:n,lineItemId:r})}))}))}nA(t,i,e,s,n,r,o){return new Promise((h=>{this.rA(t,i,e,s,n,r,o).then((t=>{h(t)})).catch((t=>{h(t)}))}))}ZP(){const t=Es(this.JP,this.XP,this.QP,this.Ds);return new Promise(((i,e)=>{this.KP.loadPrebidJs(t).then((t=>{i(t)})).catch((t=>{(0,o.n)({message:"AdManager_HeaderBidder_unable_to_load_prebidJs_script",exception:t.message,callStack:t.stack,level:o.D.CRITICAL}),e(t)}))}))}oA(t){const i=Object.keys(t),e=i.filter((i=>!(0,n.as)(t[i]))),s=i.filter((i=>(0,n.as)(t[i])));return e.forEach((i=>{null!==t[i]&&"null"!==t[i]||delete t[i]})),s.forEach((i=>{this.oA(t[i])})),t}rA(t,i,s,r,h,a,c){return new Promise(((d,l)=>{const u=this.iA(i.skippability,i.skipMin),p=((t,i,s,r)=>{const o={code:(0,e.qs)(),mediaTypes:Ss(t,s),bids:[]},h=[fs.Smaato,fs.Yieldmo];return!t.isOutstreamContext&&h.includes(r)&&(o.mediaTypes.video.startdelay=0),(0,n.r)(i)&&(o.floors=(t=>({currency:"USD",schema:{fields:["mediaType"]},values:{video:t}}))(i)),o})(c,a.requestedFloorPrice,u,s);try{const{width:t,height:e,maxAdDuration:s,videoVolume:n,inFloating:o,adBreakType:h,mediaLanguage:a,mediaId:d,liveRampEnvelope:l}=c,f=this.GP.replaceMacros(r,{videoWidth:t,videoHeight:e,videoMaxAdDuration:s,vendorId:i.vendorId,skippabilitySettings:u,videoVolume:n,inFloating:o,adBreakType:h,mediaLanguage:a,mediaId:d,supplyChain:ks(this.QP),liveRampEnvelope:l}),m=JSON.parse(f),v=this.oA(m);p.bids=[v]}catch(t){(0,o.n)({message:"AdManager_HeaderBidder_unable_to_parse_header_bidder",exception:t.message,callStack:t.stack,level:o.D.WARN});const i=Object.assign({bidderName:s,reason:m.ConnatixNoBidReasonEnum.NoBid},a);return void l(i)}const f=je();p.bids.forEach((t=>this.hA(t,a.requestedFloorPrice,i.advertiserLineItemId,f,u,c,p.code))),t.que.push((()=>{t.addAdUnits(p);const e={timeout:i.headerBidderTimeout,adUnits:[p],bidsBackHandler:()=>{var e;try{const r=t.getHighestCpmBids(p.code)[0];if(!r){const t=Object.assign({bidderName:s,reason:m.ConnatixNoBidReasonEnum.CsEmptyResponse},a);return void l(t)}let c,u;if(this.aA(r))c=(t=>`${Ps}?uuid=${t.adserverTargeting.hb_cache_id}`)(r);else if(c=r.vastUrl,u=r.vastXml,!c&&!u){(0,o.n)({level:o.D.WARN,message:"AdManager_HeaderBidder_no_content",exception:JSON.stringify(r)});const t=Object.assign({bidderName:s,reason:m.ConnatixNoBidReasonEnum.CsEmptyResponse},a);return void l(t)}const v=r.cpm||r.adResponse.ad.cpm,{advertiserLineItemId:g}=i,y=Object.assign(Object.assign({},a),{bidderName:s,adTagUrl:c,adTagXml:u,lineItemId:g,cpm:v,slotId:f,bidId:p.code});(0,n.r)(a.requestedFloorPrice)&&v<a.requestedFloorPrice&&(0,o.n)({message:"AdManager_HeaderBidderRequester_cpm_lower_than_floorprice",level:o.D.WARN,exception:`floorPrices_${h}_floorPrice_${a.requestedFloorPrice}_index_${null===(e=a.floorPriceInformation)||void 0===e?void 0:e.floorPriceIndexUsed}_cpm_${v}_li_${i.advertiserLineItemId}`,callStack:s},{shouldSendMaxLog:!1,throttle:5}),d(y)}catch(t){(0,o.n)({level:o.D.WARN,message:"AdManager_HeaderBidder_Prebidjs_error",exception:t.message,callStack:t.stack});const i=Object.assign({bidderName:s,reason:m.ConnatixNoBidReasonEnum.NoBid},a);l(i)}}};t.requestBids(e)}))}))}hA(t,i,e,s,n,r,o){var h;const a=null===(h=Ds[t.bidder])||void 0===h?void 0:h.getBidParams;if(!a)return;const{width:c,height:d,isOutstreamContext:l,maxAdDuration:u,adBreakType:p,inFloating:f,hasFloatingCapability:m}=r;t.params=a(t.params,{playerWidth:c,playerHeight:d,maxDuration:u,pageUrl:this.Ds,floorPrice:i,lineItemId:e,isOutstream:l,bidSlotId:s,skippabilitySettings:n,adBreakType:p,adUnitCode:o,inFloating:f,hasFloatingCapability:m})}aA(t){return t.adserverTargeting&&(0,n.QM)(t.adserverTargeting.hb_cache_id)}sA(t,i,e){if(0===i)return[];const{floorPrices:s,recommended:r}=t,o=s.map(((i,e)=>{if(e<r)return{requestedFloorPrice:i.price,floorPriceInformation:{floorPrices:t.floorPrices.map((({price:t})=>t)),floorPriceIndexUsed:e,floorPriceFactorBypassReason:i.floorPriceBypassReason}}})).filter((t=>(0,n.$K)(t)));return this.cA(o,i,e)}cA(t,i,e){let s=i;const n=t.filter((({requestedFloorPrice:t})=>t>=e&&s>0&&(s--,!0)));if((0,b.BZ)(n))return n;return[{requestedFloorPrice:e,floorPriceInformation:{floorPrices:t.map((({requestedFloorPrice:t})=>t)),floorPriceIndexUsed:-1,floorPriceFactorBypassReason:m.FloorPriceBypassReasonEnum.BidInHand}}]}}var js=h(3199);class Fs{constructor(t){this.al=t}isAdapterCallable(t){const i=(t=>{const i=Object.keys(fs).find((i=>fs[i]===t));if(i)return fs[i]})(t);return!!i&&(this.al.isGDPR()?this.dA(i):!this.al.isCcpaApplicable()||this.lA(i))}uA(t){return Ds[t].config.gdprSupport}dA(t){if(this.uA(t))return!0;const i=Ds[t].config.vendorId,e=(0,n.hj)(i)?`${i}`:"";return this.al.isConsent(e,js.Z)}lA(t){return!!Ds[t].config.ccpaSupport||!!this.al.isSellUserAllowed()}}var Ns,Us,$s,qs,Hs,zs=h(3003);class Ws{constructor(t,i={}){this.pA=t,this.fA=i,this.mA="{{",this.vA="}}",this.gA=new RegExp(`${this.mA}(.*?)${this.vA}`,"g")}replaceMacros(t,i){const e=(0,zs.Ed)(t,this.gA);if(!(0,b.BZ)(e))return t;const s=this.Ma(t,e,i);return this.replaceMacros(s,i)}setMacros(t){this.fA=Object.assign(Object.assign({},this.fA),t)}Ma(t,i,e){const s=t;return i.reduce(((t,i)=>this.bA(t,i,e)),s)}bA(t,i,e){const s=this.IA(i);if(!this.wA(s,e))return t.replace(i,null);let r=null,o=!1;this._A(s,e)?r=this.pA.getMacroValue(s,e):this.SA(s)&&(r=this.fA[s],(0,n.HD)(r)||(o=!0));const h=this.PA(r);if(o){return t.replace(`"${i}"`,h).replace(i,h)}return t.replace(i,h)}wA(t,i){return this._A(t,i)||this.SA(t)}_A(t,i){return this.pA.hasMacroValue(t,i)}SA(t){return(0,n.$K)(this.fA[t])}IA(t){return t.replace(this.mA,"").replace(this.vA,"")}PA(t){return[null,void 0,NaN].includes(t)?null:Array.isArray(t)||(0,n.as)(t)?JSON.stringify(t):t.toString()}}!function(t){t.InApp="mobile_app",t.MobileWeb="mobile_web",t.Web="web"}(Ns||(Ns={})),function(t){t.Outstream="outstream",t.PreRoll="pre_roll",t.MidRoll="mid_roll",t.PostRoll="post_roll"}(Us||(Us={})),function(t){t.AutoPlaySoundOn="auto_play_sound_on",t.AutoPlaySoundOff="auto_play_sound_off",t.AutoPlaySoundUnknown="auto_play_sound_unknown",t.ClickToPlay="click_to_play",t.MouseOver="mouse_over"}($s||($s={})),function(t){t[t.Instream=201]="Instream",t[t.Outstream=203]="Outstream"}(qs||(qs={})),function(t){t.CnxSupplyType="CNX_SUPPLY_TYPE",t.CnxAdUnit="CNX_AD_UNIT",t.CnxVideoMimes="CNX_VIDEO_MIMES",t.CnxVideoApi="CNX_VIDEO_API",t.CnxVideoId="CNX_VIDEO_ID",t.CnxAtsEnvelope="CNX_ATS_ENVELOPE",t.CnxSupplyChain="CNX_SUPPLY_CHAIN",t.CnxIntegrationMode="CNX_INTEGRATION_MODE",t.CnxVideoFrameworks="CNX_VIDEO_FRAMEWORKS",t.CnxVideoSkippable="CNX_VIDEO_SKIPPABLE",t.CnxVideoSkipOffset="CNX_VIDEO_SKIP_OFFSET",t.CnxVideoMaxDuration="CNX_VIDEO_MAX_DURATION",t.CnxVideoStartDelay="CNX_VIDEO_START_DELAY",t.CnxVideoPlaybackMethodInteger="CNX_VIDEO_PLAYBACK_METHOD_INTEGER",t.CnxVideoPlaybackMethodsString="CNX_VIDEO_PLAYBACK_METHOD_STRING",t.CnxVideoProtocols="CNX_VIDEO_PROTOCOLS",t.CnxVideoLinearity="CNX_VIDEO_LINEARITY",t.CnxVideoPlacement="CNX_VIDEO_PLACEMENT",t.CnxVideoContext="CNX_VIDEO_CONTEXT",t.CnxVideoSizeId="CNX_VIDEO_SIZE_ID",t.CnxVideoLanguage="CNX_VIDEO_LANGUAGE",t.CnxVideoVolume="CNX_VIDEO_VOLUME",t.UserLanguage="USER_LANGUAGE",t.AppDeviceId="APP_DEVICE_ID",t.Width="WIDTH",t.Height="HEIGHT",t.UserLat="USER_LAT",t.UserLong="USER_LONG",t.DoNotTrack="DNT",t.AppBundle="APP_BUNDLE",t.AppName="APP_NAME",t.PageUrl="PAGE_URL"}(Hs||(Hs={}));class Gs{constructor(t,i,e,s,n){this._appSettings=t,this.AA=i,this.al=e,this.xA=s,this.kA=n,this.TA={[Hs.PageUrl]:()=>this.AA.pageUrl,[Hs.AppBundle]:()=>this._appSettings.bundleID,[Hs.AppName]:()=>this._appSettings.appName,[Hs.AppDeviceId]:t=>this.CA(t),[Hs.CnxAdUnit]:()=>this.EA(),[Hs.CnxSupplyType]:()=>this.MA(),[Hs.CnxVideoContext]:t=>this.LA(t),[Hs.CnxIntegrationMode]:()=>this.AA.isAmp?"AMP":void 0,[Hs.Width]:t=>Math.floor(t.videoWidth),[Hs.Height]:t=>Math.floor(t.videoHeight),[Hs.CnxSupplyChain]:t=>t.supplyChain,[Hs.CnxVideoApi]:()=>Object.values(Is),[Hs.CnxVideoFrameworks]:()=>_s,[Hs.CnxVideoMimes]:()=>ys,[Hs.CnxVideoProtocols]:()=>bs,[Hs.CnxVideoLinearity]:()=>1,[Hs.CnxVideoMaxDuration]:t=>t.videoMaxAdDuration,[Hs.CnxVideoLanguage]:()=>"en",[Hs.CnxVideoId]:t=>t.mediaId,[Hs.CnxAtsEnvelope]:t=>t.liveRampEnvelope,[Hs.CnxVideoSkippable]:t=>t.skippabilitySettings.skippable,[Hs.CnxVideoSkipOffset]:t=>t.skippabilitySettings.skipafter,[Hs.CnxVideoPlaybackMethodInteger]:()=>this.BA(),[Hs.CnxVideoPlaybackMethodsString]:()=>this.OA(),[Hs.CnxVideoPlacement]:t=>this.RA(t),[Hs.CnxVideoSizeId]:()=>this.DA(),[Hs.CnxVideoStartDelay]:()=>this.kA,[Hs.CnxVideoVolume]:t=>t.videoVolume,[Hs.DoNotTrack]:()=>{},[Hs.UserLanguage]:()=>this.VA(),[Hs.UserLat]:()=>this.AA.geoLocation.lat,[Hs.UserLong]:()=>this.AA.geoLocation.lon}}getMacroValue(t,i){const e=this.TA[t];if(e)return e(i)}hasMacroValue(t,i){return(0,n.$K)(this.getMacroValue(t,i))}CA(t){const i=this.al.isConsent(t.vendorId);return this.al.isConsentConnatix()&&i?this.al.getTrackableUser():void 0}EA(){return this.xA.isOutstream?Os.Outstream:Os.Instream}MA(){return this.AA.isInApp?Ns.InApp:this.AA.isMobile?Ns.MobileWeb:Ns.Web}LA(t){if(this.xA.isOutstream)return Us.Outstream;return{[m.ProtoAdBreakTypeEnum.None]:Us.PreRoll,[m.ProtoAdBreakTypeEnum.PreRoll]:Us.PreRoll,[m.ProtoAdBreakTypeEnum.MidRoll]:Us.MidRoll,[m.ProtoAdBreakTypeEnum.PostRoll]:Us.PostRoll}[t.adBreakType]}BA(){return gs(this.xA.playbackMode,this.xA.initialSoundMode)}OA(){const t=this.xA.playbackMode,i=this.xA.initialSoundMode;return t===m.ProtoPlayerPlaybackModeEnum.Autoplay?i===m.ProtoPlayerSoundMode.On?$s.AutoPlaySoundOn:i===m.ProtoPlayerSoundMode.Mute?$s.AutoPlaySoundOff:$s.AutoPlaySoundUnknown:t===m.ProtoPlayerPlaybackModeEnum.ClickToPlay?$s.ClickToPlay:void 0}DA(){return this.xA.isOutstream?qs.Outstream:qs.Instream}VA(){const t=navigator.language;if((0,n.QM)(t))return t.split("-")[0].toUpperCase()}RA(t){return t.inFloating?ms.Floating:this.xA.isOutstream?ms.Outstream:ms.Instream}}class Qs{constructor(t,i,e,s,n,r,o,h,a,c,d){this.xA=t,this.QP=i,this._P=e,this._appSettings=s,this.SP=n,this.PP=r,this.xP=o,this.kP=h,this.iS=a,this.YP=c,this.TP=d,this.jA=new Map,this.FA=t=>t.replace(/\s/g,"").match(/"bidder":.+?(?=",)/).toString().split('bidder":"')[1];const l=new Gs(this._appSettings,this._P.config,this._P.services.UserManagerService,this.xA,null),u=this._appSettings.customJsTargetingObject,p=new Ws(l,u);this.NA=new Vs(p,this.QP,this._P.config.pageUrl,this._P.services.UserManagerService.isGDPR(),this._P.services.UserManagerService.isCcpaApplicable(),this._P.services.GlobalDomUtilsService,this.YP,this._P.config.sessionId),this.UA=new Fs(this._P.services.UserManagerService)}request(t){const{width:i,height:e}=t.callingState,s=this.EP(i,e);this.$A(t.lineItemRequestDataList);const n=this.qA(t.lineItemRequestDataList);return(0,b.BZ)(n)&&s?(t.lineItemRequestDataList=n,this.HA(t).then((i=>Promise.resolve(this.zA(i,t)))).catch((()=>Promise.resolve({bids:[],noBids:[]})))):Promise.resolve({bids:[],noBids:[]})}setMacros(t){this.NA.setMacros(t)}zA(t,i){const e={bids:[],noBids:[]};return t.forEach((t=>{const s=Ct(i.lineItemRequestDataList,t.lineItemId);t.bids.forEach((t=>{const n=t.bidId,r=this._P.config.sessionId,o=new Pi,h=new ns({requestedFloorPrice:t.requestedFloorPrice,prebidJsBidderName:t.bidderName,requestNumber:s.historicalMetrics.requestNumber,floorPriceInformation:t.floorPriceInformation});Ai(s.protoLineItem.trackers,o),t.adTagUrl?e.bids.push(new ss({id:n,adManagerLineItem:s,replaceTrackingMacros:!0,requestMetadata:h,trackersInformation:o,url:t.adTagUrl,callingState:i.callingState,adMacroReplacer:this.SP,adContainer:this.PP.get(s.protoLineItem.adType),globalDomUtilsService:this._P.services.GlobalDomUtilsService,viewabilityService:this._P.services.ViewabilityService,sessionId:r,cpm:t.cpm,adEnforcer:this.xP,os:this._P.config.os.os,adSlotContainerRecycler:this.kP,bidSlotId:t.slotId,loopAdWhenFinished:this.iS,pageUrl:this._P.config.pageUrl,urlSuffixerService:this._P.services.UrlSuffixerService,yoScoreCalculator:this.TP})):t.adTagXml&&e.bids.push(new Ze({id:n,adManagerLineItem:s,replaceTrackingMacros:!0,requestMetadata:h,trackersInformation:o,xml:t.adTagXml,callingState:i.callingState,adMacroReplacer:this.SP,adContainer:this.PP.get(s.protoLineItem.adType),globalDomUtilsService:this._P.services.GlobalDomUtilsService,viewabilityService:this._P.services.ViewabilityService,sessionId:r,cpm:t.cpm,adEnforcer:this.xP,os:this._P.config.os.os,adSlotContainerRecycler:this.kP,bidSlotId:t.slotId,loopAdWhenFinished:this.iS,pageUrl:this._P.config.pageUrl,urlSuffixerService:this._P.services.UrlSuffixerService,yoScoreCalculator:this.TP}))})),t.noBids.forEach((t=>{const i=new ns({requestedFloorPrice:t.requestedFloorPrice,requestNumber:s.historicalMetrics.requestNumber,prebidJsBidderName:t.bidderName,floorPriceInformation:t.floorPriceInformation});e.noBids.push({lineItem:s,requestMetadata:i,reason:t.reason})}))})),e}HA(t){const{width:i,height:e,media:s,soundValue:n}=t.callingState,r={width:i,height:e,maxAdDuration:t.maxAdDuration,videoVolume:n,hasFloatingCapability:this.xA.hasFloatingCapability,inFloating:t.callingState.inFloating,adBreakType:t.callingState.adBreakState.adBreakType,mediaLanguage:s.mediaLanguage,mediaId:s.mediaId,isOutstreamContext:this.xA.isOutstream,initialSoundMode:this.xA.initialSoundMode,playbackMode:this.xA.playbackMode,liveRampEnvelope:this.xA.liveRampEnvelope},o=t.lineItemRequestDataList.map((i=>this.WA(i,t.maxBidPrice)));return this.NA.requestHeaderBidder(o,r)}WA(t,i){const e=t.adManagerLineItem;return{availableRequests:t.maxAvailableRequests,lineItem:e.protoLineItem,maxBidPrice:i,bidderName:this.jA.get(t.adManagerLineItem).bidderName,bidderParams:this.jA.get(t.adManagerLineItem).bidderParamsJSONStringWithMacros}}qA(t){return t.filter((t=>{var i;const e=(null===(i=this.jA.get(t.adManagerLineItem))||void 0===i?void 0:i.bidderName)||"";return this.GA(e)}))}$A(t){t.map((t=>t.adManagerLineItem)).filter((t=>!this.jA.has(t))).forEach((t=>{try{const i=t.protoLineItem.prebidJsBidParamsJSONString,e=this.FA(i);this.jA.set(t,{bidderName:e,bidderParamsJSONStringWithMacros:i})}catch(i){this.QA(i,t.protoLineItem.advertiserLineItemId)}}))}QA(t,i){(0,o.n)({message:"PrebidJS_cannot_parse_bidderParams_"+i,level:o.D.WARN,exception:`${t}`},{throttle:1,shouldSendMaxLog:!1})}EP(t,i){return 0!==t&&0!==i||((0,o.n)({message:"AdManager_PrebidAggregator_dimensions",exception:`width:${t}_height:${i}_destroyed:${P.S.playerDestroyed}`,level:o.D.CRITICAL},{throttle:5}),!1)}GA(t){return this.UA.isAdapterCallable(t)}}var Js,Xs=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class Ys{constructor(t,i){this._P=t,this.sl=i}callCoreTam(t){return Xs(this,void 0,void 0,(function*(){const i=t.map((t=>{const i={lineItemId:t.lineItemId,code:t.coreTamCode,metadata:this.sl.trackingRequestMeta,exploration:this._P.config.explorationMode};return this.JA(i)}));return Promise.all(i)}))}JA(t){return Xs(this,void 0,void 0,(function*(){try{const e=yield is.n.sendProtoRequest({endpoint:Xe.n.endPoints.api.tam,protoRequest:m.ProtoCoreTamBidRequest,protoResponse:m.ProtoCoreTamBidResponse,requestData:t,queryParams:{[rs.Fk]:i.g.version},shouldLogErrors:!0});return(0,n.QM)(e.errorMessage)?{lineItemId:t.lineItemId,coreTamCode:t.code,coreTamBidResponse:null,rejectReason:m.ConnatixNoBidReasonEnum.RequestException}:(0,n.QM)(e.encryptedBidPrice)?{lineItemId:t.lineItemId,coreTamCode:t.code,coreTamBidResponse:e,rejectReason:null}:{lineItemId:t.lineItemId,coreTamCode:t.code,coreTamBidResponse:null,rejectReason:m.ConnatixNoBidReasonEnum.InvalidResponse}}catch(i){return{lineItemId:t.lineItemId,coreTamCode:t.code,coreTamBidResponse:null,rejectReason:m.ConnatixNoBidReasonEnum.RequestException}}}))}}!function(t){t.SDK_NAME_ON_PUB_WINDOW="apstag",t.MEDIA_TYPE="video",t.VAST_TAG_BASE_URL="https://aax.amazon-adsystem.com/e/dtb/vast"}(Js||(Js={}));class Ks{constructor(t){this.YA=t.amznbid,this.KA=t.amzniid}static getTargetingFromBid(t){var i,e;return{amzniid:t.amzniid||(null===(i=t.targeting)||void 0===i?void 0:i.amzniid),amznbid:t.amznbid||(null===(e=t.targeting)||void 0===e?void 0:e.amznbid)}}static hasTargeting(t){const i=Ks.getTargetingFromBid(t);return(0,n.QM)(i.amzniid)&&(0,n.QM)(i.amznbid)}get amazonBidCode(){return this.YA}getVast(){return`${Js.VAST_TAG_BASE_URL}?b=${this.KA}&pp=${this.YA}&rnd=${(0,e.qs)()}`}}class Zs{constructor(t){this.ZA=t.targetingDeal,this.tx=t.targetingKey,this.sx=t.targetingValue}static hasTargetings(t){const i=Zs.getTargetingsFromBid(t);return(0,b.BZ)(i)}static getTargetingsFromBid(t){const i=Zs.getDeals(t);return(0,b.BZ)(i)?i.map((i=>{const e=`${i}amzniid`;return{targetingDeal:i,targetingKey:e,targetingValue:t.targeting[e]}})).filter((t=>(0,n.QM)(t.targetingValue))):[]}static getDeals(t){var i;return t.amzndeals||(null===(i=t.targeting)||void 0===i?void 0:i.amzndeals)}get targetingDeal(){return this.ZA}get targetingKey(){return this.tx}get targetingValue(){return this.sx}getVast(){return`${Js.VAST_TAG_BASE_URL}?b=${this.sx}&rnd=${(0,e.qs)()}`}}class tn{constructor(t){this.YA=t.amznbid_sp,this.KA=t.amzniid_sp}static getTargetingFromBid(t){var i,e;return{amzniid_sp:t.amzniid_sp||(null===(i=t.targeting)||void 0===i?void 0:i.amzniid_sp),amznbid_sp:t.amznbid_sp||(null===(e=t.targeting)||void 0===e?void 0:e.amznbid_sp)}}static hasTargeting(t){const i=tn.getTargetingFromBid(t);return(0,n.QM)(i.amzniid_sp)&&(0,n.QM)(i.amznbid_sp)}get amazonBidCode(){return this.YA}getVast(){return`${Js.VAST_TAG_BASE_URL}?b=${this.KA}&rnd=${(0,e.qs)()}`}}class en{constructor(t,i){this.nx=t,this.ox=[],i.forEach((t=>{const i=class{static createObjects(t,i){const e=[];switch(t.creativeType){case m.ProtoCreativeTypeEnum.Tam:if(Ks.hasTargeting(i)){const t=Ks.getTargetingFromBid(i);e.push(new Ks(t))}break;case m.ProtoCreativeTypeEnum.TamDeal:if(Zs.hasTargetings(i)){const s=Zs.getTargetingsFromBid(i).filter((i=>i.targetingDeal===t.amazonDealId)).map((t=>new Zs(t)));e.push(...s)}break;case m.ProtoCreativeTypeEnum.TamPrivateAuction:if(tn.hasTargeting(i)){const t=tn.getTargetingFromBid(i);e.push(new tn(t))}}return e}}.createObjects(this.nx,t);this.ox.push(...i)}))}get amazonBidList(){return this.ox}get lineItem(){return this.nx}get hasCoreTamDependency(){return this.ox.every((t=>(0,n.QM)(t.amazonBidCode)))}}var sn=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class nn{constructor(t,i,s,n,r,o){this._P=t,this.hx=i,this.lx=s,this.In=n,this.xI=r,this.sl=o;const h=this._P.config.topWindow;this.ux=(0,e.pE)(h).topFrame}requestBids(t){return this.mx(t)}mx(t){return sn(this,void 0,void 0,(function*(){try{yield this.vx();const i=yield this.gx(),e=this.yx(t,i),s=yield this.Ix(e);return this.wx(e,s)}catch(i){return this._x(t,i)}}))}_x(t,i){return i.message?t.map((t=>({bids:[],lineItemId:t.advertiserLineItemId,noBids:[{reason:m.ConnatixNoBidReasonEnum.CsRequestException}]}))):t.map((t=>({bids:[],lineItemId:t.advertiserLineItemId,noBids:[{reason:i}]})))}wx(t,i){return t.map((t=>{const e=i.filter((i=>t.lineItem.advertiserLineItemId===i.lineItemId));return this.Sx(t,e)}))}Sx(t,i){return t.hasCoreTamDependency?this.Ax(t,i):this.xx(t)}xx(t){const i=t.amazonBidList.map((i=>({encryptedPrice:null,vastTag:i.getVast(),ofskp:yi(t.lineItem.floorPrice),successRate:t.lineItem.successRate,slotId:je()})));return(0,b.BZ)(i)?{bids:i,lineItemId:t.lineItem.advertiserLineItemId,noBids:[]}:{bids:[],lineItemId:t.lineItem.advertiserLineItemId,noBids:[{reason:m.ConnatixNoBidReasonEnum.NoBid}]}}Ax(t,i){const e=i.map((i=>this.kx(t,i))).filter((t=>t.amazonBid&&!(0,n.Cz)(t.coreTamRequestOutput.rejectReason,m.ConnatixNoBidReasonEnum))).map((t=>({encryptedPrice:t.coreTamRequestOutput.coreTamBidResponse.encryptedBidPrice,vastTag:t.amazonBid.getVast(),ofskp:t.coreTamRequestOutput.coreTamBidResponse.ofskp,successRate:t.coreTamRequestOutput.coreTamBidResponse.successRate,slotId:je()}))),s=i.filter((t=>t.rejectReason)).map((t=>({reason:t.rejectReason})));return(0,b.BZ)(e)||(0,b.BZ)(s)?{bids:e,noBids:s,lineItemId:t.lineItem.advertiserLineItemId}:{bids:[],lineItemId:t.lineItem.advertiserLineItemId,noBids:[{reason:m.ConnatixNoBidReasonEnum.NoBid}]}}kx(t,i){return{coreTamRequestOutput:i,amazonBid:t.amazonBidList.find((t=>t.amazonBidCode===i.coreTamCode))}}Ix(t){return sn(this,void 0,void 0,(function*(){const i=t.reduce(this.Tx,[]);return this.Cx(i)}))}Tx(t,i){return[...t,...i.amazonBidList.filter((t=>t.amazonBidCode)).map((t=>({lineItemId:i.lineItem.advertiserLineItemId,coreTamCode:t.amazonBidCode})))]}yx(t,i){return t.map((t=>new en(t,i)))}Cx(t){return this.lx.callCoreTam(t)}gx(){return new Promise(((t,i)=>{(0,n.$K)(this.Ex)?this.Ex.fetchBids({slots:[{slotID:this.hx,mediaType:Js.MEDIA_TYPE}]},(e=>{(0,b.BZ)(e)?t(e):i(m.ConnatixNoBidReasonEnum.EmptyResponse)})):i(m.ConnatixNoBidReasonEnum.NoLibInPage)}))}vx(){return sn(this,void 0,void 0,(function*(){if(!(0,n.$K)(this.Ex)){if((0,n.QM)(this.sl.amazonTamPubId)){const t=yield this.Mx();return this.Ex=t,void this.Ex.init({pubID:this.sl.amazonTamPubId,deals:!0})}this.Ex=this.ux[Js.SDK_NAME_ON_PUB_WINDOW]}}))}Mx(){const t=new Ce(this.In,this.xI);return new Promise(((i,e)=>{t.loadIframe({customHead:"<style> html, body {display: none}</style>",customHtml:`<script id='cnx-apstag-loader' type='text/javascript' src='${Xe.n.endPoints.assets.plugins.apstagScript}'><\/script>`,customIframeAttributes:[{key:"class",value:"cnx-apstag-loader"}],container:this.In.querySelector("head"),visible:!1,title:ji.$b}).then((t=>{if(t.iframe.contentWindow[Js.SDK_NAME_ON_PUB_WINDOW])return i(t.iframe.contentWindow[Js.SDK_NAME_ON_PUB_WINDOW]);e(new Error("Amazon TAM not found"))})).catch((t=>{e(t)}))}))}}class rn{constructor(t,i,e,s,n,r,o,h){this._P=t,this.Lx=i,this.SP=e,this.PP=s,this.xP=n,this.kP=r,this.sl=o,this.TP=h,this.Bx=new nn(this._P,this.Lx,new Ys(this._P,this.sl),this._P.services.GlobalDomUtilsService,this._P.config.sessionId,this.sl)}request(t){const{width:i,height:e}=t.callingState;return this.EP(i,e)?this.Ox(t).then((i=>Promise.resolve(this.Rx(i,t)))).catch((()=>Promise.resolve({bids:[],noBids:[]}))):Promise.resolve({bids:[],noBids:[]})}Ox(t){const i=t.lineItemRequestDataList.map((t=>t.adManagerLineItem.protoLineItem));return this.Bx.requestBids(i)}Rx(t,i){const s={bids:[],noBids:[]};return t.forEach((t=>{const n=Ct(i.lineItemRequestDataList,t.lineItemId);t.bids.forEach((t=>{const r=new Pi,o=new ns({encryptedPrice:t.encryptedPrice,requestNumber:n.historicalMetrics.requestNumber});Ai(n.protoLineItem.trackers,r),s.bids.push(new ss({id:(0,e.qs)(),adManagerLineItem:n,replaceTrackingMacros:!0,requestMetadata:o,trackersInformation:r,url:t.vastTag,bidSlotId:t.slotId,callingState:i.callingState,adMacroReplacer:this.SP,adContainer:this.PP.get(n.protoLineItem.adType),globalDomUtilsService:this._P.services.GlobalDomUtilsService,viewabilityService:this._P.services.ViewabilityService,sessionId:this._P.config.sessionId,adEnforcer:this.xP,requestWithCredentials:!1,successRate:t.successRate,obfuscatedPrice:t.ofskp,os:this._P.config.os.os,adSlotContainerRecycler:this.kP,pageUrl:this._P.config.pageUrl,urlSuffixerService:this._P.services.UrlSuffixerService,yoScoreCalculator:this.TP}))})),t.noBids.forEach((t=>{s.noBids.push({lineItem:n,requestMetadata:new ns({requestNumber:n.historicalMetrics.requestNumber}),reason:t.reason})}))})),s}EP(t,i){return 0!==t&&0!==i||((0,o.n)({message:"AdManager_PrebidAggregator_dimensions",exception:`width:${t}_height:${i}_destroyed:${P.S.playerDestroyed}`,level:o.D.CRITICAL},{throttle:5}),!1)}}const on=[[88,31],[120,20],[120,30],[120,60],[120,90],[125,125],[168,28],[168,42],[180,150],[200,200],[200,446],[216,36],[216,54],[220,90],[234,60],[240,133],[250,250],[250,360],[292,30],[300,31],[300,50],[300,75],[300,100],[300,250],[320,50],[320,100],[320,240],[336,280],[400,350],[468,60],[480,320]];class hn{constructor(t,i,s){this.jx=t,this.Fx=i,this.Nx=s,this.i_=`div-gpt-ad-1589549806211-${(0,e.qs)()}`,this.e_=new R.x,this.XI=new R.x,this.kI=new R.x}get onCreativeReceived(){return this.kI.asObservable()}get onDisplayAd(){return this.e_.asObservable()}get onError(){return this.XI.asObservable()}getAdMediaHeight(){return this.Ux?this.Ux.clientHeight:0}getAdMediaWidth(){return this.Ux?this.Ux.clientWidth:0}initializeAd(t,i){try{this.$x=t,this.sI(t);const e=this.qx(i.width,i.height);this.jx.cmd.push((()=>{this.Hx=this.jx.defineSlot(this.Nx,e,this.i_).addService(this.jx.pubads()).setTargeting("domains",this.Fx),this.jx.enableServices(),this.zx(this.Hx),this.jx.pubads().isInitialLoadDisabled()&&this.jx.pubads().refresh([this.Hx]),this.jx.display(this.i_)}))}catch(t){this.XI.next(Di.WrapperInitAdError)}}destroy(){this.jx.cmd.push((()=>{this.jx.destroySlots&&this.Hx&&this.jx.destroySlots([this.Hx])}))}zx(t){this.jx.pubads().addEventListener("slotOnload",(i=>{var e,s;if(i.slot===t){try{const t=null===(s=null===(e=null==i?void 0:i.slot)||void 0===e?void 0:e.getResponseInformation())||void 0===s?void 0:s.creativeId;t&&this.kI.next(t.toString())}catch(t){(0,o.n)({message:"AdManager_GptWrapper_creativeId",level:o.D.WARN,exception:t.message,callStack:t.stack})}this.e_.next()}})),this.jx.pubads().addEventListener("slotRenderEnded",(t=>{var i;if(t.slot===this.Hx){try{this.Ux=null===(i=this.$x)||void 0===i?void 0:i.getElementsByTagName("iframe")[0],(0,n.$K)(this.Hx)&&(0,r.AX)(this.Ux.contentWindow,"GPTWrapper")}catch(t){}t.isEmpty&&this.XI.next(Di.AdxOverlayNoFill)}}))}sI(t){t.id=this.i_}qx(t,i){return on.filter((e=>!Array.isArray(e)||!(0,b.fn)(e)||(0,b.BZ)(e)&&e[0]<=t&&e[1]<=i))}}var an=h(4581);class cn extends Wi{constructor(t,i){super(t,i),this.Qs=t,this.settings=i,this.adMediaType="displayAdx",this.adSourceType=m.ProtoAdsourceTypeEnum.Unknown,this.O_="adx",this.Wx={[Pe.n.FirstQuartile]:X.fI.AdVideoFirstQuartile,[Pe.n.SecondQuartile]:X.fI.AdVideoMidpoint,[Pe.n.ThirdQuartile]:X.fI.AdVideoThirdQuartile,[Pe.n.FourthQuartile]:X.fI.AdVideoComplete},this.Gx=[];const e=this.settings.adManagerLineItem.protoLineItem.overlayTime*J.s_;this.M_=new Oe.B(this.Qs,e,500),this.Gx.push(this.M_.onTimeUpdate.subscribe((()=>{this.Bb({type:X.fI.AdRemainingTimeChange})})),this.M_.onTimeElapsed.subscribe((()=>{this.stopAd("adxTimerElapsed")})),this.M_.onQuartile.subscribe((t=>{this.Bb({type:this.Wx[t],payload:{}})})))}initAd(t,i,e,s,n,r,o){try{super.initAd(t,i,e,s,n,r,o),this.Qx={width:t,height:i},this.Jx().then((t=>{this.Xx=new hn(t,this.settings.domain,this.settings.adxAdUnitPath),this.Gx.push(this.Xx.onCreativeReceived.subscribe((t=>{this.creativeId=t}))),this.Bb({type:X.fI.AdLoaded,payload:{skipOffset:0}})})).catch((t=>{this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdxOverlayGptScriptLoad+`_${t.message}`}})}))}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.Gx.push(this.Xx.onDisplayAd.subscribe((()=>{this.Bb({type:X.fI.AdStarted}),this.Bb({type:X.fI.AdVideoStart}),this.Bb({type:X.fI.AdImpression,payload:{}}),this.M_.start()})),this.Xx.onError.subscribe((t=>{this.Bb({type:X.fI.AdError,payload:{errorMessage:t}}),this.M_.stop()}))),this.Xx.initializeAd(this.fb,this.Qx)}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorStartAdError+`_${t.exception}`}})}}stopAd(t){try{super.stopAd(t),this.M_.stop(),this.Bb({type:X.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}catch(t){this.yI("AdxBidAdaptor","stopAd",t)}}resizeAd(t,i,e){this.Qx&&(this.Qx.width=t,this.Qx.height=i)}pauseAd(){try{this.M_.stop(),this.Bb({type:X.fI.AdPaused})}catch(t){this.yI("AdxBidAdaptor","pauseAd",t)}}resumeAd(){try{this.M_.start(),this.Bb({type:X.fI.AdPlaying})}catch(t){this.yI("AdxBidAdaptor","resumeAd",t)}}expandAd(){}collapseAd(){}skipAd(){try{super.skipAd(),this.Bb({type:X.fI.AdSkipped})}catch(t){this.yI("AdxBidAdaptor","skipAd",t)}}getAdRemainingTime(){return this.M_.timeRemaining/J.s_}getAdDuration(){return this.M_.timerDuration/J.s_}getAdVolume(){return 0}getAdMediaSize(){return{width:this.Xx.getAdMediaWidth(),height:this.Xx.getAdMediaHeight()}}setAdVolume(t){}get adVideoUrl(){return this.O_}get declaredDurationInSeconds(){return this.settings.adManagerLineItem.protoLineItem.duration}Jx(){const t=(0,e.pE)(window).topFrame;if(t.googletag)return Promise.resolve(t.googletag);{const i={cmd:[]};return t.googletag=window.googletag||i,new Promise(((i,e)=>{(0,r.dZ)({src:an.x},t.document.head,t,(()=>{i(t.googletag)}),(()=>{e()}))}))}}Im(){var t;try{super.Im(),this.M_.stop(),(0,H.i)(this.Gx),null===(t=this.Xx)||void 0===t||t.destroy()}catch(t){this.yI("AdxBidAdaptor","_destroy",t)}}}class dn extends Li{constructor(t){super(t),this.settings=t}fetchBid(){this.metrics.fetchStart=(new Date).getTime();const t=mi.h.getGlobalContainer().resolve(ie.f),i=new cn(t,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,adxAdUnitPath:this.Yx(this.settings.url),requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,domain:this.settings.pageDomain,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,successRate:this.settings.successRate,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,bidSlotId:this.settings.bidSlotId,urlSuffixerService:this.settings.urlSuffixerService,sessionId:this.settings.sessionId,yoScore:this.yoScore,price:this.bidPrice});return this.metrics.fetchEnd=(new Date).getTime(),Promise.resolve(i)}Yx(t){return t.substr("https://adx.connatix.com".length)}}var ln=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};function un(){return ln(this,void 0,void 0,(function*(){try{const t=yield(0,e.Up)((()=>ln(this,void 0,void 0,(function*(){return yield h.e("hls").then(h.t.bind(h,490,23))}))));if(!t||"object"!=typeof t)throw new Error("no_hls_module");if("function"==typeof t.isSupported)return t;if("function"!=typeof t.default||0===Object.keys(t.default).length)throw new Error("empty_hls_module");if("function"!=typeof t.default.isSupported)throw new Error("no_hls_isSupported");return t.default}catch(t){return(0,o.n)({callStack:t.stack,exception:t.message,level:o.D.WARN,message:"HLS_dynamicImport"}),null}}))}class pn extends Wi{constructor(t,i){super(t,i),this.Qs=t,this.settings=i,this.adMediaType="cnxMedia",this.adSourceType=m.ProtoAdsourceTypeEnum.CnxMedia,this.Kx=[]}initAd(t,i,e,s,r,o,h){try{let a;super.initAd(t,i,e,s,r,o,h);let c=!1;if((0,n.QM)(this.settings.externalMediaFile))a=this.Zx(this.settings.externalMediaFile);else if((0,n.QM)(this.settings.externalHlsFile))a=this.Zx(this.settings.externalHlsFile),c=!0;else{if(!(0,b.BZ)(this.settings.renditions))return void this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.CnxMediaNoRenditions}});a=this.tk(this.settings.renditions,i,this.settings.mediaId)}this.ik=a,this.ek=new ze(this.settings.globalDomUtilsService,this.ik,this.vb,this.settings.os,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,this.settings.clickUrl,this.settings.loopAdWhenFinished,this.settings.pauseAdWhenFinished,c,this.settings.hlsModule,this.settings.inApp,this.settings.pageDomain),this.Kx.push(this.ek.onVpaidEvent.subscribe((t=>{this.Bb(t)}))),this.ek.initAd(t,i,e,s,r,{slot:this.fb,videoSlot:this.vb})}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.ek.startAd()}catch(t){this.Bb({type:X.fI.AdError,payload:{errorMessage:Di.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){super.stopAd(t),this.ek?this.ek.stopAd(t):(0,o.n)({message:"stopAd",exception:t,level:o.D.WARN})}resizeAd(t,i,e){try{this.ek.resizeAd(t,i,e)}catch(t){this.yI("CnxMediaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.ek.pauseAd()}catch(t){this.yI("CnxMediaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.ek.resumeAd()}catch(t){this.yI("CnxMediaBidAdaptor","resumeAd",t)}}expandAd(){try{this.ek.expandAd()}catch(t){this.yI("CnxMediaBidAdaptor","expandAd",t)}}collapseAd(){try{this.ek.collapseAd()}catch(t){this.yI("CnxMediaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.ek.skipAd()}catch(t){this.yI("CnxMediaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.ek.getAdRemainingTime()}catch(t){return this.yI("CnxMediaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.ek?this.ek.getAdDuration():this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.yI("CnxMediaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.ek.getAdVolume()}catch(t){return this.yI("CnxMediaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.ek.getAdMediaWidth(),height:this.ek.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.ek.setAdVolume(t)}catch(t){this.yI("CnxMediaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.ik}get declaredDurationInSeconds(){return this.settings.adManagerLineItem.protoLineItem.duration}Im(){var t;if(!this.settings.pauseAdWhenFinished&&!this.settings.loopAdWhenFinished)try{super.Im(),(0,H.i)(this.Kx),null===(t=this.ek)||void 0===t||t.destroy()}catch(t){this.yI("CnxMediaBidAdaptor","_destroy",t)}}Zx(t){return(null==t?void 0:t.includes(Xe.n.endPoints.base.video))?this.Sv.appendParamsToUrl(t):t}tk(t,i,e){let s;s=t.filter((t=>t.codec===k.L5.H264));const n=(0,Bt.DE)(i,s.map((t=>t.height)));return s=s.filter((t=>t.height===n)),s.length>0?this.Sv.appendParamsToUrl(`${Xe.n.endPoints.base.video}${e}/${s[0].file}`):null}}var fn,mn,vn=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class gn extends Li{constructor(t){super(t),this.settings=t}fetchBid(){return vn(this,void 0,void 0,(function*(){let t;if(this.metrics.fetchStart=(new Date).getTime(),(0,n.QM)(this.settings.adManagerLineItem.protoLineItem.externalHlsFile)&&(t=yield un(),!t))throw Ti.NetworkRequestUrl;const i=mi.h.getGlobalContainer().resolve(ie.f),e=new pn(i,{hlsModule:t,id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,mediaId:this.settings.mediaId,renditions:this.settings.renditions,clickUrl:this.settings.clickUrl,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,adContainer:this.settings.adContainer,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,externalMediaFile:this.settings.adManagerLineItem.protoLineItem.externalMediaFile,externalHlsFile:this.settings.adManagerLineItem.protoLineItem.externalHlsFile,pauseAdWhenFinished:this.settings.pauseAdWhenFinished,loopAdWhenFinished:this.settings.loopAdWhenFinished,inApp:this.settings.inApp,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,bidSlotId:this.settings.bidSlotId,urlSuffixerService:this.settings.urlSuffixerService,pageDomain:this.settings.pageDomain,sessionId:this.settings.sessionId,yoScore:this.yoScore,price:this.bidPrice});return this.metrics.fetchEnd=(new Date).getTime(),e}))}}!function(t){t[t.IDLE=0]="IDLE",t[t.RUNNING=1]="RUNNING",t[t.STOPPING=2]="STOPPING"}(fn||(fn={}));class yn{constructor(t){this.sk=t,this.tr=fn.IDLE,this.nk=Promise.resolve()}start(){(this.tr===fn.IDLE||this.tr===fn.STOPPING)&&(this.tr=fn.RUNNING,this.rk())}stop(){this.tr=fn.STOPPING}setPromiseNotifier(t){return this.hk=t,this}setIdleNotifier(t){return this.ak=t,this}getState(){return this.tr}ck(){const t=this.sk();void 0!==t?this.nk=t.then((t=>{this.hk&&this.hk(t)})).then((()=>{this.tr===fn.STOPPING&&(this.tr=fn.IDLE)})):this.tr=fn.IDLE}rk(){this.tr===fn.IDLE?this.ak&&this.ak():this.tr===fn.RUNNING&&(this.ck(),this.nk.then((()=>{this.rk()})))}}class bn{constructor(t,i=1){this.sk=t,this.dk=i,this.lk=[],this.uk(i)}start(){return this.lk.forEach((t=>{t.start()})),this}stop(){return this.lk.forEach((t=>{t.stop()})),this}setPromiseNotifier(t){return this.lk.forEach((i=>{i.setPromiseNotifier(t)})),this}setAllThreadsIdleNotifier(t){return this.pk=t,this.fk(),this}setNumberOfThreads(t){if(t<=0)return;this.dk=t;const i=t-this.dk;i>0?this.uk(i):i<0&&this.mk(i)}getState(){return this.lk.reduce(((t,i)=>(t[i.getState()]++,t)),{[fn.IDLE]:0,[fn.RUNNING]:0,[fn.STOPPING]:0})}uk(t){for(let i=0;i<t;i++){const t=new yn(this.sk).setPromiseNotifier(this.hk);this.lk.push(t)}}mk(t){t=Math.min(t,this.lk.length);for(let i=0;i<t;i++)this.lk.pop().stop()}fk(){const t=()=>{this.getState()[fn.IDLE]===this.lk.length&&this.pk()};this.lk.forEach((i=>{i.setIdleNotifier(t)}))}}class In{constructor(){this.vk=new Set}static getInstance(){return this.INSTANCE||(this.INSTANCE=new In),this.INSTANCE}static gk(t,i){const e=t.lineItems.find((t=>{const{advertiserLineItemId:e,publisherLineItemId:s}=t.protoLineItem;return[e,s].includes(i)}));(0,n.$K)(e)&&t.remove(e)}static yk(t,i){t.getBidsByLineItemId(i).forEach((t=>t.invalidate()))}add(t,i,e){t.filter((t=>!this.vk.has(t))).forEach((t=>{this.vk.add(t),In.gk(i,t),In.yk(e,t)}))}hasLineItemById(t,i){return this.vk.has(t)||this.vk.has(i)}clear(){this.vk.clear()}}!function(t){t[t.Rtb=1]="Rtb",t[t.HeaderBidder=2]="HeaderBidder",t[t.Tam=3]="Tam"}(mn||(mn={}));const wn={[m.ProtoCreativeTypeEnum.Rtb]:mn.Rtb,[m.ProtoCreativeTypeEnum.HeaderBidder]:mn.HeaderBidder,[m.ProtoCreativeTypeEnum.Tam]:mn.Tam,[m.ProtoCreativeTypeEnum.TamDeal]:mn.Tam,[m.ProtoCreativeTypeEnum.TamPrivateAuction]:mn.Tam};class _n{static isLineItemTargetingAllowed(t,i){return _n.isAllowedByViewability(t,i)&&_n.isAllowedBySound(t,i)&&_n.isAllowedByAdBreakType(t,i)&&_n.isAllowedByMediaTargeting(t,i)&&_n.isAllowedByPodTargeting(t,i)&&_n.isAllowedByContextualTargeting(t,i)&&_n.isAllowedByPlayerSizeTargeting(t,i)&&_n.isAllowedByPlayerOrientationTargeting(t,i)}static isCallAdaptorTargetingAllowed(t,i){return _n.isLineItemTargetingAllowed(t.settings.adManagerLineItem,i)}static isBidTargetingAllowed(t,i){const e=t.getAdDuration(),{sessionMaxAdDuration:s,remainingAdDuration:n}=i.adBreakState,{adManagerLineItem:r,dimensions:o}=t.settings,{adType:h,nonlinearLineItemSettings:a}=r.protoLineItem;return _n.isLineItemTargetingAllowed(r,i)&&_n.isAllowedRegardingDuration(e,s)&&_n.isAllowedRegardingDuration(e,n)&&_n.isDimensionsAllowedForNonLinearBanner(h,a,o,i)}static isAllowedBySound(t,i){return!t.protoLineItem.sound||i.sound}static isAllowedByViewability(t,i){const e=i.adContainerState.get(t.protoLineItem.adType).viewability;return!t.protoLineItem.viewability||e}static isAllowedByAdBreakType(t,i){return!t.protoLineItem.adBreakSettings||t.protoLineItem.adBreakSettings.adBreakTargeting.some((t=>{if(t.adRollType===i.adBreakState.adBreakType)return _n.isAdBreakTypeAllowed(t.adBreakTypeEnum,i.adBreakState.isAdPodBreak)}))}static isAllowedByMediaTargeting(t,i){return!(t.protoLineItem.mediaIdTargeting&&!_n.stringTargetingFiltering(i.media.mediaId,t.protoLineItem.mediaIdTargeting))&&(!(t.protoLineItem.mediaKeywordsTargeting&&!_n.stringTargetingFiltering(i.media.mediaKeywords,t.protoLineItem.mediaKeywordsTargeting))&&!(t.protoLineItem.mediaLanguageTargeting&&!_n.stringTargetingFiltering(i.media.mediaLanguage,t.protoLineItem.mediaLanguageTargeting)))}static isAllowedByContextualTargeting(t,i){var e,s;const{advertiserContextualTargeting:n,publisherContextualTargeting:r}=t.protoLineItem,o=(null===(e=i.media.mediaInsights)||void 0===e?void 0:e.insights)||[],h=(null===(s=i.page.insights)||void 0===s?void 0:s.insights)||[];return!((0,b.BZ)(n)&&!_n.isContextualTargetingValid(n,o,h))&&!((0,b.BZ)(r)&&!_n.isContextualTargetingValid(r,o,h))}static isAllowedByPlayerSizeTargeting(t,i){const{playerSizeTargetings:e}=t.protoLineItem,{width:s}=i.adContainerState.get(t.protoLineItem.adType);return!(0,n.as)(e)||!(0,n.hj)(s)||(e.sizeChoiceCriteria===m.ProtoSizeChoiceCriteriaEnum.GreaterThan?!(0,n.hj)(e.minWidth)||s>=e.minWidth:e.sizeChoiceCriteria===m.ProtoSizeChoiceCriteriaEnum.SmallerThan?!(0,n.hj)(e.maxWidth)||s<=e.maxWidth:e.sizeChoiceCriteria!==m.ProtoSizeChoiceCriteriaEnum.Between||(!(0,n.hj)(e.maxWidth)||!(0,n.hj)(e.minWidth)||s>=e.minWidth&&s<=e.maxWidth))}static isAllowedByPlayerOrientationTargeting(t,i){const{playerOrientationTargeting:e}=t.protoLineItem;switch(e){case m.ProtoPlayerOrientationTargetingEnum.Landscape:if(i.playerOrientation===Q.Portrait)return!1;break;case m.ProtoPlayerOrientationTargetingEnum.Portrait:if(i.playerOrientation===Q.Landscape)return!1}return!0}static isAllowedByPodTargeting(t,i){var e;const s=null===(e=t.protoLineItem.adBreakSettings)||void 0===e?void 0:e.adPodTargeting;if(!s)return!0;if(!i.adBreakState.isAdPodBreak)return!0;const n=i.adBreakState.adPodSlotIndex;let r=!0;switch(s.adSlotTargetingType){case m.ProtoLineItemAdSlotTargetingTypeEnum.Interval:(n<s.adSlotPositions[0]||n>s.adSlotPositions[1])&&(r=!1);break;case m.ProtoLineItemAdSlotTargetingTypeEnum.SpecificSlots:-1===s.adSlotPositions.indexOf(n)&&(r=!1)}return s.targetingType===m.ProtoLineItemTargetingTypeEnum.Except&&(r=!r),r}static isAllowedRegardingDuration(t,i){return!t||0===i||t<=i}static isDimensionsAllowedForNonLinearBanner(t,i,e,s){if(!Mt(t,null==i?void 0:i.nonLinearRequestType))return!0;const n=Math.ceil((0,Bt.Tc)(s.height,Y.NON_LINEAR_MAX_HEIGHT_PERCENT));return!(!e||(null==e?void 0:e.width)>s.width||(null==e?void 0:e.height)>n)}static stringTargetingFiltering(t,i){if((0,b.BZ)(i.items)&&Array.isArray(t)){const e=(0,b.tN)(t,i.items).length;return i.choiceCriteria===m.ProtoChoiceCriteriaEnum.Only?e>0:0===e}const e=(0,b.d3)(t,i.items);return i.choiceCriteria===m.ProtoChoiceCriteriaEnum.Only?e:!e}static isAdBreakTypeAllowed(t,i){switch(t){case m.ProtoLineItemAdBreakTypeEnum.All:return!0;case m.ProtoLineItemAdBreakTypeEnum.AdPod:return i;case m.ProtoLineItemAdBreakTypeEnum.SingleAd:return!i}}static isContextualTargetingValid(t,i,e){return t.some((t=>_n.isContextualTargetingCaseValid(t,i,e)))}static isContextualTargetingCaseValid(t,i,e){for(let s=0;s<t.filters.length;s++){const n=t.filters[s],r=n.hashedItemsIds,o=i.filter((t=>r.includes(t))).length,h=e.filter((t=>r.includes(t))).length,a=_n.isContextualTargetingFilterValid(n.type,o,r),c=_n.isContextualTargetingFilterValid(n.type,h,r);switch(n.level){case m.ProtoContextualTargetingLevelEnum.Media:if(!a)return!1;break;case m.ProtoContextualTargetingLevelEnum.Page:if(!c)return!1;break;case m.ProtoContextualTargetingLevelEnum.Both:if(!a||!c)return!1}}return!0}static isContextualTargetingFilterValid(t,i,e){switch(t){case m.ProtoLineItemContextualTargetingEnum.IncludeAny:if(0===i)return!1;break;case m.ProtoLineItemContextualTargetingEnum.IncludeAll:if(i!==e.length)return!1;break;case m.ProtoLineItemContextualTargetingEnum.ExcludeAny:if(i>0)return!1;break;case m.ProtoLineItemContextualTargetingEnum.ExcludeAll:if(i===e.length)return!1}return!0}}class Sn{static getSelectionScore(t){return t.yoScore}}class Pn{constructor(t,i){this.settings=t,this.th=i,this.bk=new Map,this.Pd=[],this.Ik=!1,this.wk=new R.x,this._k=new R.x,this.Sk=new R.x,this.Pk=new R.x,this.Ak=new R.x,this.xk=new R.x,this.kk=()=>{const t=this.Tk();if(t)return this.wk.next(t.lineItemList),this.Ck(t.lineItemList,t.state).then((()=>{this._k.next(t.lineItemList),this.Ek()})).catch((()=>{this._k.next(t.lineItemList),this.Ek()}));this.settings.auctionManager.onNothingToCall()},this.settings.adSelector.getAllLineItems().forEach((t=>{t.hasAggregator?t.protoLineItem.timeBetweenRequests=10:t.protoLineItem.timeBetweenRequests=6})),this.Pd.push(this.settings.lineItemServices.lineItemServicesTimer.onTimer().subscribe((()=>{this.Mk()})),this.settings.adSelector.getBidEvents(fi.ON_BID_LOADING).subscribe((()=>{this.Mk()})),this.settings.adSelector.getBidEvents(fi.ON_BID_LOADING_CONSUMED).subscribe((()=>{this.Mk()})),this.settings.adSelector.getBidEvents(fi.ON_BID_LOADED_CONSUMED).subscribe((()=>{this.Mk()}))),this.Lk=new bn(this.kk,5),this.settings.adSelector.hasAggregatorType(mn.Rtb)&&this.bk.set(mn.Rtb,{auctionPending:!1,caller:new ps(this.settings.playerData.isOutstream,this.settings.skipAdSettings,this.settings.app,this.settings.generalRepository,this.settings.adMacroReplacer,this.settings.adContainerMap,this.settings.adRequestGatekeeper,this.settings.adEnforcer,this.settings.adSlotContainerRecycler,this.settings.lineItemAbTestInformation,this.settings.yoScoreCalculator)}),this.settings.adSelector.hasAggregatorType(mn.HeaderBidder)&&this.bk.set(mn.HeaderBidder,{auctionPending:!1,caller:new Qs(this.settings.playerData,this.settings.schainSettings,this.settings.app,this.settings.appSettings,this.settings.adMacroReplacer,this.settings.adContainerMap,this.settings.adEnforcer,this.settings.adSlotContainerRecycler,this.settings.loopAdWhenFinished,this.settings.skipAdSettings,this.settings.yoScoreCalculator)}),this.settings.adSelector.hasAggregatorType(mn.Tam)&&this.bk.set(mn.Tam,{auctionPending:!1,caller:new rn(this.settings.app,this.settings.amazonSlotId,this.settings.adMacroReplacer,this.settings.adContainerMap,this.settings.adEnforcer,this.settings.adSlotContainerRecycler,this.settings.generalRepository,this.settings.yoScoreCalculator)}),this.Lk.setAllThreadsIdleNotifier((()=>{this.settings.lineItemServices.lineItemServicesTimer.start()}))}get onLineItemsRequestStart(){return this.wk.asObservable()}get onLineItemsRequestEnd(){return this._k.asObservable()}get onCallAdapterStart(){return this.Sk.asObservable()}get onCallAdapterEnd(){return this.Pk.asObservable()}get onBid(){return this.Ak.asObservable()}get onFirstAggregatedBatchFinished(){return this.xk.asObservable()}call(t){this.Lk.setNumberOfThreads(t.maxParallelCalls),this.Bk=t,this.Ik=!0,this.Mk()}stop(){this.Ik=!1,this.Lk.stop()}setMacros(t){const i=this.bk.get(mn.HeaderBidder);i&&i.caller.setMacros(t)}destroy(){this.stop(),this.settings.callingValidationAggregator.destroy(),(0,H.i)(this.Pd)}Ek(){let t=!0;this.bk.forEach((i=>{i.auctionPending&&(t=!1)})),t&&this.xk.next()}Mk(){this.Ik&&this.Lk.start()}Tk(){const t=this.Bk.stateSettings.currentState||this.Bk.stateSettings.predictedState;if(!t)return void(0,o.n)({message:"AdCallerController_no_state",level:o.D.INFO},{throttle:10,shouldSendMaxLog:!1});const i=this.settings.adSelector.getAllCallableLineItems(t),e=this.settings.adSelector.getBestCallableLineItem(i,this.Bk.stateSettings);return e||void 0}Ck(t,i){return t[0].hasAggregator?this.Rk(t,i):this.Dk(t[0],i)}Dk(t,i){const e=this.Vk(t,i);return this.settings.callingValidationAggregator.registerRequestForLineItem(t,this.jk()),t.historicalMetrics.requestNumber++,this.Nk(e)}Rk(t,i){const e=this.bk.get(wn[t[0].protoLineItem.creativeType]);t.forEach((t=>t.aggregators.add(e.caller))),e.auctionPending=!0;const s={lineItemRequestDataList:t.map((t=>({adManagerLineItem:t,maxAvailableRequests:this.settings.lineItemServices.requestCapsService.getAvailableRequestsForLineItem(t,this.jk())}))),callingState:i,maxAdDuration:i.adBreakState.maxAdDuration,maxBidPrice:this.settings.adSelector.getBestAllowedBidPrice(i)};return e.caller.request(s).then((s=>{s.bids.length||s.noBids.length||t.forEach((t=>{this.settings.callingValidationAggregator.registerRequestForLineItem(t,this.jk())})),t.forEach((t=>{t.aggregators.delete(e.caller),t.historicalMetrics.requestNumber++})),s.noBids.forEach((t=>{this.settings.callingValidationAggregator.registerRequestForLineItem(t.lineItem,this.jk()),this.Uk(i,t.lineItem,t.reason,t.requestMetadata)})),s.bids.sort(((t,i)=>Sn.getSelectionScore(i)-Sn.getSelectionScore(t)));const n=s.bids.map((t=>(this.settings.callingValidationAggregator.registerRequestForLineItem(t.settings.adManagerLineItem,this.jk()),this.Nk(t))));return Promise.all(n)})).catch().then((()=>{e.auctionPending=!1}))}Nk(t){return this.Sk.next(t),t.settings.adManagerLineItem.callers.add(t),t.fetchBid().catch((i=>{t.settings.adManagerLineItem.callers.delete(t),this.Pk.next(t);const e=Ei[i]?Ei[i]:m.ConnatixNoBidReasonEnum.RequestException;return this.Uk(t.settings.callingState,t.settings.adManagerLineItem,e,t.settings.requestMetadata,t.settings.trackersInformation,Date.now()-t.metrics.fetchStart,i),Promise.reject()})).then((i=>{t.settings.adManagerLineItem.callers.delete(t),this.$k(i,t,Date.now()-t.metrics.fetchStart)})).catch((t=>{void 0!==t&&(0,o.n)({message:"AdManager_AdCallerController_handleCallAdaptorRequest",exception:t.message,callStack:t.stack,level:o.D.CRITICAL},{throttle:5})}))}$k(t,i,s){const n=t.settings.adManagerLineItem,r=t.settings.requestMetadata,o=t.settings.requestMetadata.data.floorPriceInformation;if(!t.settings.requestMetadata.data.requestTrackingHandledByServer){const i={advertiserLineItemId:n.protoLineItem.advertiserLineItemId,publisherLineItemId:n.protoLineItem.publisherLineItemId,requestedFloorPrice:r.data.requestedFloorPrice,requestsCount:r.data.requestNumber,isUserSynced:r.data.isUserSynced,prebidJsBidderName:r.data.prebidJsBidderName,customClientPrice:t.settings.cpm,timeSpentMs:s,rtbDspId:r.data.dspId,encryptedPrice:r.data.encryptedPrice,rtbADomain:r.data.rtbAdomain,rtbCreativeId:t.creativeId,rtbSeatId:r.data.rtbSeatId,cnxBidId:t.settings.requestMetadata.data.cnxBidId,floorPriceInformation:o?w.wE.fromProtoFloorPriceInformation(o):void 0,dynamicElkFields:{1:`${(0,e.M$)(this.settings.app.config.deviceType)}`}};this.th.adBid.next(i)}this.settings.adRequestGatekeeper.addBid(n.protoLineItem.advertiserLineItemId,r.data.requestedFloorPrice),this.qk(t,t.settings.callingState)?(this.Pk.next(i),this.Ak.next(t)):this.settings.auctionInfoLogging.bidIsNotWinnableEverInSession(t)}Uk(t,i,s,n,r,o,h){if(r&&Pi.track(r.adError,this.settings.adMacroReplacer,i.protoLineItem,t),!n.data.requestTrackingHandledByServer){const t=n.data.floorPriceInformation,r={advertiserLineItemId:i.protoLineItem.advertiserLineItemId,publisherLineItemId:i.protoLineItem.publisherLineItemId,partnerCustomHeaders:n.data.partnerCustomHeaders,partnerReason:w.EN.fromProtoPrebidPartnerReason(n.data.partnerReason),requestedFloorPrice:n.data.requestedFloorPrice,requestsCount:n.data.requestNumber,isUserSynced:n.data.isUserSynced,prebidJsBidderName:n.data.prebidJsBidderName,playerReason:w.EN.fromProtoPrebidReason(s),timeSpentMs:o,floorPriceInformation:t?w.wE.fromProtoFloorPriceInformation(t):void 0,dynamicElkFields:{1:`${(0,e.M$)(this.settings.app.config.deviceType)}`}};this.th.adPrebid.next(r)}this.settings.adRequestGatekeeper.addPrebid(i.protoLineItem.advertiserLineItemId)}qk(t,i){const e=t.getAdDuration(),s=i.adBreakState.sessionMaxAdDuration;return _n.isAllowedRegardingDuration(e,s)}static isBidTargetingAllowedEverInSession(t,i){const{protoLineItem:e}=t.settings.adManagerLineItem,{advertiserLineItemId:s,publisherLineItemId:n}=e,{sessionMaxAdDuration:r}=i.adBreakState,o=t.getAdDuration();return _n.isAllowedRegardingDuration(o,r)&&!In.getInstance().hasLineItemById(s,n)}Vk(t,i){const s=new Pi;Ai(t.protoLineItem.trackers,s);const n={id:(0,e.qs)(),adManagerLineItem:t,replaceTrackingMacros:!0,requestMetadata:new ns({requestNumber:t.historicalMetrics.requestNumber}),trackersInformation:s,callingState:i,sessionId:this.settings.app.config.sessionId,adContainer:this.settings.adContainerMap.get(t.protoLineItem.adType),globalDomUtilsService:this.settings.app.services.GlobalDomUtilsService,viewabilityService:this.settings.app.services.ViewabilityService,cpm:t.protoLineItem.floorPrice||t.protoLineItem.customCpm,adEnforcer:this.settings.adEnforcer,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,bidSlotId:je(),urlSuffixerService:this.settings.app.services.UrlSuffixerService,interactionService:this.settings.app.services.InteractionService,yoScoreCalculator:this.settings.yoScoreCalculator};switch(t.protoLineItem.creativeType){case m.ProtoCreativeTypeEnum.External:case m.ProtoCreativeTypeEnum.ThirdParty:return t.protoLineItem.adType===m.ProtoAdType.Overlay?new dn(Object.assign(Object.assign({},n),{url:t.protoLineItem.adTag,pageDomain:this.settings.app.config.pageDomain})):new ss(Object.assign(Object.assign({},n),{url:t.protoLineItem.adTag,adMacroReplacer:this.settings.adMacroReplacer,sessionId:this.settings.sessionId,loopAdWhenFinished:this.settings.loopAdWhenFinished,pageUrl:this.settings.app.config.pageUrl}));case m.ProtoCreativeTypeEnum.MediaFile:return new gn(Object.assign(Object.assign({},n),{clickUrl:t.protoLineItem.mediaCreativeClickUrl,mediaId:t.protoLineItem.mediaCreativeId,renditions:t.protoLineItem.renditions,pauseAdWhenFinished:this.settings.pauseAdWhenFinished,loopAdWhenFinished:this.settings.loopAdWhenFinished,inApp:this.settings.app.config.isInApp,pageDomain:this.settings.app.config.pageDomain}))}}jk(){return(this.Bk.stateSettings.currentState||this.Bk.stateSettings.predictedState).adOpportunity.id}}const An="uncategorized";class xn{resetCapsBasedOnExternalEvent(t){const i=this.kt.keys();for(const e of i)this.Hk(e,t)&&this.zk(e,An)}Hk(t,i){return t.protoLineItem.resetCapType===i}Wk(t){return this.Hk(t,m.ProtoResetCapTypeEnum.TimeCapping)&&this.Gk(t)>0}}class kn{constructor(t){this.Qk=t,this.Jk=new Map}setNumberOfImpressions({value:t,categoryId:i}){(0,n.$K)(i)&&this.Qk===m.ProtoResetCapTypeEnum.OpportunityCapping||(i=An),this.Jk.set(i,t)}getNumberOfImpressions({categoryId:t}){return(0,n.$K)(t)&&this.Qk===m.ProtoResetCapTypeEnum.OpportunityCapping||(t=An),this.Jk.get(t)||0}}class Tn extends xn{constructor(t=Date.now()){super(),this.Xk=t,this.kt=new Map}canCall(t,i){this.Zk(t);const e=this.kt.get(t);return void 0===e||(0===t.protoLineItem.impressionCap||e.getNumberOfImpressions({categoryId:i})<t.protoLineItem.impressionCap)}registerImpressionForLineItem(t,i){let e=this.kt.get(t);return void 0===e&&(this.kt.set(t,new kn(t.protoLineItem.resetCapType)),e=this.kt.get(t),this.Wk(t)&&(e.nextImpressionCapResetTimestamp=this.tT(this.Gk(t)))),e.setNumberOfImpressions({value:e.getNumberOfImpressions({categoryId:i})+1,categoryId:i}),this}registerRequestForLineItem(t,i){return this}destroy(){this.kt.clear()}zk(t,i){this.kt.get(t).setNumberOfImpressions({value:0,categoryId:i})}Gk(t){return t.protoLineItem.resetImpressionsCapTime*J.s_}Zk(t,i=Date.now()){if(!this.Wk(t))return;const e=this.kt.get(t);void 0!==e&&this.iT(t,i)&&(e.setNumberOfImpressions({value:0}),e.nextImpressionCapResetTimestamp=this.tT(this.Gk(t),i))}iT(t,i){return i>=this.kt.get(t).nextImpressionCapResetTimestamp}tT(t,i=Date.now()){const e=Math.ceil((i-this.Xk)/t)*t;return this.Xk+e}}class Cn{constructor(t){this.Qk=t,this.eT=new Map}setNumberOfRequests({value:t,categoryId:i}){(0,n.$K)(i)&&this.Qk===m.ProtoResetCapTypeEnum.OpportunityCapping||(i=An),this.eT.set(i,t)}getNumberOfRequests({categoryId:t}){return(0,n.$K)(t)&&this.Qk===m.ProtoResetCapTypeEnum.OpportunityCapping||(t=An),this.eT.get(t)||0}}class En extends xn{constructor(t=Date.now()){super(),this.Xk=t,this.allowResetOnTime=!0,this.kt=new Map}canCall(t,i){this.Zk(t);const e=this.kt.get(t);return void 0===e||(0===t.protoLineItem.requestCap||e.getNumberOfRequests({categoryId:i})<t.protoLineItem.requestCap)}registerRequestForLineItem(t,i,e=Date.now()){let s=this.kt.get(t);return void 0===s&&(this.kt.set(t,new Cn(t.protoLineItem.resetCapType)),s=this.kt.get(t),this.Wk(t)&&(s.nextRequestCapResetTimestamp=this.tT(this.Gk(t)))),s.setNumberOfRequests({value:s.getNumberOfRequests({categoryId:i})+1,categoryId:i}),this}registerImpressionForLineItem(t){return this}getAvailableRequestsForLineItem(t,i){const e=this.kt.get(t);return void 0===e?t.protoLineItem.requestCap:t.protoLineItem.requestCap-e.getNumberOfRequests({categoryId:i})}restoreOneCapForLineItem(t,i){if(t.protoLineItem.ignoreFilledRequests){const e=this.kt.get(t);if(void 0===e)return;const s=e.getNumberOfRequests({categoryId:i});s>0&&e.setNumberOfRequests({value:s-1,categoryId:i})}}destroy(){this.kt.clear()}zk(t,i){this.kt.get(t).setNumberOfRequests({value:0,categoryId:i})}Gk(t){return t.protoLineItem.resetRequestsCapTime*J.s_}Zk(t,i=Date.now()){if(!this.Wk(t))return;const e=this.kt.get(t);void 0!==e&&this.iT(t,i)&&(e.setNumberOfRequests({value:0}),e.nextRequestCapResetTimestamp=this.tT(this.Gk(t),i))}iT(t,i){return i>=this.kt.get(t).nextRequestCapResetTimestamp&&this.allowResetOnTime}tT(t,i=Date.now()){const e=Math.ceil((i-this.Xk)/t)*t;return this.Xk+e}}class Mn{constructor(){this.kt=new Map}registerRequestForLineItem(t,i,e=Date.now()){let s=this.kt.get(t);return void 0===s&&(this.kt.set(t,{}),s=this.kt.get(t)),s.lastRequestTimestamp=e,s.categoryId=i,this}registerImpressionForLineItem(t){return this}canCall(t,i,e=Date.now()){const s=this.kt.get(t);if(void 0===s)return!0;if(0===t.protoLineItem.timeBetweenRequests)return!0;if(e>=s.lastRequestTimestamp+t.protoLineItem.timeBetweenRequests*J.s_)return!0;return!(s.categoryId===i||t.protoLineItem.resetCapType!==m.ProtoResetCapTypeEnum.OpportunityCapping)}destroy(){this.kt.clear()}}class Ln{constructor(t){this.Qs=t,this.sT=null,this.nT=new R.x}start(){return this.rT(),this}stop(){return this.oT(),this}onTimer(){return this.nT.asObservable()}destroy(){this.oT()}rT(){null===this.sT&&(this.sT=this.Qs.setInterval((()=>{this.nT.next()}),500))}oT(){this.Qs.clearInterval(this.sT),this.sT=null}}class Bn{constructor(t,i,e,s){this.hT=t,this.aT=i,this.cT=e,this.Pm=s,this.dT=new R.x,this.lT=new Map,this.uT=[],this.forceTriggerUpdateState=()=>{this.uT.forEach((t=>this.fT(t)))},this.fT=(t,i)=>{this.lT.set(t,this.mT(this.aT.get(t),i))},this.vT=t=>{this.gT([m.ProtoAdType.Video],t)},this.yT=t=>{this.gT([m.ProtoAdType.Overlay],t)},this.bT=t=>{this.gT([m.ProtoAdType.Nonlinear],t)},this.$a=()=>{this.gT(this.uT)},this.gT=(t,i)=>{t.forEach((t=>this.fT(t,i))),this.dT.next()},this.IT={[m.ProtoAdType.Video]:this.vT,[m.ProtoAdType.Overlay]:this.yT,[m.ProtoAdType.Nonlinear]:this.bT},this.uT=[...this.aT.keys()],this.uT.forEach((t=>this.fT(t))),this.wT()}get onContainerStateUpdate(){return this.dT.asObservable()}getContainerMap(){return this.aT}getContainerStateMap(){return this.lT}getMainContainer(){return this.aT.get(this.hT)}getMainContainerState(){return this.getContainerStateMap().get(this.hT)}destroy(){this.aT.forEach(((t,i)=>{this.cT.off(t,this.$a),this.Pm.off(t,this.IT[i])}))}wT(){this.aT.forEach(((t,i)=>{this.cT.on(t,this.$a),this.Pm.on(t,this.IT[i],{threshold:G})}))}mT(t,i){let e=i;return void 0===e&&(e=this.Pm.check({element:t,threshold:G})),{width:t.clientWidth,height:t.clientHeight,viewability:e}}}const On="cnxpl-vl",Rn="cnxpl-rf";class Dn{constructor(){this._T=!0,this.ST=new R.x,this.PT=[],this.xT=t=>{if(this._T)return;const i=t.target;if(i.volume>0&&(i.volume=0,!i.paused)){const t=i.getAttribute(Rn);this.ST.next(t)}t.preventDefault?t.preventDefault():t.returnValue=!1}}get onVolumeDetected(){return this.ST.asObservable()}enforce(t,i){let e=t;(0,n.cL)(t)&&(e=t.contentDocument||t.contentWindow.document),this._T=!1;(0,b.Sz)(e.getElementsByTagName("video")).forEach((t=>{this.kT(t,i)}))}stopEnforce(){this._T=!0}clearEnforce(t){try{const i=[];this.PT=this.PT.filter((e=>e.getAttribute(Rn)!==t||(i.push(e),!1))),i.forEach((t=>{t.removeAttribute(On),t.removeAttribute(Rn),t.removeEventListener("volumechange",this.xT)}))}catch(t){}}kT(t,i){t&&!t.getAttribute("cnxpl-vl")&&(t.volume=0,t.setAttribute(On,"true"),t.setAttribute(Rn,i),t.addEventListener("volumechange",this.xT),this.PT.push(t))}}class Vn{TT(t){const i=function(){};t.Element.prototype.scrollIntoView=i,t.Element.prototype.scrollIntoViewIfNeeded=i,t.scroll=i,t.scrollTo=i,t.scrollBy=i}enforce(t){(0,n.cL)(t)&&this.TT(t.contentWindow)}stopEnforce(){}clearEnforce(){}}class jn{constructor(t){this.CT=t=>t.cnxEnfStorage?t.cnxEnfStorage:null,this.Di=t;try{this.CT(this.Di)||this.ET(this.Di)}catch(t){(0,o.n)({message:"AdManager_EnforcerMemory_bind_enforcement",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}ET(t){(0,r.ML)(t.document.head,t,'!function(){function n(n){window["cnx"+n]||(window["cnx"+n]=window[n],window[n]=function(e){var t="";try{e&&(t=function n(e,t){try{if(!e)return"";if(e.cnxInnerTag)return e.cnxInnerTag;if(t<2){var r=t+1;return n(e.caller,r)}}catch(n){return""}return""}(e))}catch(n){}var r=window["cnx"+n].apply(null,arguments);if(t){var i=window.cnxEnfStorage;i[n][t]=i[n][t]||[],i[n][t].push(r)}return r})}window.cnxEnfStorage={setTimeout:{},setInterval:{},eventListeners:{},errors:[]};var e=window.location.hostname.split("."),t=window.btoa(e[e.length-2]+"."+e[e.length-1]);-1===["dG16LmNvbQ==","YmlsbGJvYXJkLmNvbQ==","aG9sbHl3b29kcmVwb3J0ZXIuY29t","dmliZS5jb20=","aG9yb3Njb3BlLmNvbQ==","YXN0cm9sb2d5LmNvbQ==","YWhvcmFtaXNtby5jb20="].indexOf(t)&&(!function(){const n=window.EventTarget?window.EventTarget.prototype:window.document;n.cnxAddEventListener||(n.cnxAddEventListener=n.addEventListener,n.addEventListener=function(n,e,t){var r=this||window;if(e&&e.cnxInnerTag){var i=window.cnxEnfStorage;i.eventListeners[e.cnxInnerTag]=i.eventListeners[e.cnxInnerTag]||[],i.eventListeners[e.cnxInnerTag].push({element:r,type:n,handler:e,options:t})}try{r.cnxAddEventListener(n,e,t)}catch(n){n.message="adlstn_"+n.message,i.errors.push(n)}})}(),n("setTimeout"),n("setInterval"))}();')}enforce(t,i){if((0,n.cL)(t))try{t.contentWindow.self===top||t.contentWindow.Function.prototype.cnxInnerTag||t.contentWindow.Object.defineProperty(t.contentWindow.Function.prototype,"cnxInnerTag",{enumerable:!1,writable:!0,value:i}),t.contentWindow.self===top||t.contentWindow.Object.prototype.cnxInnerTag||t.contentWindow.Object.defineProperty(t.contentWindow.Object.prototype,"cnxInnerTag",{enumerable:!1,writable:!0,value:i})}catch(t){}}stopEnforce(){}clearEnforce(t){try{const i=this.CT(this.Di);i.eventListeners[t]&&(i.eventListeners[t].forEach((t=>{t.element.removeEventListener(t.type,t.handler,t.options)})),i.eventListeners[t]=[]),i.setInterval[t]&&(i.setInterval[t].forEach((t=>this.Di.clearInterval(t))),i.setInterval[t]=[]),i.setTimeout[t]&&(i.setTimeout[t].forEach((t=>this.Di.clearTimeout(t))),i.setTimeout[t]=[])}catch(t){}}}class Fn{constructor(){this.MT=["viralgains","serving-sys.com","commercialadsdistributor"],this.BT=["beachfrontmedia","commercialadsdistributor"],this.OT=["commercialadsdistributor"],this.RT=["pixel.clearstream.tv","pixel.clrstm.com"],this.DT=new R.x,this.VT=new R.x}get onMalwareDetected(){return this.DT.asObservable()}get onBadUriDetected(){return this.VT.asObservable()}enforce(t,i){if((0,n.cL)(t)){this.jT=i;try{this.FT(t),this.NT(t),this.UT(t),this.$T(t)}catch(t){}}}stopEnforce(){}clearEnforce(){}qT(t,i,e,s){t.every((t=>!e.includes(t)))&&!i.getAttribute("cnx")&&(i.setAttribute("cnx","true"),this.VT.next({referenceId:this.jT,enforcementMessage:`${s}-${i}`}))}FT(t){const i=t.getAttribute("src");i&&(this.MT.forEach((t=>{i.includes(t)&&this.DT.next({referenceId:this.jT,enforcementMessage:`malware-${t}`})})),this.qT(["//","about:blank","about:self","javascript:"],t,i,"iframe"))}NT(t){(0,b.Sz)(t.contentDocument.getElementsByTagName("script")).forEach((t=>{const i=t.getAttribute("src");i&&(this.BT.forEach((t=>{i.includes(t)&&this.DT.next({referenceId:this.jT,enforcementMessage:`malware-${t}`})})),this.qT(["//"],t,i,"script"))}))}UT(t){(0,b.Sz)(t.contentDocument.getElementsByTagName("a")).forEach((t=>{const i=t.getAttribute("href");i&&this.OT.forEach((t=>{i.includes(t)&&this.DT.next({referenceId:this.jT,enforcementMessage:`malware-${t}`})}))}))}$T(t){(0,b.Sz)(t.contentDocument.getElementsByTagName("img")).forEach((t=>{const i=t.getAttribute("src");i&&this.RT.forEach((t=>{i.includes(t)&&this.DT.next({referenceId:this.jT,enforcementMessage:`malware-${t}`})}))}))}}class Nn{constructor(t,i,e){if(this.zT=e,this.WT=null,this.GT=new Map,this.QT=Oi.None,this.JT=300,this.Pd=[],this.XT=new Map,this.vI=new R.x,this.GT.set(Oi.MemoryLeak,new jn(i)),e||this.GT.set(Oi.ScrollHijack,new Vn),!t){const t=new Dn;this.GT.set(Oi.Mute,t),this.Pd.push(t.onVolumeDetected.subscribe((t=>{this.YT(Bi.VOLUME_DETECTED,t,"")})))}const s=new Fn;this.Pd.push(s.onBadUriDetected.subscribe((t=>{this.YT(Bi.BADURI_DETECTED,t.referenceId,t.enforcementMessage)})),s.onMalwareDetected.subscribe((t=>{this.YT(Bi.MALWARE_DETECTED,t.referenceId,t.enforcementMessage)}))),this.GT.set(Oi.Malware,s)}get onEnforcerEvent(){return this.vI.asObservable()}registerContainer(t,i){this.XT.get(t)||this.XT.set(t,i)}deregisterContainer(t){this.XT.get(t)&&(this.GT.forEach((i=>{i.clearEnforce(this.XT.get(t))})),this.XT.delete(t),this.XT.size||this.stop(Oi.All))}start(t){this.zT&&(t^=Oi.ScrollHijack),this.QT|=t,null===this.WT&&(this.WT=setInterval((()=>{try{this.XT.forEach(((t,i)=>{this.KT(i,t)}))}catch(t){}}),this.JT))}stop(t){this.QT&=~t,this.QT===Oi.None&&(clearInterval(this.WT),this.WT=null),this.GT.forEach(((i,e)=>{t&e&&i.stopEnforce()}))}destroy(){this.stop(Oi.All),(0,H.i)(this.Pd),this.XT.forEach(((t,i)=>{this.deregisterContainer(i)}))}KT(t,i){(0,b.Sz)(t.getElementsByTagName("iframe")).forEach((t=>{try{this.KT(t,i)}catch(t){}})),this.GT.forEach(((e,s)=>{this.QT&s&&e.enforce(t,i)}))}YT(t,i,e){let s;this.XT.forEach(((t,e)=>{t===i&&(s=e)})),this.vI.next({message:e,type:t,detectedContainer:s})}}var Un=h(3816);class $n{constructor(){this.tC={},this.iC=Date.now()}setOutOfViewAdPrice(t){this.tC.outOfViewAdPrice=t>0?Math.round(1e3*t):t}setOutOfViewAdLineItemId(t){this.tC.outOfViewAdLineItemId=t}setInViewAdPrice(t){this.tC.inViewAdPrice=t>0?Math.round(1e3*t):t}setDistanceWhenOutOfViewStarted(t){this.tC.distanceWhenOutOfViewStarted=Math.round(t)}setTimeUntilNextOpportunity(t){this.tC.timeUntilNextOpportunity=t}get missedImpressionsLogs(){return this.tC.outOfViewTimeRunning=Date.now()-this.iC,this.tC}}class qn{static createRecord(t){const i=new $n;return qn.eC.set(t,i),i}static getPlayerRecord(t){return qn.eC.get(t)}}qn.eC=new Map;class Hn{constructor(t,i){this.vi=t,this.th=i,this.sC=!1,this.rC=void 0,this.hC=!1,this.aC=[],this.Pd=[],this.cC=!1,this.dC=new R.x,this.lC=new R.x,this.pC=new R.x,this.fC=!1,this.mC=-1,this.Pd.push(this.vi.adSelector.getBidEvents(fi.ON_BID_LOADED).subscribe((()=>{this.vC()})),this.vi.adSelector.getBidEvents(fi.ON_BID_IN_IMPRESSION).subscribe((t=>{this.gC(t)})),this.vi.adSelector.getBidEvents(fi.ON_BID_LOADED_CONSUMED).subscribe((t=>{t.started&&t.status!==Ni.INVALIDATED&&this.yC(t)})),this.vi.impressionCapsTimer.onTimer().subscribe((()=>{this.vC()})))}get onAdSelected(){return this.dC.asObservable()}get onAdFinished(){return this.lC.asObservable()}start(t){this.bC=t,this.sC=!0,this.vC()}stop(){this.sC=!1}destroy(){this.stop(),(0,H.i)(this.Pd),this.rC&&this.IC()}get onMissedImpression(){return this.pC.asObservable()}vC(){var t;if(!this.sC||this.hC)return;const i=this.vi.adSelector.getBestBidAllowedByStatus([Ni.LOADED],this.bC);if(!i)return;const e=this.rC&&Sn.getSelectionScore(this.rC)<Sn.getSelectionScore(i);this.rC&&this.vi.removeBidIfHigherYoScore&&e?(this.IC(),null===(t=this.rC)||void 0===t||t.stopAd("removeStartedBid"),this.wC(i)):this.rC||this.wC(i)}wC(t){this.rC=t,this.vi.internalAuctionSnapshot.takeSnapshot(this.rC,this.bC,this.bC.adOpportunity.timestamp),this.dC.next(t),this._C(),this.SC(t),t.startAd()}IC(){this.rC&&(this.rC=void 0,(0,H.i)(this.aC),this.aC=[])}_C(){const t=this.bC.adOpportunity;if(this.PC!==t)return this.PC=t,void(this.mC=0);this.mC++}gC(t){this.hC&&(0,o.n)({message:"AdManager_ABaseBidAdaptor_multipleImpressions",exception:`advertiserLineItemId:${t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId}_creativeId:${t.creativeId}`,callStack:`${t.adMediaType}`,level:o.D.CRITICAL},{throttle:1e3}),this.hC=!0,this.cC=this.AC(t.skipOffset,t.getAdDuration()),this.vi.adRequestGatekeeper.addImpression(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.obfuscatedPrice),this.vi.impressionCapsService.registerImpressionForLineItem(t.settings.adManagerLineItem,this.bC.adOpportunity.id),this.vi.requestCapsService.restoreOneCapForLineItem(t.settings.adManagerLineItem,this.bC.adOpportunity.id);const i=this.vi.auctionInfoLogging.onImpression(t);this.xC(t,i)}yC(t){this.kC(t),this.vi.loopAdWhenFinished?t.resumeAd():this.vi.pauseAdWhenFinished?t.pauseAd():(this.lC.next(t),this.IC(),this.vC())}kC(t){if(this.hC)return this.fC=!1,void(this.hC=!1);if(!t.shouldTrackPostbid)return;const i=this.vi.auctionInfoLogging.onPostBid(t);this.TC(t,i)}CC(t,i){this.fC=!0,t.setOutOfViewAdLineItemId(i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId),t.setOutOfViewAdPrice(i.price);const e=this.EC();t.setInViewAdPrice(e);const s=(0,r.oW)(i.settings.adContainer);t.setDistanceWhenOutOfViewStarted(s.top)}EC(){return this.vi.adSelector.getWinnableBidPricesSortedDesc()[0]||-1}MC(){const t=this.vi.internalAuctionSnapshot.lastSnapshot,i=null==t?void 0:t.firstLoser,e=null==t?void 0:t.allLoserStatusInfo;let s,r,o;return(0,n.$K)(i)&&(s=i.lineItem,o=i.isIma,r=i.status),{firstLoser:i,bidStatus:r,highestLosingBidLineItem:s,allLoserStatusInfo:e,firstLoserIsIma:o}}xC(t,i){var s,r,h,a,c,d,l,u,p;const{adBreakState:f}=this.bC,m=(0,n.hj)((0,Bt.oK)(t.getAdDuration(),2))?(0,Bt.oK)(t.getAdDuration(),2):0,v=(0,n.hj)((0,Bt.oK)(t.declaredDurationInSeconds,2))?(0,Bt.oK)(t.declaredDurationInSeconds,2):0,g=m-v,y=(0,de.H8)(t.createdTimestamp),b=this.bC.adContainerState.get(t.settings.adManagerLineItem.protoLineItem.adType).viewability;let I;if(b||this.CC(qn.createRecord(this.vi.playerId),t),t.settings.adManagerLineItem.protoLineItem.isPMP)if((0,n.$K)(this.vi.internalAuctionSnapshot.lastSnapshot)){const{winnerDemandType:t,firstLoser:i,firstOpenMarketLoser:e}=this.vi.internalAuctionSnapshot.lastSnapshot;I={winnerDemandType:t,firstLoser:i,firstOpenMarketLoser:e}}else(0,o.n)({message:"AdImpressionerController: No internal auction snapshot found",level:o.D.WARN},{throttle:1,shouldSendMaxLog:!1});const{floorPriceInformation:_,discount:S,liveRampType:P}=t.settings.requestMetadata.data,A=this.MC(),x=(0,n.$K)(A.firstLoser)?100*(t.price-A.firstLoser.customClientPrice):null,k=A.allLoserStatusInfo;let T,C;(0,n.$K)(this.vi.internalAuctionSnapshot.lastSnapshot)&&(T=this.vi.internalAuctionSnapshot.lastSnapshot.auctionEndType,C=this.vi.internalAuctionSnapshot.lastSnapshot.deltaTimestampAdStartAdOpportunity);const E={adPodSlotPosition:f.adPodSlotIndex,adSourceType:w.EN.fromProtoAdSourceType(t.adSourceType),advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:t.settings.adManagerLineItem.protoLineItem.publisherLineItemId,customClientPrice:t.settings.cpm,encryptedPrice:t.settings.requestMetadata.data.encryptedPrice,prebidJsBidderName:t.settings.requestMetadata.data.prebidJsBidderName,rtbADomain:t.settings.requestMetadata.data.rtbAdomain,rtbCreativeId:t.creativeId,rtbSeatId:t.settings.requestMetadata.data.rtbSeatId,isUserSynced:t.settings.requestMetadata.data.isUserSynced,timeSpentMs:t.startingTimeMs,vastMediaType:t.adMediaType,rtbDspId:t.settings.requestMetadata.data.dspId,cnxBidId:t.settings.requestMetadata.data.cnxBidId,winToAdLoadedTimeMs:null===(s=t.settings.bidLifecycle)||void 0===s?void 0:s.winToAdLoadedTime,startAdToImpressionTimeMs:null===(r=t.settings.bidLifecycle)||void 0===r?void 0:r.startAdToImpressionTime,impressionDurationSeconds:g,declaredDurationSeconds:v,isExplorationMode:this.vi.explorationMode,requestsCount:t.settings.requestMetadata.data.requestNumber,requestedFloorPrice:t.settings.requestMetadata.data.requestedFloorPrice,floorPriceInformation:_?w.wE.fromProtoFloorPriceInformation(_):void 0,bidElapsedTimeSeconds:y,adBreakType:w.EN.fromProtoAdBreakType(f.adBreakType),liveRampType:P?w.EN.fromProtoLiveRamp(P):void 0,internalAuctionInformation:I?w.W1.fromProtoInternalAuction(I):void 0,auctionInformation:i?w.Ti.fromProtoAuctionInformation(i):void 0,dynamicElkFields:{1:t.settings.requestMetadata.data.rtbRequestId,2:t.settings.requestMetadata.data.auctionBidId,4:`${b}`,5:`${t.settings.adManagerLineItem.protoLineItem.viewability}`,6:`${(0,n.$K)(null===(h=A.highestLosingBidLineItem)||void 0===h?void 0:h.lineItemPriority)?null===(a=A.highestLosingBidLineItem)||void 0===a?void 0:a.lineItemPriority:0}`,7:`${(0,n.$K)(A.bidStatus)?A.bidStatus:null}`,8:`${(0,n.$K)(t.price)?t.price:0}`,9:`${(0,n.$K)(null===(c=A.firstLoser)||void 0===c?void 0:c.customClientPrice)?A.firstLoser.customClientPrice:0}`,11:`${T}`,10:`${(0,n.$K)(null===(d=A.firstLoser)||void 0===d?void 0:d.demandType)?null===(l=A.firstLoser)||void 0===l?void 0:l.demandType:0}`,12:(0,n.hj)(C)?`${C}`:"0",13:`${(0,n.$K)(k)?k.verifyingBidsInAuction:0}`,14:`${(0,n.$K)(k)?k.idleBidsInAuction:0}`,15:`${(0,n.$K)(k)?k.loadingBidsInAuction:0}`,16:`${(0,n.$K)(k)?k.loadedBidsInAuction:0}`,17:`${(0,n.$K)(this.PC.id)?this.PC.id:""}`,18:`${(0,n.$K)(null===(u=A.highestLosingBidLineItem)||void 0===u?void 0:u.creativeType)?null===(p=A.highestLosingBidLineItem)||void 0===p?void 0:p.creativeType:null}`,19:`${(0,n.$K)(A.firstLoserIsIma)?A.firstLoserIsIma:null}`,20:`${x}`,21:`${this.mC}`,22:`${(0,e.M$)(this.vi.deviceType)}`},hasAdSkip:this.cC,discount:S?Un.d.fromProtoDiscount(S):void 0};this.th.adImpression.next(E)}TC(t,i){var s;const{adBreakState:r}=this.bC,o=(0,de.H8)(t.createdTimestamp),h=(0,n.$K)(i)?w.EN.fromProtoAuctionPostbidReason(this.vi.auctionInfoLogging.getGeneralPostbidReason(t.errorReason)):void 0,{discount:a,liveRampType:c}=t.settings.requestMetadata.data,d=t.settings.requestMetadata.data.floorPriceInformation;let l,u;(0,n.$K)(this.vi.internalAuctionSnapshot.lastSnapshot)&&(l=this.vi.internalAuctionSnapshot.lastSnapshot.auctionEndType,u=this.vi.internalAuctionSnapshot.lastSnapshot.deltaTimestampAdStartAdOpportunity);const p={adPodSlotPosition:r.adPodSlotIndex,adSourceType:w.EN.fromProtoAdSourceType(t.adSourceType),advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:t.settings.adManagerLineItem.protoLineItem.publisherLineItemId,reason:t.errorReason,isBidLoaded:!0,prebidJsBidderName:t.settings.requestMetadata.data.prebidJsBidderName,vastMediaType:t.adMediaType,isUserSynced:t.settings.requestMetadata.data.isUserSynced,rtbSeatId:t.settings.requestMetadata.data.rtbSeatId,rtbADomain:t.settings.requestMetadata.data.rtbAdomain,rtbCreativeId:t.creativeId,timeSpentMs:t.startingTimeMs,rtbDspId:t.settings.requestMetadata.data.dspId,cnxBidId:t.settings.requestMetadata.data.cnxBidId,winToAdLoadedTimeMs:null===(s=t.settings.bidLifecycle)||void 0===s?void 0:s.winToAdLoadedTime,requestsCount:t.settings.requestMetadata.data.requestNumber,requestedFloorPrice:t.settings.requestMetadata.data.requestedFloorPrice,floorPriceInformation:d?w.wE.fromProtoFloorPriceInformation(d):void 0,liveRampType:c?w.EN.fromProtoLiveRamp(c):void 0,bidElapsedTimeSeconds:o,adBreakType:w.EN.fromProtoAdBreakType(r.adBreakType),auctionInformation:i?w.Ti.fromProtoAuctionInformation(i):void 0,auctionReason:h,discount:a?Un.d.fromProtoDiscount(a):void 0,dynamicElkFields:{1:`${l}`,2:(0,n.hj)(u)?`${u}`:"0",7:`${(0,n.$K)(this.PC.id)?this.PC.id:""}`,8:`${this.mC}`,9:`${(0,e.M$)(this.vi.deviceType)}`}};this.th.adPostbid.next(p)}SC(t){this.aC.push(t.onAdSlotViewabilityChanged.subscribe((t=>{if(t&&this.fC){const t=qn.getPlayerRecord(this.vi.playerId);this.pC.next(t),this.fC=!1}})),t.onVpaidEvent.subscribe((i=>{const e=function(t,i){switch(t){case X.fI.AdImpression:return i.adImpression;case X.fI.AdClickThru:return i.adClick;case X.fI.AdStarted:return i.adStarted;case X.fI.AdVideoStart:return i.adVideoStart;case X.fI.AdVideoFirstQuartile:return i.adQuartileFirst;case X.fI.AdVideoMidpoint:return i.adQuartileSecond;case X.fI.AdVideoThirdQuartile:return i.adQuartileThird;case X.fI.AdVideoComplete:return i.adQuartileFourth;case X.fI.AdPaused:return i.adPause;case X.fI.AdPlaying:return i.adResume;case X.fI.AdSkipped:return i.adSkip;case X.fI.AdUserClose:return i.adUserClose;case X.fI.AdUserAcceptInvitation:return i.adUserAcceptInvitation;case X.fI.AdUserMinimize:return i.adUserMinimize;case X.fI.AdError:return i.adError}}(i.type,t.settings.trackers);!(0,b.BZ)(e)&&i.type===X.fI.AdImpression&&(t.adSourceType===m.ProtoAdsourceTypeEnum.Vpaid||t.adSourceType===m.ProtoAdsourceTypeEnum.VastMedia)&&(0,o.n)({message:"AdManager_AdImpressionController_tracker_impression_not_found",exception:`creativeId: ${t.creativeId}, advertiserLineItemId: ${t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId}`,level:o.D.CRITICAL},{shouldSendMaxLog:!1}),Pi.track(e,this.vi.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState,t.getTrackerSlot())}))),this.aC.push(t.onAdViewableImpression.subscribe((i=>{const{publisherLineItemId:e,advertiserLineItemId:s,rtbSeatId:n,dspId:r,rtbAdomain:o}=i,h=t.settings.requestMetadata.data.discount;this.th.adInView.next({publisherLineItemId:e,advertiserLineItemId:s,rtbSeatId:n,rtbDspId:r,adBreakType:w.EN.fromProtoAdBreakType(this.bC.adBreakState.adBreakType),discount:h?Un.d.fromProtoDiscount(h):void 0,hasSkipAd:this.cC,rtbADomain:o}),Pi.track(t.settings.trackers.adViewableImpression,this.vi.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState)})))}AC(t,i){if((0,n.hj)(t)&&t>=0)return!0;return(0,tt.Xj)(i,this.vi.skipAdSettings)}}const zn={[m.ProtoAdBreakTypeEnum.PreRoll]:"preRoll",[m.ProtoAdBreakTypeEnum.MidRoll]:"midRoll",[m.ProtoAdBreakTypeEnum.PostRoll]:"postRoll"};class Wn{constructor(t,i){this.LC=t,this.al=i}replace(t,i,e){this.LC.setAdWidth(e.adMacros.adWidth),this.LC.setAdHeight(e.adMacros.adHeight),this.LC.setAdPosition(zn[e.adMacros.adPostion]),e.mediaMacros.mediaDescription&&this.LC.setVideoDescription(e.mediaMacros.mediaDescription),e.mediaMacros.mediaDuration&&this.LC.setVideoDuration(e.mediaMacros.mediaDuration),e.mediaMacros.mediaId&&this.LC.setVideoId(e.mediaMacros.mediaId),e.mediaMacros.mediaTitle&&this.LC.setVideoTitle(e.mediaMacros.mediaTitle),e.mediaMacros.mediaUrl&&this.LC.setVideoUrl(e.mediaMacros.mediaUrl);const s=this.al.isConsent(i);this.LC.setGDPR(this.al.isConsentRequired()?1:0),this.LC.setConsent(s?1:0),this.LC.setGDPRConsent(this.al.getConsentPayload()),this.LC.setNPA(this.al.isPersonalisedAdsAllowed()?0:1);const n=this.al.getTrackableUser(),r=this.al.isConsentConnatix()&&s?n:void 0;return this.LC.setUUID(r),this.LC.setupMacros(t)}}class Gn{constructor(t,i){this.vi=t,this.BC=i,this.Pd=[],this.km=!1,this.OC=()=>{if(this.vi.adSelector.hasReachTheMaxNumberOfReadyBids())return void this.vi.auctionManager.onNothingToWin();const t=this.RC(),{selectedBid:i,state:e}=t;if(!i)return;this.vi.auctionInfoLogging.winBid(i);const{width:s,height:n}=e.adContainerState.get(i.settings.adManagerLineItem.protoLineItem.adType);i.initAd(s,n,this.DC.vastViewMode,this.vi.desiredBitRateForWins,void 0,void 0,e.soundValue);const{trackers:r,adManagerLineItem:o}=i.settings;return Pi.track(r.adWin,this.vi.adMacroReplacer,o.protoLineItem,e),Promise.resolve()},this.Lk=new bn(this.OC,10),this.Pd.push(this.vi.adSelector.getBidEvents(fi.ON_BID).subscribe((t=>{const i=this.RC();this.vi.auctionInfoLogging.newBidAdded(t,i),this.VC()})),this.vi.adSelector.getBidEvents(fi.ON_BID_STARTING).subscribe((()=>{this.VC()})),this.vi.adSelector.getBidEvents(fi.ON_BID_LOADED_CONSUMED).subscribe((t=>{if(!t.started&&t.status!==Ni.INVALIDATED){const i=this.vi.auctionInfoLogging.onPostBid(t),e=!0;this.jC(t,i,e)}this.VC()})),this.vi.adSelector.getBidEvents(fi.ON_BID_LOADING_CONSUMED).subscribe((t=>{if(t.status!==Ni.INVALIDATED){const i=this.vi.auctionInfoLogging.onPostBid(t);this.jC(t,i)}this.VC()})),this.vi.impressionCapsTimer.onTimer().subscribe((()=>{this.VC()})))}win(t){this.DC=t,this.Lk.setNumberOfThreads(t.maxParallelWins),this.km=!0,this.VC()}stop(){this.km=!1,this.Lk.stop()}destroy(){this.stop(),(0,H.i)(this.Pd)}VC(){this.km&&this.Lk.start()}RC(){const t=this.vi.adBidPool.getBidsByStatus([Ni.LOADING]),i=this.DC.stateSettings.currentState||this.DC.stateSettings.predictedState;return this.vi.adSelector.selectBestBidForWin(t,i,this.vi.sessionId)}jC(t,i,e=!1){var s,r,o,h,a;Pi.track(t.settings.trackers.adError,this.vi.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState);const c=(null===(r=null===(s=this.DC.stateSettings)||void 0===s?void 0:s.currentState)||void 0===r?void 0:r.adBreakState)||(null===(h=null===(o=this.DC.stateSettings)||void 0===o?void 0:o.predictedState)||void 0===h?void 0:h.adBreakState),d=(0,de.H8)(t.createdTimestamp),l=(0,n.$K)(i)?w.EN.fromProtoAuctionPostbidReason(this.vi.auctionInfoLogging.getGeneralPostbidReason(t.errorReason)):void 0,{discount:u,liveRampType:p}=t.settings.requestMetadata.data,f=t.settings.requestMetadata.data.floorPriceInformation,m={adPodSlotPosition:c.adPodSlotIndex,adSourceType:w.EN.fromProtoAdSourceType(t.adSourceType),advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:t.settings.adManagerLineItem.protoLineItem.publisherLineItemId,reason:t.errorReason,isBidLoaded:e,prebidJsBidderName:t.settings.requestMetadata.data.prebidJsBidderName,vastMediaType:t.adMediaType,isUserSynced:t.settings.requestMetadata.data.isUserSynced,rtbSeatId:t.settings.requestMetadata.data.rtbSeatId,rtbADomain:t.settings.requestMetadata.data.rtbAdomain,rtbCreativeId:t.creativeId,timeSpentMs:t.loadingTimeMs,rtbDspId:t.settings.requestMetadata.data.dspId,cnxBidId:t.settings.requestMetadata.data.cnxBidId,winToAdLoadedTimeMs:null===(a=t.settings.bidLifecycle)||void 0===a?void 0:a.winToAdLoadedTime,requestsCount:t.settings.requestMetadata.data.requestNumber,requestedFloorPrice:t.settings.requestMetadata.data.requestedFloorPrice,floorPriceInformation:f?w.wE.fromProtoFloorPriceInformation(f):void 0,liveRampType:p?w.EN.fromProtoLiveRamp(p):void 0,bidElapsedTimeSeconds:d,auctionInformation:i?w.Ti.fromProtoAuctionInformation(i):void 0,auctionReason:l,discount:u?Un.d.fromProtoDiscount(u):void 0};this.BC.adPostbid.next(m)}}var Qn,Jn;!function(t){t[t.ON_STARTED=0]="ON_STARTED",t[t.ON_END=1]="ON_END"}(Qn||(Qn={}));class Xn{constructor(t){this.vi=t,this.NC=new R.x,this.UC=[],this.$C=!1,this.qC=!1,this.Pd=[]}get onAuctionMechanismEnded(){return this.NC.asObservable()}startNewAuction(t){this.HC=t.callingState,this.qC=t.waitForNewReadyBid,this.zC(),this.WC(),this.GC(),this.QC()}cancelAuction(){this.zC()}updateState(t){if(this.HC=t,0===this.UC.length)return;const i=this.HC.stateSettings.currentState||this.HC.stateSettings.currentState;if(!i)return;const e=this.vi.adSelector.getLineItemsByRequest(!0).map((t=>t.protoLineItem.advertiserLineItemId)),s=this.vi.adSelector.getAllCallableLineItems(i).map((t=>t.protoLineItem.advertiserLineItemId));this.UC=this.UC.filter((t=>t.isAdCalled||(0,b.d3)(t.lineItemId,s)||(0,b.d3)(t.lineItemId,e))),this.QC()}onNothingToWin(){0!==this.UC.length&&this.UC.every((t=>!0===t.isAdCalled))&&this.QC()}onNothingToCall(){0!==this.UC.length&&(this.JC(),this.QC())}JC(){const t=this.vi.adSelector.getLineItemsByRequest(!0).map((t=>t.protoLineItem.advertiserLineItemId));this.UC=this.UC.filter((i=>!0===i.isAdCalled||!1===i.isAdCalled&&(0,b.d3)(i.lineItemId,t)))}XC(){this.zC(),this.NC.next()}GC(){this.Pd.push(this.vi.adSelector.getLineItemRequestEvents(Qn.ON_END).subscribe((t=>{this.YC(t),this.QC()})),this.vi.adSelector.getBidEvents(fi.ON_BID_LOADED).subscribe((t=>{this.$C=!0,this.QC()})),this.vi.adSelector.getBidEvents(fi.ON_BID_LOADING_CONSUMED).subscribe((t=>{this.QC()})))}YC(t){this.UC.forEach((i=>{t.some((t=>t.protoLineItem.advertiserLineItemId===i.lineItemId))&&(i.isAdCalled=!0)}))}KC(){(0,H.i)(this.Pd)}QC(){0!==this.UC.length?this.qC&&!this.$C||this.UC.every((t=>!0===t.isAdCalled))&&this.ZC()&&this.XC():this.XC()}ZC(){const t=this.tE(this.vi.adBidPool.getBidsByStatus([Ni.LOADED]));if(!t)return!1;const i=this.vi.adSelector.selectBestBid(this.vi.adBidPool.getBidsByStatus([Ni.IDLE]),this.HC.stateSettings.currentState||this.HC.stateSettings.predictedState,this.vi.sessionId),e=[...this.vi.adBidPool.getBidsByStatus([Ni.LOADING])];i.selectedBid&&e.push(i.selectedBid);const s=this.tE(e);return!s||t.yoScore>=s.yoScore}tE(t){if(t&&0!==t.length)return t.reduce(((t,i)=>t.yoScore>i.yoScore?t:i))}zC(){this.UC=[],this.$C=!1,this.KC()}WC(){this.iE(),this.eE(),this.sE()}sE(){this.vi.adSelector.getLineItemsByRequest(!0).forEach((t=>{this.nE(t)}))}eE(){const t=this.HC.stateSettings.currentState||this.HC.stateSettings.predictedState;if(!t)return void(0,o.n)({message:"ShortCircuitMechanism_registerClientSideLineItem_no_state",level:o.D.INFO},{throttle:10,shouldSendMaxLog:!1});const i=this.vi.adSelector.getAllCallableLineItems(t).filter((t=>!t.hasAggregator)),e=i.filter((t=>t.protoLineItem.forceCallingInEveryAO)),s=this.rE(i,this.HC.stateSettings);if(!s)return void this.oE(e);const n=this.hE();(n?Sn.getSelectionScore(n):0)>Sn.getSelectionScore(s)?this.oE(e):(this.nE(s),e.filter((t=>t!==s)).forEach((t=>{this.nE(t)})))}iE(){const t=this.HC.stateSettings.currentState||this.HC.stateSettings.predictedState;if(!t)return void(0,o.n)({message:"ShortCircuitMechanism_registerAggregatedLineItems_no_state",level:o.D.INFO},{throttle:1,shouldSendMaxLog:!1});this.vi.adSelector.getAllCallableLineItems(t).filter((t=>t.hasAggregator)).forEach((t=>{this.nE(t)}))}rE(t,i){const e=this.vi.adSelector.getBestCallableLineItem(t,i);if(e&&(0,b.BZ)(e.lineItemList))return e.lineItemList[0]}hE(){return[...this.vi.adBidPool.getBidsByStatus([Ni.LOADED])].sort(((t,i)=>Sn.getSelectionScore(i)-Sn.getSelectionScore(t)))[0]}nE(t){this.UC.some((i=>i.lineItemId===t.protoLineItem.advertiserLineItemId))||this.UC.push({isAdCalled:!1,lineItemId:t.protoLineItem.advertiserLineItemId})}oE(t){t.forEach((t=>{this.nE(t)}))}}!function(t){t.ShortCircuitEnd="short",t.TimeoutEnd="timeout",t.Prefetch="prefetched"}(Jn||(Jn={}));class Yn{constructor(t,i){this.Qs=t,this.aE=null,this.cE=new R.x,this.NC=new R.x,this.dE=null,this.lE={inPrefetchMode:!1,startTime:0,prefetchEnded:!1},this.uE={id:"",auctionEnded:!1},this.fE=new Xn({adSelector:i.adSelector,adBidPool:i.adBidPool,sessionId:i.sessionId}),this.mE()}get onAuctionStopCalling(){return this.NC.asObservable()}get onAuctionEnd(){return this.cE.asObservable()}updateState(t){this.fE.updateState(t)}cancelAuction(){this.lE.inPrefetchMode=!1,this.fE.cancelAuction(),this.Ep()}startPrefetch(t){this.Ep(),this.lE={inPrefetchMode:!0,startTime:Date.now(),prefetchEnded:!1},this.fE.startNewAuction({callingState:t,waitForNewReadyBid:!0})}startAuction(t,i,e=3e3){if(this.uE.id===i)return void(this.uE.auctionEnded&&(0,n.$K)(this.uE.auctionEndedType)&&this.XC(this.uE.auctionEndedType));this.aE=Date.now(),this.uE={auctionEnded:!1,id:i},this.Ep();let s=e;this.lE.inPrefetchMode?(s-=Date.now()-this.lE.startTime,s<0||this.lE.prefetchEnded?this.XC(Jn.Prefetch):this.vE(s)):(this.fE.startNewAuction({callingState:t,waitForNewReadyBid:!1}),this.vE(s)),this.lE.inPrefetchMode=!1}onNothingToWin(){this.fE.onNothingToWin()}onNothingToCall(){this.fE.onNothingToCall()}destroy(){this.gE.unsubscribe(),this.gE=null}mE(){this.gE=this.fE.onAuctionMechanismEnded.subscribe((()=>{this.yE()}))}yE(){this.lE.prefetchEnded=!0,this.NC.next(),this.lE.inPrefetchMode||this.XC(Jn.ShortCircuitEnd)}vE(t){this.dE=this.Qs.setTimeout((()=>{this.XC(Jn.TimeoutEnd)}),t)}XC(t){null!==this.aE&&(0,n.$K)(t)&&(this.bE(t,Date.now()-this.aE),this.aE=null),this.uE.auctionEnded=!0,this.uE.auctionEndedType=t,this.cancelAuction(),this.cE.next(t)}Ep(){this.Qs.clearTimeout(this.dE),this.dE=null}bE(t,i){(0,e.Vm)([99,1])&&(0,o.n)({message:"AuctionManager_end_auction",exception:t,callStack:this.IE(i),level:o.D.INFO},{shouldSendMaxLog:!1,throttle:1e4})}IE(t,i=0){const e=[0,.25,.5,.75,1,1.25,1.5,1.75,2,2.25,2.5,2.75,3,4,5][i];return void 0===e?"over_5s":t<=1e3*e?`${e}`:this.IE(t,i+1)}}class Kn{constructor(){this.requestNumber=0}}class Zn{constructor(t,i){this.protoLineItem=t,this.historicalMetrics=new Kn,this.callers=new Set,this.aggregators=new Set,this.hasAggregator=this._E(t.creativeType),this.yoScore=this.SE(i)}_E(t){return(0,n.$K)(wn[t])}SE(t){const{advertiserLineItemId:i,lineItemPriority:e}=this.protoLineItem,s=this.PE();return t.calculateLineItemYoScore(i,{cpm:s,priority:e},this.hasAggregator)}PE(){const{floorPrice:t,customCpm:i}=this.protoLineItem;return t||i}}class tr{constructor(t,i,e){this.parentContainer=t,this.Lp=i,this.xI=e,this.isImaSlot=!1,this.slotsContainer=this.Lp.createElementByString('<div class= "cnx-ad-bid-slot"></div>');const s=this.Lp.createElementByString('<div class="cnx-ad-slot"></div>');this.adSlot=this.Lp.createElementByString('<div class="cnx-ad-slot"></div>'),this.videoSlot=this.Lp.createElementByString('<video class="cnx-ad-slot cnx-ad-video-slot"></video>'),this.videoSlot.setAttribute("playsinline",""),this.videoSlot.setAttribute("webkit-playsinline",""),this.videoSlot.setAttribute("aria-label","Advertisement"),this.videoSlot.setAttribute("aria-hidden","true"),s.appendChild(this.videoSlot),s.appendChild(this.adSlot),this.slotsContainer.appendChild(s),this.parentContainer.appendChild(this.slotsContainer)}destroy(){this.parentContainer.removeChild(this.slotsContainer)}AE(){this.parentContainer.querySelectorAll(`[${Ii.b.GarbageCollector}]`).forEach((t=>{(0,r.bX)(t)}))}sanitize(){this.AE()}}class ir extends tr{constructor(){super(...arguments),this.isImaSlot=!0,this.xE=!1,this.kE={imaAdDisplayContainer:void 0,imaAdsLoader:void 0,imaSdk:void 0}}fetchImaDependencies(){return Ki.fetchImaSdk(window,!0).then((t=>this.TE(t)))}destroy(){this.kE.imaAdsLoader&&this.kE.imaAdsLoader.destroy(),this.kE.imaAdDisplayContainer&&this.kE.imaAdDisplayContainer.destroy(),super.destroy()}sanitize(){this.kE.imaAdsLoader.contentComplete(),super.sanitize()}TE(t){if(this.xE)return this.kE;t.settings.setDisableCustomPlaybackForIOS10Plus(!0);const i=this.CE(t),e=this.EE(t,i);return this.kE={imaSdk:t,imaAdDisplayContainer:i,imaAdsLoader:e},this.xE=!0,this.kE}CE(t){const i=new t.AdDisplayContainer(this.adSlot,this.videoSlot);return i.initialize(),i}EE(t,i){const e=new t.AdsLoader(i),s=mi.h.getSessionChildContainer(this.xI).resolve(Ci.P);return e.getSettings().setVpaidMode(t.ImaSdkSettings.VpaidMode.INSECURE),s.isImaTestCaseForSS()||s.isRDDotComDomain()||s.isBudgetYourTripDotComDomain()||e.getSettings().setAutoPlayAdBreaks(!1),e}}class er{constructor(t){this.settings=t,this.ME=new Set,this.LE=new Set}preloadImaSdkSlots(t){Ki.preloadImaSdk(window);const i=mi.h.getSessionChildContainer(this.settings.sessionId).resolve(Ci.P);if(!i.isImaTestCaseForSS()&&!i.isMarriageDotComDomain()&&!i.isDailykosDotComDomain())for(let i=1;i<=3;i++){const i=new ir(t,this.settings.globalDomUtilsService,this.settings.sessionId);i.fetchImaDependencies(),this.ME.add(i)}}requestAdSlot(t){const i=new tr(t,this.settings.globalDomUtilsService,this.settings.sessionId);return this.BE(i),i}requestAdSlotIma(t){let i=this.OE();return i||(i=new ir(t,this.settings.globalDomUtilsService,this.settings.sessionId)),this.BE(i),i}destroyAdSlot(t){this.LE.delete(t),t.destroy()}recycleAdSlot(t){this.LE.delete(t),this.RE(t)?(t.sanitize(),this.ME.add(t)):this.destroyAdSlot(t)}RE(t){return t.isImaSlot}OE(){let t=null;return this.ME.forEach((i=>{this.RE(i)&&null===t&&(t=i)})),t}BE(t){this.ME.delete(t),this.LE.add(t)}}class sr{constructor(t,i){this.jE=t,this.th=i,this.FE=new Map}bidIsNotWinnableEverInSession(t){if(!this.NE(t))return;const i=[...this.UE(),t.price].sort(((t,i)=>i-t)),e=this.$E(i);this.ml(t.settings.requestMetadata.data.cnxBidId,e,m.ProtoAuctionLossReasonEnum.TargetingMismatch)}newBidAdded(t,i){this.NE(t)&&(i.selectedBid?i.selectedBid!==t?this.qE(t,i):this.HE(t):this.qE(t,i))}winBid(t){if(!this.NE(t))return;const i=this.UE(),e=this.$E(i);this.FE.set(t,e)}onPostBid(t){return this.zE(t)}onImpression(t){return this.zE(t)}NE(t){return t.settings.requestMetadata.data.logAuctionInformation}HE(t){const{cnxBidId:i}=t.settings.requestMetadata.data,e=this.UE(),s=this.$E(e);this.ml(i,s,m.ProtoAuctionLossReasonEnum.CompetitorPriority)}zE(t){const i=this.WE(t);return this.GE(t),i}qE(t,i){var e,s,r,o;const{cnxBidId:h}=t.settings.requestMetadata.data,a=this.UE(),c=this.QE(t,i),d=this.$E(a);(0,n.$K)(c)?this.ml(h,d,c):this.JE("AdManager_AuctionInfoLogging_lossReason_cannot_be_found",t.settings.requestMetadata.data.cnxBidId,null===(o=null===(r=null===(s=null===(e=i.selectedBid)||void 0===e?void 0:e.settings)||void 0===s?void 0:s.requestMetadata)||void 0===r?void 0:r.data)||void 0===o?void 0:o.cnxBidId)}WE(t){if(this.FE.has(t))return this.FE.get(t);this.NE(t)&&this.JE("AdManager_AuctionInfoLogging_cannot_find_win_bid_snapshot",t.settings.requestMetadata.data.cnxBidId)}GE(t){this.FE.has(t)&&this.FE.delete(t)}QE(t,i){var e;return null===(e=i.unselectedBidList.find((i=>i.bid===t)))||void 0===e?void 0:e.lossReason}getGeneralPostbidReason(t){switch(t){case Di.ImaScriptFailure:case Di.ImaObjectNotFound:case Di.ImaManagerInit:case Di.ImaInitSdkError:case Di.AdxOverlayGptScriptLoad:case Di.DisplayIntegratorIframeLoad:return m.ProtoAuctionPostbidReasonEnum.SDKFailure;case Di.VastUnsupportedMedia:case Di.CnxMediaSrcNotSupported:return m.ProtoAuctionPostbidReasonEnum.UnsupportedMedia;case Di.DomainBlocked:case Di.AdaptorInitAdError:case Di.AdaptorStartAdError:case Di.WrapperInitAdError:case Di.WrapperStartAdError:return m.ProtoAuctionPostbidReasonEnum.TargetingMismatch;default:return m.ProtoAuctionPostbidReasonEnum.CreativeError}}UE(){return this.jE.getAllBids().map((t=>t.price)).sort(((t,i)=>i-t))}$E(t){const i=t[0]?yi(t[0]):void 0,e=t[1]?yi(t[1]):void 0;return i||this.JE("AdManager_AuctionInfoLogging_highestBidPrice_missing",`${i}`),{bidDensity:t.length,highestObfuscatedBidPrice:i,secondHighestObfuscatedBidPrice:e}}ml(t,i,e){this.th.auctionInformation.next({cnxBidId:t,auctionInformation:i?w.Ti.fromProtoAuctionInformation(i):void 0,auctionLossReason:w.EN.fromProtoAuctionLossReason(e)})}JE(t,i="",e=""){(0,o.n)({message:t,level:o.D.CRITICAL,callStack:i,exception:e},{throttle:5})}}class nr{constructor(){this.YE=[]}canCall(t,i){return this.YE.every((e=>e.canCall(t,i)))}registerRequestForLineItem(t,i){return this.YE.forEach((e=>{e.registerRequestForLineItem(t,i)})),this}registerImpressionForLineItem(t,i){return this.YE.forEach((e=>{e.registerImpressionForLineItem(t,i)})),this}registerCallingValidator(t){return this.YE.push(t),this}registerCallingValidators(t){return t.forEach((t=>{this.registerCallingValidator(t)})),this}destroy(){this.YE.forEach((t=>{t.destroy()}))}}class rr{constructor(){this.KE=new R.x,this.ZE=new R.x,this.tM={[Qn.ON_STARTED]:this.KE,[Qn.ON_END]:this.ZE},this.iM={[Qn.ON_STARTED]:t=>this.KE.next(t),[Qn.ON_END]:t=>this.ZE.next(t)}}getCallingObservable(t){return this.tM[t].asObservable()}triggerEvent(t,i){(0,this.iM[t])(i)}}var or=h(4546),hr=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let ar=class{constructor(){this.eM=new rr,this.sM=[]}get lineItems(){return this.sM}add(t){this.sM=[...this.lineItems,...t],this.eM.triggerEvent(Qn.ON_STARTED,t)}remove(t){this.sM=this.lineItems.filter((i=>!(0,b.d3)(i,t))),this.eM.triggerEvent(Qn.ON_END,t)}getEvents(t){return this.eM.getCallingObservable(t)}};ar=hr([(0,or.b2)(),(0,or.Yn)(or.Fw.ContainerScoped)],ar);class cr{constructor(){this.Ak=new R.x,this.nM=new R.x,this.oM=new R.x,this.hM=new R.x,this.aM=new R.x,this.cM=new R.x,this.dM=new R.x,this.lM={[fi.ON_BID]:this.Ak,[fi.ON_BID_LOADING]:this.nM,[fi.ON_BID_LOADING_CONSUMED]:this.cM,[fi.ON_BID_LOADED]:this.oM,[fi.ON_BID_STARTING]:this.hM,[fi.ON_BID_IN_IMPRESSION]:this.aM,[fi.ON_BID_LOADED_CONSUMED]:this.dM},this.uM={[Ni.IDLE]:t=>{this.Ak.next(t)},[Ni.LOADING]:t=>{this.nM.next(t)},[Ni.LOADED]:t=>{this.oM.next(t)},[Ni.STARTING]:t=>{this.hM.next(t)},[Ni.IMPRESSION]:t=>{this.aM.next(t)},[Ni.CONSUMED_LOADING]:t=>{this.cM.next(t)},[Ni.CONSUMED_LOADED]:t=>{this.dM.next(t)},[Ni.INVALIDATED]:t=>{[Ni.IDLE,Ni.LOADING].includes(t.status)?this.cM.next(t):this.dM.next(t)}}}bidStatusChanged(t,i){(0,this.uM[i])(t)}getBidObservable(t){return this.lM[t].asObservable()}}var dr=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let lr=class{constructor(){this.ox=[],this.pM=new cr,this.fM=new Map}getEvents(t){return this.pM.getBidObservable(t)}addBid(t){this.mM(t),this.ox.push(t),this.pM.bidStatusChanged(t,Ni.IDLE)}getAllBids(){return this.vM(),this.ox}getBidsByLineItemId(t){return this.getAllBids().filter((i=>{const{advertiserLineItemId:e,publisherLineItemId:s}=i.settings.adManagerLineItem.protoLineItem;return[e,s].includes(t)}))}getBidsByStatus(t){return this.getAllBids().filter((i=>t.includes(i.status)))}gM(t,i){[Ni.CONSUMED_LOADING,Ni.CONSUMED_LOADED,Ni.INVALIDATED].includes(i)&&this.yM(t),this.pM.bidStatusChanged(t,i)}yM(t){this.bM(t),(0,b.sj)(this.ox,t)}IM(){return this.ox.filter((t=>{const i=t.createdTimestamp,e=t.settings.adManagerLineItem.protoLineItem.networkExpiryTimeSeconds;return(0,n.r)(e)&&(0,de.H8)(i)>=e}))}vM(){this.IM().forEach((t=>t.invalidate()))}mM(t){const i=t.onStatusChanged.subscribe((i=>{this.gM(t,i)}));this.fM.set(t.settings.id,i)}bM(t){const{id:i}=t.settings,e=this.fM.get(i);null==e||e.unsubscribe(),this.fM.delete(i)}};lr=dr([(0,or.b2)(),(0,or.Yn)(or.Fw.ContainerScoped)],lr);var ur=h(6666);class pr{constructor(t){this.wM=t,this._M=!1,this.SM=!1,this.xM=!1}get predictMode(){return this._M}get adFetchingAllowed(){return this.SM}get impressionsAllowed(){return this.xM}get currentAdPlayerState(){return this.kM}get predictedAdPlayerState(){return this.TM}partialStateUpdate(t){this.kM&&(this.kM=Object.assign(Object.assign({},this.kM),t)),this.TM&&(this.TM=Object.assign(Object.assign({},this.TM),t))}getCurrentAdManagerState(t=!1){let i=this.kM;!this.currentAdPlayerState&&t&&(i=this.TM);const e=this.wM.getContainerStateMap();return this.getAdManagerState(i,e)}getPredictedAdManagerState(){const t=this.TM,i=this.CM();return this.getAdManagerState(t,i)}getAdManagerState(t,i){if(!t)return;const{width:e,height:s,viewability:n}=this.wM.getMainContainerState(),{clickToPlay:r,mediaMetadata:o,sound:h,adBreakState:a,linearAdOpportunity:c,playerOrientation:d,inFloating:l}=t;return{width:e,height:s,viewability:n,clickToPlay:r,media:o,sound:!!h,soundValue:h,adContainerState:i,adBreakState:a,adOpportunity:c,playerOrientation:d,page:{insights:ur.k.pageInsights},inFloating:l,auctionEndType:this.EM}}CM(){let t;return this.TM.prefetchStateType===pi.StartSessionPrefetch?(t=new Map,this.wM.getContainerStateMap().forEach(((i,e)=>{t.set(e,Object.assign(Object.assign({},i),{viewability:!0}))}))):t=this.wM.getContainerStateMap(),t}getCallSettings(){return{maxParallelCalls:Y.PARALLEL_CALLS_DEFAULT,stateSettings:{currentState:this.getCurrentAdManagerState(),predictedState:this.getPredictedAdManagerState()}}}getWinSettings(){return{desiredBitRate:Y.DEFAULT_DESIRED_BITRATE,maxParallelWins:Y.PARALLEL_WINS_DEFAULT,vastViewMode:this.currentAdPlayerState?this.currentAdPlayerState.vastViewMode:this.predictedAdPlayerState.vastViewMode,stateSettings:{currentState:this.getCurrentAdManagerState(),predictedState:this.getPredictedAdManagerState()}}}enableImpression(t){this._M=!1,this.kM=t,this.TM||(this.TM=this.kM),this.SM=!0}disableImpression(){this.xM=!1,this.SM=!1}enablePredict(t,i){this.kM=null,this._M=!0,this.TM=t,this.TM.prefetchStateType=i,this.SM=!0}auctionEnd(t){this.EM=t,this.xM=!0}auctionStopCalling(){this.predictMode&&(this.SM=!1)}}const fr=["11d44b9b-1330-432c-bcd7-4a095b47cdbd"];class mr{constructor(t,i){this.MM=t,this.LM=i,this.BM=3e3,this.OM=null,this.RM=!1,fr.includes(this.MM.settings.adManagerLineItem.protoLineItem.advertiserLineItemId)||this.DM()}DM(){this.VM=this.MM.onVpaidEvent.subscribe((t=>{var i,e,s,n,r,o,h,a,c;switch(t.type){case X.fI.AdImpression:this.jM();break;case X.fI.AdVideoFirstQuartile:this.NM();break;case X.fI.AdVideoMidpoint:null===(i=this.UM)||void 0===i||i.reset();break;case X.fI.AdVideoThirdQuartile:null===(e=this.UM)||void 0===e||e.reset();break;case X.fI.AdVideoComplete:null===(s=this.UM)||void 0===s||s.stop();break;case X.fI.AdStopped:null===(n=this.UM)||void 0===n||n.stop();break;case X.fI.AdError:null===(r=this.UM)||void 0===r||r.stop();break;case X.fI.AdPaused:null===(o=this.UM)||void 0===o||o.stop();break;case X.fI.AdSkipped:null===(h=this.UM)||void 0===h||h.stop();break;case X.fI.AdPlaying:null===(a=this.UM)||void 0===a||a.start();break;case X.fI.AdUserClose:null===(c=this.UM)||void 0===c||c.stop();break;case X.fI.AdExpandedChange:case X.fI.AdClickThru:case X.fI.AdInteraction:case X.fI.AdUserAcceptInvitation:case X.fI.AdLinearChange:case X.fI.AdUserMinimize:this.destroy()}}))}jM(){const t=mi.h.getGlobalContainer().resolve(ie.f);let i=this.MM.getAdDuration();(0,n.r)(i)?(i*=1e3,this.RM=!0):i=1e3*this.LM,this.OM=i;const e=this.$M();this.UM=new Oe.B(t,e),this.UM.onTimeElapsed.subscribe((()=>{this.VM.unsubscribe(),this.VM=null,this.MM.stopAd("adNotLoading")})),this.UM.start()}NM(){if(this.RM)this.UM.reset();else{this.OM=4*this.UM.timeElapsed;const t=this.$M();this.UM.reset(t)}}$M(){return this.OM/4+this.BM}destroy(){var t;this.VM&&(this.VM.unsubscribe(),this.VM=null),null===(t=this.UM)||void 0===t||t.stop()}}const vr=30*J.s_;class gr{constructor(){this.qM=null}onAdRemoved(){this.qM=null,this.HM()}pauseViaUserInteraction(){this.qM&&(this.qM.pausedWithUserInteraction=!0)}resumeViaUserInteraction(){this.qM&&(this.qM.pausedWithUserInteraction=!1,this.HM())}zM(t){this.qM={currentAd:t,isPaused:!1,pausedWithUserInteraction:!1,remainingTimeForAdToBePaused:vr,lastAdPausedStartedTimestamp:void 0},this.HM()}checkPauseAd(t,i){t&&(null===this.qM&&this.zM(t),i?this.WM(t):this.GM(t))}GM(t){this.JM(t)&&(this.qM.isPaused=!0,this.qM.lastAdPausedStartedTimestamp=Date.now(),t.pauseAd(),this.HM(),this.XM=setTimeout((()=>{t.stopAd("pauseOutOfView"),this.qM=null,this.HM()}),this.qM.remainingTimeForAdToBePaused))}WM(t){t.settings.adManagerLineItem.protoLineItem.pauseAdOutOfView&&t.impressionStarted&&this.qM.isPaused&&!this.qM.pausedWithUserInteraction&&(this.HM(),this.qM.isPaused=!1,this.qM.remainingTimeForAdToBePaused=this.qM.remainingTimeForAdToBePaused-(Date.now()-this.qM.lastAdPausedStartedTimestamp),t.resumeAd())}HM(){clearTimeout(this.XM),this.XM=void 0}JM(t){return t.settings.adManagerLineItem.protoLineItem.pauseAdOutOfView&&t.impressionStarted&&!this.qM.isPaused&&!this.qM.pausedWithUserInteraction}}class yr{constructor(t,i,e,s,n){this.MM=t,this.wM=i,this.th=e,this.YM=s,this.vi=n,this.Po=!1,this.cC=!1,this.KM=[],this.ZM=new gr,this.ob=new R.x,this.DM(),this.tL=new mr(this.MM,this.vi.maxAdDuration),this.resizeAd()}get onVpaidEvent(){return this.ob.asObservable()}get inImpression(){return this.Po}setVastViewMode(t){this.vi.adViewMode=t;const{width:i,height:e}=this.wM.getContainerStateMap().get(this.MM.settings.adManagerLineItem.protoLineItem.adType);this.MM.resizeAd(i,e,this.vi.adViewMode)}getAdVolume(){return this.MM.getAdVolume()}setAdVolume(t,i){if(i){const{adMacroReplacer:e,adManagerState:s}=i;this.iL(t,s,e)}this.MM.setAdVolume(t)}resizeAd(){const{width:t,height:i,viewability:e}=this.wM.getContainerStateMap().get(this.MM.settings.adManagerLineItem.protoLineItem.adType);this.ZM.checkPauseAd(this.MM,e),this.MM.resizeAd(t,i,this.vi.adViewMode)}skipAd(){this.MM.setAdVolume(0),this.MM.skipAd()}stopAd(t){this.MM.stopAd(t)}pauseAd(t){this.MM.pauseAd(),t&&this.ZM.pauseViaUserInteraction()}resumeAd(t){this.MM.resumeAd(),t&&this.ZM.resumeViaUserInteraction()}getMediaSize(){const t=this.MM.getAdMediaSize().width,i=this.MM.getAdMediaSize().height,{widthRatio:e,heightRatio:s}=(0,Bt.dO)(t,i);return{width:t,height:i,widthRatio:e,heightRatio:s,adType:this.MM.settings.adManagerLineItem.protoLineItem.adType}}getMetadata(){return{advertiserLineItemId:this.MM.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:this.MM.settings.adManagerLineItem.protoLineItem.publisherLineItemId,adType:this.MM.settings.adManagerLineItem.protoLineItem.adType,duration:this.MM.getAdDuration(),adSkipMode:this.MM.settings.adManagerLineItem.protoLineItem.skipMode,moatTrackingEnabled:this.MM.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled}}destroy(){this.Po=!1,this.ZM.onAdRemoved(),this.VM.unsubscribe(),this.VM=null,this.tL.destroy()}DM(){this.VM=this.MM.onVpaidEvent.subscribe((t=>{switch(t.type){case X.fI.AdImpression:this.eL();break;case X.fI.AdVideoFirstQuartile:this.sL(m.ProtoQuartilesEnum.First);break;case X.fI.AdVideoMidpoint:this.sL(m.ProtoQuartilesEnum.Second);break;case X.fI.AdVideoThirdQuartile:this.sL(m.ProtoQuartilesEnum.Third);break;case X.fI.AdVideoComplete:this.sL(m.ProtoQuartilesEnum.Fourth)}this.ob.next(t)}))}eL(){this.cC=this.AC(this.MM.skipOffset,this.MM.getAdDuration()),this.Po=!0;const{viewability:t}=this.wM.getContainerStateMap().get(this.MM.settings.adManagerLineItem.protoLineItem.adType);this.ZM.checkPauseAd(this.MM,t)}sL(t){const i=this.KM.indexOf(t)>=0&&!(this.vi.pauseAdWhenFinished||this.vi.loopAdWhenFinished),s=this.YM.adBreakState,{adManagerLineItem:n}=this.MM.settings;if(i)return void(1===(0,e.Vm)([99,1])&&(0,o.n)({message:"AdManager_AdImpressionerController_handleQuartilesTracking_track_same_quartile_twice",level:o.D.WARN,exception:n.protoLineItem.advertiserLineItemId,callStack:this.MM.adMediaType}));this.KM.push(t);const{requestMetadata:r}=this.MM.settings,{advertiserLineItemId:h,publisherLineItemId:a}=n.protoLineItem,{rtbSeatId:c,rtbAdomain:d,dspId:l}=r.data;this.th.adQuartile.next({advertiserLineItemId:h,publisherLineItemId:a,rtbSeatId:c,dspId:l,rtbADomain:d,type:w.EN.fromProtoGetQuartile(t),adBreakType:w.EN.fromProtoAdBreakType(s.adBreakType),hasSkipAd:this.cC})}AC(t,i){if((0,n.hj)(t)&&t>=0)return!0;return(0,tt.Xj)(i,this.vi.skipAdSettings)}iL(t,i,e){const s=this.MM.getAdVolume();let n=null;0===s&&t>0?n=this.MM.settings.trackers.adUnmute:s>0&&0===t&&(n=this.MM.settings.trackers.adMute);const r=this.MM.settings.adManagerLineItem.protoLineItem;n&&Pi.track(n,e,r,i)}}var br,Ir;!function(t){t[t.VERIFYING=-1]="VERIFYING"}(br||(br={})),function(t){t.BID="bid",t.CALL_ADAPTER="callAdapter"}(Ir||(Ir={}));class wr{static getBidDemandType(t){const i=Object.keys(wr.bidDemandTypeMap).filter((i=>(0,wr.bidDemandTypeMap[i])(t.settings.adManagerLineItem.protoLineItem)))[0];if(!(0,n.$K)(i))return m.ProtoDemandTypeEnum.None;const e=Number.parseInt(i,10);return m.ProtoDemandTypeEnum[m.ProtoDemandTypeEnum[e]]}static isPrivateMarketplaceBid(t){return t.isPMP}static isOpenMarketBid(t){const{advertiserLineItemId:i,publisherLineItemId:e}=t;return!wr.isPrivateMarketplaceBid(t)&&i!==e}static isSelfServedBid(t){const{advertiserLineItemId:i,publisherLineItemId:e}=t;return!wr.isPrivateMarketplaceBid(t)&&i===e}}wr.bidDemandTypeMap={[m.ProtoDemandTypeEnum.PMP]:t=>wr.isPrivateMarketplaceBid(t),[m.ProtoDemandTypeEnum.OpenMarket]:t=>wr.isOpenMarketBid(t),[m.ProtoDemandTypeEnum.SelfServed]:t=>wr.isSelfServedBid(t)};class _r{constructor(t,i,e,s){this.nL=t,this.rC=i,this.adManagerState=e,this.rL=[],this.oL=[],this.deltaTimestampAdStartAdOpportunity=Date.now()-s,this.rL=this.nL.getEligibleBidsInAuctionSortedDescBySelectionScore(this.adManagerState).filter((t=>t!==this.rC)),this.oL=this.nL.getEligibleCallAdaptorsInAuctionSortedDescBySelectionScore(this.adManagerState),this.winnerDemandType=this.hL(),this.firstLoser=this.aL(),this.allLoserStatusInfo=this.dL(),this.firstOpenMarketLoser=this.lL(),this.auctionEndType=this.adManagerState.auctionEndType}hL(){return this.rC?wr.getBidDemandType(this.rC):(this.uL("ImpressionAuctionSnapshot: No winner bid found"),m.ProtoDemandTypeEnum.None)}dL(){const t=this.oL.length;let i=0,e=0,s=0;return this.rL.forEach((t=>{switch(t.status){case Ni.IDLE:i++;break;case Ni.LOADING:e++;break;case Ni.LOADED:s++}})),{verifyingBidsInAuction:t,idleBidsInAuction:i,loadingBidsInAuction:e,loadedBidsInAuction:s}}aL(){var t,i;const e=this.rL[0],s=this.oL[0];if(!(0,n.$K)(e)&&!(0,n.$K)(s))return;let r=0;(0,n.$K)(e)&&(r=Sn.getSelectionScore(e));let o,h,a,c,d,l,u,p,f=0;return(0,n.$K)(s)&&(f=Sn.getSelectionScore(s)),r>f?(o=wr.getBidDemandType(e),h=e.price,a=Ir.BID,c=e.settings.requestMetadata.data.encryptedPrice,d=e.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,l=e.settings.adManagerLineItem.protoLineItem,u=Boolean(null===(t=e.settings)||void 0===t?void 0:t.isIma),p=e.status):(o=class{static getCallAdaptorDemandType(t){const i=Object.keys(wr.bidDemandTypeMap).filter((i=>(0,wr.bidDemandTypeMap[i])(t.settings.adManagerLineItem.protoLineItem)))[0];if(!(0,n.$K)(i))return m.ProtoDemandTypeEnum.None;const e=Number.parseInt(i,10);return m.ProtoDemandTypeEnum[m.ProtoDemandTypeEnum[e]]}}.getCallAdaptorDemandType(s),h=s.bidPrice,a=Ir.CALL_ADAPTER,c=s.settings.requestMetadata.data.encryptedPrice,d=s.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,l=s.settings.adManagerLineItem.protoLineItem,u=Boolean(null===(i=s.settings)||void 0===i?void 0:i.isIma),p=br.VERIFYING),{loserType:a,demandType:o,encryptedPrice:c,customClientPrice:h,advertiserLineItemId:d,lineItem:l,isIma:u,status:p}}lL(){const t=this.pL();if((0,n.$K)(t))return{demandType:m.ProtoDemandTypeEnum.OpenMarket,encryptedPrice:t.settings.requestMetadata.data.encryptedPrice,customClientPrice:t.settings.cpm,advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId}}pL(){return this.rL.find((t=>wr.getBidDemandType(t)===m.ProtoDemandTypeEnum.OpenMarket))}uL(t){(0,o.n)({level:o.D.WARN,message:t},{throttle:1,shouldSendMaxLog:!1})}}class Sr{constructor(t){this.nL=t,this.fL=null}get lastSnapshot(){return this.fL}takeSnapshot(t,i,e){return this.fL=new _r(this.nL,t,i,e),this.fL}}var Pr=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let Ar=class{constructor(){this.callAdapterList=[]}add(t){this.callAdapterList.push(t)}remove(t){(0,b.sj)(this.callAdapterList,t)}getById(t){return this.callAdapterList.find((i=>i.settings.id===t))}};var xr;Ar=Pr([(0,or.b2)(),(0,or.Yn)(or.Fw.ContainerScoped)],Ar),function(t){t[t.TimeoutWithReadyBid=0]="TimeoutWithReadyBid",t[t.TimeoutWithoutReadyBid=1]="TimeoutWithoutReadyBid",t[t.Shorted=2]="Shorted",t[t.Prefetched=3]="Prefetched"}(xr||(xr={}));class kr{calculateLineItemYoScore(t,i,e){return e?Math.random():this.mL(i)}calculateBidYoScore(t,i){return this.mL(i)}mL(t){const{cpm:i,priority:e}=t;return i+200*e}}class Tr{constructor(){this.vL=new Map}calculateLineItemYoScore(t){return this.gL(t)}calculateBidYoScore(t){return this.gL(t)}gL(t){const i=this.vL.get(t);if((0,n.$K)(i))return i;const e=Math.random();return this.vL.set(t,e),e}}class Cr{constructor(t){this.TP=t?new Tr:new kr}calculateLineItemYoScore(t,i,e){return this.TP.calculateLineItemYoScore(t,i,e)}calculateBidYoScore(t,i){return this.TP.calculateBidYoScore(t,i)}}var Er=function(t,i,e,s){var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let Mr=class{constructor(){this.yL=[]}get lineItems(){return[...this.yL]}add(t){this.yL.push(...t)}remove(t){this.yL.indexOf(t)<0||(0,b.sj)(this.yL,t)}getByAggregation(t){return this.lineItems.filter((i=>i.hasAggregator===t))}hasAggregatorType(t){return this.lineItems.some((i=>{const e=i.protoLineItem.creativeType;return e&&wn[e]===t}))}};Mr=Er([(0,or.b2)(),(0,or.Yn)(or.Fw.ContainerScoped)],Mr);class Lr{constructor(t,i,e,s){this.bL=t,this.IL=i,this.wL=e,this._L=s}static sortBySelectionScore(t){return[...t].sort(((t,i)=>Sn.getSelectionScore(i)-Sn.getSelectionScore(t)))}getRequestEvents(t){return this.IL.getEvents(t)}hasAggregatorType(t){return this.bL.hasAggregatorType(t)}getAll(){return this.bL.lineItems}getAllByAggregator(t){return this.bL.getByAggregation(t)}getAllByRequest(t){return t?this.IL.lineItems:(0,b.V7)(this.bL.lineItems,this.IL.lineItems)}getAllCallable(t){return this.bL.lineItems.filter((t=>!In.getInstance().hasLineItemById(t.protoLineItem.advertiserLineItemId,t.protoLineItem.publisherLineItemId))).filter((i=>this.SL(i,t))).filter((i=>_n.isLineItemTargetingAllowed(i,t))).filter((i=>this.PL(i,t)))}getBestCallable(t,i){const e=i.currentState||i.predictedState;if(!e)return;const s=this.AL(t);return s?{state:e,lineItemList:this.xL(s,t)}:void 0}PL(t,i){const{hasAggregator:e,protoLineItem:s}=t;if(e||s.forceCallingInEveryAO)return!0;const n=t.protoLineItem.floorPrice||t.protoLineItem.customCpm||0,r=t.yoScore,o=this.getAllByRequest(!0),h=this.wL.getBidsByStatus([Ni.IDLE,Ni.LOADING,Ni.LOADED]).filter((t=>this.kL(t,i))).map((t=>t.price)).some((t=>n<t)),a=o.map((t=>t.yoScore)).some((t=>r<t));return!h&&!a}SL(t,i){if(t.aggregators.size>0)return!1;const{advertiserLineItemId:e,forceCallingInEveryAO:s}=t.protoLineItem,n=this.wL.getBidsByLineItemId(e).filter((t=>t.status!==Ni.IMPRESSION));return!(!t.hasAggregator&&(n.length>0||t.callers.size>0)&&!s)&&this._L.callingValidationAggregator.canCall(t,i.adOpportunity.id)}AL(t){let i=t;return t.some((t=>t.hasAggregator))&&(i=i.filter((t=>t.hasAggregator))),[...i].sort(((t,i)=>i.yoScore-t.yoScore))[0]}xL(t,i){if(t.hasAggregator){const{creativeType:e}=t.protoLineItem;return[...i.filter((t=>e===t.protoLineItem.creativeType))].sort(((t,i)=>i.yoScore-t.yoScore))}return[t]}kL(t,i){return this._L.impressionCapsValidationService.canCall(t.settings.adManagerLineItem,i.adOpportunity.id)&&_n.isBidTargetingAllowed(t,i)}}class Br{constructor(t,i,e,s){this.TL=t,this.wL=i,this._L=e,this.vi=s,this.CL=(t,i)=>{const e=[],s=[];for(const n of t){this.kL(n,i)?e.push(n):s.push(n)}return{allowedBidList:e,notAllowedBidList:s}}}static sortBySelectionScore(t){return[...t].sort(((t,i)=>Sn.getSelectionScore(i)-Sn.getSelectionScore(t)))}static getBestBySelectionScore(t){return Br.sortBySelectionScore(t)[0]}getBidEvents(t){return this.wL.getEvents(t)}hasReachTheMaxNumberOfReadyBids(){const{maxNumberOfWins:t}=this.vi;if(-1===t)return!1;return this.wL.getBidsByStatus([Ni.LOADING,Ni.LOADED,Ni.STARTING,Ni.IMPRESSION]).length>=t}hasAdsEligibleForFill(t){const i=this.TL.callAdapterList.filter((i=>this.EL(i,t))),e=this.wL.getBidsByStatus([Ni.IDLE,Ni.LOADING,Ni.LOADED]).filter((i=>this.kL(i,t)));return(0,b.BZ)(e)||(0,b.BZ)(i)}getEligibleCallAdaptorsInAuctionSortedDescBySelectionScore(t){return this.TL.callAdapterList.filter((i=>this.LL(i,t))).sort(((t,i)=>Sn.getSelectionScore(i)-Sn.getSelectionScore(t)))}getEligibleBidsInAuctionSortedBySelectionScore(t){return this.wL.getBidsByStatus([Ni.IDLE,Ni.LOADING,Ni.LOADED]).filter((i=>this.kL(i,t))).sort(((t,i)=>Sn.getSelectionScore(i)-Sn.getSelectionScore(t)))}getBestAllowedBidPrice(t){return[...this.wL.getBidsByStatus([Ni.IDLE,Ni.LOADING,Ni.LOADED])].filter((i=>this.kL(i,t))).sort(((t,i)=>i.price-t.price)).map((t=>t.price))[0]||0}getWinnableBidPricesSortedDesc(){return this.wL.getBidsByStatus([Ni.LOADING,Ni.LOADED]).sort(((t,i)=>i.price-t.price)).map((t=>t.price))}getBestBidAllowedByStatus(t,i){const e=this.wL.getBidsByStatus(t);return this.BL(e,i)}getBestBidAllowed(t){const i=this.wL.getAllBids();return this.BL(i,t)}selectBestBid(t,i,e){let s=t;const n=mi.h.getSessionChildContainer(e).resolve(Ci.P);if(n.isImaTestCaseForSS()||n.isMarriageDotComDomain()||n.isDailykosDotComDomain()){this.wL.getBidsByStatus([Ni.IMPRESSION,Ni.LOADING,Ni.LOADED,Ni.STARTING]).find((t=>"ima"===t.adMediaType))&&(s=s.filter((t=>"ima"!==t.adMediaType)))}const r=this.CL(s,i),{allowedBidList:o,notAllowedBidList:h}=r,a=this.OL(o),c=h.map((t=>({bid:t,lossReason:this.RL(t,i)}))),d=o.filter((t=>t!==a)).map((t=>({bid:t,lossReason:m.ProtoAuctionLossReasonEnum.CompetitorPriority})));return{state:i,selectedBid:a,unselectedBidList:[...c,...d]}}selectBestBidForWin(t,i,e){const s=this.DL(i,e),n=this.VL(t,i,e);return this.jL(s,n)}DL(t,i){const e=this.wL.getBidsByStatus([Ni.IDLE]);return this.selectBestBid(e,t,i)}VL(t,i,e){const s=[...t,...this.wL.getBidsByStatus([Ni.LOADED])];return this.selectBestBid(s,i,e)}jL(t,i){const e=Object.assign({},t);return t.selectedBid&&i.selectedBid?(i.selectedBid.yoScore>t.selectedBid.yoScore&&(e.selectedBid=null,e.unselectedBidList.push({bid:t.selectedBid,lossReason:m.ProtoAuctionLossReasonEnum.CompetitorPriority})),e):e}OL(t){return(0,b.BZ)(t)?[...t].sort(((t,i)=>i.yoScore-t.yoScore))[0]:null}RL(t,i){const e=t.getAdDuration(),s=i.adBreakState.remainingAdDuration;return _n.isAllowedRegardingDuration(e,s)?m.ProtoAuctionLossReasonEnum.AdOpportunityEnd:m.ProtoAuctionLossReasonEnum.TargetingMismatch}LL(t,i){const e=[m.ProtoCreativeTypeEnum.ThirdParty,m.ProtoCreativeTypeEnum.External],s=t.settings.adManagerLineItem.protoLineItem.creativeType,n=e.includes(s),r=this.EL(t,i);return!n&&r}kL(t,i){return this._L.impressionCapsValidationService.canCall(t.settings.adManagerLineItem,i.adOpportunity.id)&&_n.isBidTargetingAllowed(t,i)}EL(t,i){return this._L.impressionCapsValidationService.canCall(t.settings.adManagerLineItem,i.adOpportunity.id)&&_n.isCallAdaptorTargetingAllowed(t,i)}BL(t,i){const e=t.filter((t=>this.kL(t,i)));return Br.getBestBySelectionScore(e)}}class Or{constructor(t,i,e,s,n){this.bL=t,this.IL=i,this.TL=e,this.wL=s,this._L=n,this.FL=new Lr(this.bL,this.IL,this.wL,{callingValidationAggregator:this._L.callingValidationAggregator,impressionCapsValidationService:this._L.impressionCapService}),this.NL=new Br(this.TL,this.wL,{impressionCapsValidationService:this._L.impressionCapService},{maxNumberOfWins:Y.MAX_WINS_DEFAULT})}getLineItemRequestEvents(t){return this.FL.getRequestEvents(t)}getBidEvents(t){return this.NL.getBidEvents(t)}hasAggregatorType(t){return this.FL.hasAggregatorType(t)}getAllLineItems(){return this.FL.getAll()}getLineItemsByAggregation(t){return this.FL.getAllByAggregator(t)}getLineItemsByRequest(t){return this.FL.getAllByRequest(t)}getAllCallableLineItems(t){return this.FL.getAllCallable(t)}getBestCallableLineItem(t,i){return this.FL.getBestCallable(t,i)}hasReachTheMaxNumberOfReadyBids(){return this.NL.hasReachTheMaxNumberOfReadyBids()}hasAdsEligibleForFill(t){return this.NL.hasAdsEligibleForFill(t)}getEligibleCallAdaptorsInAuctionSortedDescBySelectionScore(t){return this.NL.getEligibleCallAdaptorsInAuctionSortedDescBySelectionScore(t)}getEligibleBidsInAuctionSortedDescBySelectionScore(t){return this.NL.getEligibleBidsInAuctionSortedBySelectionScore(t)}getBestAllowedBidPrice(t){return this.NL.getBestAllowedBidPrice(t)}getWinnableBidPricesSortedDesc(){return this.NL.getWinnableBidPricesSortedDesc()}getBestBidAllowedByStatus(t,i){return this.NL.getBestBidAllowedByStatus(t,i)}getBestBidAllowed(t){return this.NL.getBestBidAllowed(t)}selectBestBid(t,i,e){return this.NL.selectBestBid(t,i,e)}selectBestBidForWin(t,i,e){return this.NL.selectBestBidForWin(t,i,e)}}class Rr{constructor(t,i,e){this.vi=t,this.tl=i,this.th=e,this.UL=!1,this.ob=new R.x,this.$L=new R.x,this.pC=new R.x,this.qL=new R.x,this.Pd=[],this.bu=t=>{In.getInstance().add(t,this.bL,this.jE)},this.Iu=t=>{this.$L.next(t)},this.HL=(t,i)=>{const e=this.bL.lineItems.find((i=>i.protoLineItem.advertiserLineItemId===t));e&&(e.protoLineItem.viewability=i)},this.dT=()=>{var t;null===(t=this.zL)||void 0===t||t.resizeAd(),this.WL()},this.zb=mi.h.getSessionChildContainer(this.vi.app.config.sessionId).resolve(Ci.P);const s=this.vi.adContainerMap.get(this.GL());this.QL=(0,r.LT)(s),this.th.startBidTracking.next(),this.JL(),this.XL(),this.YL(),this.ZL()}get onVpaidEvent(){return this.ob.asObservable()}get onImpressionRevenueEvent(){return this.$L.asObservable()}get onNoFill(){return this.qL.asObservable()}setAdVolume(t){var i;this.YM.partialStateUpdate({sound:t});const e={adManagerState:this.YM.getCurrentAdManagerState(!0),adMacroReplacer:this.SP};null===(i=this.zL)||void 0===i||i.setAdVolume(t,e),this.zb.adManagerSound=t}setAdViewMode(t){var i;this.YM.partialStateUpdate({vastViewMode:t}),null===(i=this.zL)||void 0===i||i.setVastViewMode(t)}getCurrentAdMetadata(){var t;return null===(t=this.zL)||void 0===t?void 0:t.getMetadata()}getCurrentAdMediaSize(){var t;return null===(t=this.zL)||void 0===t?void 0:t.getMediaSize()}pauseAd(t){var i;null===(i=this.zL)||void 0===i||i.pauseAd(t)}resumeAd(t){var i;null===(i=this.zL)||void 0===i||i.resumeAd(t)}skipAd(){var t;null===(t=this.zL)||void 0===t||t.skipAd()}stopAd(t){var i;null===(i=this.zL)||void 0===i||i.stopAd(t)}setPlayerOrientation(t){this.YM.partialStateUpdate({playerOrientation:t}),this.WL()}enableImpressions(t){this.YM.enableImpression(t),this.wM.forceTriggerUpdateState(),this.tB.allowResetOnTime=!0,this.iB(t),this.eB()}disableImpressions(t=!1){(this.YM.impressionsAllowed||t)&&(this.sB.stop(),this.nB.stop(),this.YM.disableImpression(),this.zL&&!this.zL.inImpression&&this.vi.app.config.isInApp&&this.zL.stopAd("inApp_disable"))}enablePredict(t,i){switch(this.YM.enablePredict(t,i),i){case pi.StartSessionPrefetch:this.tB.allowResetOnTime=!1;break;case pi.MidSessionPrefetch:this.tB.allowResetOnTime=!0}this.eB();const e=this.YM.getCallSettings();this.rB.startPrefetch(e)}isLoadingAds(){return!!this.zL||(0,b.BZ)(this.jE.getBidsByStatus([Ni.LOADING]))}getMainContainerState(){return this.wM.getMainContainerState()}getMainContainer(){return this.wM.getMainContainer()}setCustomMacros(t){this.nB.setMacros(t)}destroy(){var t;this.disableImpressions(),(0,H.i)(this.Pd),this.nB.destroy(),this.oB.destroy(),this.sB.destroy(),this.hB.destroy(),this.aB(),null===(t=this.zL)||void 0===t||t.stopAd("adManagerDestroy"),this.cB()}JL(){const t=mi.h.getGlobalContainer().resolve(ie.f);this.hB=new Ln(t),this.dB=new Tn,this.tB=new En,this.lB=new Mn,this.uB=(new nr).registerCallingValidators([this.tB,this.dB,this.lB]),this.AP=new bi,this.SP=new Wn(this.vi.app.services.MacrosService,this.vi.app.services.UserManagerService)}XL(){this.TP=new Cr(this.vi.app.config.explorationMode);const t=this.vi.lineItemList.map((t=>new Zn(t,this.TP)));this.bL=new Mr,this.bL.add(t),this.IL=new ar,this.pB=new Ar,this.jE=new lr,this.wM=new Bn(this.GL(),this.vi.adContainerMap,this.vi.app.services.ResizeObserver,this.vi.app.services.ViewabilityService),this.kP=new er({globalDomUtilsService:this.vi.app.services.GlobalDomUtilsService,recycleAdSlots:!0,sessionId:this.vi.app.config.sessionId}),this.YM=new pr(this.wM),this.nL=new Or(this.bL,this.IL,this.pB,this.jE,{callingValidationAggregator:this.uB,impressionCapService:this.dB});const i=mi.h.getGlobalContainer().resolve(ie.f);this.rB=new Yn(i,{sessionId:this.vi.app.config.sessionId,adSelector:this.nL,adBidPool:this.jE});const e=mi.h.getSessionChildContainer(this.vi.app.config.sessionId).resolve(vi.k),s=new sr(this.jE,e);this.nB=new Pn({yoScoreCalculator:this.TP,playerData:this.vi.playerData,generalRepository:this.vi.generalRepository,auctionInfoLogging:s,adSelector:this.nL,adContainerMap:this.vi.adContainerMap,amazonSlotId:this.vi.amazonTamSlotId,app:this.vi.app,appSettings:this.vi.appSettings,schainSettings:this.vi.pbjsSchainSettings,skipAdSettings:this.vi.skipPlayerSettings,sessionId:this.vi.app.config.sessionId,adMacroReplacer:this.SP,lineItemServices:{lineItemServicesTimer:this.hB,requestCapsService:this.tB},adRequestGatekeeper:this.AP,adEnforcer:new Nn(this.vi.app.config.isMobile,this.QL,this.vi.disableScrollHijackEnforcement),pauseAdWhenFinished:this.vi.pauseAdWhenFinished,loopAdWhenFinished:this.vi.loopAdWhenFinished,os:this.vi.app.config.os.os,adSlotContainerRecycler:this.kP,callingValidationAggregator:this.uB,auctionManager:this.rB,lineItemAbTestInformation:this.vi.lineItemAbTestInformation},e),this.oB=new Gn({desiredBitRateForWins:Y.DEFAULT_DESIRED_BITRATE,maxNumberOfWins:Y.MAX_WINS_DEFAULT,playerId:this.vi.app.config.playerId,sessionId:this.vi.app.config.sessionId,auctionManager:this.rB,auctionInfoLogging:s,adBidPool:this.jE,adSelector:this.nL,impressionCapsService:this.dB,impressionCapsTimer:this.hB,adMacroReplacer:this.SP},e),this.sB=new Hn({adContainer:this.wM,adSelector:this.nL,auctionInfoLogging:s,internalAuctionSnapshot:new Sr(this.nL),impressionCapsService:this.dB,impressionCapsTimer:this.hB,requestCapsService:this.tB,removeBidIfHigherYoScore:Y.REMOVE_BIDS_DEFAULT,adRequestGatekeeper:this.AP,pauseAdWhenFinished:this.vi.pauseAdWhenFinished,loopAdWhenFinished:this.vi.loopAdWhenFinished,adMacroReplacer:this.SP,explorationMode:this.vi.app.config.explorationMode,playerId:this.vi.app.config.playerId,skipAdSettings:this.vi.skipPlayerSettings,fullSessionLog:this.vi.generalRepository.canTrackAllRequests,deviceType:this.vi.app.config.deviceType},e)}YL(){this.Pd.push(this.tl.onLineItemPlatformCapped.subscribe((t=>{this.bu(t)})),this.tl.onImpressionRevenue.subscribe((t=>{this.Iu(t)})),this.tl.onLineItemViewabilityChange.subscribe((([t,i])=>{this.HL(t,i)})))}ZL(){this.Pd.push(this.nB.onLineItemsRequestStart.subscribe((t=>{this.IL.add(t)})),this.nB.onLineItemsRequestEnd.subscribe((t=>{this.IL.remove(t)})),this.nB.onCallAdapterStart.subscribe((t=>{this.pB.add(t)})),this.nB.onCallAdapterEnd.subscribe((t=>{this.pB.remove(t)})),this.nB.onBid.subscribe((t=>{this.jE.addBid(t)})),this.rB.onAuctionEnd.subscribe((t=>{this.cE(t)})),this.rB.onAuctionStopCalling.subscribe((()=>{this.fB()})),this.wM.onContainerStateUpdate.subscribe((()=>{this.dT()})),this.sB.onAdSelected.subscribe((t=>{this.dC(t)})),this.sB.onAdFinished.subscribe((t=>{this.lC()})),this.sB.onMissedImpression.subscribe((t=>{this.pC.next(t)})))}get onMissedImpression(){return this.pC.asObservable()}cE(t){this.YM.auctionEnd(this.mB(t)),this.vB()}mB(t){switch(t){case Jn.Prefetch:return xr.Prefetched;case Jn.ShortCircuitEnd:return xr.Shorted;case Jn.TimeoutEnd:return this.gB()?xr.TimeoutWithReadyBid:xr.TimeoutWithoutReadyBid;default:return}}gB(){const t=this.jE.getBidsByStatus([Ni.LOADED]);return!!(0,b.BZ)(t)}hasAdsEligibleForFill(t){const i=this.YM.getAdManagerState(t,this.wM.getContainerStateMap());return this.nL.hasAdsEligibleForFill(i)}fB(){this.YM.predictMode&&this.nB.stop(),this.YM.auctionStopCalling()}dC(t){const{currentAdPlayerState:i,predictedAdPlayerState:e}=this.YM,s=(i||e).vastViewMode,n=this.YM.getCurrentAdManagerState().adBreakState.maxAdDuration,r=this.YM.getCurrentAdManagerState()||this.YM.getPredictedAdManagerState();this.zL=new yr(t,this.wM,this.th,r,{adViewMode:s,maxAdDuration:n,skipAdSettings:this.vi.skipPlayerSettings,loopAdWhenFinished:this.vi.loopAdWhenFinished,pauseAdWhenFinished:this.vi.pauseAdWhenFinished}),this.yB(),this.zL.setAdVolume(this.YM.currentAdPlayerState.sound),this.bB(t)}bB(t){var i;this.ob.next({type:X.fI.AdLoaded,payload:null===(i=t.settings.adLoadedPayload)||void 0===i?void 0:i.payload})}lC(){this.cB()}WL(){this.YM.adFetchingAllowed&&this.eB(),this.YM.impressionsAllowed&&this.vB()}eB(){this.UL||(this.UL=!0,this.vi.app.services.UserManagerService.ccpaInfoLogging(this.vi.app.config.playerId));const t=this.YM.getCallSettings();this.nB.call(t);const i=this.YM.getWinSettings();this.oB.win(i)}vB(){(this.YM.currentAdPlayerState||this.YM.predictedAdPlayerState)&&this.YM.currentAdPlayerState&&this.sB.start(this.YM.getCurrentAdManagerState())}yB(){this.IB=this.zL.onVpaidEvent.subscribe((t=>{var i;if(t.type===X.fI.AdImpression)try{const t=(null===(i=this.YM.getCurrentAdManagerState())||void 0===i?void 0:i.soundValue)||0;this.zL.setAdVolume(t)}catch(t){(0,o.n)({level:o.D.WARN,message:"AdManager_current_sound",exception:t.message,callStack:t.stack})}this.ob.next(t)}))}cB(){var t;null===(t=this.zL)||void 0===t||t.destroy(),this.zL=null,this.aB()}aB(){var t;null===(t=this.IB)||void 0===t||t.unsubscribe(),this.IB=null}iB(t){const i=[this.dB,this.tB];t.newContent&&i.forEach((t=>{t.resetCapsBasedOnExternalEvent(m.ProtoResetCapTypeEnum.ContentCapping)}))}}class Dr extends Rr{constructor(t,i,e){super(t,i,e),this.cE=t=>{this._B()||this.qL.next(),super.cE(t)};const s=this.wM.getMainContainer();this.kP.preloadImaSdkSlots(s),this.nL.getBidEvents(fi.ON_BID_LOADED_CONSUMED).subscribe((()=>{this._B()||this.qL.next()}))}enableImpressions(t){super.enableImpressions(t);const i=this.YM.getCallSettings();this.rB.startAuction(i,t.linearAdOpportunity.id)}disableImpressions(t=!1){(this.YM.impressionsAllowed||t)&&(this.rB.cancelAuction(),super.disableImpressions(t))}eB(){const t=this.YM.getCallSettings();this.rB.updateState(t),super.eB()}GL(){return m.ProtoAdType.Video}_B(){const t=this.YM.getCurrentAdManagerState()||this.YM.getPredictedAdManagerState(),i=this.nL.getBestBidAllowed(t);return(0,n.$K)(i)}}class Vr extends Rr{GL(){return m.ProtoAdType.Nonlinear}enableImpressions(t){super.enableImpressions(t),this.cE()}}const jr={[m.ProtoAdSlotsEnum.PreRoll]:m.ProtoAdBreakTypeEnum.PreRoll,[m.ProtoAdSlotsEnum.MidRoll]:m.ProtoAdBreakTypeEnum.MidRoll,[m.ProtoAdSlotsEnum.PostRoll]:m.ProtoAdBreakTypeEnum.PostRoll};var Fr,Nr;!function(t){t.remainTimeForAdPod=(t,i)=>!(i<=0)&&!(Math.round(i/J.s_)>t.remainingAdDuration)}(Fr||(Fr={})),function(t){t.adLoadedPayload=t=>({payload:{adType:t.payload.adType,adSkipMode:t.payload.adSkipMode,adLoadedData:{skipOffset:t.payload.adLoadedData.skipOffset}}}),t.impressionPayload=(t,i)=>{const{adId:e,adVideoUrl:s,creativeId:n,name:r,length:o,imaMetadata:h,moatTrackingEnabled:a}=t.payload.adSourceData,{adType:c,adSkipMode:d,clickThroughUrl:l,customAdData:u,adSourceData:p}=t.payload;return{payload:{adType:c,adSkipMode:d,adSourceData:{moatTrackingEnabled:a,adId:e,length:o,imaMetadata:h,adVideoUrl:s,creativeId:n,name:r},clickThroughUrl:l,customAdData:{ADVERTISER:null==u?void 0:u.ADVERTISER,CAMPAIGN_ID:null==u?void 0:u.CAMPAIGN_ID,CREATIVE_ID:u.CREATIVE_ID},adDuration:p.length,selectedAdSlot:i}}},t.defaultPayload=t=>({payload:{adType:t.payload.adType}})}(Nr||(Nr={}));class Ur{constructor(t,i){this.SB=t,this.PB=i,this.AB=new R.x,this.Pd=[],this.xB=!1;const e=mi.h.getGlobalContainer().resolve(ie.f);this.M_=new Oe.B(e),this.kB(),this.WS(),this.TB()}get onAdLifeEnding(){return this.AB.asObservable()}isDurationExpired(){return this.xB}destroy(){this.M_.disable(),this.Pd.forEach((t=>t.unsubscribe()))}kB(){this.Pd.push(this.M_.onTimeElapsed.subscribe((()=>{this.M_.stop(),this.xB=!0,this.AB.next()})))}WS(){this.Pd.push(this.SB.subscribe((t=>{switch(t.type){case X.fI.AdImpression:this.CB(t.payload.adSourceData.length);break;case X.fI.AdPlaying:this.TB();break;case X.fI.AdPaused:this.Vo();break;case X.fI.AdStopped:case X.fI.AdSkipped:case X.fI.AdError:this.EB();break;case X.fI.AdVideoFirstQuartile:this.MB()}})))}Vo(){this.M_.stop()}TB(){this.M_.start()}CB(t){if(this.LB=Date.now(),t){this.OM=t*J.s_;const i=this.OM-this.PB;this.BB(i),this.M_.start()}}EB(){this.M_.stop(),this.xB=!1}MB(){if(this.OM)return;const t=Date.now()-this.LB;this.OM=4*t;const i=this.OM-t-this.PB;this.BB(i)}BB(t){const i=t<0?0:t;this.M_.reset(i)}}class $r{constructor(t,i){this.iS=t,this.OB=new R.x,this.RB=pi.NoPrefetch,this.DB=i===m.ProtoAdPlaybackMode.ScrollToPlay}get prefetchType(){return this.RB}get startSessionPrefetch(){return this.DB}set startSessionPrefetch(t){this.DB=t}get onMidSessionPrefetchReady(){return this.OB.asObservable()}enablePrefetch(t,i,e){this.DB=!1,this.RB=t,null==e||e.enablePredict(i,t)}disablePrefetch(){this.RB=pi.NoPrefetch}tryPreparingMidSessionPrefetch(t,i){if(!this.jB(t))return;const e=null==t?void 0:t.disableReason;e===ui.TimeoutBetweenAds&&this.OB.next(pi.MidSessionPrefetch),e===ui.InImpression&&this.FB(t,i)&&this.OB.next(pi.MidSessionPrefetch)}jB(t){return this.RB===pi.NoPrefetch&&null!==t}FB(t,i){return i&&t.adBreakLength<=Y.MID_SESSION_PREFETCH_MINIMUM_TIME&&!this.iS}}class qr{constructor(t,i){this.vi={[xt.LINEAR]:{enable:!1,disablePayload:null,usePrefetch:!0},[xt.NONLINEAR]:{enable:!1,disablePayload:null,usePrefetch:!1}},this.OB=new R.x,this.Pd=[],this.NB(t,i)}get onMidSessionPrefetchReady(){return this.OB.asObservable()}getAllLinearityKeys(){return Object.keys(this.vi)}enable(t){this.vi[t].enable=!0,this.vi[t].disablePayload=null}disable(t,i){this.vi[t].enable=!1,this.vi[t].disablePayload=i}getDisablePayload(t){return this.vi[t].disablePayload}setAdManager(t,i){this.vi[t].adManager=i,this.vi[t].usePrefetch&&(this.vi[t].adLifecycleObserver=new Ur(i.onVpaidEvent,Y.MID_SESSION_PREFETCH_MINIMUM_TIME),this.Pd.push(this.vi[t].adLifecycleObserver.onAdLifeEnding.subscribe((()=>{const i=this.getDisablePayload(t),e=this.vi[t].adLifecycleObserver.isDurationExpired();this.vi[t].adPrefetch.tryPreparingMidSessionPrefetch(i,e)}))))}isAdManagerEnable(t){return this.vi[t].enable}getAllAdManagers(){return this.getAllLinearityKeys().map((t=>this.vi[t].adManager))}getAllAvailableAdManagers(){return this.getAllAdManagers().filter((t=>(0,n.$K)(t)))}getAdManagerByLinearity(t){return this.vi[t].adManager}usePrefetch(t){return this.vi[t].usePrefetch}enablePrefetch(t,i,e,s){this.usePrefetch(t)&&this.vi[t].adPrefetch.enablePrefetch(i,e,s)}startSessionPrefetch(t,i){this.vi[t].adPrefetch.startSessionPrefetch=i}disablePrefetch(t){this.usePrefetch(t)&&this.vi[t].adPrefetch.disablePrefetch()}getPrefetchType(t){if(this.usePrefetch(t))return this.vi[t].adPrefetch.prefetchType}hasStartSessionPrefetch(t){return!!this.usePrefetch(t)&&this.vi[t].adPrefetch.startSessionPrefetch}tryPreparingMidSessionPrefetch(t,i){var e;if(!this.usePrefetch(t))return;const s=(null===(e=this.vi[t].adLifecycleObserver)||void 0===e?void 0:e.isDurationExpired())||!1;this.vi[t].adPrefetch.tryPreparingMidSessionPrefetch(i,s)}destroy(){(0,H.i)(this.Pd),this.getAllAvailableAdManagers().forEach((t=>t.destroy()))}NB(t,i){this.getAllLinearityKeys().forEach((e=>{this.vi[e].usePrefetch&&(this.vi[e].adPrefetch=new $r(t,i),this.UB(e))}))}UB(t){const i=this.vi[t].adPrefetch;this.Pd.push(i.onMidSessionPrefetchReady.subscribe((i=>{this.OB.next({prefetchType:i,linearity:xt[t]})})))}}var Hr=h(6286);class zr{constructor(t,i,e){this.Cs=t,this.$B=i,this.qB=e,this.Pd=[],this.HB=new R.x,this.zB=new R.x,this.WB=new R.x,this.GB=new R.x,this.QB=new R.x,this.JB=new R.x,this.XB=new R.x,this.YB=new R.x,this.pC=new R.x,this.PP=new Map,this.KB=!0,this.ZB=!0,this.tO={[xt.LINEAR]:(t,i)=>{const e=new Dr(t,t.trackingResponseService,i);this.vi.setAdManager(xt.LINEAR,e)},[xt.NONLINEAR]:(t,i)=>{const e=new Vr(t,t.trackingResponseService,i);this.vi.setAdManager(xt.NONLINEAR,e)}},this.iO={mediaMetadata:{},clickToPlay:!1,linearAdOpportunity:new hi,newContent:!1,sound:0,vastViewMode:X.zc.Normal,adBreakState:this.qB.getAdBreakState(),playerOrientation:this.$B,inFloating:this.Cs.playerData.inFloating},this.vi=new qr(this.Cs.loopAdWhenFinished,this.Cs.adPlaybackMode),this.KB=this.Cs.canPrefetch}get onMissedImpression(){return this.pC.asObservable()}get onLinearNoFill(){return this.YB.asObservable()}get onAdsEnable(){return this.HB.asObservable()}get onLinearVpaidEvent(){return this.zB.asObservable()}get onNonlinearVpaidEvent(){return this.WB.asObservable()}get onLinearImpressionRevenue(){return this.GB.asObservable()}get onNonlinearImpressionRevenue(){return this.QB.asObservable()}get onLinearImpressionPrice(){return this.JB.asObservable()}get onNonlinearImpressionPrice(){return this.XB.asObservable()}hasAdsEligibleForFill(){return this.vi.getAdManagerByLinearity(xt.LINEAR).hasAdsEligibleForFill(this.iO)}getCurrentAdBreakType(){return this.iO.adBreakState.adBreakType}canPrefetchAds(t){const i=this.vi.getAdManagerByLinearity(t);this.eO(t,pi.StartSessionPrefetch,i)}initAd(t,i,e,s,n,r,o){this.sO(r),this.nO(o),this.vi.getAllLinearityKeys().forEach((t=>{this.rO(xt[t],{sound:n})}))}getNewLinearAdOpportunity(){return this.vi.getPrefetchType(xt.LINEAR)===pi.NoPrefetch?new hi:this.iO.linearAdOpportunity}getAdContainerSize(t){const i=this.PP.get(t);return{height:(null==i?void 0:i.clientHeight)||0,width:(null==i?void 0:i.clientWidth)||0}}getMainAdContainerWidth(t){var i;return null===(i=this.vi.getAdManagerByLinearity(t))||void 0===i?void 0:i.getMainContainerState().width}getCurrentAdMetadata(t){var i;return null===(i=this.vi.getAdManagerByLinearity(t))||void 0===i?void 0:i.getCurrentAdMetadata()}getCurrentAdMediaSize(t){var i;return null===(i=this.vi.getAdManagerByLinearity(t))||void 0===i?void 0:i.getCurrentAdMediaSize()}isAdInWin(t){const i=this.vi.getAdManagerByLinearity(t);return(null==i?void 0:i.isLoadingAds())||!1}enableAds(t){this.vi.enable(t),this.rO(t),this.HB.next(t)}disableAds(t,i){this.vi.disable(t,i);const e=this.vi.getAdManagerByLinearity(t);if(!e)return;const s=(null==i?void 0:i.disableReason)===ui.ForceDisable;e.disableImpressions(s),(null==i?void 0:i.disableReason)!==ui.ForceDisable&&this.vi.usePrefetch(t)&&this.vi.tryPreparingMidSessionPrefetch(t,i)}disableAdvertising(){this.ZB=!1}enableAdvertising(){this.ZB=!0,this.vi.getAllLinearityKeys().forEach((t=>{const i=xt[t];this.enablePrefetchForLinearity(i)}))}setAdVolume(t,i){var e;null===(e=this.vi.getAdManagerByLinearity(t))||void 0===e||e.setAdVolume(i),this.rO(t,{sound:i})}pauseAd(t,i){var e;null===(e=this.vi.getAdManagerByLinearity(t))||void 0===e||e.pauseAd(i)}resumeAd(t,i){var e;null===(e=this.vi.getAdManagerByLinearity(t))||void 0===e||e.resumeAd(i)}skipAd(t){var i;null===(i=this.vi.getAdManagerByLinearity(t))||void 0===i||i.skipAd()}stopAd(t,i){var e;null===(e=this.vi.getAdManagerByLinearity(t))||void 0===e||e.stopAd(i)}onAdStateChange(t,i,e){const s=jr[i];this.oO(t,e,s),s===m.ProtoAdBreakTypeEnum.PreRoll&&(this.KB=!0)}onContentChange(){this.vi.getAllLinearityKeys().forEach((t=>{this.rO(xt[t],{newContent:!0})}))}setMediaRestrictions(t){const i=Object.assign(this.iO.mediaMetadata,t);this.vi.getAllLinearityKeys().forEach((t=>{const e=xt[t];this.rO(e,{mediaMetadata:i}),this.enablePrefetchForLinearity(e)}))}userInteraction(t){this.vi.getAllLinearityKeys().forEach((t=>{this.rO(xt[t],{clickToPlay:!0})}))}setPlayerOrientation(t){this.iO.playerOrientation=t,this.vi.getAllAvailableAdManagers().forEach((i=>i.setPlayerOrientation(t)))}setVastViewMode(t){this.hO({vastViewMode:t})}newLinearAdOpportunity(t){const i=xt.LINEAR;this.vi.usePrefetch(i)&&(this.iO.linearAdOpportunity=t,this.iO.linearAdOpportunity.timestamp=Date.now(),this.rO(i,{linearAdOpportunity:this.iO.linearAdOpportunity}),this.vi.disablePrefetch(i))}updateLinearPodRemainingTime(t){const i=this.iO.adBreakState;Fr.remainTimeForAdPod(i,t)&&this.oO(xt.LINEAR,t,i.adBreakType)}inFloatingChanged(t){this.iO.inFloating=t}setCustomMacros(t){this.vi.getAllAvailableAdManagers().forEach((i=>i.setCustomMacros(t)))}destroy(){try{(0,H.i)(this.Pd),this.vi.destroy()}catch(t){(0,o.n)({message:"AdManagerBridge_destroy",level:o.D.WARN,exception:t.message,callStack:t.stack})}}sO(t){t.forEach((t=>{this.PP.set(t.type,t.container)}))}oO(t,i,e){this.rO(t,{adBreakState:this.qB.getAdBreakState({adSlotDuration:i,adBreakType:e})})}rO(t,i){this.hO(i);const e=this.vi.getAdManagerByLinearity(t);if(e&&this.vi.isAdManagerEnable(t)){if(this.vi.usePrefetch(t)){const i=!1;this.vi.startSessionPrefetch(t,i)}e.enableImpressions(this.iO),this.aO()}}hO(t){Object.assign(this.iO,t),this.iO.adBreakState=this.qB.getAdBreakState({adSlotDuration:this.iO.adBreakState.remainingAdDuration,adBreakType:this.iO.adBreakState.adBreakType})}aO(){this.hO({clickToPlay:!1,newContent:!1})}enablePrefetchForLinearity(t){if(this.vi.usePrefetch(t)&&this.vi.hasStartSessionPrefetch(t)){const i=this.vi.getAdManagerByLinearity(t);this.eO(t,pi.StartSessionPrefetch,i)}}eO(t,i,e){this.KB&&this.ZB&&(this.iO.linearAdOpportunity=new hi,this.vi.enablePrefetch(t,i,this.iO,e))}nO(t){const i=Tt(this.Cs.adSourceSettings.lineItems,xt.NONLINEAR),e=Tt(this.Cs.adSourceSettings.lineItems,xt.LINEAR);(0,b.BZ)(i)&&this.cO(xt.NONLINEAR,i,t),(0,b.BZ)(e)&&this.cO(xt.LINEAR,e,t),this.lO(),this.uO(),this.pO()}pO(){const t=this.vi.getAdManagerByLinearity(xt.LINEAR);this.Pd.push(null==t?void 0:t.onMissedImpression.subscribe((t=>{this.pC.next(t)})))}cO(t,i,e){const s=mi.h.getSessionChildContainer(e.config.sessionId).resolve(Hr.j),n=mi.h.getSessionChildContainer(e.config.sessionId).resolve(vi.k),r={playerData:this.Cs.playerData,generalRepository:this.Cs.generalRepository,trackingResponseService:s,lineItemList:i,adBreakHelper:this.qB,adContainerMap:this.PP,amazonTamSlotId:this.Cs.amazonTamSlotId,pbjsSchainSettings:this.Cs.prebidJsSupplyChain,skipPlayerSettings:this.Cs.skipPlayerSettings,disableScrollHijackEnforcement:!this.Cs.adSourceSettings.disableScrollHijackEnforcement,pauseAdWhenFinished:this.Cs.pauseAdWhenFinished,loopAdWhenFinished:this.Cs.loopAdWhenFinished,app:e,lineItemAbTestInformation:this.Cs.lineItemAbTestInformation,appSettings:this.Cs.appSettings};(0,this.tO[t])(r,n),this.Pd.push(this.vi.onMidSessionPrefetchReady.subscribe((i=>{const{linearity:e,prefetchType:s}=i,n=this.vi.getAdManagerByLinearity(e);this.eO(t,s,n)})))}lO(){const t={[xt.LINEAR]:this.zB,[xt.NONLINEAR]:this.WB};Object.keys(t).forEach((i=>{const e=xt[i];this.fO(e,t[e])}))}fO(t,i){const e=this.vi.getAdManagerByLinearity(t);e&&this.Pd.push(e.onVpaidEvent.subscribe((e=>{var s,n;switch(e.type){case X.fI.AdLoaded:i.next({type:X.fI.AdLoaded,payload:Nr.adLoadedPayload(e)});break;case X.fI.AdImpression:{const r=null===(n=null===(s=this.vi.getAdManagerByLinearity(t))||void 0===s?void 0:s.getCurrentAdMetadata())||void 0===n?void 0:n.adType,o=this.PP.get(r);i.next({type:X.fI.AdImpression,payload:Nr.impressionPayload(e,o)});break}case X.fI.AdVideoStart:case X.fI.AdError:i.next(e);break;default:i.next({type:e.type,payload:Nr.defaultPayload(e)})}})))}uO(){const t=this.vi.getAdManagerByLinearity(xt.LINEAR),i=this.vi.getAdManagerByLinearity(xt.NONLINEAR);t&&this.Pd.push(t.onImpressionRevenueEvent.subscribe((t=>{this.GB.next(t),this.JB.next(t.impressionRevenue)})),t.onNoFill.subscribe((()=>{this.YB.next()}))),i&&this.Pd.push(i.onImpressionRevenueEvent.subscribe((t=>{this.QB.next(t),this.XB.next(t.impressionRevenue)})))}}var Wr=h(2300),Gr=h(2246);class Qr extends Gr._{constructor(){super(...arguments),this.mO=100}vO(){if(this.elapsedTimeoutId||!this.yo.duration)return;const t=Date.now();this.elapsedTimeoutId=setTimeout((()=>{this.yo.elapsedTime+=(Date.now()-t)/1e3;const i=this.yo.getComponent(Wr.r.ProgressBar);i&&i.setProgress((0,Bt.dQ)(0,this.yo.duration,0,100,this.yo.elapsedTime)),this.elapsedTimeoutId=null,this.vO()}),this.mO)}initState(){super.initState(),this.yo.duration&&this.vO()}exitState(){super.exitState(),this.yo.duration&&(clearTimeout(this.elapsedTimeoutId),this.elapsedTimeoutId=null)}}var Jr=h(4291);class Xr extends Jr.d{initState(){super.initState()}exitState(){super.exitState()}}var Yr=h(6664),Kr=h(1277),Zr=h(244),to=h(9391),io=h(7263),eo=h(4670);class so extends io.P{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.gO=this.Sn.getElementsByClassName(I.mr.BackgroundImg)[0],this.yO=this.Sn.getElementsByClassName(I.mr.Icon)[0],this.yO.innerHTML=eo,this.bO=this.Sn.getElementsByClassName(I.mr.ButtonContainer)[0];const t=this.Sn.getElementsByClassName(I.mr.Button)[0];this.IO=this.In.createElementByString(`<a class="${I.mr.Wrapper}" href="#">`),this.IO.target=O.bS.Blank,this.IO.appendChild(t),this.bO.innerHTML="",this.bO.appendChild(this.IO),this.wO=this.Sn.getElementsByClassName(I.mr.InfoContainer)[0],this._O=this.Sn.getElementsByClassName(I.mr.FallbackContainer)[0],this.SO=this.Sn.getElementsByClassName(I.mr.SlotCountText)[0]}setBackgroundImg(t){(0,n.QM)(t)?((0,r.IV)(this.gO,I.Gj.DisplayNone),this.gO.src=t):(0,r.cn)(this.gO,I.Gj.DisplayNone)}setClickUrl(t){if(!(0,n.QM)(t))return(0,r.Ho)(this._O),void(0,r.MV)(this.wO);(0,r.Ho)(this.wO),(0,r.MV)(this._O),this.IO.href=t}setFallbackText(t,i){const e=t||1,s=i||1;this.SO.innerHTML=`Loading ad ${e}/${s}`}}var no=h(9040);class ro extends no.h{constructor(){super(...arguments),this.eventList=[F.C[F.C.SkipAd],...this.eventList],this.PO=-1,this.AO=-1}initComponent(){super.initComponent(),this.hideComponent(),this.xO=this.Sn.getElementsByTagName("cnx-span")[0],this.xO.innerHTML="Ad",this.kO=this.Sn.querySelectorAll(`.${I.Hs.Timer} svg`)[0],this.Sn.setAttribute("aria-label","Skip Ad")}setSecondsUntilSkip(t){this.PO=Math.ceil(t),this.AO=-1,this.PO>0&&(0,r.T7)(this.kO,{"animation-duration":this.PO+"s"})}tickDown(t){const i=this.PO-Math.floor(t);if(i<0||0===this.AO)return;const e=(0,r.pv)(this.Sn,I.Hs.InTimer);this.AO=i,0===this.AO?(e&&(0,r.IV)(this.Sn,I.Hs.InTimer),this.xO.innerHTML="Ad"):(e||(0,r.cn)(this.Sn,I.Hs.InTimer),this.xO.innerHTML=`in ${this.AO}s`)}get tooltip(){}onClickHandler(){0===this.AO&&this.mediator.publish(this,F.C[F.C.SkipAd])}}class oo extends Zr.A{constructor(){super(...arguments),this.TO={[Wr.r.VolumeControls]:t=>new Kr.N(t,this.In,to.Z,this),[Wr.r.AdLoadingScreen]:t=>new so(t,this.In,this.wn,'<cnx class="cnx-pod-loading-screen-container"><img alt="Loading Pods" class="cnx-pod-loading-background"><cnx class="cnx-pod-loading-info"><cnx class="cnx-pod-open-new-icon"></cnx><cnx class="cnx-pod-visit-website-text"><cnx-span>Visit Advertiser website</cnx-span></cnx><cnx class="cnx-pod-read-more-container"><cnx-span class="cnx-pod-read-more-btn">GO TO PAGE</cnx-span></cnx></cnx><cnx class="cnx-pod-loading-fallback"><cnx class="cnx-pod-loading-spinner"></cnx><cnx-span class="cnx-pod-slot-count-text"></cnx-span></cnx></cnx>'),[Wr.r.SkipAdButton]:t=>new ro(t,this.In,this.wn,'<cnx class="cnx-ad-skip-button cnx-ui-btn" role="button" tabindex="0"><cnx class="cnx-icon-button"><cnx class="cnx-skip-ad-text">Skip&nbsp;<cnx-span></cnx-span></cnx><cnx class="cnx-skip-ad-icon"><svg markup-inline viewBox="0 0 24 24" class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 21h3V3h-3v18zM3 21l14-9L3 3v18z" fill-rule="evenodd"/></svg></cnx></cnx><cnx class="cnx-timer-loader"><svg markup-inline xmlns="http://www.w3.org/2000/svg" width="36" height="36"><circle class="cnx-svg-circle-stroke" cx="18" cy="18" r="17"/></svg></cnx></cnx>',this.vi.isMobile)},this.CO=t=>i=>{var e,s;return null===(s=(e=this.TO)[t])||void 0===s?void 0:s.call(e,i)}}createComponent(t,i){return this.CO(t)(i)||super.createComponent(t,i)}}var ho=h(565),ao=h(1e3);class co extends Yr.q{constructor(t,i,e,s,n,o={}){super(s,t,n,new oo(t,e,s,o)),this.Pm=i,this.$container=s,this.settings=o,this.EO=new R.x,this.Xr={[k.Ez.PlayingState]:new Qr(this),[k.Ez.PausedState]:new Xr(this)},this.MO=0,this.Tn=null,this.LO=t=>{(0,r.og)(this.$uiContainer,I.s6.UiInView,t)},this.oo.setDistanceValues({top:4,bottom:4}),this.Xr[k.Ez.PausedState].enterState(),this.BO=this.$container.querySelector(`.${ho.Z.CardImage}`),this.OO=this.$container.querySelector(`.${ho.Z.CardTitle}`),this.RO=this.$container.querySelector(`.${ho.Z.AdMarkerTitleText}`),this.DO=this.$container.querySelector(`.${ho.Z.AdUiContent}`),this.Qs=mi.h.getGlobalContainer().resolve(ie.f)}get onUiEvent(){return this.EO.asObservable()}zr(t,i,e){var s,n,r;switch(super.zr(t,i,e),t){case F.C[F.C.Volume]:{const t=i.payload;this.EO.next({type:F.C.Volume,payload:{volume:t}});break}case F.C[F.C.Seek]:{const t=i.payload;this.EO.next({type:F.C.Seek,payload:{seek:t}});break}case F.C[F.C.Quality]:{const t=i.payload;this.EO.next({type:F.C.Quality,payload:{quality:t}});break}case F.C[F.C.HoverStart]:{const t=null===(s=null==i?void 0:i.payload)||void 0===s?void 0:s.targetComponent;this.EO.next({type:F.C.HoverStart,payload:t?{targetComponent:t}:void 0});break}case F.C[F.C.FocusStart]:this.VO();break;case F.C[F.C.HoverEnd]:{const t=null===(n=null==i?void 0:i.payload)||void 0===n?void 0:n.targetComponent;this.EO.next({type:F.C.HoverEnd,payload:t?{targetComponent:t}:void 0});break}case F.C[F.C.StateChanged]:{const t=null===(r=null==i?void 0:i.payload)||void 0===r?void 0:r.targetComponent;this.EO.next({type:F.C.StateChanged,payload:t?{targetComponent:t}:void 0});break}case F.C[F.C.RebindComponent]:{const t=i.payload;this.EO.next({type:F.C.RebindComponent,payload:{uiComponentEnum:t}});break}case Wr.r[Wr.r.CloseButton]:this.EO.next({type:F.C.Close});break;default:this.EO.next({type:F.C[t]})}}VO(){this.Qs.clearTimeout(this.jO),(0,r.cn)(this.$container,I.s6.PlayerFocused),this.jO=this.Qs.setTimeout((()=>{(0,r.IV)(this.$container,I.s6.PlayerFocused),this.oo.removeActiveTooltip()}),3e3)}updateDuration(t){const i=this.getComponent(Wr.r.ProgressBar),e=this.getComponent(Wr.r.TotalDurationLabel),s=this.getComponent(Wr.r.SkipAdButton);!t&&s&&(s.setSecondsUntilSkip(0),s.tickDown(0)),t||!i?(this.elapsedTime=0,this.duration=t,i&&i.setProgress((0,Bt.dQ)(0,t,0,100,0)),e&&e.setTime(t),this.FO(this.MO)):i.setProgress(100)}updateVolume(t){const i=this.getComponent(Wr.r.VolumeControls),e=this.getComponent(Wr.r.VolumeButton);i&&i.setVolume(t),e&&e.setVolume(t)}get elapsedTime(){return this.MO}set elapsedTime(t){this.MO=t,this.FO(this.MO)}showSkipAdButton(t){const i=this.getComponent(Wr.r.SkipAdButton);i&&(i.showComponent(),i.setSecondsUntilSkip(t))}hideSkipAdButton(){const t=this.getComponent(Wr.r.SkipAdButton);t&&t.hideComponent()}addPodAdMarker(t,i){(0,r.cn)(this.$uiContainer,ho.Z.InPod);(0,b.Sz)(this.$uiContainer.getElementsByClassName(ho.Z.AdMarkerInPodTextContainer)).forEach((e=>{e.innerHTML=`${t+1}/${i}`}))}removeAddPodAdMarker(){(0,r.IV)(this.$uiContainer,ho.Z.InPod)}addDurationAdMarker(){(0,r.cn)(this.$uiContainer,ho.Z.AdDurationLabel)}removeDurationAdMarker(){(0,r.IV)(this.$uiContainer,ho.Z.AdDurationLabel)}FO(t){const i=this.getComponent(Wr.r.ElapsedTimeLabel);i&&i.setTime(t);const e=this.getComponent(Wr.r.SkipAdButton);e&&e.tickDown(t);const s=this.getComponent(Wr.r.RemainingDurationLabel);if(s&&this.duration){const i=this.duration-t;i>=0&&s.setTime(i)}}hideAdLoadingScreen(){const t=this.getComponent(Wr.r.AdLoadingScreen);t&&t.hideComponent(),(0,r.IV)(this.$container,I.s6.PodLoadingScreen)}showAdLoadingScreen(t,i,e,s){const n=this.getComponent(Wr.r.AdLoadingScreen);n&&(n.showComponent(),n.setBackgroundImg(t),n.setClickUrl(i),n.setFallbackText(e,s),(0,r.cn)(this.$container,I.s6.PodLoadingScreen))}hideAdMarker(){const t=this.$container.querySelector(".cnx-ad-marker");(0,r.MV)(t)}hideProgressBar(){this.getComponent(Wr.r.ProgressBar).hideComponent()}setContinueReadingCard(t){this.BO.style.backgroundImage=`url("${t.imageSrc}")`,this.OO.innerText=t.title}addAdMarkerTitle(t){this.RO.innerHTML=t}cardHasData(){return(0,n.QM)(this.BO.style.backgroundImage)&&(0,n.QM)(this.OO.innerHTML)}showContinueReadingCard(t){(0,r.cn)(this.$container,I.s6.AdShowCard),null===this.Tn&&(this.Tn=this.globalDomUtilsService.requestAnimationFrameHelper((()=>{this.Tn=null,(0,r.T7)(t,{height:`${this.DO.clientHeight}px`})})))}hideContinueReadingCard(t){(0,r.IV)(this.$container,I.s6.AdShowCard),(0,r.aQ)(t,"height")}showAdMarkerTitle(){(0,r.cn)(this.$uiContainer,ho.Z.AdTitleLabel)}hideAdMarkerTitle(){(0,r.IV)(this.$uiContainer,ho.Z.AdTitleLabel)}show(){super.show(),this.Pm.on(this.$uiContainer,this.LO,{threshold:.5})}hide(){super.hide();(0,r.og)(this.$uiContainer,I.s6.UiInView,!1),this.Pm.off(this.$uiContainer,this.LO)}expand(){this.getComponent(Wr.r.ExpandButton).setState(ao.q.expand)}collapse(){this.getComponent(Wr.r.ExpandButton).setState(ao.q.collapse)}getComponent(t){return super.getComponent(t)}}var lo=h(3204);class uo{constructor(t){this.showExpandButton=t}get template(){return`\n            <cnx class="cnx-ui cnx-ui-ad">\n                <cnx class="cnx-ui-ad-content ${this.showExpandButton?"cnx-ad-fs":""}">\n                    <cnx class="cnx-ad-marker" aria-label="Ad" role="img">\n                        <cnx class="cnx-marker-cnt-first">\n                            <cnx class="cnx-marker-cnt-second">\n                                <cnx class="cnx-ad-marker-svg">${lo}</cnx>\n                                <cnx class="cnx-ad-marker-text">1/1</cnx>\n                            </cnx>\n                            <cnx class="cnx-ad-marker-duration">[[${Wr.r.RemainingDurationLabel}]]</cnx>\n                        </cnx>\n                        <cnx class="cnx-ad-marker-title"><cnx-span class="cnx-ad-title-text"></cnx-span></cnx>\n                    </cnx>\n                    <cnx class="cnx-ad-buttons">\n                        <cnx class="cnx-ad-play-button cnx-ui-btn">[[${Wr.r.PlayButton}]]</cnx>\n                        <cnx class="cnx-ad-volume-controls">[[${Wr.r.VolumeControls}]]</cnx>\n                        <cnx class="cnx-ad-volume-button cnx-ui-btn">[[${Wr.r.VolumeButton}]]</cnx>\n                    </cnx>\n                    [[${Wr.r.SkipAdButton}]]\n                    <cnx class="cnx-ad-close-button cnx-ui-btn">[[${Wr.r.CloseButton}]]</cnx>\n                    ${this.getExpandTemplate()}\n                    <cnx class="cnx-ad-progress-bar">[[${Wr.r.ProgressBar}]]</cnx>\n                </cnx>\n                <cnx class="cnx-ad-card">\n                    <svg class="${ho.Z.CardImage}" viewBox="0 0 16 9" />\n                    <cnx class="cnx-ad-card-text">\n                        <cnx>Continue watching</cnx>\n                        <cnx class="${ho.Z.CardTitle}"></cnx>\n                        <cnx>after the ad</cnx>\n                    </cnx>\n                </cnx>\n                [[${Wr.r.AdLoadingScreen}]]\n            </cnx>\n        `.trim()}getExpandTemplate(){return this.showExpandButton?`<cnx class="cnx-ad-expand-button cnx-ui-btn cnx-hide-on-volume-hover cnx-d-sm-none">[[${Wr.r.ExpandButton}]]</cnx>`:""}}class po{static getScaledImageUrl(t,i,e,s,r){if(t&&!(0,Bt.ON)({width:i,height:e}))return(0,n.r)(r)&&(i=(0,Bt.Tc)(i,r),e=(0,Bt.Tc)(e,r)),s.appendParamsToUrl(`${t}${po.getScaledImageQueryParams(i,e)}`.trim())}static getScaledImageQueryParams(t,i){return(0,Bt.ON)({width:t,height:i})?"":`?width=${t}&height=${i}&fit=bounds`}static getSmartCroppedImageUrl(t,i,e,s){return(0,n.QM)(t)||(t=Xe.n.endPoints.base.image),(0,Bt.ON)({width:i,height:e})&&(i=140,e=80),s.appendParamsToUrl(`${t}${po.getSmartCroppedImageQueryParams(i,e)}`)}static getSmartCroppedImageQueryParams(t,i){return(0,Bt.ON)({width:t,height:i})?"":`?crop=${t}:${i},smart&width=${t}&height=${i}&format=jpeg&quality=60&fit=crop`}}class fo extends class{constructor(t,i,e,s,n,r,o,h,a){this.Cs=t,this.NO=i,this.UO=e,this.qB=s,this._P=n,this.Sv=r,this.$B=o,this.$O=h,this.th=a,this.qO=[],this.HO=!1,this.zO=!1,this.Po=!1,this.WO=0,this.lf=0,this.GO=!0,this.JO=!1,this.XO=!1,this.YO=!1,this.Pd=[],this.KO=new R.x,this.ob=new R.x,this.ZO=new R.x,this.tR=new R.x,this.iR=new R.x}ql(){this.Pd.push(this.eR(),this.sR())}nR(t){switch(t.type){case X.fI.AdPaused:this.KO.next({type:K.PauseLinearEvent});break;case X.fI.AdPlaying:this.KO.next({type:K.ResumeLinearEvent});break;case X.fI.AdImpression:this.KO.next({type:K.ShowLinearEvent,payload:t.payload});break;case X.fI.AdSkipped:this.KO.next({type:K.SkipLinearEvent});break;case X.fI.AdStopped:this.KO.next({type:K.HideLinearEvent});break;case X.fI.AdError:this.inImpression&&this.KO.next({type:K.HideLinearEvent})}}rR(t){var i;this.oR(),this.updateContinueReadingCard(),t.payload.adDuration=null===(i=this.$O.getCurrentAdMetadata(xt.LINEAR))||void 0===i?void 0:i.duration,t.payload.adDuration||this.HO||this.show(),this.HO=!0,this.Po=!0,this.JO&&this.hR(),t.payload.adDuration?this.aR.addDurationAdMarker():this.aR.removeDurationAdMarker(),this.aR.updateDuration(t.payload.adDuration),this.aR.changeState(k.Ez.PlayingState),this.cR=t.payload.clickThroughUrl,this.dR(t.payload.selectedAdSlot),this.qB.getTotalNumberOfSlots()>1?this.aR.addPodAdMarker(this.qB.getCurrentSlotIndex(),this.qB.getTotalNumberOfSlots()):this.aR.removeAddPodAdMarker()}lR(t=!1){const i=(e=this.Cs,s=this._P.config,{logoUrl:e.logoUrl,isMobile:s.isMobile,closeButtonMode:e.closeButtonMode,floatingCloseButtonMode:e.floatingSettings.floatingCloseButtonMode,isCloseButton:e.isCloseButton,sharingDestinations:e.sharingDestinations});var e,s;this.aR=new co(this._P.services.GlobalDomUtilsService,this._P.services.ViewabilityService,this._P.services.InteractionService,this.NO,new uo(t).template,i),this.aR.hide()}uR(){this.wM=this.pR(),this.fR(this.wM),this.qO.push(this.wM)}pR(t=""){return this._P.services.GlobalDomUtilsService.createElementByString(`<div class= "cnx-ad-container cnx-full-height ${t}"></div>`)}fR(t){this.NO.appendChild(t)}eR(){return this.$O.onLinearVpaidEvent.subscribe((t=>{let i=!1;switch(t.type){case X.fI.AdLoaded:this.JO=this.mR(t.payload),this.JO&&(t.payload.payload.adLoadedData.skipOffset=this.Cs.skipAdAfter);break;case X.fI.AdPaused:this.YO=!1,this.aR.changeState(k.Ez.PausedState);break;case X.fI.AdPlaying:this.YO=!0,this.aR.changeState(k.Ez.PlayingState);break;case X.fI.AdImpression:this.YO=!0,this.rR(t.payload);break;case X.fI.AdSkipped:this.vR(m.ProtoAdClickTypeEnum.AdSkipClick),this.gR(),i=!0;break;case X.fI.AdStopped:case X.fI.AdError:if(this.yR())return;this.gR(),i=!0;break;case X.fI.AdClickThru:this.vR(m.ProtoAdClickTypeEnum.AdClickThrough)}this.GO&&(this.ob.next(t),this.nR(t)),this.GO=!0,i&&(this.Po=!1,this.YO=!1,this.aR.changeState(k.Ez.PausedState))}))}sR(){return this.aR.onUiEvent.subscribe((t=>{switch(t.type){case F.C.Volume:this.setVolume(t.payload.volume),this.vR(m.ProtoAdClickTypeEnum.VolumeClick);break;case F.C.Play:this.vR(m.ProtoAdClickTypeEnum.PlayClick),this.play();break;case F.C.Pause:this.vR(m.ProtoAdClickTypeEnum.PauseClick),this.pause();break;case F.C.Expand:this.vR(m.ProtoAdClickTypeEnum.FullScreenClick),this.iR.next(F.C.Expand);break;case F.C.Collapse:this.vR(m.ProtoAdClickTypeEnum.ExitFullScreenClick),this.iR.next(F.C.Collapse);break;case F.C.Close:this.tR.next({type:y.Uh.UserInteraction,payload:{playback:!1}}),this.ZO.next({type:F.C.Close});break;case F.C.Mute:this.setVolume(0),this.vR(m.ProtoAdClickTypeEnum.MuteClick);break;case F.C.Unmute:this.setVolume(1),this.vR(m.ProtoAdClickTypeEnum.UnmuteClick);break;case F.C.SkipAd:this.bR()}}))}hR(){this.aR.showSkipAdButton(this.Cs.skipAdAfter)}vR(t){var i;const e=null===(i=this.$O)||void 0===i?void 0:i.getCurrentAdMetadata(xt.LINEAR);if(!e)return;const{advertiserLineItemId:s,publisherLineItemId:n}=e,r=this.$O.getCurrentAdBreakType();this.th.adClick.next({advertiserLineItemId:s,publisherLineItemId:n,adBreakType:w.EN.fromProtoAdBreakType(r),type:w.EN.fromProtoAdClickType(t)})}mR(t){var i;if(t.payload.adLoadedData.skipOffset&&t.payload.adLoadedData.skipOffset>=0)return!1;const e=null===(i=this.$O)||void 0===i?void 0:i.getCurrentAdMetadata(xt.LINEAR);return!!e&&(0,tt.Xj)(e.duration,this.Cs)}dR(t){this.qO.filter((i=>i!==t)).forEach((t=>{(0,r.cn)(t,I.Gj.Hide)}))}gR(){this.qO.forEach((t=>{(0,r.IV)(t,I.Gj.Hide)}))}IR(){this.XO=!1,this.aR.hideAdLoadingScreen()}oR(){this.aR.hideSkipAdButton()}start(t,i=!1){try{this.lR(i),this.uR(),this.setVolume(t),this.ql()}catch(t){(0,o.n)({callStack:t.stack,level:o.D.CRITICAL,exception:t.message,message:"linearAdhandler_start"})}}getVolume(){return this.WO}increaseVolume(t,i=!1){if(i&&this.vR(m.ProtoAdClickTypeEnum.VolumeClick),this.WO+t>1)return void this.setVolume(1);const e=this.WO+t;this.setVolume(e)}decreaseVolume(t,i=!1){if(i&&this.vR(m.ProtoAdClickTypeEnum.VolumeClick),this.getVolume()-t<0)return void this.setVolume(0);const e=this.getVolume()-t;this.setVolume(e)}toggleMute(t=!1){if(t&&this.vR(0===this.WO?m.ProtoAdClickTypeEnum.UnmuteClick:m.ProtoAdClickTypeEnum.MuteClick),0===this.WO)return this.lf=this.lf>0?this.lf:.2,void this.setVolume(this.lf);this.lf=this.WO,this.setVolume(0)}hide(){(0,r.IV)(this.NO,I.s6.Ad,I.s6.AdOverlayType),this.aR.hide()}show(){var t,i;const e=[I.s6.Ad],s=null===(i=null===(t=this.$O)||void 0===t?void 0:t.getCurrentAdMetadata(xt.LINEAR))||void 0===i?void 0:i.adType;s===m.ProtoAdType.Overlay&&e.push(I.s6.AdOverlayType),this.wR=s,(0,r.cn)(this.NO,...e),this.aR.show(),this.aR.updateVolume(this.WO),this.IR()}setVolume(t){this.WO=t,this.$O.setAdVolume(xt.LINEAR,t),this.aR&&this.aR.updateVolume(t),this.tR.next({type:y.Uh.UserInteraction,payload:{volume:!0}}),this.ZO.next({type:F.C.Volume,payload:{volume:t}})}resizeAd(t,i){this.inImpression&&(this.updateContinueReadingCard(),this.updateShowAdMarkerTitle())}adStateChange(t,i){this.$O.onAdStateChange(xt.LINEAR,t,i)}getMainAdContainerWidth(){return this.$O.getMainAdContainerWidth(xt.LINEAR)}resumeWithoutUserInteraction(){this.inImpression&&this.$O.resumeAd(xt.LINEAR,!1)}play(){if(!this.inImpression)return;this.$O.resumeAd(xt.LINEAR,!0),this.tR.next({type:y.Uh.UserInteraction,payload:{playback:!0}}),this.YO=!0}_R(t){if((0,s.Ph)("cnxShowAdCard",this._P.config.pageUrl))return!0;let i=!1;if(t.adType===m.ProtoAdType.Video){const e=this.NO.clientWidth*(t.heightRatio/t.widthRatio);i=this.NO.clientHeight-e>=76}return t.adType===m.ProtoAdType.Overlay&&(i=this.NO.clientHeight-t.height>=76),i}updateContinueReadingCard(){const t=this.$O.getCurrentAdMediaSize(xt.LINEAR);(0,n.$K)(t)&&(this._R(t)?this.aR.showContinueReadingCard(this.wM):this.aR.hideContinueReadingCard(this.wM))}updateShowAdMarkerTitle(){this.zO&&this.NO.clientWidth>=320?this.aR.showAdMarkerTitle():this.aR.hideAdMarkerTitle()}setContinueReadingCard(t){this.aR.setContinueReadingCard({imageSrc:po.getSmartCroppedImageUrl(t.imageSrc,270,150,this.Sv),title:t.title})}hideContinueReadingCard(){this.aR.hideContinueReadingCard(this.wM)}setAdMarkerTitle(t){this.aR.addAdMarkerTitle(t),this.zO=!0,this.NO.clientWidth>=320&&this.aR.showAdMarkerTitle()}hideAdMarkerTitle(){this.aR.hideAdMarkerTitle()}pause(){if(!this.inImpression)return;this.$O.pauseAd(xt.LINEAR,!0),this.tR.next({type:y.Uh.UserInteraction,payload:{playback:!1}}),this.YO=!1}togglePlay(t=!1){t&&this.vR(this.YO?m.ProtoAdClickTypeEnum.PauseClick:m.ProtoAdClickTypeEnum.PlayClick),this.YO?this.pause():this.play()}stopAd(t){const i=()=>{this.ob.next({type:X.fI.AdStopped,payload:{payload:{adType:m.ProtoAdType.Video}}});const i=t===Yt.ForceStopAdSlot;this.KO.next({type:K.HideLinearEvent,forced:i}),this.GO=!1};this.$O?(i(),this.$O.stopAd(xt.LINEAR,t)):this.inAdPodLoadingState&&i()}bR(){this.$O&&this.inImpression?this.$O.skipAd(xt.LINEAR):this.XO&&(this.ob.next({type:X.fI.AdSkipped}),this.IR())}enterAdPodLoadingState(){this.XO=!0;const{width:t,height:i}=this.$O.getAdContainerSize(this.wR);this.aR.showAdLoadingScreen(po.getSmartCroppedImageUrl(this.SR,t,i,this.Sv),this.cR,this.qB.getNextSlotIndex(),this.qB.getTotalNumberOfSlots())}setAdLoadingBackgroundUrl(t){this.SR=t}destroy(){var t;(0,H.i)(this.Pd),null===(t=this.aR)||void 0===t||t.destroy()}get onVpaidEvent(){return this.ob.asObservable()}get onUiComponentEvent(){return this.ZO.asObservable()}get onExperienceEvent(){return this.tR.asObservable()}get onLinearEvent(){return this.KO.asObservable()}get adUserInterface(){return this.aR}get adContainer(){return this.wM}get secondaryAdContainer(){return this.PR}get firstAdShown(){return this.HO}get inImpression(){return this.Po}get adInWin(){return this.$O.isAdInWin(xt.LINEAR)}get inAdPodLoadingState(){return this.XO}get onFullcreenChange(){return this.iR.asObservable()}}{rR(t){super.rR(t),this.Cs.outstreamAdAsContent&&this.AR()}yR(){return this.Cs.outstreamAdAsContent}AR(){this.aR.hideProgressBar(),this.aR.hideAdMarker(),this.oR()}}class mo extends class{constructor(t,i,e,s,n,r,o,h,a){this.Cs=t,this.NO=i,this.UO=e,this.qB=s,this._P=n,this.Sv=r,this.$B=o,this.$O=h,this.th=a,this.Pd=[],this.xR=new R.x,this.ob=new R.x,this.tR=new R.x,this.qO=[],this.Po=!1,this.kR=X.zc.Normal,this.TR=!1}ql(){this.Pd.push(this.$O.onNonlinearVpaidEvent.subscribe((t=>{switch(t.type){case X.fI.AdImpression:this.rR(t.payload);break;case X.fI.AdUserClose:this.vR(m.ProtoAdClickTypeEnum.AdUserClose);break;case X.fI.AdError:this.gR();break;case X.fI.AdClickThru:this.vR(m.ProtoAdClickTypeEnum.AdClickThrough)}this.ob.next(t),this.ER(t)})))}ER(t){switch(t.type){case X.fI.AdImpression:this.show(),this.xR.next({type:Z.ShowNonLinearEvent,payload:t.payload});break;case X.fI.AdUserClose:this.hide();break;case X.fI.AdStopped:this.hide(),this.xR.next({type:Z.HideNonLinearEvent});break;case X.fI.AdError:this.inImpression&&this.xR.next({type:Z.HideNonLinearEvent})}}rR(t){this.Po=!0,this.dR(t.payload.selectedAdSlot)}uR(){this.wM=this.pR(),this.fR(this.wM),this.qO.push(this.wM)}pR(t=""){return this._P.services.GlobalDomUtilsService.createElementByString(`<div class= "cnx-non-linear-ad-container cnx-full-height ${t}"></div>`)}fR(t){this.NO.appendChild(t)}vR(t){var i;const e=null===(i=this.$O)||void 0===i?void 0:i.getCurrentAdMetadata(xt.NONLINEAR);if(!e)return;const{advertiserLineItemId:s,publisherLineItemId:n}=e,r=this.$O.getCurrentAdBreakType();this.th.adClick.next({advertiserLineItemId:s,publisherLineItemId:n,adBreakType:w.EN.fromProtoAdBreakType(r),type:w.EN.fromProtoAdClickType(t)})}dR(t){this.qO.filter((i=>i!==t)).forEach((t=>{(0,r.cn)(t,I.Gj.Hide)}))}gR(){this.qO.forEach((t=>{(0,r.IV)(t,I.Gj.Hide)}))}MR(){var t;const i=null===(t=this.$O.getCurrentAdMediaSize(xt.NONLINEAR))||void 0===t?void 0:t.height;if(!(0,n.r)(i))return!0;const e=this.adContainer.clientHeight,s=(0,Bt.Tc)(e,Y.NON_LINEAR_MAX_HEIGHT_PERCENT);return Math.ceil(s)<i}start(){try{this.uR(),this.ql()}catch(t){(0,o.n)({callStack:t.stack,level:o.D.CRITICAL,exception:t.message,message:"nonLinearAdhandler_start"})}}hide(){(0,r.IV)(this.NO,I.s6.AdNonLinear)}show(){(0,r.cn)(this.NO,I.s6.AdNonLinear)}adStateChange(t,i){this.inImpression&&(t===m.ProtoAdSlotsEnum.PreRoll||t===m.ProtoAdSlotsEnum.PostRoll?this.pause():this.resumeWithoutUserInteraction(t),this.$O.onAdStateChange(xt.NONLINEAR,t,i))}contentPlaybackStateChanged(t){this.TR=t,this.TR||this.pause()}resizeAd(t,i,e){this.inImpression&&this.TR&&(this.MR()?this.pause():this.resumeWithoutUserInteraction(e))}resumeWithoutUserInteraction(t){this.inImpression&&t!==m.ProtoAdSlotsEnum.PreRoll&&t!==m.ProtoAdSlotsEnum.PostRoll&&(this.MR()||(this.show(),this.$O.resumeAd(xt.NONLINEAR,!1)))}pause(){if(!this.inImpression)return;this.hide();this.$O.pauseAd(xt.NONLINEAR,!0),this.tR.next({type:y.Uh.UserInteraction,payload:{playback:!1}})}stopAd(t){if(!this.inImpression)return;const i=()=>{this.ob.next({type:X.fI.AdStopped,payload:{payload:{adType:m.ProtoAdType.Nonlinear}}}),this.xR.next({type:Z.HideNonLinearEvent})};this.$O&&(i(),this.$O.stopAd(xt.NONLINEAR,t))}destroy(){(0,H.i)(this.Pd)}get onExperienceEvent(){return this.tR.asObservable()}get onNonLinearEvent(){return this.xR.asObservable()}get onVpaidEvent(){return this.ob.asObservable()}get adContainer(){return this.wM}get inImpression(){return this.Po}get adInWin(){return this.$O.isAdInWin(xt.NONLINEAR)}}{}class vo extends class{constructor(t,i,e,s,n,r,o,h,a,c,d){this.LR=t,this.BR=i,this.Cs=e,this.sl=s,this.NO=n,this.UO=r,this.qB=o,this._P=h,this._appSettings=a,this.Sv=c,this.$B=d,this.kR=X.zc.Normal,this.Pd=[],this.HB=new R.x,this.ob=new R.x,this.KO=new R.x,this.OR=new R.x,this.RR=new R.x,this.JB=new R.x,this.GB=new R.x,this.YB=new R.x,this.pC=new R.x,this.xR=new R.x,this.DR=new R.x,this.XB=new R.x,this.VR=new R.x,this.$O=this.jR(),this.FR();const l=mi.h.getSessionChildContainer(this._P.config.sessionId).resolve(vi.k);this.NR=this.$R(l),this.qR(),this.HR=this.zR(l),this.HR&&this.GR(),this.BR&&this.disableAdvertising()}get onMissedImpression(){return this.pC.asObservable()}inFloatingChanged(t){this.LR=t,this.$O.inFloatingChanged(t)}canPrefetchAds(t){this.$O.canPrefetchAds(t)}hasAdsEligibleForFill(){return this.$O.hasAdsEligibleForFill()}QR(t,i){const e=[{container:this.JR,width:t,height:i,type:m.ProtoAdType.Overlay},{container:this.JR,width:t,height:i,type:m.ProtoAdType.Video},{container:this.XR,width:t,height:i,type:m.ProtoAdType.Nonlinear}];return this.XR||e.pop(),e}FR(){this.Pd.push(this.$O.onAdsEnable.subscribe((t=>{this.HB.next(t)})))}GR(){var t,i,e;this.Pd.push(null===(t=this.HR)||void 0===t?void 0:t.onVpaidEvent.subscribe((t=>{this.ob.next(t)})),null===(i=this.HR)||void 0===i?void 0:i.onNonLinearEvent.subscribe((t=>{t.type===Z.ShowNonLinearEvent&&this.linearInImpression&&this.HR.pause(),this.xR.next(t)})),null===(e=this.HR)||void 0===e?void 0:e.onExperienceEvent.subscribe((t=>{this.DR.next({type:t.type,payload:t.payload})})),this.$O.onNonlinearImpressionPrice.subscribe((t=>{this.XB.next(t)})),this.$O.onNonlinearImpressionRevenue.subscribe((t=>{this.VR.next(t)})))}qR(){this.Pd.push(this.NR.onVpaidEvent.subscribe((t=>{this.ob.next(t)})),this.NR.onUiComponentEvent.subscribe((t=>{this.OR.next(t)})),this.NR.onExperienceEvent.subscribe((t=>{this.RR.next({type:t.type,payload:t.payload})})),this.NR.onLinearEvent.subscribe((t=>{var i;t.type===K.ShowLinearEvent&&(null===(i=this.HR)||void 0===i||i.pause()),this.KO.next(t)})),this.$O.onLinearImpressionPrice.subscribe((t=>{this.JB.next(t)})),this.$O.onMissedImpression.subscribe((t=>{this.pC.next(t)})),this.$O.onLinearImpressionRevenue.subscribe((t=>{this.GB.next(t)})),this.$O.onLinearNoFill.subscribe((()=>{this.YB.next()})))}nO(t,i,e){this.$O.initAd(t,i,this.kR,1,e,this.QR(t,i),this._P)}adStateChange(t,i){var e;this.NR.adStateChange(t,i),null===(e=this.HR)||void 0===e||e.adStateChange(t,i)}contentPlaybackStateChanged(t){var i;null===(i=this.HR)||void 0===i||i.contentPlaybackStateChanged(t)}disableAds(t,i){this.$O.disableAds(t,i)}enableAds(t){this.$O.enableAds(t)}disableAdvertising(){this.$O.disableAdvertising()}enableAdvertising(){this.$O.enableAdvertising()}start(t,i,e,s=!1,n=!1){n&&this.startNonLinear(),this.startLinear(e,s),this.nO(t,i,e)}stopAd(t){var i;this.NR.stopAd(t),null===(i=this.HR)||void 0===i||i.stopAd(t)}play(){this.NR.play()}pause(){var t;this.NR.pause(),null===(t=this.HR)||void 0===t||t.pause()}togglePlay(t=!1){this.NR.togglePlay(t)}resumeWithoutUserInteraction(t){var i;this.NR.resumeWithoutUserInteraction(),null===(i=this.HR)||void 0===i||i.resumeWithoutUserInteraction(t)}resizeAd(t,i,e,s){var n;this.setVastViewMode(e),this.NR.resizeAd(t,i),null===(n=this.HR)||void 0===n||n.resizeAd(t,i,s)}setPlayerOrientation(t){this.$O.setPlayerOrientation(t)}setVastViewMode(t){this.kR=t,this.$O.setVastViewMode(t)}contentChanged(){this.$O.onContentChange()}newLinearAdOpportunity(t){this.$O.newLinearAdOpportunity(t)}destroy(){var t,i,e;(0,H.i)(this.Pd),this.NR.destroy(),null===(t=this.HR)||void 0===t||t.destroy(),null===(i=this.$O)||void 0===i||i.disableAds(xt.LINEAR,{disableReason:ui.Unknown}),null===(e=this.$O)||void 0===e||e.disableAds(xt.NONLINEAR,{disableReason:ui.Unknown}),this.$O.destroy()}get onAdsEnable(){return this.HB.asObservable()}get onVpaidEvent(){return this.ob.asObservable()}startNonLinear(){var t;null===(t=this.HR)||void 0===t||t.start()}contentEnded(){var t;null===(t=this.HR)||void 0===t||t.pause()}get onNonLinearEvent(){return this.xR.asObservable()}get onNonLinearExperienceEvent(){return this.DR.asObservable()}get onNonLinearImpressionPrice(){return this.XB.asObservable()}get onNonLinearImpressionRevenue(){return this.VR.asObservable()}get nonLinearInImpression(){return!!this.HR&&this.HR.inImpression}get XR(){var t;return null===(t=this.HR)||void 0===t?void 0:t.adContainer}startLinear(t,i=!1){this.NR.start(t,i)}setMediaRestrictions(t){this.$O.setMediaRestrictions(t)}getNewLinearAdOpportunity(){return this.$O.getNewLinearAdOpportunity()}getLinearVolume(){return this.NR.getVolume()}setLinearVolume(t){this.NR.setVolume(t)}increaseVolume(t,i=!1){this.NR.increaseVolume(t,i)}decreaseVolume(t,i=!1){this.NR.decreaseVolume(t,i)}toggleMute(t=!1){this.NR.toggleMute(t)}hideLinear(){this.NR.hide()}showLinear(){this.NR.show()}updateContinueReadingCard(){this.NR.updateContinueReadingCard()}setContinueReadingCard(t){this.NR.setContinueReadingCard(t)}hideContinueReadingCard(){this.NR.hideContinueReadingCard()}setAdMarkerTitle(t){this.NR.setAdMarkerTitle(t)}hideAdMarkerTitle(){this.NR.hideAdMarkerTitle()}enterAdPodLoadingState(){this.NR.enterAdPodLoadingState()}setAdLoadingBackgroundUrl(t){this.NR.setAdLoadingBackgroundUrl(t)}updateLinearPodRemainingTime(t){this.$O.updateLinearPodRemainingTime(t)}setCustomMacros(t){this.$O.setCustomMacros(t)}enablePrefetchForLinearity(t){this.$O.enablePrefetchForLinearity(t)}get onLinearEvent(){return this.KO.asObservable()}get onLinearUiComponentEvent(){return this.OR.asObservable()}get onLinearExperienceEvent(){return this.RR.asObservable()}get onLinearImpressionPrice(){return this.JB.asObservable()}get onLinearImpressionRevenue(){return this.GB.asObservable()}get onLinearNoFill(){return this.YB.asObservable()}get linearInImpression(){return this.NR.inImpression}get JR(){return this.NR.adContainer}get PR(){return this.NR.secondaryAdContainer}get linearAdUserInterface(){return this.NR.adUserInterface}get onFullcreenChange(){return this.NR.onFullcreenChange}get linearAdInWin(){return this.NR.adInWin}get firstLinearAdShown(){return this.NR.firstAdShown}get inAdPodLoadingState(){return this.NR.inAdPodLoadingState}getLinearAdContainerWidth(){return this.NR.getMainAdContainerWidth()}userInteraction(t){this.$O.userInteraction(t)}}{jR(){const t={playerData:{isOutstream:this.Cs.isOutStreamType(),playbackMode:this.Cs.playbackMode,initialSoundMode:this.Cs.soundMode,hasFloatingCapability:this.Cs.floatingSettings.hasFloatingCapability,inFloating:this.LR,liveRampEnvelope:this._P.services.UserManagerService.identityEnvelope},appSettings:this._appSettings,generalRepository:this.sl,adSourceSettings:this.Cs.lineItemSettings,pauseAdWhenFinished:this.Cs.pauseAdWhenFinished,loopAdWhenFinished:this.Cs.loopAdWhenFinished,skipPlayerSettings:{skipAdAfter:this.Cs.skipAdAfter,skipMin:this.Cs.skipMin,skippability:this.Cs.skippability},adPlaybackMode:this.Cs.adPlaybackMode,amazonTamSlotId:this.Cs.amazonTamSlotId,prebidJsSupplyChain:this.Cs.supplyChainSettings,lineItemAbTestInformation:this.Cs.lineItemAbTestInformation,canPrefetch:this.Cs.prefetchOnPreroll};return new zr(t,this.$B,this.qB)}$R(t){return new fo(this.Cs,this.NO,this.UO,this.qB,this._P,this.Sv,this.$B,this.$O,t)}zR(t){return new mo(this.Cs,this.NO,this.UO,this.qB,this._P,this.Sv,this.$B,this.$O,t)}}class go{constructor(t,i){this.YR=t,this.KR=i,this.ZR=null,this.tD=null,this.iD=0,this.eD=0,this.sD=!1,this.nD=!1,this.rD=new Map,this.oD=new R.x,this.hD=new R.x,this.aD=new R.x,this.cD=new R.x,this.dD=new R.x,this.lD=new R.x,this.pD=new R.x,this.fD=new R.x,this.mD=new R.x,this.vD=new R.x,this.Pd=[],this.gD={inImpression:!1}}start(){this.yD();const{totalAdBreakLength:t}=this.YR.linearAdsControllerData;if(t){const i=mi.h.getGlobalContainer().resolve(ie.f);this.bD=new Oe.B(i,t),this.rD.set(this.bD,[this.bD.onTimeElapsed.subscribe((()=>{this.hD.next()}))])}}get currentPlayerAdSlot(){return this.ZR}get onExperienceControllerStateChange(){return this.vD.asObservable()}get onCanPrefetchAds(){return this.mD.asObservable()}get onAdSlotDurationElapsed(){return this.oD.asObservable()}get onAdPodDurationElapsed(){return this.aD.asObservable()}get onAdPodTimeUpdate(){return this.cD.asObservable()}get onAdOpportunity(){return this.dD.asObservable()}get onAdsDisabled(){return this.lD.asObservable()}get onAdsEnabled(){return this.pD.asObservable()}get onTotalAdBreakDurationExpired(){return this.hD.asObservable()}get onMidRollCapped(){return this.fD.asObservable()}contentPlaybackStateChanged(t){var i,e;null===(e=(i=this.KR).contentPlaybackStateChanged)||void 0===e||e.call(i,t)}contentTimeUpdate(t){var i,e;null===(e=(i=this.KR).contentTimeUpdate)||void 0===e||e.call(i,t)}slideChanged(t){var i,e;null===(e=(i=this.KR).slideChanged)||void 0===e||e.call(i,t)}updateStoryTimeline(t){var i,e;null===(e=(i=this.KR).updateStoryTimeline)||void 0===e||e.call(i,t)}onAdImpression(t,i){this.KR.onAdImpression(this.ZR,i),this.gD.inImpression=!0,this.ID(),this.wD()}contentChanged(t){this.KR.contentChanged(this.ZR,t),this.eD=0}onAdFinished(t,i,e){this.KR.onAdFinished(this.ZR,i,e),this._D=this.SD(this._D),i||(this.PD=this.SD(this.PD),this.ZR===m.ProtoAdSlotsEnum.MidRoll?this.sD||this.eD++:this.iD++),this.AD()&&!i&&this.fD.next(),t&&(this.nD=!0),this.gD.inImpression=!1}viewabilityStateChanged(t,i){var e,s;null===(s=(e=this.KR).viewabilityStateChanged)||void 0===s||s.call(e,this.ZR,t,i)}onStop(){this.ZR=null}onAdStateChange(t,i,e,s){this.KR.onAdStateChange(t,e,s),this.YR.linearAdsControllerData.maxAdSlotDuration=i.maxAdSlotDuration,this.YR.linearAdsControllerData.maxAdPodDuration=i.maxAdPodDuration,s||(t!==m.ProtoAdSlotsEnum.MidRoll&&(this.iD=0),null===t&&this.tD===m.ProtoAdSlotsEnum.MidRoll||(this.nD=!0),this.tD=t,this.ZR=t)}canEnableAds(t){const i=this.KR.canEnableAds(this.ZR,t);return i.enableAds?this.gD.inImpression?{enableAds:!1,disableReason:ui.InImpression}:this.ZR===m.ProtoAdSlotsEnum.MidRoll&&this.AD()||this.ZR!==m.ProtoAdSlotsEnum.MidRoll&&this.iD>0?{enableAds:!1,disableReason:ui.Unknown}:{enableAds:!0,disableReason:ui.Unknown}:i}enableAds(){this.pD.next(),this.bD&&this.bD.start()}disableAds(t,i){const e={disableReason:t,adBreakLength:this.KR.getAdBreakDuration(i)};this.lD.next({payload:e}),this.bD&&!this.gD.inImpression&&this.bD.stop()}getTheoreticalDurationUntilNextOpportuinity(t){return this.ZR===m.ProtoAdSlotsEnum.MidRoll&&this.AD()?-1:this.KR.getDurationUntilNextOpportunity(t)}onAdPlay(){this.PD&&this.PD.start(),this._D&&this._D.start(),this.bD&&this.bD.start()}onAdPause(){this.PD&&this.PD.stop(),this._D&&this._D.stop(),this.bD&&this.bD.stop()}triggerAdOpportunity(){this.nD&&(this.nD=!1,this.dD.next({payload:{adBreakType:jr[this.ZR]}}))}startAds(t){var i,e;null===(e=(i=this.KR).startAds)||void 0===e||e.call(i,this.ZR,t)}onNewMediaVideo(t){var i,e;this.sD=(0,b.BZ)(t),null===(e=(i=this.KR).onNewMediaVideo)||void 0===e||e.call(i,t)}setAdHandler(t){this.KR&&this.KR.setAdHandler&&this.KR.setAdHandler(t)}destroy(){(0,H.i)(this.Pd),this.bD&&this.bD.disable(),this._D=this.SD(this._D),this.PD=this.SD(this.PD),this.KR.destroy()}yD(){var t;this.Pd.push(this.KR.onExperienceControllerStateChange.subscribe((t=>{this.vD.next(t)})),null===(t=this.KR.onCanPrefetchAds)||void 0===t?void 0:t.subscribe((()=>{this.mD.next()}))),this.KR.start()}AD(){if(this.sD)return!1;const{numberOfMidRolls:t}=this.YR.linearAdsControllerData;return this.eD>=t&&-1!==t}SD(t){if(t)return t.stop(),(0,H.i)(this.rD.get(t)),this.rD.delete(t),null}ID(){const{maxAdSlotDuration:t}=this.YR.linearAdsControllerData;if(!t||this._D)return;const i=mi.h.getGlobalContainer().resolve(ie.f);this._D=new Oe.B(i,t),this._D.start(),this.rD.set(this._D,[this._D.onTimeElapsed.subscribe((()=>{this.oD.next()}))])}wD(){const{maxAdPodDuration:t}=this.YR.linearAdsControllerData;if(!t||this.PD)return;const i=mi.h.getGlobalContainer().resolve(ie.f);this.PD=new Oe.B(i,t),this.PD.start(),this.rD.set(this.PD,[this.PD.onTimeElapsed.subscribe((()=>{this.aD.next()})),this.PD.onTimeUpdate.subscribe((()=>{const t=this.PD.timeRemaining;this.cD.next(t)}))])}}class yo{constructor(t,i){this.YR=t,this.xD=i,this.lD=new R.x,this.pD=new R.x,this.kD=0,this.vD=new R.x,this.rD=new Map,this.Pd=[],this.gD={inImpression:!1,linearInImpression:!1,inPrePostRoll:!1,contentPaused:!0,linearInOpportunity:!1},this.TD=!1,this.CD=!0}start(){this.yD(),this.initTimer()}get onExperienceControllerStateChange(){return this.vD.asObservable()}initTimer(){const t=mi.h.getGlobalContainer().resolve(ie.f);this.ED=new Oe.B(t,this.YR.resetNumberOfNonLinearAdsAfter),this.rD.set(this.ED,[this.ED.onTimeElapsed.subscribe((()=>{this.kD=0,this.vD.next()}))])}yD(){this.Pd.push(this.xD.onExperienceControllerStateChange.subscribe((()=>{this.vD.next()}))),this.xD.start()}get onAdsDisabled(){return this.lD.asObservable()}get onAdsEnabled(){return this.pD.asObservable()}onLinearImpressionStateChange(t){this.gD.linearInImpression=t,t?(this.ED.stop(),this.kD=0):(this.ED.reset(),this.ED.start(),this.xD.onLinearAdFinished())}onLinearOpportunityChange(t){this.gD.linearInOpportunity=t}onAdStateChange(t){this.gD.inPrePostRoll=!(t===m.ProtoAdSlotsEnum.MidRoll)}onAdFinished(){this.xD.onAdFinished(),this.gD.inImpression=!1,this.kD++}onAdImpression(){this.gD.inImpression=!0,0===this.kD&&(this.ED.reset(),this.ED.start())}canEnableAds(){return!!this.xD.canEnableAds()&&(!(this.gD.inImpression||this.gD.inPrePostRoll||this.gD.linearInImpression||this.gD.linearInOpportunity&&this.CD||this.gD.contentPaused&&this.TD)&&!(this.kD>=this.YR.numberOfNonlinearAds&&this.YR.numberOfNonlinearAds>0))}viewabilityStateChanged(t){this.TD=t}onLinearNoDemand(){this.CD=!1}enableAds(){this.pD.next()}disableAds(){this.lD.next()}contentPlaybackStateChanged(t){this.gD.contentPaused=!t,this.vD.next()}destroy(){var t;(0,H.i)(this.Pd),null===(t=this.xD)||void 0===t||t.destroy()}}class bo{constructor(t,i,e,s,r,o){var h;this.mediator=t,this.YR=s,this.Pd=[],this.gD={stopped:!1,viewability:!1,forceDisable:!1,zeroDimension:!1,isAppBackgrounded:!1,restrictedOnCurrentMedia:!1,adBlockerActive:!0},this.MD=new go(s,r),this.LD(r),this.viewabilityStateChanged(i),this.onResize(this.YR.playerDimensions.width,this.YR.playerDimensions.height),this.MD.start(),(0,n.hj)(null===(h=s.nonLinearAdsControllerData)||void 0===h?void 0:h.numberOfNonlinearAds)&&o&&this.BD(s.nonLinearAdsControllerData,o),e&&this.disableAdvertising(),this.onContentStop()}LD(t){this.Pd.push(this.MD.onAdSlotDurationElapsed.subscribe((()=>{this.mediator.publish(this,ot)})),this.MD.onAdPodDurationElapsed.subscribe((()=>{this.mediator.publish(this,ht)})),this.MD.onAdPodTimeUpdate.subscribe((t=>{this.mediator.publish(this,ct,{payload:{remainingTime:t}})})),this.MD.onAdOpportunity.subscribe((t=>{var i;null===(i=this.OD)||void 0===i||i.onLinearOpportunityChange(!0),this.mediator.publish(this,at,t)})),this.MD.onAdsDisabled.subscribe((t=>{this.mediator.publish(this,rt,t)})),this.MD.onAdsEnabled.subscribe((()=>{this.mediator.publish(this,nt)})),this.MD.onTotalAdBreakDurationExpired.subscribe((()=>{this.mediator.publish(this,st)})),this.MD.onMidRollCapped.subscribe((()=>{this.mediator.publish(this,et)})),this.MD.onExperienceControllerStateChange.subscribe((t=>{(0,n.$K)(t)&&(t.inCuePoint?this.mediator.publish(this,ft):(t.cuePointTimedOut&&this.mediator.publish(this,ot),this.mediator.publish(this,mt))),this.RD()})),this.MD.onCanPrefetchAds.subscribe((()=>{this.mediator.publish(this,vt,{payload:{linearity:xt.LINEAR}})})))}BD(t,i){this.OD=new yo(t,i),this.Pd.push(this.OD.onAdsDisabled.subscribe((()=>{this.mediator.publish(this,dt)})),this.OD.onAdsEnabled.subscribe((()=>{this.mediator.publish(this,lt)})),this.OD.onExperienceControllerStateChange.subscribe((()=>{this.RD()}))),this.OD.start()}slideChanged(t){this.MD.slideChanged(t)}updateStoryTimeline(t){this.MD.updateStoryTimeline(t)}contentPlaybackStateChanged(t){var i;this.MD.contentPlaybackStateChanged(t),null===(i=this.OD)||void 0===i||i.contentPlaybackStateChanged(t)}contentTimeUpdate(t){this.MD.contentTimeUpdate(t)}forceRecheck(){this.RD()}onAdImpression(t,i){var e;switch(i){case xt.LINEAR:this.MD.onAdImpression(t,this.Zm);const i=!0;null===(e=this.OD)||void 0===e||e.onLinearImpressionStateChange(i);break;case xt.NONLINEAR:this.OD.onAdImpression()}this.RD()}getTheoreticalDurationUntilNextOpportuinity(){return this.MD.canEnableAds(this.Zm).enableAds?0:this.MD.getTheoreticalDurationUntilNextOpportuinity(this.Zm)}onAdFinished(t,i,e=!1){var s,n;switch(i){case xt.LINEAR:if(this.MD.onAdFinished(t,e,this.Zm),e)this.DD();else{const t=!1;null===(s=this.OD)||void 0===s||s.onLinearImpressionStateChange(t)}break;case xt.NONLINEAR:null===(n=this.OD)||void 0===n||n.onAdFinished()}e||this.RD()}onLinearAdPause(){this.MD.onAdPause()}onLinearAdPlay(){this.MD.onAdPlay()}onContentStop(){this.MD.onStop(),this.gD.stopped=!0,this.RD()}onAdStateChange(t,i,e){var s;null===(s=this.OD)||void 0===s||s.onAdStateChange(t);const n=t===this.MD.currentPlayerAdSlot&&t===m.ProtoAdSlotsEnum.MidRoll;n?this.MD.onAdStateChange(t,i,e,n):(this.MD.onAdStateChange(t,i,e,n),this.VD())}adBlockerStatusChange(t){this.gD.adBlockerActive=t,this.RD()}VD(){this.MD.startAds(this.Zm),this.gD.stopped=!1,this.RD()}contentChanged(){this.MD.contentChanged(this.Zm),this.RD()}viewabilityStateChanged(t,i=!1,e=!1){var s;this.MD.viewabilityStateChanged(t,i),null===(s=this.OD)||void 0===s||s.viewabilityStateChanged(t),this.Zm=t,this.YR.viewabilityPolicy===m.ProtoAdViewabilityPolicy.Strict&&(this.gD.viewability=!t),e||this.RD()}setToggleAdsReason({isAppBackgrounded:t}){this.gD.isAppBackgrounded=t,this.RD()}onLinearNoFill(){var t;null===(t=this.OD)||void 0===t||t.onLinearOpportunityChange(!1),this.jD()}onLinearNoDemand(){var t;null===(t=this.OD)||void 0===t||t.onLinearNoDemand(),this.jD()}disableAdvertising(){this.mediator.publish(this,ut),this.gD.forceDisable=!0,this.RD()}enableAdvertising(){this.mediator.publish(this,pt),this.gD.forceDisable=!1,this.RD()}get isAdvertisingDisabled(){return this.gD.forceDisable}get inView(){return this.Zm}onResize(t,i){this.gD.zeroDimension=0===t||0===i,this.RD()}onNewMediaVideo(t,i=!1){this.MD.onNewMediaVideo(t),this.gD.restrictedOnCurrentMedia=i,this.RD()}destroy(){(0,H.i)(this.Pd),this.MD.destroy()}RD(){const t=this.FD();t.enableAds?(this.ND(),this.jD()):(this.UD(t.disableReason),this.$D())}ND(){const t=this.MD.canEnableAds(this.Zm);t.enableAds?this.DD():this.UD(t.disableReason)}jD(){var t;(null===(t=this.OD)||void 0===t?void 0:t.canEnableAds())?this.qD():this.$D()}$D(){var t;null===(t=this.OD)||void 0===t||t.disableAds()}qD(){var t;null===(t=this.OD)||void 0===t||t.enableAds()}UD(t){this.MD.disableAds(t,this.Zm)}FD(){return this.gD.forceDisable?{enableAds:!1,disableReason:ui.ForceDisable}:Object.keys(this.gD).some((t=>this.gD[t]))?{enableAds:!1,disableReason:ui.Unknown}:{enableAds:!0,disableReason:ui.Unknown}}setAdHandler(t){this.MD.setAdHandler(t)}DD(){this.MD.triggerAdOpportunity(),this.MD.enableAds()}}var Io,wo=h(7953);!function(t){t[t.None=0]="None",t[t.MinTimeBeforeFirstAd=1]="MinTimeBeforeFirstAd",t[t.TimeBetweenAds=2]="TimeBetweenAds"}(Io||(Io={}));class _o{constructor(t,i){this.zD=t,this.WD=i,this.GD=!1,this.gD={inTimeout:!1},this.QD=!1,this.JD=new R.x,this.Pd=[]}get onExperienceTimeoutControllerStateChange(){return this.JD.asObservable()}init(){const t=mi.h.getGlobalContainer().resolve(ie.f);this.YD=new Oe.B(t,this.zD),this.Pd.push(this.YD.onTimeElapsed.subscribe((()=>{this.GD||(this.GD=!0),this.gD.inTimeout=!1,this.QD=!0,this.JD.next()})))}canEnableAds(t,i){return t===m.ProtoAdSlotsEnum.MidRoll&&this.gD.inTimeout&&i?{enableAds:!1,disableReason:ui.TimeoutBetweenAds}:{enableAds:!0,disableReason:ui.Unknown}}startAds(t,i){this.KD(t,i)}getAdBreakDuration(t){const i=this.ZD(t);return i===Io.MinTimeBeforeFirstAd?this.zD:i===Io.TimeBetweenAds?this.WD:0}getDurationUntilNextOpportunity(){return this.YD.timeRemaining/J.s_}onAdImpression(t,i){t===m.ProtoAdSlotsEnum.MidRoll&&(this.GD||(this.GD=!0)),this.tV=!i}onAdFinished(t,i,e){this.QD=!1,this.GD&&!this.tV&&e&&!i&&this.KD(t,e)}viewabilityStateChanged(t,i,e){e||this.KD(t,i)}onAdStateChange(t){t!==m.ProtoAdSlotsEnum.MidRoll&&(this.GD=!1),this.QD=!1}contentPlaybackStateChanged(t){t?this.YD.start():this.YD.stop()}contentChanged(t,i){this.gD.inTimeout=!1,this.YD.stop(),this.GD=!1,this.QD=!1,this.KD(t,i)}disable(){this.YD.reset(),this.YD.disable()}destroy(){(0,H.i)(this.Pd),this.YD.disable()}KD(t,i){if(t===m.ProtoAdSlotsEnum.MidRoll&&!this.gD.inTimeout&&!this.QD){const t=this.ZD(i);t===Io.MinTimeBeforeFirstAd?this.iV():t===Io.TimeBetweenAds&&this.eV(),this.JD.next()}}eV(){this.gD.inTimeout=!0,this.YD.reset(this.WD)}iV(){this.gD.inTimeout=!0,this.YD.reset(this.zD)}ZD(t){return!this.GD&&this.zD?Io.MinTimeBeforeFirstAd:this.GD&&this.WD&&t?Io.TimeBetweenAds:Io.None}}class So{constructor(){this.sV=!1,this.nV=[],this.rV=0,this.hV=new R.x,this.mD=new R.x,this.rD=new Map;const t=mi.h.getGlobalContainer().resolve(ie.f);this.aV=new Oe.B(t,2*J.s_),this.rD.set(this.aV,[this.aV.onTimeElapsed.subscribe((()=>{this.cV()}))])}get onExperienceCuePointsControllerStateChange(){return this.hV.asObservable()}get onCanPrefetchAds(){return this.mD.asObservable()}canEnableAds(t){return this.sV||t!==m.ProtoAdSlotsEnum.MidRoll?{enableAds:!0,disableReason:ui.Unknown}:{enableAds:!1,disableReason:ui.Unknown}}getDurationUntilNextOpportunity(){let t;return this.nV.some((i=>{if(this.rV<=i)return t=i,!0})),t?t-this.rV:0}contentTimeUpdate(t){t&&(this.rV=t,this.dV(),this.lV())}onAdImpression(){this.sV=!1,this.uV()}onAdFinished(t,i){i||(this.pV=void 0,this.hV.next({inCuePoint:!1}))}onNewMediaVideo(t){this.pV=void 0,this.fV=void 0,this.sV=!1,(0,b.BZ)(t)&&(this.nV=t.map((t=>t.timeStamp)).sort(((t,i)=>t-i)))}setAdHandler(t){this._p=t}lV(){this.nV.forEach(((t,i)=>{let e=t-10;i-1>=0&&this.nV[i]-this.nV[i-1]<=10&&(e=this.nV[i-1]),(0,Bt.mg)(this.rV,e,t)&&this.pV!==i&&(this.pV=i,this.mD.next())}))}cV(){this.pV=void 0,this.sV=!1,this.hV.next({inCuePoint:!1,cuePointTimedOut:!0}),this.uV()}uV(){this.aV.reset(),this.aV.stop()}dV(){var t;let i,e=!1;if(!(this.nV.length<=0)&&(this.nV.forEach(((t,s)=>{if((0,Bt.mg)(this.rV,t,t+2))return e=!0,void(i=s)})),e&&void 0!==i&&this.fV!==i)){if(this.fV=i,!(null===(t=this._p)||void 0===t?void 0:t.hasAdsEligibleForFill()))return void(0,o.n)({message:"ElementsCuePointsController_cuepoint_not_filled",level:o.D.INFO},{pacing:100});this.sV=!0,this.hV.next({inCuePoint:!0}),this.aV.start()}}}class Po{constructor(t){this.YR=t,this.gD={limitAdsOnMidRoll:!1},this.vD=new R.x,this.mD=new R.x,this.Pd=[],this.mV(),this.vV(),this.gV=this.yV}start(){this.gD.limitAdsOnMidRoll=!0,this.yV.init()}get onExperienceControllerStateChange(){return this.vD.asObservable()}get onCanPrefetchAds(){return this.mD.asObservable()}canEnableAds(t,i){const e=this.gV.canEnableAds(t,i);return e.enableAds?t===wo.ProtoAdSlotsEnum.MidRoll&&this.gD.limitAdsOnMidRoll?{enableAds:!1,disableReason:ui.Unknown}:{enableAds:!0,disableReason:ui.Unknown}:e}startAds(t,i){var e,s;null===(s=(e=this.gV).startAds)||void 0===s||s.call(e,t,i)}getAdBreakDuration(t){var i,e;return null===(e=(i=this.gV).getAdBreakDuration)||void 0===e?void 0:e.call(i,t)}getDurationUntilNextOpportunity(){return this.gV.getDurationUntilNextOpportunity()}onAdImpression(t,i){this.gV.onAdImpression(t,i)}onAdFinished(t,i,e){var s,n;null===(n=(s=this.gV).onAdFinished)||void 0===n||n.call(s,t,i,e)}viewabilityStateChanged(t,i,e){var s,n;null===(n=(s=this.gV).viewabilityStateChanged)||void 0===n||n.call(s,t,i,e)}onAdStateChange(t,i,e){var s,n;const r=this.gD.limitAdsOnMidRoll;this.bV(t,i),r!==this.gD.limitAdsOnMidRoll&&this.vD.next(),e||null===(n=(s=this.gV).onAdStateChange)||void 0===n||n.call(s,t)}contentPlaybackStateChanged(t){var i,e;null===(e=(i=this.gV).contentPlaybackStateChanged)||void 0===e||e.call(i,t)}contentChanged(t,i){var e,s;this.gD.limitAdsOnMidRoll=!0,null===(s=(e=this.gV).contentChanged)||void 0===s||s.call(e,t,i)}onNewMediaVideo(t){var i,e;(0,b.BZ)(t)?(this.gV=this.wV,null===(e=(i=this.gV).onNewMediaVideo)||void 0===e||e.call(i,t),this.yV.disable()):this.gV=this.yV}contentTimeUpdate(t){var i,e;null===(e=(i=this.gV).contentTimeUpdate)||void 0===e||e.call(i,t)}destroy(){var t,i;(0,H.i)(this.Pd),null===(i=(t=this.gV).destroy)||void 0===i||i.call(t)}setAdHandler(t){this.wV.setAdHandler(t)}mV(){this.yV=new _o(this.YR.minTimeBeforeAdBreak,this.YR.timeBetweenAds),this.Pd.push(this.yV.onExperienceTimeoutControllerStateChange.subscribe((()=>{this.vD.next()})))}vV(){this.wV=new So,this.Pd.push(this.wV.onExperienceCuePointsControllerStateChange.subscribe((t=>{this.vD.next(t)})),this.wV.onCanPrefetchAds.subscribe((()=>{this.mD.next()})))}bV(t,i){this.gD.limitAdsOnMidRoll=this.YR.midRollOnlyOnLongContent&&t===wo.ProtoAdSlotsEnum.MidRoll&&(!i||i<480)}}class Ao{constructor(t){this._V=t,this.gD={inTimeoutBetweenNonLinears:!1,inTimeoutBetweenLinearAndNonLinear:!1},this.vD=new R.x,this.Pd=[]}start(){const t=mi.h.getGlobalContainer().resolve(ie.f);this.SV=new Oe.B(t,this._V.timeSecondsBetweenNonlinear*J.s_),this.PV=new Oe.B(t,this._V.timeSecondsBetweenLinearAndNonlinear*J.s_),this.Pd.push(this.SV.onTimeElapsed.subscribe((()=>{this.gD.inTimeoutBetweenNonLinears=!1,this.vD.next()})),this.PV.onTimeElapsed.subscribe((()=>{this.gD.inTimeoutBetweenLinearAndNonLinear=!1,this.vD.next()})))}get onExperienceControllerStateChange(){return this.vD.asObservable()}canEnableAds(){return!Object.keys(this.gD).some((t=>this.gD[t]))}onAdFinished(){this._V.timeSecondsBetweenNonlinear&&(this.gD.inTimeoutBetweenNonLinears=!0,this.SV.reset(),this.SV.start())}onLinearAdFinished(){this._V.timeSecondsBetweenLinearAndNonlinear&&(this.gD.inTimeoutBetweenLinearAndNonLinear=!0,this.PV.reset(),this.PV.start())}destroy(){var t,i;(0,H.i)(this.Pd),null===(t=this.SV)||void 0===t||t.disable(),null===(i=this.PV)||void 0===i||i.disable()}}const xo={xl:720,lg:320,md:204,sm:142,xs:0},ko={[m.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:142,xs:0},[m.ProtoDeviceType.Tablet]:Object.assign({},xo),[m.ProtoDeviceType.Smartphone]:Object.assign({},xo)},To={xl:720,lg:320,md:204,sm:142,xs:0},Co={[m.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:142,xs:0},[m.ProtoDeviceType.Tablet]:Object.assign({},To),[m.ProtoDeviceType.Smartphone]:Object.assign({},To)},Eo=176,Mo=160,Lo=144,Bo=112,Oo={xl:To.xl+Eo,lg:To.lg+Mo,md:To.md+Lo,sm:To.sm+Bo},Ro={[m.ProtoDeviceType.Desktop]:{xl:468+Eo,lg:388+Mo,md:248+Lo,sm:142+Bo,xs:0},[m.ProtoDeviceType.Tablet]:Object.assign({},Oo),[m.ProtoDeviceType.Smartphone]:Object.assign({},Oo)},Do={lg:320,md:204,sm:0},Vo={[m.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:0},[m.ProtoDeviceType.Tablet]:Object.assign({},Do),[m.ProtoDeviceType.Smartphone]:Object.assign({},Do)},jo={xxl:1080,xl:0},Fo={[m.ProtoDeviceType.Desktop]:{xxl:720,xl:0},[m.ProtoDeviceType.Tablet]:Object.assign({},jo),[m.ProtoDeviceType.Smartphone]:Object.assign({},jo)},No={[wo.ProtoGalleryOrientationEnum.Landscape]:{[wo.ProtoGalleryStyleMode.Detailed]:Fo,[wo.ProtoGalleryStyleMode.Visual]:Ro},[wo.ProtoGalleryOrientationEnum.Portrait]:{[wo.ProtoGalleryStyleMode.Detailed]:Vo,[wo.ProtoGalleryStyleMode.Visual]:Co}};class Uo extends li{constructor(){super(...arguments),this.ky=ko,this.Ty=I.Rq,this.yy=0,this.AV=9e4}get type(){return this.Wg.playerType}gy(){this.$playerContentWrapper=this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${this.Wg.floatingSettings.isPinnedFloating?I._7.PinnedWrapper:I._7.ContentWrapper}"></cnx>`),this.$playerContentWrapper.appendChild(this.$playerContainer),this.$playerWrapper.appendChild(this.$playerContentWrapper),this.floatingModule=new It(this.app.services.ViewabilityService,this.sl,this.app.services.ResizeObserver,this.$playerContainer.parentElement,this.Wg.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService,this.yy),this.vy(),this.floatingModule.start(),this.floatingStateMachine=new St(this.floatingModule,this.Wg.floatingSettings.floatingMode)}Rg(){var t,i;const e=!(!(null===(t=this.floatingModule)||void 0===t?void 0:t.isInFloating)&&!(null===(i=this.alwaysFloatingModule)||void 0===i?void 0:i.isInFloating));return new vo(e,this.Eg.isAdvertisingDisabled,this.Wg,this.sl,this.$playerContainer,this.checkFloatingViewability(this.isViewable()),this.Cg,this.app,this._appSettings,this.Sv,this.Zg(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight))}generateHTML(){if(this.$playerWrapper=this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${I.sN.PlayerWrapper}"></cnx>`),this.$playerContainer=this.app.services.GlobalDomUtilsService.createElementByString("<cnx class='cnx-video-container' tabindex=0></cnx>"),!this.app.config.isMobile){const t=this.app.services.GlobalDomUtilsService.createElementByString("<cnx class='cnx-border'></cnx>");this.$playerContainer.appendChild(t)}this.addPlayerSize(),this.$experienceContainer.appendChild(this.$playerWrapper),this.$playerWrapper.appendChild(this.$playerContainer)}setFloatingSettings(t){super.setFloatingSettings(t),this.Wg.floatingSettings.isPinnedFloating?((0,r.IV)(this.$playerContentWrapper,I._7.ContentWrapper),(0,r.cn)(this.$playerContentWrapper,I._7.PinnedWrapper)):((0,r.IV)(this.$playerContentWrapper,I._7.PinnedWrapper),(0,r.cn)(this.$playerContentWrapper,I._7.ContentWrapper)),this.wp.floatingChanged(this.Wg.floatingSettings.isPinnedFloating)}getFloatingSettings(){return super.getFloatingSettings()}addPlayerSize(){this.Wg.playerSize.responsive?(this.$playerWrapper.appendChild(this.oy()),(0,r.cn)(this.$playerWrapper,I.Ig.Responsive)):(this.setFixedSize(this.$experienceContainer),(0,r.cn)(this.$playerWrapper,I.Ig.Fixed))}setFixedSize(t){(0,r.T7)(t,{width:`${this.Wg.playerSize.fixedWidth}px`,height:`${this.Wg.playerSize.fixedHeight}px`})}Dy(){var t,i;let e;if(this.Wg.nonlinearPlayerSettings){const{timeSecondsBetweenNonlinear:t,timeSecondsBetweenLinearAndNonlinear:i}=this.Wg.nonlinearPlayerSettings;e=new Ao({timeSecondsBetweenLinearAndNonlinear:i,timeSecondsBetweenNonlinear:t})}const s=new Po({midRollOnlyOnLongContent:this.Wg.midRollOnlyOnLongContent,minTimeBeforeAdBreak:this.Wg.minTimeBeforeFirstAd,timeBetweenAds:this.Wg.timeBetweenAds});return new bo(this,this.isViewable(),this.Wg.disableAdvertising,{linearAdsControllerData:{numberOfMidRolls:this.Wg.midRollNumber,maxAdSlotDuration:this.Cg.getMaxAdSlotDuration(),maxAdPodDuration:this.Cg.getMaxAdPodDuration(),totalAdBreakLength:this.Wg.outstreamSettings?this.Wg.outstreamSettings.totalAdBreakLength:void 0},nonLinearAdsControllerData:{resetNumberOfNonLinearAdsAfter:0!==this.Wg.midRollNumber?this.Wg.timeBetweenAds:this.AV,numberOfNonlinearAds:null===(i=null===(t=this.Wg)||void 0===t?void 0:t.nonlinearPlayerSettings)||void 0===i?void 0:i.numberOfNonlinearAds},viewabilityPolicy:this.Wg.adViewabilityPolicy,playerDimensions:{width:this.$playerContainer.offsetWidth,height:this.$playerContainer.offsetHeight}},s,e)}}const $o=Object.assign(Object.assign(Object.assign(Object.assign({},{VideoStarted:"videoStarted",VideoCompleted25:"videoCompleted25",VideoCompleted50:"videoCompleted50",VideoCompleted75:"videoCompleted75",VideoCompleted100:"videoCompleted100",NewVideo:"newVideo"}),{SubtitlesVisibilityChanged:"subtitlesVisibilityChanged"}),{PlayerClicked:"playerClicked"}),{GalleryCardClicked:"galleryCardClicked"}),qo={Collapsed:"collapsed",AdCycleComplete:"adCycleComplete"},Ho=Object.assign(Object.assign({},y.dP),{FirstFramePlayed:"firstFramePlayed",ContentQuartiles:"contentQuartiles",MediaMetaUpdate:"mediaMetaUpdate",ChangeVideo:"changeVideo",VideoQueued:"videoQueued"});var zo=h(6515),Wo=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class Go extends Uo{constructor(){super(...arguments),this.events=Object.assign(Object.assign({},x.Km),$o),this.xV=new zo.X(!1),this.kV=!1,this.TV=!0,this.CV=[],this.EV={[k.Ez.PlayingState]:()=>{var t;this.Pg(m.ProtoAdSlotsEnum.MidRoll);null===(t=this.adHandler)||void 0===t||t.contentPlaybackStateChanged(true),this.Eg.contentPlaybackStateChanged(true)},[k.Ez.PrerollState]:()=>{this.Pg(m.ProtoAdSlotsEnum.PreRoll)},[k.Ez.PostrollState]:()=>{this.Pg(m.ProtoAdSlotsEnum.PostRoll)},[k.Ez.PausedState]:()=>{this.nh===m.ProtoAdSlotsEnum.PreRoll&&this.Pg(m.ProtoAdSlotsEnum.MidRoll)},[k.Ez.StoppedState]:()=>{this.nh===m.ProtoAdSlotsEnum.PostRoll&&this.Wg.upNextMode!==wo.ProtoPlayerUpNextMode.Stop?(this.Pg(m.ProtoAdSlotsEnum.MidRoll),this.fg()):(this.Bg(),this.Eg.onContentStop(),this.fg())}},this.LV=({payload:t})=>{t===k.Ez.PlayingState&&(this.unsubscribe(Ho.StateChanged,this.wp,this.LV),this.mediator.publish(this,$o.VideoStarted,{payload:this.getVideoDetails()}))},this.BV=t=>{const i=this.EV[t];return()=>{var e;if(t!==k.Ez.PlayingState){const t=!1;null===(e=this.adHandler)||void 0===e||e.contentPlaybackStateChanged(t),this.Eg.contentPlaybackStateChanged(t)}i&&i()}},this.OV=()=>{this.xV.next(!0),this.RV.enterFullScreen().then((()=>{this.wp.enterFullscreen(),this.floatingModule&&this.floatingModule.fullscreenStateChange(!0)})).catch((t=>{(0,o.n)({level:o.D.WARN,message:"BaseVideoExperience_enterFullscreen"})}))},this.ny=()=>{this.xV.next(!1),this.wp.exitFullscreen(),this.floatingModule&&this.floatingModule.fullscreenStateChange(!1),this.app.services.GlobalDomUtilsService.hasIosFullscreenBehaviour(this.app.config.os.os)&&(this.kV=this.wp.isIosFullscreen=!1,this.Pg(this.nh)),this.mediator.publish(this,x.Zr.FullscreenChanged,{payload:!1}),super.ny()},this.sy=()=>{this.app.services.GlobalDomUtilsService.hasIosFullscreenBehaviour(this.app.config.os.os)&&(this.kV=this.wp.isIosFullscreen=!0,this.Eg.onContentStop()),this.mediator.publish(this,x.Zr.FullscreenChanged,{payload:!0}),super.sy()}}start(){const t=Object.create(null,{start:{get:()=>super.start}});return Wo(this,void 0,void 0,(function*(){try{t.start.call(this),this.DV(),this.app.config.isOVPDomain?this.qv.push(S._.onAdBlockerDetected().subscribe((t=>{t||this.VV(),this.Eg.adBlockerStatusChange(t)}))):this.VV(),this.jV(this.wp,this.adHandler),this.FV(),yield this.wp.start(),this.Kg(),this.Ay(this.wp),this.NV(),this.UV(),this.$V()}catch(t){(0,o.n)({message:"BaseVideoExperience_Start",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}))}$V(){if(this.Wg.playbackMode===m.ProtoPlayerPlaybackModeEnum.ClickToPlay&&this.isFloatingModeEnabled()){this.qV=this.HV.cloneNode();this.$playerContentWrapper.querySelector(`.${I.s6.VideoWrapper}`).appendChild(this.qV)}}zV(){const t=this.RV.onFullScreenEnter.subscribe((()=>this.sy())),i=this.RV.onFullScreenExit.subscribe((()=>this.ny()));this.CV.push(i,t)}changeVideo(t,i=!1){if(this.adHandler){if(this.adHandler.linearInImpression||this.adHandler.nonLinearInImpression)this.adHandler.stopAd(Yt.ChangeVideo);else{const t=!0;this.Hg(t)}this.adHandler.userInteraction(i)}this.wp.setVideo(t)}play(t=!0){this.adHandler&&this.adHandler.linearInImpression?this.adHandler.play():this.wp.play(t)}pause(t=!0){var i,e;null===(i=this.adHandler)||void 0===i||i.pause(),(null===(e=this.adHandler)||void 0===e?void 0:e.linearInImpression)||this.wp.pause(t)}setNewVolume(t){super.setNewVolume(t),this.wp.volume=t}getVolume(){return this.wp.volume}get currentTime(){return this.wp.currentTime}set currentTime(t){this.wp.currentTime=t}get duration(){return this.wp.duration}getVideoDetails(){let t;return this.wp.getCurrentVideoData((i=>{t=this.WV(i)})),t}getUpNextVideoDetails(){let t;return this.wp.getUpNextVideoData((i=>{t=this.WV(i)})),t}toggleFullscreen(t=!this.RV.isFullscreen){return this.RV.isFullscreen===t||(t?this.OV():this.RV.exitFullScreen()),t}toggleCaptions(t=!this.wp.areCaptionsEnabled){t?this.showCaptions():this.hideCaptions()}togglePlay(){return this.wp.togglePlay()}toggleMute(){this.wp.toggleMute()}increaseVolume(t){this.wp.increaseVolume(t)}decreaseVolume(t){this.wp.decreaseVolume(t)}showCaptions(t){this.wp.showCaptions(t);const i=this.wp.getSelectedCaption();this.wp.updateCaptionsMenuUI(null==i?void 0:i.file)}getSubtitles(){return this.wp.getSubtitles()}hideCaptions(){this.wp.hideCaptions(),this.wp.updateCaptionsMenuUI()}toggleExpandButton(t){this.wp.toggleExpandButton(t)}getPlaylistId(){return this.Wg.playlistId}getPlaylistDetails(){return Object.assign(Object.assign({},this.Wg.getPlaylistDetails()),this.GV)}QV(t){return new Promise(((i,e)=>{this.wp.getVideoData(t,(t=>i(this.WV(t))),(t=>e(t)))}))}getAllMetadata(){const t=this.Wg.getPlaylistLength();return Promise.all([...Array(t)].map(((t,i)=>this.QV(i))))}setPlaylistDetails(t){(0,n.$K)(t)&&((0,n.QM)(t.name)||(0,n.QM)(t.description))&&(this.GV=Object.assign(Object.assign({},this.GV),t))}getQuality(){return this.wp.getQuality()}setQuality(t){this.wp.setQuality(t)}setAutoQuality(){this.wp.setAutoQuality()}getAvailableQualities(){return this.wp.getAvailableQualities()}destroy(){super.destroy(),this.JV.destroy(),this.wp&&(this.wp.destroy(),this.unsubscribeAll(this.wp)),(0,H.i)(this.CV),(0,H.i)(this.Hv)}setPreRollBreak(t){var i;this.Wg.setPreRollBreak(t),null===(i=this.JV)||void 0===i||i.setPreRollBreak(this.Wg.preRollBreak),this.wp.hasPreroll=(0,n.r)(this.Wg.preRollBreak)}setPostRollBreak(t){var i;this.Wg.setPostRollBreak(t),null===(i=this.JV)||void 0===i||i.setPostRollBreak(this.Wg.postRollBreak),this.wp.hasPostroll=(0,n.r)(this.Wg.postRollBreak)}WV(t){const{imageMaxHeight:i,ratioHeight:e,ratioWidth:s}=T,r=i/e*s;return{id:t.id,title:t.title,description:t.description,duration:(0,n.hj)(t.duration)?t.duration:this.wp.duration,keywords:t.keywords,url:t.clickUrl?this.app.services.MacrosService.setupMacros(t.clickUrl):"",customFields:t.customFields,thumbnail:t.getThumbnailUrl(r,i),publishDate:t.publishDate}}ag(){if(this.Bv)return;this.Rv||this.dg();const t=U[m.ProtoAdSlotsEnum[this.nh]];this.Bv=!0,this.Ov=!1;const i={adBreakPosition:t};this.nh===m.ProtoAdSlotsEnum.PostRoll&&(this.Dv=!0),this.app.services.EventsStorageService.emitAdBreakStart(i)}cg(){this.Bv&&(this.Bv=!1,this.app.services.EventsStorageService.emitAdBreakComplete(),this.Dv&&(this.Dv=!1,this.fg()))}ug(){this.Ov||(this.Bv&&this.cg(),this.Rv||this.dg(),this.Ov=!0,this.app.services.EventsStorageService.emitPlay())}pg(){this.Ov&&(this.Ov=!1,this.app.services.EventsStorageService.emitPause())}dg(){this.Rv||(this.Rv=!0,this.wp.getCurrentVideoData((({title:t,id:i,sourceItemId:e,keywords:s,duration:n,customFields:r})=>{const o=this.wp.streamFormat,h=e||i;this.app.services.EventsStorageService.emitSessionStart({name:t,keywords:s,mediaId:h,length:n,streamFormat:o,customFieldList:r,feed:"Video"})})))}fg(){this.Rv&&(this.Rv=!1,this.Ov=!1,this.Bv&&this.cg(),this.app.services.EventsStorageService.emitSessionEnd())}vg(){this.Rv&&(this.app.services.EventsStorageService.emitContentComplete(),this.Wg.postRollBreak||this.fg())}qg(){const t=this.nh===m.ProtoAdSlotsEnum.PostRoll?this.getUpNextVideoDetails():this.getVideoDetails();t?(this.adHandler.setContinueReadingCard({imageSrc:t.thumbnail,title:t.title}),this.adHandler.setAdMarkerTitle(t.title)):(this.adHandler.hideContinueReadingCard(),this.adHandler.hideAdMarkerTitle()),super.qg(),this.wp.hide()}Om(t,i=!1){super.Om(t,i),this.XV&&(this.XV.setSoundVolume(this.wp.volume),this.XV.setViewability(t),this.XV.setIsAppBackgrounded(i))}Go(){super.Go(),this.wp&&this.wp.resize(this.breakPointsHandler.currentBreakpointClass)}handleClose(){this.floatingModule&&this.floatingModule.isInFloating?(this.floatingModule.destroy(!0),0!==this.wp.volume&&this.setVolume(0)):this.RV.isFullscreen?this.RV.exitFullScreen():this.triggerDestroy()}generateHTML(){super.generateHTML(),this.setPlayerMinDimension(),this.HV=this.app.services.GlobalDomUtilsService.createElementByString(`<img class="${I.sN.ImagePlaceholder}">`),this.$playerWrapper.appendChild(this.HV)}setPlayerMinDimension(){this.zv=142}Co(t){super.Co(t),this.wp.getCurrentVideoData((t=>{var i,e;t.disableAdvertising&&((null===(i=this.adHandler)||void 0===i?void 0:i.linearInImpression)||(null===(e=this.adHandler)||void 0===e?void 0:e.nonLinearInImpression))&&(0,o.n)({level:o.D.WARN,message:"BaseVideoExperience_adImpression_onDisableAdvertising"})}))}YV(t){this.adHandler&&this.adHandler.setMediaRestrictions(t)}FV(){this.subscribe(F.C[F.C.Volume],this.wp,(({payload:{volume:t}})=>{this.adHandler?this.adHandler.setLinearVolume(t):this.Do(t)})),this.subscribe(k.wB.Timeupdate,this.wp,(({payload:{currentTime:t}})=>{this.Eg.contentTimeUpdate(t)})),this.subscribe(k.T$.NewVideo,this.wp,(()=>{this.mediator.publish(this,$o.NewVideo),this.subscribe(Ho.StateChanged,this.wp,this.LV),this.wp.getCurrentVideoData((t=>{var i;this.Eg.onNewMediaVideo(t.cuePoints,t.disableAdvertising);const e={mediaId:t.id,mediaKeywords:t.keywords,mediaLanguage:t.languageId,mediaInsights:t.insights};let s;this.YV(e),this.sl.currentMediaMetadata={mediaId:t.id,clickUrl:t.clickUrl,insights:(null===(i=t.insights)||void 0===i?void 0:i.insights)||[],sentimentAnalysis:t.sentimentAnalysis},s=(0,n.QM)(this.Wg.playlistThumbnail)?this.Wg.playlistThumbnail:t.getThumbnailUrl(this.$experienceContainer.clientWidth,this.$experienceContainer.clientHeight),this.adHandler&&this.adHandler.setAdLoadingBackgroundUrl(s),this.KV(s,t.altText),this.ZV(),this.mediator.publish(this,Ho.MediaMetaUpdate,{payload:{title:t.title,description:t.description}})}))})),this.subscribe(Ho.FirstFramePlayed,this.wp,(()=>{this.ih.mediaQuartile.next({quartile:W.yU.Start}),this.Ey(),this.dg()})),this.subscribe(Ho.StateChanged,this.wp,(({payload:t})=>{var i,e,s,n;switch(this.JV.changeState(t),this.tj(t),t){case k.Ez.PlayingState:this.mediator.publish(this,x.q0.Play,{payload:this.getVideoDetails()}),this.ug(),(0,r.pv)(this.$experienceContainer,I.s6.ClickToPlayThumbnail)&&((0,r.IV)(this.$experienceContainer,I.s6.ClickToPlayThumbnail),null===(e=null===(i=this.qV)||void 0===i?void 0:i.parentElement)||void 0===e||e.removeChild(this.qV)),null===(s=this.floatingStateMachine)||void 0===s||s.setPlayerPlay(!0);break;case k.Ez.PausedState:this.mediator.publish(this,x.q0.Pause,{payload:this.getVideoDetails()}),this.Ud.sessionPlaybackChanged.next({isPlaying:!1}),this.pg(),null===(n=this.floatingStateMachine)||void 0===n||n.setPlayerPause(!0);break;case k.Ez.StoppedState:this.Ud.sessionPlaybackChanged.next({isPlaying:!1});break;case k.Ez.PrerollState:case k.Ez.PostrollState:this.Ud.sessionPlaybackChanged.next({isPlaying:!0}),this.ag();break;case k.Ez.HiddenState:this.Ud.sessionPlaybackChanged.next({isPlaying:!0}),this.pg(),this.ag();break;default:this.Ud.sessionPlaybackChanged.next({isPlaying:!0})}})),this.floatingModule&&this.subscribe(y.Uh.UserInteraction,this.wp,this.Kv),this.adHandler&&this.subscribe(y.Uh.UserInteraction,this.wp,(({payload:{playback:t}})=>{!1===t&&(this.adHandler.pause(),this.Eg.onContentStop()),this.adHandler.userInteraction(t)})),this.subscribe(y.Uh.UserInteraction,this.wp,(({payload:{clickedNext:t,clickedPrev:i}})=>{(t||i)&&this.fg()})),this.subscribe(Ho.ContentQuartiles,this.wp,(({payload:t})=>{let i;switch(this.ih.mediaQuartile.next({quartile:w.EN.fromProtoGetQuartile(t)}),t){case m.ProtoQuartilesEnum.First:i=$o.VideoCompleted25;break;case m.ProtoQuartilesEnum.Second:i=$o.VideoCompleted50;break;case m.ProtoQuartilesEnum.Third:i=$o.VideoCompleted75;break;case m.ProtoQuartilesEnum.Fourth:i=$o.VideoCompleted100}i&&this.mediator.publish(this,i,{payload:this.getVideoDetails()})})),this.subscribe(Ho.ContentQuartiles,this.wp,(({payload:t})=>{t===m.ProtoQuartilesEnum.Fourth&&this.vg()})),this.subscribe(F.C[F.C.OverlayClick],this.wp,(()=>{this.mediator.publish(this,$o.PlayerClicked,{payload:this.getVideoDetails()}),this.ih.mediaClick.next({type:N.$.PauseClick})})),this.subscribe(k.XQ.Change,this.wp,(t=>this.mediator.publish(this,x.q0.QualityChanged,t))),this.subscribe(k.T$.PlayError,this.wp,(t=>{this.mediator.publish(this,x.q0.PlayError,t),this.app.services.EventsStorageService.emitPlayError()})),this.subscribe(F.C[F.C.CaptionOn],this.wp,(()=>this.mediator.publish(this,$o.SubtitlesVisibilityChanged,{payload:!0}))),this.subscribe(F.C[F.C.CaptionOff],this.wp,(()=>this.mediator.publish(this,$o.SubtitlesVisibilityChanged,{payload:!1}))),this.adHandler&&this.CV.push(this.adHandler.onLinearUiComponentEvent.subscribe((t=>{if(t.type===F.C.Volume){const{volume:i}=t.payload;this.Do(i),this.wp.volume=i}})),this.adHandler.onLinearNoFill.subscribe((()=>{var t;null===(t=this.Eg)||void 0===t||t.onLinearNoFill()}))),this.subscribe(k.T$.NewVideo,this.wp,(()=>{this.TV?(this.TV=!1,this.Wg.adPlaybackMode===m.ProtoAdPlaybackMode.Autoplay&&this.Wg.playbackMode!==m.ProtoPlayerPlaybackModeEnum.ClickToPlay&&0===this.Wg.preRollBreak&&this.Pg(m.ProtoAdSlotsEnum.MidRoll)):this.Mg()})),this.Wg.isCloseButton&&this.subscribe(F.C[F.C.Close],this.wp,(()=>this.handleClose())),this.subscribe(y.Uh.GeneralUserInteraction,this.wp,(({payload:{type:t}})=>{this.ih.mediaClick.next({type:t})}))}VV(){this.adHandler&&(this.adHandler.start(this.wp.width,this.wp.height,this.Wg.soundMode===wo.ProtoPlayerSoundMode.On?1:0,!1,!0),this.Eg.forceRecheck())}tj(t){this.BV(t)()}xg(t){!this.kV&&this.adHandler&&this.adHandler.adStateChange(t,this.Cg.getMaxAdSlotDuration())}kg(t){const{duration:i}=this.wp;this.Eg.onAdStateChange(t,{maxAdPodDuration:this.Cg.getMaxAdPodDuration(),maxAdSlotDuration:this.Cg.getMaxAdSlotDuration()},i)}NV(){this.RV=new D(this.app.services.GlobalDomUtilsService,this.$playerContainer,this.app.config.os.os),this.ij()}ij(){this.zV(),this.subscribe(F.C[F.C.Expand],this.wp,this.OV),this.subscribe(F.C[F.C.Collapse],this.wp,(()=>this.RV.exitFullScreen()))}KV(t,i){this.HV.style.display="none",this.HV.onload=()=>{this.HV.style.display=null},(0,n.QM)(t)&&this.HV.setAttribute("src",t),this.HV.setAttribute("alt",i||""),this.HV.setAttribute("id",`cnx-thumbnail-id-${this.app.config.sessionId}`)}ZV(){if((0,n.$K)(this.HV)){const t=this.HV.getAttribute("id");this.wp.setVideoTagLabelledByAttribute(t)}}jV(t,i){const{preRollBreak:e,postRollBreak:s}=this.Wg;this.JV=new C(t,i,e,s)}UV(){this.XV=new V(this,this.Wg.playbackMode),this.subscribe(M[M.Play],this.XV,(t=>{var i,e;this.wp.play(),(null===(i=this.adHandler)||void 0===i?void 0:i.nonLinearInImpression)&&(null===(e=this.adHandler)||void 0===e||e.play()),t.payload&&(0,n.hj)(t.payload.volume)&&super.setNewVolume(t.payload.volume)})),this.subscribe(M[M.Pause],this.XV,(t=>{var i,e;this.wp.pause(),(null===(i=this.adHandler)||void 0===i?void 0:i.nonLinearInImpression)&&(null===(e=this.adHandler)||void 0===e||e.pause()),t.payload&&(0,n.hj)(t.payload.volume)&&super.setNewVolume(t.payload.volume)})),this.subscribe(y.Uh.UserInteraction,this.wp,(({payload:{playback:t}})=>{(0,n.$K)(t)&&this.XV.setUserPlayback(t)}));const t=this.wp.canPlay().subscribe((t=>{this.XV.setCanPlay(t)})),i=this.xV.subscribe((t=>{this.XV.setIsFullscreen(t)}));this.CV.push(t,i)}}var Qo=h(8843);var Jo=h(89);var Xo,Yo,Ko;!function(t){t[t.StateChanged=0]="StateChanged",t[t.ContentEnd=1]="ContentEnd",t[t.VideoQueued=2]="VideoQueued"}(Xo||(Xo={}));class Zo{constructor(t,i,e,s,n,r=!1,o){this.mediator=t,this.ej=i,this.nj=e,this.rj=s,this.oj=n,this.aj=r,this.cj=o,this.dj=!1,this.lj=!1,this.uj=!1,this.pj=!1,this.mj=500,this.vj=new R.x,this.gj=0,this.$m(),this.initListeners()}$m(){this.Hm=k.Ez.StoppedState,this.yj=k.Ez.StoppedState,this.cj&&(this.dj=!0)}bj(){this.Ij=this.nj.onVideoEvents.subscribe((t=>{switch(t){case k.wB.Playing:this.wj();break;case k.wB.Error:this._j();break;case k.wB.Pause:this.Sj()}}))}wj(){switch(this.Hm){case k.Ez.PlayingState:return;case k.Ez.PausedState:case k.Ez.StoppedState:case k.Ez.BufferingState:this.Pj(k.Ez.PlayingState);break;case k.Ez.HiddenState:case k.Ez.PrerollState:this.Aj()}}_j(){switch(this.Hm){case k.Ez.BufferingState:case k.Ez.PlayingState:this.Pj(k.Ez.PausedState)}}Sj(){switch(this.Hm){case k.Ez.BufferingState:case k.Ez.PlayingState:this.Pj(k.Ez.PausedState)}}initListeners(){var t,i;this.vj.pipe((t=400,void 0===i&&(i=Qo.z),(0,Dt.e)((function(e,s){var n=null,r=null,o=null,h=function(){if(n){n.unsubscribe(),n=null;var t=r;r=null,s.next(t)}};function a(){var e=o+t,r=i.now();if(r<e)return n=this.schedule(void 0,e-r),void s.add(n);h()}e.subscribe((0,Vt.x)(s,(function(e){r=e,o=i.now(),n||(n=i.schedule(a,t),s.add(n))}),(function(){h(),s.complete()}),void 0,(function(){r=n=null})))}))),(0,Jo.q)(1)).subscribe((t=>{this.xj(t),this.gj=0})),this.bj()}Pj(t){this.Hm!==t&&(this.yj=this.Hm,this.Hm=t,this.mediator.publish(this,Xo[Xo.StateChanged],{payload:this.Hm}))}kj(t){return this.Hm===t}Tj(){this.Pj(k.Ez.PrerollState),this.dj=!0}Cj(){this.Ej===k.Ez.PlayingState?this.Mj():this.Aj()}Lj(){this.Pj(k.Ez.PostrollState)}Bj(){this.Ej===k.Ez.PausedState?(this.uj=!0,this.stop()):(this.uj=!1,this.mediator.publish(this,Xo[Xo.ContentEnd]))}Aj(){this.nj.pause(),this.Pj(k.Ez.PausedState)}Mj(){this.Pj(k.Ez.BufferingState),this.ej.getCurrentVideoData((()=>{this.kj(k.Ez.HiddenState)||this.Ej===k.Ez.PausedState||this.nj.play()}))}Oj(){this.Hm!==k.Ez.PostrollState&&(this.dj=!1)}resume(){this.yj&&this.Pj(this.yj)}play(){this.Ej=k.Ez.PlayingState,this.kj(k.Ez.PlayingState)||this.kj(k.Ez.PrerollState)||this.kj(k.Ez.PostrollState)||this.kj(k.Ez.HiddenState)||this.kj(k.Ez.InCuePoint)||(!this.rj||this.dj||this.lj?this.kj(k.Ez.StoppedState)&&this.uj?this.Bj():this.Mj():this.Tj())}isInPlayingState(){return this.kj(k.Ez.PlayingState)}setVideoQueue(t,i){0===this.vj.observers.length&&this.initListeners(),i?this.gj--:this.gj++;const e=this.ej.getAdjustedVideoIndex(t,this.gj);this.vj.next(e),this.mediator.publish(this,Xo[Xo.VideoQueued],{payload:e})}onEnterCuePoint(){this.nj.pause(),this.Pj(k.Ez.InCuePoint)}onExitCuePoint(){this.kj(k.Ez.HiddenState)||(this.Ej===k.Ez.PlayingState?this.Mj():this.Aj())}xj(t){if(this.nj.pause(),this.Oj(),this.Pj(k.Ez.BufferingState),this.Rj&&this.Rj.isPending)try{this.Rj.reject(),this.Rj=null}catch(t){this.Rj=null}const i=this.ej.setVideo(t);this.Rj=new B.C,this.Rj.resolve(i),this.Rj.promise.then((t=>{this.Rj=null,this.nj.setSource(t).then((()=>this.play()))}))}set hasPreroll(t){this.rj=t,this.dj=!0}set hasPostroll(t){this.oj=t}pause(t=!1){this.Ej=k.Ez.PausedState,this.kj(k.Ez.PrerollState)||this.kj(k.Ez.PostrollState)||this.kj(k.Ez.HiddenState)||this.kj(k.Ez.InCuePoint)||this.Aj()}pauseToggle(){if(this.kj(k.Ez.PausedState)||this.kj(k.Ez.PlayingState))return this.kj(k.Ez.PausedState)&&this.pj?(this.pj=!1,void this.play()):this.kj(k.Ez.PlayingState)?(this.pj=!0,void this.pause()):void 0}stop(){this.nj.pause(),this.Pj(k.Ez.StoppedState)}hide(){this.nj.hide(),this.nj.pause(),this.Pj(k.Ez.HiddenState)}show(t=!0){this.kj(k.Ez.HiddenState)&&(this.nj.show(),this.yj!==k.Ez.PostrollState?t&&(this.Ej===k.Ez.PlayingState?this.Mj():this.Aj()):this.Bj())}handleVideoEnd(){this.oj&&!this.lj?this.Lj():this.Bj()}onEnterBuffering(){this.kj(k.Ez.PlayingState)&&this.Pj(k.Ez.BufferingState)}onExitBuffering(){this.kj(k.Ez.BufferingState)&&(this.Ej===k.Ez.PlayingState?this.Mj():this.Aj())}getCurrentState(){return this.Hm}replay(){this.nj.currentTime=0,!this.rj||this.lj?this.Mj():this.Tj()}exitRollBreak(){this.Hm!==k.Ez.PostrollState?this.Cj():this.Bj()}onFullScreenChange(t){this.aj&&(this.lj=t,t||setTimeout((()=>{this.Ej===k.Ez.PlayingState?(this.pause(),this.play()):this.pause()}),this.mj))}destroy(){this.Ij.unsubscribe()}}!function(t){t.Autoplay="autoplay",t.Autochain="autochain",t.UserInitiated="user initiated"}(Yo||(Yo={}));class th{constructor(t){this.streamFormat=Yo.Autoplay,this.isMuted=!0,t===m.ProtoPlayerPlaybackModeEnum.ClickToPlay&&(this.streamFormat=Yo.UserInitiated)}get streamFormatValue(){return`${this.streamFormat}${this.isMuted?" muted":""}`}}class ih{constructor(t){this.Dj=[],this.Dj=t,this.Vj(0)}jj(){this.Fj(this.Nj).getMetadata()}Vj(t){this.Nj=t,this.jj()}Fj(t){return this.Dj[t]}setAvailableQualitiesForSourceMeta(t,i){t.setAvailableQualities(i)}get nextVideoIndex(){return this.Nj===this.Dj.length-1?0:this.Nj+1}get prevVideoIndex(){return 0===this.Nj?this.Dj.length-1:this.Nj-1}get currentVideoIndex(){return this.Nj}getCurrentVideoData(t,i){this.Fj(this.Nj).getMetadata(t,i)}getVideoData(t,i,e=null){this.Fj(t).getMetadata(i,e)}getAdjustedVideoIndex(t,i){return 1===i||-1===i?t:i>0?t+i<this.length?t+i:this.length-1:t+i<0?0:t+i}setVideo(t){return new Promise((i=>{this.Fj(t).getMetadata((e=>{this.Vj(t),i(e)}))}))}get length(){return this.Dj.length}destroy(){this.Dj=[]}}!function(t){t.Play="play",t.Pause="pause",t.Volume="volume",t.Seek="seek",t.SeekingStart="seekstart",t.SeekingStop="seekstop",t.Quality="quality",t.CaptionOn="captionon",t.CaptionOff="captionoff"}(Ko||(Ko={}));var eh=h(4524),sh=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};const nh={[m.ProtoVideoQuality.High1080p]:{quality:k.ZH.Strict,height:1080},[m.ProtoVideoQuality.High720p]:{quality:k.ZH.Strict,height:720},[m.ProtoVideoQuality.Medium360p]:{quality:k.ZH.Strict,height:360}};class rh extends g._{constructor(t,i,e,s,n){super(),this.mediator=t,this.Wg=i,this._P=e,this.NO=s,this.Uj=n,this.$j=!1,this.qj=!0,this.Hj=new zo.X(!1),this.zj=new zo.X(!1),this.subscriptions=[],this.Wj(),this.Qj(),this.Jj=new th(this.Wg.playbackMode)}set hasPostroll(t){this.Yj.hasPostroll=t}set hasPreroll(t){this.Yj.hasPreroll=t}start(){return sh(this,void 0,void 0,(function*(){yield this.Kj(),this.ql()}))}get streamFormat(){return this.Jj.streamFormatValue}play(t=!1){t&&(this.mediator.publish(this,y.Uh.UserInteraction,{payload:{playback:!0}}),this.Jj.streamFormat=Yo.UserInitiated),this.Yj.play()}pause(t=!1){t&&this.mediator.publish(this,y.Uh.UserInteraction,{payload:{playback:!1}}),this.Yj.pause(t)}setVideo(t,i=!1){this.Yj.setVideoQueue(t,i)}show(t=!0){this.Yj.show(t)}hide(){this.Yj.hide()}get isHidden(){return this.Yj.getCurrentState()===k.Ez.HiddenState}enterFullscreen(){this.Fp=!0,this.Zj.enterFullscreen(),this.Yj.onFullScreenChange(!0)}exitFullscreen(){this.Fp=!1,this.Zj.exitFullscreen(),this.Yj.onFullScreenChange(!1)}resize(t){var i,e;null===(i=this.Zj)||void 0===i||i.onResize(t),null===(e=this.tF)||void 0===e||e.onResize(t)}get width(){return this.nj.width}get height(){return this.nj.height}get volume(){return this.nj.volume}set volume(t){var i;this.nj.volume=t,null===(i=this.Zj)||void 0===i||i.updateVolume(t),this.Jj.isMuted=t<=0}getCurrentVideoData(t){return this.ej.getCurrentVideoData(t)}getVideoData(t,i,e=null){return this.ej.getVideoData(t,i,e)}getUpNextVideoData(t){return this.ej.getVideoData(this.ej.nextVideoIndex,t)}get isIosFullscreen(){return this.nj.isIosFullscreen}set isIosFullscreen(t){this.nj.isIosFullscreen=t}get currentTime(){return this.nj.currentTime}set currentTime(t){this.nj.currentTime=t}get duration(){return this.nj.duration}toggleCaptions(){this.nj.hasSubtitles()&&(this.nj.toggleCaptions(),this.Zj.toggleCaptionButton(!0),this.mediator.publish(this,F.C[F.C.CaptionOn]))}togglePlay(){return this.nj.togglePlay()}toggleMute(){this.nj.toggleMute(),this.Zj.updateVolume(this.nj.volume)}increaseVolume(t){this.nj.increaseVolume(t),this.Zj.updateVolume(this.nj.volume)}decreaseVolume(t){this.nj.decreaseVolume(t),this.Zj.updateVolume(this.nj.volume)}showCaptions(t){this.nj.hasSubtitles()&&(this.nj.showCaptions(t),this.Zj.toggleCaptionButton(!0),this.mediator.publish(this,F.C[F.C.CaptionOn]))}get areCaptionsEnabled(){return this.nj.areCaptionsEnabled}getSelectedCaption(){return this.nj.getSelectedCaption()}updateCaptionsMenuUI(t){this.Zj.updateDefaultCaption(t)}getSubtitles(){return this.nj.getSubtitles()}hideCaptions(){this.nj.hideCaptions(),this.Zj.toggleCaptionButton(!1),this.mediator.publish(this,F.C[F.C.CaptionOff])}toggleExpandButton(t){this.Zj.toggleExpandButton(t)}getQuality(){let t;return this.ej.getCurrentVideoData((i=>{t=i.getClosestSourceQuality(this.nj.currentQualitySettings.height).videoHeight})),t}setQuality(t){this.ej.getCurrentVideoData((i=>{const e=i.getClosestSourceQuality(t);this.nj.setQuality({height:e.videoHeight,quality:k.ZH.Strict})}))}setAutoQuality(){this.nj.setQuality({height:this.nj.height,quality:k.ZH.Auto})}getAvailableQualities(){let t=[];return this.ej.getCurrentVideoData((i=>{t=i.getAvailableQualities().map((t=>t.videoHeight))})),t}stop(){this.Yj&&this.Yj.stop()}resume(){this.Yj&&this.Yj.resume()}startContent(){this.Yj.exitRollBreak()}setVideoTagLabelledByAttribute(t){this.nj.setVideoTagLabelledByAttribute(t)}destroy(){var t;null===(t=this.Zj)||void 0===t||t.destroy(),this.ej.destroy(),this.nj.destroy(),this.Yj.destroy(),(0,H.i)(this.subscriptions)}canPlay(){return this.Hj.asObservable()}onReady(){return this.zj.asObservable()}iF(){return new Promise(((t,i)=>{try{this.ej.getCurrentVideoData((i=>sh(this,void 0,void 0,(function*(){yield this.nj.setSource(i),this.Zj.updateCurrentVideo(i),this.eF(i),this.sF(i,this.nj.currentQualitySettings),t()}))),(()=>i(new Error("getCurrentVideoData fail callback"))))}catch(t){i(t)}}))}nF(){this.subscribe(Xo[Xo.StateChanged],this.Yj,(({payload:t})=>{this.Zj.changeState(t),this.mediator.publish(this,Ho.StateChanged,{payload:t})})),this.subscribe(Xo[Xo.ContentEnd],this.Yj,(()=>{this.rF()})),this.subscribe(Xo[Xo.VideoQueued],this.Yj,(({payload:t})=>{this.mediator.publish(this,Ho.VideoQueued,{payload:{videoIndex:t}})}))}oF(){this.subscriptions.push(this.Zj.onUIEvent.subscribe((t=>{switch(t.type){case Ko.Play:if(this.qj&&this.Wg.playbackMode===m.ProtoPlayerPlaybackModeEnum.ClickToPlay){const t=this.Wg.soundMode===m.ProtoPlayerSoundMode.On?1:0;this.volume=t,this.mediator.publish(this,F.C[F.C.Volume],{payload:{volume:t}})}this.qj=!1,this.mediator.publish(this,y.Uh.UserInteraction,{payload:{playback:!0}}),this.play();break;case Ko.Volume:const{volume:i}=t.payload;this.nj.volume=i,this.Jj.isMuted=i<=0,this.mediator.publish(this,y.Uh.UserInteraction,{payload:{volume:!0}}),this.mediator.publish(this,F.C[F.C.Volume],{payload:{volume:i}});break;case Ko.Pause:this.mediator.publish(this,y.Uh.UserInteraction,{payload:{playback:!1}});const e=!0;this.pause(e);break;case Ko.Seek:const{seekedTime:s}=t.payload;this.hF=s;break;case Ko.SeekingStart:this.Yj.pauseToggle();break;case Ko.SeekingStop:this.nj.forceCurrentTime(this.hF),this.Yj.pauseToggle();break;case eh.t.OverlayClick:this.ej.getCurrentVideoData((t=>{(0,n.QM)(t.clickUrl)?(this.Wg.disableClickUrl||(this._P.services.MacrosService.setVideoTime(this.nj.currentTime),this._P.services.GlobalDomUtilsService.open(this._P.services.MacrosService.setupMacros(t.clickUrl),O.bS.Blank)),this.mediator.publish(this,y.Uh.GeneralUserInteraction,{payload:{type:W.$u.UrlClick}})):this.pause(!0),this.mediator.publish(this,F.C[F.C.OverlayClick])}));break;case eh.t.Expand:this.mediator.publish(this,F.C[F.C.Expand]);break;case eh.t.Collapse:this.mediator.publish(this,F.C[F.C.Collapse]);break;case Ko.Quality:const{quality:r}=t.payload;this.nj.setQuality(r);break;case eh.t.Close:this.mediator.publish(this,y.Uh.UserInteraction,{payload:{playback:!1,isFullscreenClose:this.Fp}}),this.mediator.publish(this,F.C[F.C.Close]);break;case Ko.CaptionOn:const{captionUrl:o}=t.payload;this.showCaptions(o);break;case Ko.CaptionOff:this.hideCaptions();break;case eh.t.GeneralUserInteraction:const{payload:h}=t;this.mediator.publish(this,y.Uh.GeneralUserInteraction,{payload:h})}}))),this.subscribe(F.C[F.C.CaptionOn],this.nj,(()=>{this.Zj.toggleCaptionButton(!0)})),this.subscribe(F.C[F.C.CaptionOff],this.nj,(()=>{this.Zj.toggleCaptionButton(!1)})),this.subscribe(F.C[F.C.CaptionUpdate],this.nj,(({payload:t})=>{this.Zj.updateActiveCue(t)}))}Oj(t=!0){t&&(this.ej.getCurrentVideoData((t=>{var i,e;if(this.aF(t),this.Zj.updateCurrentVideo(t),this.eF(t),null===(i=this.tF)||void 0===i||i.updateCurrentVideo(t),this.sF(t,this.nj.currentQualitySettings),this.Wg.closedCaptionDefault&&t.subtitles){const i=null===(e=t.getDefaultSubtitle())||void 0===e?void 0:e.file;setTimeout((()=>{this.showCaptions(i),this.Zj.updateDefaultCaption(i)}),0)}else this.hideCaptions(),this.Zj.updateDefaultCaption()})),this.Zj.updateActiveCue()),this.mediator.publish(this,k.T$.NewVideo,{payload:{videoIndex:this.ej.currentVideoIndex}}),this.$j=!1,this.cF()}ql(){this.dF(),this.lF(),this.uF()}pF(){return{logoPosition:this.Wg.logoPosition,logoUrl:this.Wg.logoUrl,isMobile:this._P.config.isMobile,hasUpNext:this.Wg.upNextMode===wo.ProtoPlayerUpNextMode.Next,accentColor:this.Wg.accentColor||I.QO.Connatix,iconsColor:this.Wg.iconsColor||I.QO.Icons,tooltipBackgroundColor:this.Wg.tooltipBackgroundColor||I.QO.Connatix,tooltipTextColor:this.Wg.tooltipTextColor||I.QO.Icons,closeButtonMode:this.Wg.closeButtonMode,floatingCloseButtonMode:this.Wg.floatingSettings.floatingCloseButtonMode,isCloseButton:this.Wg.isCloseButton,uiComponentsVisibility:this.Wg.uiComponentsVisibility,sharingDestinations:this.Wg.sharingDestinations,closedCaptionDefault:this.Wg.closedCaptionDefault,alwaysDisplayControls:this.Wg.alwaysDisplayControls,os:this._P.config.os.os,sdkVersion:this._P.config.sdkVersion,isPinned:this.Wg.floatingSettings.isPinnedFloating,enableNewUI:this.Wg.enableNewUI}}Qj(){const t={browser:this._P.config.browser.browserType,os:this._P.config.os.os,osVersion:this._P.config.os.osVersion},i=this.Wg.soundMode===m.ProtoPlayerSoundMode.On&&this.Wg.playbackMode!==m.ProtoPlayerPlaybackModeEnum.ClickToPlay?1:0;this.fF=nh[this.Wg.videoQuality],this.mF(t,i),this.subscribe(k.XQ.Loaded,this.nj,(({payload:{qualityList:t,videoMeta:i}})=>{this.ej.setAvailableQualitiesForSourceMeta(i,t),this.Zj&&this.Zj.updateCurrentVideo(i)})),this.subscribe(k.T$.Buffering,this.nj,(()=>{this.Yj.onEnterBuffering()})),this.subscribe(k.T$.Buffered,this.nj,(()=>{this.Yj.onExitBuffering()}))}sF(t,i){const e=t.getAvailableQualities();if((0,b.BZ)(e)){const e=t.getClosestSourceQuality(i.height).isHD;this.Zj.updateQuality(i,e)}}aF(t){this._P.services.MacrosService.setVideoDuration(t.duration),this._P.services.MacrosService.setVideoTitle(t.title),this._P.services.MacrosService.setVideoDescription(t.description),this._P.services.MacrosService.setVideoUrl(t.clickUrl),this._P.services.MacrosService.setVideoId(t.id)}Wj(){this.ej=new ih(this.Wg.playlist)}Kj(){return sh(this,void 0,void 0,(function*(){const t=this.pF();yield this.vF(t),1===this.ej.length&&this.Zj.togglePlaylistControls(!1),this.Zj.updateVolume(this.Wg.soundMode===m.ProtoPlayerSoundMode.On?1:0)}))}dF(){this.relay(k.T$.PlayError,this.nj,this,this.mediator),this.subscribe(k.T$.NewVideo,this.nj,(()=>{this.Oj()}))}lF(){this.subscribe(k.wB.Timeupdate,this.nj,(({payload:{isPlaying:t}})=>{this.Zj.updateCurrentTime(this.nj.currentTime,this.nj.duration),this._P.services.MacrosService.setVideoTime(this.nj.currentTime),!this.$j&&t&&(this.$j=!0,this.mediator.publish(this,Ho.FirstFramePlayed)),this.nj.currentTime!==this.gF&&this.yF(t),this.gF=this.nj.currentTime,this.mediator.publish(this,k.wB.Timeupdate,{payload:{currentTime:this.nj.currentTime}})})),this.subscribe(k.wB.Ended,this.nj,(()=>{this.Yj.handleVideoEnd()}))}uF(){this.subscribe(k.XQ.CurrentQuality,this.nj,(({payload:t})=>{this.ej.getCurrentVideoData((i=>{this.sF(i,t)}))})),this.subscribe(k.XQ.Change,this.nj,(({payload:t})=>{this.ej.getCurrentVideoData((i=>{const e=i.getAvailableQualities();if((0,b.BZ)(e)){const e=i.getClosestSourceQuality(t);this.fF={quality:k.ZH.Strict,height:e.videoHeight},this.mediator.publish(this,k.XQ.Change,{payload:e.videoHeight})}}))}))}eF(t){const i=t.getThumbnailUrl(this.NO.clientWidth,this.NO.clientHeight);this.mediator.publish(this,k.d0.NewThumbnail,{payload:{thumbnailUrl:i}})}}class oh extends Zo{play(){if(this.bF)return this.Ej=k.Ez.PlayingState,this.bF=!1,void this.Tj();super.play()}pause(t=!1){this.kj(k.Ez.LiveStreamEnded)||this.kj(k.Ez.LiveStreamStarting)||this.kj(k.Ez.LiveStreamStopped)||(t&&(this.bF=!0),super.pause())}endOfStream(){this.pause(),this.handleVideoEnd()}enterLiveNotSupported(){this.Pj(k.Ez.LiveStreamNotSupported)}enterLiveStreamStopped(){this.Pj(k.Ez.LiveStreamStopped)}$m(){this.Hm=k.Ez.LiveStreamStarting,this.yj=k.Ez.LiveStreamStarting}Bj(){this.Pj(k.Ez.LiveStreamEnded)}Aj(){this.nj.pause(),this.Pj(k.Ez.LiveStreamStopped)}}class hh{constructor(t){this.IF=[{id:k.L5.H264,extension:"mp4",type:"video/mp4"},{id:k.L5.Hevc,extension:"mp4",type:"video/mp4"}],this.wF=this.IF.find((i=>i.id===t))}get type(){const t=this.wF.codecs?`codecs=${this.wF.codecs}`:"";return`${this.wF.type}; ${t}`}get id(){return this.wF.id}}class ah{constructor(t,i){this.Pf=t,this.Qp=i,this._F={quality:k.ZH.Auto,height:360},this.resizeObserverBinded=!1,this.SF=new R.x,this.PF=new zo.X(this._F),this.AF=30,this.Vf=()=>{const t=this.Qp.clientHeight;if(this.xF(t)&&this.currentQualitySettings.quality===k.ZH.Auto){const i={height:t,quality:k.ZH.Auto};this.setCurrentQualitySettings(i),this.PF.next(i)}}}setCurrentQualitySettings(t){this._F.quality=t.quality,this._F.height!==t.height&&(this._F.height=t.height,this.SF.next())}xF(t){return!this._F.height||t/this._F.height*100-100>this.AF}addResizeObserver(){this.resizeObserverBinded=!0,this.Pf.on(this.Qp,this.Vf)}removeResizeObserver(){this.resizeObserverBinded=!1,this.Pf.off(this.Qp,this.Vf)}setQuality(t){t.quality===k.ZH.Auto?this.resizeObserverBinded||(this.setCurrentQualitySettings({height:t.height,quality:t.quality}),this.addResizeObserver(),this.Vf()):(this.resizeObserverBinded&&this.removeResizeObserver(),this.setCurrentQualitySettings(t)),this.PF.next(this._F)}get currentQualitySettings(){return this._F}get onQualityChange(){return this.SF.asObservable()}get onCurrentQuality(){return this.PF.asObservable()}destroy(){this.removeResizeObserver()}}class ch{constructor(t,i){this.Lp=t,this.j_=i,this.kF=new R.x,this.SF=new R.x,this.PF=new R.x,this.onTrackLoaded=this.kF.asObservable(),this.onQualityChange=this.SF.asObservable(),this.onCurrentQuality=this.PF.asObservable(),this.TF=()=>{this.kF.next()}}CF(t){this.EF=t}LF(t){this.j_.innerHTML="",t.forEach((t=>{this.j_.appendChild(t)}))}BF(){return this.OF}RF(t){var i;if(null===(i=this.OF)||void 0===i||i.remove(),this.OF=null,this.DF=t,this.EF&&this.EF.subtitles&&t){this.j_.childNodes.forEach((t=>{"track"===t.nodeName.toLowerCase()&&t.remove()}));const i=this.Lp.createElement("track");i.src=t.file,i.srclang=t.code,i.label=t.title,i.kind="subtitle",i.default=!0,i.addEventListener("load",this.TF,!1),i.addEventListener("loaded",this.TF,!1),this.j_.appendChild(i),this.OF=i}}}var dh,lh,uh;!function(t){t[t.MP4=0]="MP4",t[t.HLS=1]="HLS"}(dh||(dh={}));class ph extends ch{constructor(t,i,e,s,n={},r){super(t,s),this.Pf=i,this.NO=e,this.fF=r,this.CV=[],this.VF=null,this.jF=10.13,this.handlerType=dh.MP4,this.FF=this.NF(n)}start(){try{this.UF=new ah(this.Pf,this.NO),this.Zp(),this.setQuality(this.fF)}catch(t){(0,o.n)({message:"Mp4SourceHandler_start",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}onQualityChanged(){return this.attachMedia()}setSource(t,i=!1){this.CF(t),this.$F(this.HF(),i)}setQuality(t){this.UF.setQuality(t)}get currentQualitySettings(){return this.UF.currentQualitySettings}attachMedia(){return new Promise((t=>{this.zF(),t()}))}detachMedia(){this.j_.removeAttribute("src"),this.$F(null)}destroy(){this.UF.destroy(),(0,H.i)(this.CV)}updateSubtitleTrackSource(t){this.RF(t)}getSelectedCaptionTrack(){return this.DF}Zp(){const t=this.UF.onCurrentQuality.subscribe((t=>this.PF.next(t))),i=this.UF.onQualityChange.subscribe((()=>this.WF(this.UF.currentQualitySettings.height)));this.CV.push(t,i)}WF(t){this.$F(this.HF()),this.SF.next(t)}QF(t){this.LF(t),this.j_.load()}HF(){return[...this.JF(),...this.BF()?[this.BF()]:[]]}JF(){if(!this.j_||!this.EF)return[];const t=[];return this.EF.getSources(this.UF.currentQualitySettings.height,this.FF).forEach((i=>{const e=this.Lp.createElement("source");e.src=i.src,e.type=i.type,t.push(e)})),t}zF(){this.VF&&(this.QF(this.VF),this.VF=null)}$F(t,i=!1){this.VF=t,i&&this.zF()}NF(t){let i;switch(t.os){case L.M.Ios:i=[k.L5.Hevc,k.L5.H264];break;case L.M.Mac:i=t.osVersion>this.jF&&t.browser===O.lI.Safari?[k.L5.Hevc,k.L5.H264]:[k.L5.H264];break;default:i=[k.L5.H264]}return i.map((t=>new hh(t)))}}!function(t){t.UnexpectedError="unexpectedError",t.BufferingError="bufferingError",t.FragBuffered="fragBuffered",t.ManifestLoaded="manifestLoaded",t.LevelSwitching="levelSwitching",t.StreamEnded="streamEnded"}(lh||(lh={})),function(t){t.Http="http",t.Https="https"}(uh||(uh={}));var fh=h(655),mh=h(5720),vh=h(3699);const gh={enableWorker:!1,capLevelToPlayerSize:!0,cnxRenderWindow:window,maxBufferSize:5e6,maxBufferLength:5,maxMaxBufferLength:10,liveBackBufferLength:0};class yh extends ch{constructor(t,i,e,s,n,r,o,h){super(t,i),this.D_=e,this.YF=s,this.fF=n,this.KF=r,this.Sv=o,this.ZF=h,this.iN=new R.x,this.onHlsEvent=this.iN.asObservable(),this.N_=[],this.eN=k.ZH.Auto,this.nN=320,this.rN=!1,this.oN=!1,this.hN=!1,this.handlerType=dh.HLS,this.aN=new zo.X(0),this.cN=!1,this.dN=!1,this.lN=!1,this.z_=()=>{this.H_.off(this.D_.Events.MEDIA_ATTACHED,this.z_);const t=this.uN(this.pN);this.H_.loadSource(t),this.H_.once(this.D_.Events.MANIFEST_PARSED,this.W_)},this.W_=()=>{this.H_.off(this.D_.Events.MANIFEST_PARSED,this.W_),this.H_.on(this.D_.Events.LEVEL_SWITCHING,this.fN),this.H_.on(this.D_.Events.LEVEL_SWITCHED,this.mN),this.H_.on(this.D_.Events.FRAG_BUFFERED,this.vN),this.H_.on(this.D_.Events.FRAG_LOADING,this.gN),this.H_.on(this.D_.Events.FRAG_LOADED,this.yN),this.H_.on(this.D_.Events.BUFFER_APPENDING,this.bN),this.H_.on(this.D_.Events.BUFFER_APPENDED,this.IN),this.H_.on(this.D_.Events.BUFFER_EOS,this.wN),this.pN=null,this.G_(),this._N(),this.SN(),this.PN.resolve()},this.AN=()=>{this.pN=null,this.j_.removeEventListener(k.wB.LoadedMetadata,this.AN),this.xN.resolve()},this._N=()=>{const t=function(t){const i=[];return t.forEach((t=>{i.some((i=>i.height===t.height))||i.push(t)})),i}(this.N_),i=t.map((t=>({videoHeight:t.height,isHD:t.height>=k.gQ,label:t.level.toString()})));this.iN.next({type:lh.ManifestLoaded,payload:{qualityList:i}})},this.vN=()=>{this.iN.next({type:lh.FragBuffered})},this.gN=()=>{this.rN=!0},this.yN=()=>{this.rN=!1},this.bN=()=>{this.oN=!0},this.IN=()=>{this.oN=!1},this.wN=()=>{this.iN.next({type:lh.StreamEnded})},this.U_=(t,i)=>{if(i.details===this.D_.ErrorDetails.BUFFER_STALLED_ERROR&&(this.rN||this.oN?this.iN.next({type:lh.BufferingError}):(this.hN||(this.shouldRecoverMediaError()&&this.H_.recoverMediaError(),this.j_.play().then((()=>{this.hN=!1})).catch((()=>{this.hN=!1}))),this.hN=!0)),i.fatal)switch(i.type){case this.D_.ErrorTypes.NETWORK_ERROR:if(i.details===this.D_.ErrorDetails.MANIFEST_PARSING_ERROR)return void this.kN("hls_network_error_manifest_parsing_error_FATAL");if(i.details===this.D_.ErrorDetails.MANIFEST_LOAD_ERROR)return void this.iN.next({type:lh.UnexpectedError});if(i.details===this.D_.ErrorDetails.LEVEL_LOAD_ERROR&&this.aN.next(this.aN.value+1),this.cN)return this.wN(),void(this.cN=!1);this.H_.startLoad();break;case this.D_.ErrorTypes.MEDIA_ERROR:this.H_.recoverMediaError();break;default:this.kN("hls_unexpected_error_FATAL",`type_${i.type}_details_${i.details}`)}else i.type===this.D_.ErrorTypes.MEDIA_ERROR&&i.details===this.D_.ErrorDetails.BUFFER_APPENDING_ERROR&&this.kN("hls_media_error_buffer_appending_error"),i.type===this.D_.ErrorTypes.NETWORK_ERROR&&i.details===this.D_.ErrorDetails.MANIFEST_PARSING_ERROR&&this.kN("hls_network_error_manifest_parsing_error")},this.TN=()=>{this.kN("hls_video_tag_error",`code_${this.j_.error.code}_message_${this.j_.error.message}`)},this.mN=(t,i)=>{this.nN=this.N_.find((t=>t.level===i.level)).height,this.SF.next(this.currentQualitySettings.height),this.PF.next(this.currentQualitySettings)},this.fN=()=>{this.iN.next({type:lh.LevelSwitching})},this.D_.isSupported()&&(this.H_=this.CN()),this.nN=this.fF.height,this.eN=this.fF.quality}start(){}get liveSyncPosition(){if(this.H_)return this.H_.liveSyncPosition}setSource(t,i=!1){this.dN=this.KF&&!t.isExternalSource,this.H_&&this.dN&&(this.lN||(this.lN=!0,this.H_.autoLevelCapping=1)),this.MN=t.id,this.CF(t),this.pN=t,i&&this.attachMedia()}attachMedia(){return!this.H_&&this.D_.isSupported()&&(this.H_=this.CN()),new Promise((t=>{if(this.H_?this.H_.on(this.D_.Events.ERROR,this.U_):this.j_.addEventListener(k.wB.Error,this.TN),this.initLiveStreamRetry(),this.pN){const i=this.BF()?[this.BF()]:[];this.LF(i),this.H_?this.LN().then((()=>{t()})):this.BN().then((()=>{t()}))}else t()}))}detachMedia(){this.N_=[],this.H_?(this.H_.detachMedia(),this.destroy()):(this.j_.removeAttribute("src"),this.j_.removeEventListener(k.wB.LoadedMetadata,this.AN),this.j_.removeEventListener(k.wB.Error,this.TN))}setQuality(t){this.eN=t.quality,this.nN=t.height,this.H_&&this.SN(),this.SF.next(this.currentQualitySettings.height),this.PF.next(this.currentQualitySettings)}get currentQualitySettings(){return{quality:this.eN,height:this.nN}}onQualityChanged(){return new Promise((()=>{}))}shouldRecoverMediaError(){return!this.ZF}destroy(){this.H_?(this.RN(),this.H_.destroy(),this.H_=null):(this.j_.removeEventListener(k.wB.LoadedMetadata,this.AN),this.j_.removeEventListener(k.wB.Error,this.TN))}updateSubtitleTrackSource(t){this.RF(t)}getSelectedCaptionTrack(){return this.DF}LN(){return this.PN=new B.C,this.H_.attachMedia(this.j_),this.H_.once(this.D_.Events.MEDIA_ATTACHED,this.z_),this.PN.promise}BN(){return this.xN=new B.C,this.j_.src=this.uN(this.pN),this.j_.addEventListener(k.wB.LoadedMetadata,this.AN),this.xN.promise}RN(){this.H_.off(this.D_.Events.MEDIA_ATTACHED,this.z_),this.H_.off(this.D_.Events.MANIFEST_PARSED,this.W_),this.H_.off(this.D_.Events.ERROR,this.U_),this.H_.off(this.D_.Events.LEVEL_SWITCHING,this.fN),this.H_.off(this.D_.Events.LEVEL_SWITCHED,this.mN),this.H_.off(this.D_.Events.FRAG_BUFFERED,this.vN),this.H_.off(this.D_.Events.FRAG_LOADING,this.gN),this.H_.off(this.D_.Events.FRAG_LOADED,this.yN),this.H_.off(this.D_.Events.BUFFER_APPENDING,this.bN),this.H_.off(this.D_.Events.BUFFER_APPENDED,this.IN),this.H_.off(this.D_.Events.BUFFER_EOS,this.wN)}G_(){this.H_.levels.forEach(((t,i)=>{this.dN&&i>1||this.N_.push({level:i,height:t.height})}))}kN(t,i){(0,o.n)({message:t,exception:this.MN,level:o.D.WARN,callStack:i}),this.iN.next({type:lh.UnexpectedError})}SN(){if(this.eN===k.ZH.Auto)this.H_.currentLevel=-1;else try{const e=(t=this.N_,i=this.nN,t.reduce(((t,e)=>{if(!t)return e;const s=Math.abs(t.height-i);return Math.abs(e.height-i)<s?e:t}),void 0));this.H_.currentLevel=e.level}catch(t){(0,o.n)({message:"HlsSourceHandler_set_quality",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}var t,i}uN(t){try{const i=t.getHlsSource(),s=(0,e.bx)(i);return s&&s.protocol?this.Sv.appendParamsToUrl(i):this.Sv.appendParamsToUrl(`${this.YF}:${i}`)}catch(t){(0,o.n)({exception:t.message,message:"HlsSourceHandler_undefined_sourceMeta",level:o.D.CRITICAL,callStack:t.stack},{throttle:5,shouldSendMaxLog:!1})}}CN(){return new this.D_(Object.assign(Object.assign({},gh),{cnxRenderWindow:this.Lp.global}))}initLiveStreamRetry(){var t;null===(t=this.DN)||void 0===t||t.unsubscribe(),this.DN=this.aN.pipe(function(t){for(var i,e,s=[],n=1;n<arguments.length;n++)s[n-1]=arguments[n];var r=null!==(i=qt(s))&&void 0!==i?i:Qo.z,o=null!==(e=s[0])&&void 0!==e?e:null,h=s[1]||1/0;return(0,Dt.e)((function(i,e){var s=[],n=!1,a=function(t){var i=t.buffer;t.subs.unsubscribe(),(0,vh.P)(s,t),e.next(i),n&&c()},c=function(){if(s){var i=new mh.w0;e.add(i);var n={buffer:[],subs:i};s.push(n),zt(i,r,(function(){return a(n)}),t)}};null!==o&&o>=0?zt(e,r,c,o,!0):n=!0,c();var d=(0,Vt.x)(e,(function(t){var i,e,n=s.slice();try{for(var r=(0,fh.XA)(n),o=r.next();!o.done;o=r.next()){var c=o.value,d=c.buffer;d.push(t),h<=d.length&&a(c)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(i)throw i.error}}}),(function(){for(;null==s?void 0:s.length;)e.next(s.shift().buffer);null==d||d.unsubscribe(),e.complete(),e.unsubscribe()}),void 0,(function(){return s=null}));i.subscribe(d)}))}(5e3),(0,Ot.h)((t=>t.length<3))).subscribe((()=>{this.cN=!0,this.aN.next(0)}))}}var bh,Ih;!function(t){t.Disabled="disabled",t.Hidden="hidden",t.Showing="showing"}(bh||(bh={})),function(t){t.Video="VIDEO",t.Audio="AUDIO"}(Ih||(Ih={}));class wh{constructor(t,i,e){this.jN=t,this.WP=e,this.YO=!1,this.FN=!1,this.UN=bh.Hidden,this.$N=!1,this.qN=new R.x,this.HN=!1,this.zN=t=>{let i=!1;switch(t.type){case k.wB.Play:this.WN();break;case k.wB.Playing:this.GN(t);break;case k.wB.Timeupdate:this.QN()&&(i=this.JN(t.type)),this.XN(t,i);break;case k.wB.Ended:this.qN.next({type:t.type,payload:{isCorruptedCurrentTime:i}});break;case k.wB.Seeked:i=this.JN(t.type),this.qN.next({type:t.type,payload:{isCorruptedCurrentTime:i}});break;case k.wB.Error:this.YN(t);break;case k.wB.LoadedMetadata:this.KN(t);break;case k.wB.Pause:this.ZN(t);break;default:this.qN.next({type:t.type})}},this.oS=Object.values(k.wB),this.volume=i,this.Zp()}get currentTime(){return this.jN.currentTime}set currentTime(t){this.FN?this.jN.currentTime=t:this.tU=t}get duration(){return this.jN.duration}get isPlaying(){return this.YO}get videoEvents(){return this.qN.asObservable()}get volume(){return this.lf}set volume(t){this.lf=t?t<=1?t:t/100:t,void 0!==this.lf&&(this.jN.volume=this.lf,(0,r.Q1)(this.jN,this.lf))}setUnfreeze(){this.HN=!0}play(){this.$N=!0,this.iU&&clearTimeout(this.iU),this.iU=setTimeout((()=>{this.qN.next({type:k.wB.Error,payload:{errorMessage:"play_timeout"}})}),25e3),this.jN.play().catch((t=>{(0,o.n)({message:"ContentPlayer_play_promise_catch",exception:t,level:o.D.INFO},{shouldSendMaxLog:!1,pacing:1})}))}pause(){this.iU&&clearTimeout(this.iU),this.jN.pause(),this.YO=!1,this.$N=!1}destroy(){this.oS.forEach((t=>{this.jN.removeEventListener(t,this.zN)}))}setTrackModes(t){this.UN=t,this.eU()}setMetaLoaded(t){this.FN=t}setCrossOriginAttribute(){this.jN.getAttribute("crossorigin")||this.jN.setAttribute("crossorigin","anonymous")}setPoster(t){if(this.jN.nodeName!==Ih.Video)return;const i=t.getThumbnailUrl(this.jN.clientWidth,this.jN.clientHeight);(0,n.QM)(i)&&(this.jN.poster=i)}getCurrentTrack(){return this.jN.textTracks&&0!==this.jN.textTracks.length?this.jN.textTracks[0]:null}Zp(){this.oS.forEach((t=>{this.jN.addEventListener(t,this.zN)}))}WN(){this.$N||!this.WP.isInApp||this.WP.os!==L.M.Android?this.YO=!0:this.pause()}GN(t){this.iU&&clearTimeout(this.iU),this.WP.os===L.M.Ios&&this.HN&&((0,r.UR)(this.jN),this.HN=!1),this.eU(),this.qN.next({type:t.type})}XN(t,i){this.qN.next({type:t.type,payload:{isPlaying:this.YO,isCorruptedCurrentTime:i}})}ZN(t){this.iU&&clearTimeout(this.iU),this.qN.next({type:t.type})}YN(t){this.iU&&clearTimeout(this.iU),this.qN.next({type:t.type,payload:{errorMessage:this.jN.error?this.jN.error.message:""}})}KN(t){this.FN=!0,(0,n.hj)(this.tU)&&(this.currentTime=this.tU,this.tU=null),this.qN.next({type:t.type})}JN(t){return this.WP.os===L.M.Ios&&this.jN.currentTime>this.jN.duration&&((0,r.UR)(this.jN),(0,o.n)({message:"ContentPlayer__CorruptedCurrentTime",callStack:`Event type: ${t}`,level:o.D.WARN},{throttle:10}),!0)}QN(){return this.jN.currentTime-this.jN.duration>.1}eU(){this.jN.textTracks&&0!==this.jN.textTracks.length&&Object.keys(this.jN.textTracks).forEach((t=>{this.UN===this.jN.textTracks[t].mode&&(this.jN.textTracks[t].mode=this.UN===bh.Hidden?bh.Disabled:bh.Hidden),this.jN.textTracks[t].mode=this.UN}))}}const _h={height:0,quality:k.ZH.Auto};var Sh,Ph=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class Ah extends g._{constructor(t,i,e,s,r,o,h={},a,c){super(),this.mediator=t,this._P=i,this.Lp=e,this.NO=s,this.Pf=r,this.sU=o,this.wF=h,this.cj=a,this.fF=c,this.nU=!0,this.kV=!1,this.rU=!1,this.pS=new R.x,this.Pv=.01,this.CV=[],this.oU=t=>{var i;const e={[lh.LevelSwitching]:k.T$.LevelSwitching,[lh.StreamEnded]:k.T$.EndOfStream,[lh.FragBuffered]:k.T$.Buffered,[lh.BufferingError]:k.T$.Buffering}[t.type];if((0,n.QM)(e))this.mediator.publish(this,e);else{if(t.type===lh.UnexpectedError)return this.rU=!0,void this.hU();if(t.type===lh.ManifestLoaded){const e=null===(i=t.payload)||void 0===i?void 0:i.qualityList;this.mediator.publish(this,k.XQ.Loaded,{payload:{qualityList:e,videoMeta:this.aU}}),this.cU.setMetaLoaded(!0)}}},this.dU=()=>{let t;this.currentTrack.activeCues&&this.currentTrack.activeCues.length>0&&(t=this.currentTrack.activeCues[0]),this.mediator.publish(this,F.C[F.C.CaptionUpdate],{payload:t})},this.TF=()=>{this.currentTrack&&(this.currentTrack.mode=this.uU?bh.Hidden:bh.Disabled,this.currentTrack.oncuechange=this.dU)},this.pU(),this.fU.appendChild(this.j_),this.NO.appendChild(this.fU),this.fF=this.fF||_h,this.mU=new ph(e,this.Pf,this.NO,this.j_,this.wF,this.fF),this._P.config.os.os===L.M.Ios&&this._P.services.ViewabilityService.on(this.j_,((t,i)=>{!i&&t||this.cU.setUnfreeze()}),{threshold:this.Pv})}initHlsSourceHandler(t){const i=this.Lp.isHttpsProtocolUsed()?uh.Https:uh.Http,e=(0,n.QM)(this._P.config.bundleID);this.PS=new yh(this.Lp,this.j_,t,i,this.fF,e,this._P.services.UrlSuffixerService,this._P.config.browser.browserType===O.lI.Safari)}vU(){return Ph(this,void 0,void 0,(function*(){if(this.PS)return!0;const t=yield un();return t&&t.isSupported()||(i=this.j_,(0,n.QM)(i.canPlayType("application/vnd.apple.mpegurl")))?(this.initHlsSourceHandler(t),this.gU(),this.bU(),!0):(this.nU=!1,(0,o.n)({message:"Hls_not_supported",level:o.D.INFO}),!1);var i}))}get onVideoEvents(){return this.pS.asObservable()}start(){try{this.cU=new wh(this.j_,this.sU,{isInApp:this._P.config.isInApp,os:this._P.config.os.os}),this.lf=this.cU.volume,this.IU(),this.gU(),this.wU()}catch(t){(0,o.n)({message:"VideoHandler_start",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}hU(){this._U=this.currentTime,this.setSource(this.aU,!0,!0),this.SU.attachMedia().then((()=>{this.cU.play()})).catch((t=>{this.rU=!1,this.pS.next(k.wB.Error),(0,o.n)({message:"VideoHandler_hls_error_attach_media",exception:t.message,callStack:t.callStack,level:o.D.CRITICAL})}))}bU(){this.CV.push(this.PS.onHlsEvent.subscribe((t=>this.oU(t))))}IU(){this.PU(this.mU)}gU(){this.PS&&this.PU(this.PS)}PU(t){t.start(),this.AU(t)}wU(){this.cU.videoEvents.subscribe((t=>{var i;if(t.payload&&t.payload.isCorruptedCurrentTime)this.SU.handlerType===dh.HLS&&this.hU();else{if(t.type===k.wB.Canplay&&this.cj&&(this.currentTime=this.cj,this.cj=null),this.pS.next(t.type),this.rU&&(this.rU=!1,t.type===k.wB.Playing&&(this.cU.currentTime=this._U)),t.type===k.wB.Error)return(0,o.n)({message:"VideoHandler_play_error_event",exception:t.payload.errorMessage,level:o.D.WARN}),void this.mediator.publish(this,k.T$.PlayError,{payload:null===(i=t.payload)||void 0===i?void 0:i.errorMessage});this.mediator.publish(this,t.type,{payload:t.payload})}}))}AU(t){this.CV.push(t.onTrackLoaded.subscribe((()=>this.TF())),t.onQualityChange.subscribe((t=>this.onQualityChanged(t))),t.onCurrentQuality.subscribe((t=>{this.mediator.publish(this,k.XQ.CurrentQuality,{payload:t})})))}xU(t,i=!1){return Ph(this,void 0,void 0,(function*(){if(i)this.kU();else{if(t){if(yield this.vU())return void(this.SU=this.PS)}this.kU()}}))}get width(){return this.fU.getBoundingClientRect().width}get height(){return this.fU.getBoundingClientRect().height}get currentTime(){return this.cU.currentTime}set currentTime(t){this.cU.currentTime=t}forceCurrentTime(t){this.cU.currentTime=t,this.cj=t}get duration(){return this.cU.duration}get volume(){return this.cU.volume}set volume(t){this.cU.volume=t}toggleMute(){if(0===this.cU.volume)return this.lf=this.lf>0?this.lf:.2,void(this.cU.volume=this.lf);this.lf=this.cU.volume,this.cU.volume=0}increaseVolume(t){this.cU.volume+t>1?this.cU.volume=1:this.cU.volume+=t}decreaseVolume(t){this.cU.volume-t<0?this.cU.volume=0:this.cU.volume-=t}get playing(){return this.cU.isPlaying}get isIosFullscreen(){return this.kV}set isIosFullscreen(t){this.kV=t,this.kV&&this.uU?this.TU():this.CU()}get currentQualitySettings(){var t;return null===(t=this.SU)||void 0===t?void 0:t.currentQualitySettings}hide(){(0,r.cn)(this.fU,I.pT)}show(){(0,r.IV)(this.fU,I.pT)}setSource(t,i=!1,e=!1){return Ph(this,void 0,void 0,(function*(){try{this.aU=t,this.SU&&this.SU.detachMedia();const s=(0,n.QM)(t.hlsFilePath);return yield this.xU(s,e),t&&t.subtitles&&this.cU.setCrossOriginAttribute(),this.j_.setAttribute("aria-label",t.altText),this.cU.setPoster(t),this.cU.setTrackModes(this.uU?bh.Hidden:bh.Disabled),i&&this.cU.setMetaLoaded(!1),this.SU.setSource(t,!0),void this.mediator.publish(this,k.T$.NewVideo)}catch(t){return void(0,o.n)({message:"VideoHandler_set_video_source",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}))}setQuality(t){this.SU.setQuality(t)}pause(){this.cU.pause(),this.pS.next(k.wB.Pause)}play(){var t;return this.EU=new B.C,null===(t=this.SU)||void 0===t||t.attachMedia().then((()=>{this.cU.play()})).catch((t=>{this.pS.next(k.wB.Error),(0,o.n)({message:"VideoHandler_public_play_attach_media_error",exception:t.message,callStack:t.callStack,level:o.D.CRITICAL})})),this.EU.promise}hasSubtitles(){return(0,b.BZ)(this.aU.subtitles)}getSubtitles(){return this.aU.subtitles}toggleCaptions(){this.SU.updateSubtitleTrackSource(this.aU.getDefaultSubtitle()),this.uU=!0,this.cU.setTrackModes(bh.Hidden)}togglePlay(){return this.playing?(this.pause(),!1):(this.play(),!0)}showCaptions(t){var i;void 0===t&&(t=null===(i=this.aU.getDefaultSubtitle())||void 0===i?void 0:i.file);const e=this.aU.subtitles.find((i=>i.file===t));this.SU.updateSubtitleTrackSource(e),this.uU=!0,this.cU.setTrackModes(bh.Hidden)}hideCaptions(){this.SU.updateSubtitleTrackSource(),this.uU=!1,this.cU.setTrackModes(bh.Disabled),this.mediator.publish(this,F.C[F.C.CaptionUpdate])}get areCaptionsEnabled(){return this.uU}getSelectedCaption(){return this.SU.getSelectedCaptionTrack()}setVideoTagLabelledByAttribute(t){this.j_.setAttribute("aria-labelledby",t)}destroy(){this.SU.destroy(),this.fU.parentNode.removeChild(this.fU),this.cU.destroy()}pU(){this.fU=this.Lp.createElementByString(`<cnx class="${I.s6.VideoWrapper}"></cnx>`),this.j_=this.Lp.createElementByString('<video class="cnx-video-tag"></video>'),this.wF.os===L.M.Ios&&(this.j_.setAttribute("playsinline",""),this.j_.setAttribute("webkit-playsinline",""))}kU(){this.SU=this.mU,this.SU.setQuality({quality:k.ZH.Auto,height:0})}onQualityChanged(t){const i=this.cU.isPlaying;this.cj=this.currentTime,i&&this.SU.onQualityChanged&&this.SU.onQualityChanged().then((()=>{this.cU.setMetaLoaded(!1),this.cU.play()})),this.mediator.publish(this,k.XQ.Change,{payload:t})}get currentTrack(){return this.cU.getCurrentTrack()}TU(){this.currentTrack&&(this.currentTrack.oncuechange=null,this.mediator.publish(this,F.C[F.C.CaptionUpdate]),this.currentTrack.mode=bh.Showing)}CU(){if(this.currentTrack){switch(this.currentTrack.mode){case bh.Showing:case bh.Hidden:this.uU=!0;break;case bh.Disabled:this.uU=!1}this.mediator.publish(this,this.uU?F.C[F.C.CaptionOn]:F.C[F.C.CaptionOff])}this.TF()}}class xh extends Ah{play(){const t=this.SU.liveSyncPosition;return t&&(this.cU.currentTime=t),super.play()}endOfStream(){this.SU.detachMedia()}get hlsSupported(){return this.nU}hU(){this.EU&&this.EU.isPending&&this.EU.reject(),this.SU.detachMedia(),this.mediator.publish(this,k.T$.LiveStreamNotPlayable)}initHlsSourceHandler(t){super.initHlsSourceHandler(t)}}!function(t){t.Replay="replay",t.Next="next",t.Prev="prev"}(Sh||(Sh={}));const kh=new Map([[F.C[F.C.Replay],Sh.Replay],[F.C[F.C.Next],Sh.Next],[F.C[F.C.Prev],Sh.Prev],[F.C[F.C.Play],Ko.Play],[F.C[F.C.Volume],Ko.Volume],[F.C[F.C.Pause],Ko.Pause],[F.C[F.C.Seek],Ko.Seek],[F.C[F.C.SeekingStart],Ko.SeekingStart],[F.C[F.C.SeekingStopped],Ko.SeekingStop],[F.C[F.C.Quality],Ko.Quality],[F.C[F.C.CaptionOn],Ko.CaptionOn],[F.C[F.C.CaptionOff],Ko.CaptionOff],[F.C[F.C.Expand],eh.t.Expand],[F.C[F.C.Collapse],eh.t.Collapse],[F.C[F.C.Close],eh.t.Close],[F.C[F.C.OverlayClick],eh.t.OverlayClick],[eh.t.GeneralUserInteraction,eh.t.GeneralUserInteraction]]);var Th=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};function Ch(){return Th(this,void 0,void 0,(function*(){return yield(0,e.Up)((()=>Th(this,void 0,void 0,(function*(){return yield h.e("elements.ui").then(h.bind(h,2244))}))))}))}var Eh=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class Mh extends g._{constructor(t,i,e,s,n){super(),this.Lp=t,this.wn=i,this.Ha=e,this.MU=s,this.LU=n,this.BU=new R.x}get onUIEvent(){return this.BU.asObservable()}destroy(){this.Zj.destroy()}onResize(t){var i;null===(i=this.Zj)||void 0===i||i.onResize(t)}enterFullscreen(){this.Zj.expand()}exitFullscreen(){this.Zj.collapse()}toggleCaptionButton(t){this.Zj.toggleCaptionState(t)}togglePlaylistControls(t){this.Zj.togglePlaylistControls(t)}toggleExpandButton(t){this.Zj.toggleExpandButtonDisplay(t)}changeState(t){this.Zj.changeState(t)}updateUpNextBox(t,i){this.Zj.updateUpNextBox(t,i)}updateActiveCue(t){this.Zj.updateCaptions(t)}updateDefaultCaption(t){this.Zj.updateDefaultCaptions(t)}updateCurrentVideo(t){this.Zj.updateCurrentVideo(t)}updateCurrentTime(t,i){this.Zj.updateDuration(t,i)}updateVolume(t){this.Zj.updateVolume(t)}updateQuality(t,i){this.Zj.updateQuality(t,i)}start(t,i,e){return Eh(this,void 0,void 0,(function*(){const s=yield Ch(),n=i?s.LiveUiContent:s.VideoUiContent,{template:r}=new s.VideoTemplate(t,i);this.Zj=new n(this,this.Lp,this.wn,this.Ha,this.MU,r,t,this.LU,e),this.oF(),this.Zj.start()}))}oF(){kh.forEach(((t,i)=>{this.subscribe(i,this.Zj,(i=>{const e={type:t,payload:i.payload};this.BU.next(e)}))}))}}var Lh=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class Bh extends rh{constructor(){super(...arguments),this.OU=!1,this.RU=()=>{this.ej.getCurrentVideoData((()=>{this.nj.onVideoEvents.pipe((0,Ot.h)((t=>t===k.wB.Playing&&!this.OU)),(0,Jo.q)(1),Ft((()=>this.OU=!0))).subscribe((()=>{this.Yj.enterLiveStreamStopped(),this.nj.pause(),this.Hj.next(!0)})),this.nj.play().catch((()=>{}))})),this.nj.play()},this.DU=()=>{this.Yj.endOfStream(),this.nj.endOfStream()}}start(){const t=Object.create(null,{start:{get:()=>super.start}});return Lh(this,void 0,void 0,(function*(){yield t.start.call(this),this.VU(),this.nF(),this.nj.hlsSupported?(this.nj.start(),this.iF().then((()=>{this.RU(),this.zj.next(!0)}))):this.Yj.enterLiveNotSupported()}))}destroy(){this.jU(),this.FU(),super.destroy()}VU(){this.subscribe(k.T$.EndOfStream,this.nj,this.DU),this.subscribe(k.T$.LevelSwitching,this.nj,(()=>{this.Yj.onEnterBuffering()}))}vF(t){return Lh(this,void 0,void 0,(function*(){this.Zj=new Mh(this._P.services.GlobalDomUtilsService,this._P.services.InteractionService,this._P.services.ResizeObserver,this.NO,this._P.config.appId),this.oF(),yield this.Zj.start(t,!0,this.Uj)}))}yF(t){this.NU(t)}cF(){}rF(){}nF(){const{preRollBreak:t,postRollBreak:i}=this.Wg,e=(0,n.r)(t),s=(0,n.r)(i);this.Yj=new oh(this,this.ej,this.nj,e,s,this._P.config.os.os===L.M.Ios,this.Wg.videoPosition),super.nF()}Qj(){super.Qj(),this.subscribe(k.T$.LiveStreamNotPlayable,this.nj,(()=>{clearTimeout(this.UU),this.UU=setTimeout(this.RU,10*J.s_)}))}mF(t,i){this.nj=new xh(this,this._P,this._P.services.GlobalDomUtilsService,this.NO,this._P.services.ResizeObserver,i,t,this.Wg.videoPosition)}NU(t){this.jU(),t&&(this.$U=setInterval((()=>{this.Yj.isInPlayingState()&&(this.DU(),this.jU())}),10*J.s_))}jU(){this.$U&&(clearInterval(this.$U),this.$U=null)}FU(){this.UU&&(clearInterval(this.UU),this.UU=null)}}var Oh=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class Rh extends Go{start(){const t=Object.create(null,{start:{get:()=>super.start}});return Oh(this,void 0,void 0,(function*(){try{t.start.call(this)}catch(t){(0,o.n)({message:"LiveExperience_start",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}))}DV(){this.wp=new Bh(this,this.Wg,this.app,this.$playerContainer,this.breakPointsHandler.currentBreakpointClass)}zg(){this.Cg.isInAdPod()?this.Jg((()=>{super.zg(),this.Eg.onAdFinished(this.adHandler.linearInImpression,xt.LINEAR,this.Cg.isInAdPod()),this.wp.show(true)})):(super.zg(),this.wp.show(true))}FV(){super.FV(),this.subscribe(k.d0.NewThumbnail,this.wp,(({payload:{thumbnailUrl:t}})=>{this.adHandler&&this.adHandler.setAdLoadingBackgroundUrl(t)}))}}class Dh{constructor(){this.Pd={}}on(t,i){if(this.Pd[t]=this.Pd[t]||[],!(0,n.mf)(i))throw new Error(`${t} event callback is not a function`);return this.Pd[t].push(i),()=>this.Pd[t]=this.Pd[t].filter((t=>t!==i))}once(t,i){const e=this.on(t,(t=>{try{i(t)}catch(t){}e()}))}remove(t,i){this.Pd[t]&&(this.Pd[t]=this.Pd[t].filter((t=>t!==i)))}removeAll(){this.Pd={}}trigger(t,i){this.Pd[t]&&this.Pd[t].forEach((t=>{try{t(i)}catch(t){}}))}}class Vh extends class{constructor(t){this.experience=t,this.qU=(t,i)=>this.Yu.on(t,i),this.HU=(t,i)=>{this.Yu.remove(t,i)},this.zU=()=>{this.Yu.removeAll()},this.WU=(t,i)=>{this.Yu.once(t,i)},this.GU=()=>this.experience.isViewable(),this.QU=t=>{this.experience.setViewableThreshold(t)},this.JU=()=>{this.experience.play()},this.XU=()=>{this.experience.pause()},this.YU=()=>this.experience.getVolume(),this.KU=t=>{this.experience.setVolume(t)},this.Im=()=>{this.experience.triggerDestroy()},this.zu=()=>{this.experience.disableAdvertising()},this.ZU=()=>{this.experience.enableAdvertising()},this.t$=()=>{this.experience.enableFloatingMode()},this.i$=()=>{this.experience.disableFloatingMode()},this.e$=()=>this.experience.isFloatingModeEnabled(),this.wm=t=>{this.experience.setFloatingSettings(t)},this.getFloatingSettings=()=>this.experience.getFloatingSettings(),this.s$=t=>{this.experience.setCustomMacros(t)},this.n$=t=>{this.experience.setAmpUserConsent(t)},this.Yu=new Dh}trigger(t,i){this.Yu.trigger(t,i)}setDestroyed(){this.trigger(x.Km.Removed)}getApiMethods(){return{on:this.qU,remove:this.HU,removeAll:this.zU,once:this.WU,isViewable:this.GU,setViewableThreshold:this.QU,play:this.JU,pause:this.XU,getVolume:this.YU,setVolume:this.KU,disableAdvertising:this.zu,enableAdvertising:this.ZU,enableFloatingMode:this.t$,disableFloatingMode:this.i$,isFloatingModeEnabled:this.e$,setFloatingSettings:this.wm,getFloatingSettings:this.getFloatingSettings,setMacros:this.s$,setAmpUserConsent:this.n$,destroy:this.Im}}}{constructor(){super(...arguments),this.r$=()=>this.experience.type,this.lw=()=>this.experience.getSize(),this.o$=(t,i)=>{this.experience.setSize(t,i)}}getApiMethods(){return Object.assign(Object.assign({},super.getApiMethods()),{getPlayerType:this.r$,getSize:this.lw,setSize:this.o$})}}class jh extends Vh{}class Fh extends vo{constructor(){super(...arguments),this.h$=[],this.enterFullScreen=()=>{this.RV.enterFullScreen().then().catch((t=>{(0,o.n)({level:o.D.WARN,message:"OutstreamAdHandler_enterFullscreen"})}))},this.exitFullscreen=()=>{this.RV.exitFullScreen()},this.ny=()=>{this._P.services.InteractionService.enableScrollEvent(),this._P.services.EventsStorageService.emitOnExitFullscreen(),this.linearAdUserInterface.collapse(),this.setVastViewMode(X.zc.Normal)},this.sy=()=>{this._P.services.InteractionService.disableScrollEvent(),this._P.services.EventsStorageService.emitOnEnterFullscreen(),this.linearAdUserInterface.expand(),this.setVastViewMode(X.zc.Fullscreen)}}initFullScreen(){this.RV=new D(this._P.services.GlobalDomUtilsService,this.JR.parentElement,this._P.config.os.os),this.ij()}ij(){this.h$.push(this.onFullcreenChange.subscribe((t=>{t===F.C.Expand?this.enterFullScreen():this.exitFullscreen()}))),this.zV()}zV(){const t=this.RV.onFullScreenEnter.subscribe((()=>this.sy())),i=this.RV.onFullScreenExit.subscribe((()=>this.ny()));this.h$.push(i,t)}destroy(){super.destroy(),(0,H.i)(this.h$)}_R(){return!1}}var Nh=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class Uh extends Uo{constructor(){super(...arguments),this.events=Object.assign(Object.assign({},x.Km),qo),this.a$=!1,this.c$=!1,this.d$=!1,this.l$=t=>{"max-height"===t.propertyName&&(this.$experienceContainer.removeEventListener("transitionend",this.l$),this.handleClose())}}Rg(){var t,i;const e=!(!(null===(t=this.floatingModule)||void 0===t?void 0:t.isInFloating)&&!(null===(i=this.alwaysFloatingModule)||void 0===i?void 0:i.isInFloating));return new Fh(e,this.Eg.isAdvertisingDisabled,this.Wg,this.sl,this.$playerContainer,this.checkFloatingViewability(this.isViewable()),this.Cg,this.app,this._appSettings,this.Sv,Q.None)}u$(){this.adHandler&&this.adHandler.linearInImpression?this.a$=!0:this.p$()}p$(){this.Eg.onContentStop(),this.Wg.outstreamSettings.endAdBreakPolicy===wo.ProtoOutstreamEndAdBreakPolicyEnum.Hide&&this.f$(!0),this.mediator.publish(this,qo.AdCycleComplete)}m$(){return{logoPosition:this.Wg.logoPosition,logoUrl:this.Wg.logoUrl,isCloseButton:this.Wg.isCloseButton,closeButtonMode:this.Wg.closeButtonMode,backgroundColor:this.Wg.outstreamSettings.houseScreenBackgroundColor,uiComponentsVisibility:{expandButton:this.Wg.uiComponentsVisibility.expandButton&&this.app.config.os.os!==L.M.Ios}}}v$(){return Nh(this,void 0,void 0,(function*(){let t;try{t=yield Ch()}catch(t){throw t}const{UiOutstream:i,OutstreamTemplate:e}=t,s=this.m$(),n=new e(s).template;this.g$=new i(this,this.$playerContainer,this.app.services.GlobalDomUtilsService,this.app.services.InteractionService,s,n),this.subscribe(F.C[F.C.Close],this.g$,(()=>{this.handleClose()})),this.subscribe(F.C[F.C.Expand],this.g$,(()=>{this.adHandler.enterFullScreen()})),this.subscribe(F.C[F.C.Collapse],this.g$,(()=>{this.adHandler.exitFullscreen()}))}))}y$(){this.d$&&((0,r.IV)(this.$experienceContainer,I.s6.Collapsed),this.mediator.publish(this,qo.Collapsed,{payload:!1}),this.d$=!1,this.Sg())}f$(t=!1){if(!this.d$){if(t){const t=setTimeout((()=>{this.$experienceContainer.removeEventListener("transitionend",this.l$),this.handleClose()}),1e3);this.$experienceContainer.addEventListener("transitionend",(i=>{clearTimeout(t),this.l$(i)}))}(0,r.cn)(this.$experienceContainer,I.s6.Collapsed),this.mediator.publish(this,qo.Collapsed,{payload:!0}),this.d$=!0,this._g()}}b$(){this.$experienceContainer.style.maxHeight=`${this.$playerContainer.clientHeight}px`}I$(){this.g$&&this.g$.hide()}w$(){this.g$&&this.g$.show()}handleClose(){this.triggerDestroy()}Go(){super.Go(),this.b$()}Hg(t=!1){super.Hg(t),this.a$&&this.p$()}Om(t,i=!1){super.Om(t,i),!this.c$&&t&&(this.c$=!0,this._$())}zg(){this.Cg.isInAdPod()?this.Jg((()=>{this.Eg.onAdFinished(this.adHandler.linearInImpression,xt.LINEAR,this.Cg.isInAdPod()),super.zg(),this.w$(),this.Cg.setNewBreak(wo.ProtoAdSlotsEnum.MidRoll)})):(super.zg(),this.Cg.setNewBreak(wo.ProtoAdSlotsEnum.MidRoll),this.w$())}qg(){super.qg(),this.I$()}addPlayerSize(){super.addPlayerSize(),this.Wg.playerSize.responsive?this.$playerWrapper.appendChild(this.oy()):this.setFixedSize(this.$playerWrapper)}iy(){}_$(){var t;if(this.Wg.adPlaybackMode===wo.ProtoAdPlaybackMode.ScrollToPlay&&!this.c$)return;this.Pg(wo.ProtoAdSlotsEnum.MidRoll);null===(t=this.adHandler)||void 0===t||t.contentPlaybackStateChanged(true),this.Eg.contentPlaybackStateChanged(true)}Tg(){this.gg(Lt.I.Standalone)}S$(){}start(){const t=Object.create(null,{start:{get:()=>super.start}});var i,e;return Nh(this,void 0,void 0,(function*(){try{t.start.call(this),this.Kg(),this.adHandler?(this.adHandler.start(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight,this.Wg.soundMode===wo.ProtoPlayerSoundMode.On?1:0,this.Wg.uiComponentsVisibility.expandButton&&this.app.config.os.os!==L.M.Ios,!1),this.adHandler.enablePrefetchForLinearity(xt.LINEAR),this.adHandler.initFullScreen(),this.Eg.forceRecheck(),null===(i=this.adHandler)||void 0===i||i.onVpaidEvent.subscribe((t=>{t.type===X.fI.AdImpression&&this.y$()})),null===(e=this.adHandler)||void 0===e||e.onLinearUiComponentEvent.subscribe((t=>{switch(t.type){case F.C.Volume:const{volume:i}=t.payload;this.Do(i);break;case F.C.Expand:this.expand();break;case F.C.Collapse:this.collapse()}}))):this.f$(),this._$(),this.subscribe(et,this.Eg,(()=>{this.u$()})),this.subscribe(st,this.Eg,(()=>{this.u$()})),this.Wg.outstreamSettings.initialRendering===wo.ProtoOutstreamInitialRenderingEnum.ExpandWithAd&&(this.f$(),(0,r.Tp)(this.$playerContainer)),(0,r.cn)(this.$experienceContainer,I.Gj.Collapsable),this.b$(),this.Wg.outstreamAdAsContent||(yield this.v$())}catch(t){(0,o.n)({message:"Outsream_start",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}))}getVolume(){if(this.adHandler)return this.adHandler.getLinearVolume()}get currentTime(){return 0}get duration(){return 0}destroy(){super.destroy(),this.g$&&this.g$.destroy()}expand(){var t;null===(t=this.g$)||void 0===t||t.getComponent(Wr.r.ExpandButton).setState(ao.q.expand)}collapse(){var t;null===(t=this.g$)||void 0===t||t.getComponent(Wr.r.ExpandButton).setState(ao.q.collapse)}}class $h extends Vh{constructor(t){super(t),this.experience=t,this.P$=()=>this.experience.getVideoDetails(),this.A$=()=>this.experience.getPlaylistId(),this.x$=()=>this.experience.getPlaylistDetails(),this.C$=()=>this.experience.getAllMetadata(),this.E$=t=>this.experience.setPlaylistDetails(t),this.L$=()=>this.experience.currentTime,this.B$=t=>{this.experience.setVideoPosition(t)},this.O$=()=>this.experience.duration,this.R$=t=>{this.experience.toggleFullscreen(t)},this.D$=t=>{this.experience.toggleCaptions(t)},this.V$=()=>this.experience.getSubtitles(),this.j$=t=>{t&&t.file?this.experience.showCaptions(t.file):this.experience.hideCaptions()},this.F$=t=>{this.experience.toggleExpandButton(t)},this.N$=()=>this.experience.getQuality(),this.U$=t=>{this.experience.setQuality(t)},this.$$=()=>{this.experience.setAutoQuality()},this.q$=()=>this.experience.getAvailableQualities(),this.H$=()=>{this.experience.nextVideo()},this.z$=()=>{this.experience.prevVideo()},this.W$=t=>{this.experience.setPreRollBreak(t)},this.Q$=t=>{this.experience.setPostRollBreak(t)},this.J$=()=>this.experience.getVideoIndex(),this.X$=t=>{this.experience.setVideoIndex(t)}}getApiMethods(){return Object.assign(Object.assign({},super.getApiMethods()),{getVideoDetails:this.P$,getVideoCurrentPosition:this.L$,setVideoPosition:this.B$,getVideoDuration:this.O$,toggleFullscreen:this.R$,toggleSubtitles:this.D$,getSubtitles:this.V$,setSubtitle:this.j$,toggleFullscreenButton:this.F$,getPlaylistId:this.A$,getPlaylistDetails:this.x$,getAllMetadata:this.C$,setPlaylistDetails:this.E$,getQuality:this.N$,setQuality:this.U$,setAutoQuality:this.$$,getAvailableQualities:this.q$,nextVideo:this.H$,prevVideo:this.z$,setPreRollBreak:this.W$,setPostRollBreak:this.Q$,getVideoIndex:this.J$,setVideoIndex:this.X$})}}var qh=h(3310);const Hh=t=>t.clientHeight||t.getBoundingClientRect().height||0,zh=t=>t.clientWidth||t.getBoundingClientRect().width||0,Wh=(t,i,e=!1)=>{const s=t.offsetTop,n=((t,i)=>(parseInt(i.getMarginTopPropertyValue(t),10)||0)+(parseInt(i.getMarginBottomPropertyValue(t),10)||0))(t,i),r=Hh(t),o=Hh(t.parentElement);let h=s;if(e){const t=Math.floor(o/(r+n)),i=Math.floor(t/2);h=Math.max(s-i*(r+n),0)}t.parentElement.scrollTop=h},Gh=(t,i,e=!1)=>{const s=t.offsetLeft,n=((t,i)=>(parseInt(i.getMarginLeftPropertyValue(t),10)||0)+(parseInt(i.getMarginRightPropertyValue(t),10)||0))(t,i),r=zh(t),o=zh(t.parentElement);let h=s;if(e){const t=Math.floor(o/(r+n)),i=Math.floor(t/2);h=Math.max(s-i*(r+n),0)}t.parentElement.scrollLeft=h};var Qh,Jh=h(6203);class Xh{constructor(t,i,e={}){this.jN=t,this.In=i,this.Y$=1.2,this.K$=16,this.Z$="normal",this.wF={lines:0,useNativeClamping:!0},this.tq=!1,this.wF=Object.assign(Object.assign({},this.wF),e),this.tq=this.iq()}setLines(t){this.wF.lines=t}getClampedText(t){this.eq=t.trim(),this.sq=this.In.createElementByString(`<cnx-span style="display:inline-block;width:100%;line-height:inherit;font-family:inherit;font-size:inherit;">${this.eq}</cnx-span>`),this.jN.appendChild(this.sq);let i=0;try{i=this.nq()}catch(t){(0,o.n)({message:"LineClamp_getMaxLines",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}const e=this.rq(this.wF.lines,i),s=this.oq(e);return Math.ceil(this.sq.getBoundingClientRect().height)-1<=s?(this.hq(),this.eq):this.tq?void(0,r.T7)(this.jN,{overflow:"hidden",textOverflow:"ellipsis",webkitBoxOrient:"vertical",display:"-webkit-box",webkitLineClamp:e}):this.aq(this.sq.firstChild,s)}iq(){return!!this.wF.useNativeClamping&&void 0!==this.jN.style.webkitLineClamp}oq(t){return this.cq(this.jN)*t+(this.dq(this.sq)+this.dq(this.jN))+(this.lq(this.sq)+this.lq(this.jN))}pq(t){if(t.getBoundingClientRect){const{height:i}=t.getBoundingClientRect();if(i>0)return Math.ceil(i)}const i=t.clientHeight;return i&&i>0?Math.ceil(i):t.parentNode?this.pq(t.parentNode):0}nq(){const t=this.pq(this.jN),i=this.cq(this.jN),e=this.dq(this.sq)+this.dq(this.jN),s=this.lq(this.sq)+this.lq(this.jN),n=Math.floor((t-e-s)/i+.05);return Math.max(n,0)}fq(t){const i=this.In.getFontSizePropertyValue(t);return i?parseInt(i,10):this.K$}cq(t){let i=this.In.getLineHeightPropertyValue(t);return i&&i!==this.Z$||(i=""+this.Y$*this.fq(t)),parseInt(i,10)}dq(t){if(!t)return 0;const i=this.In.getPaddingTopPropertyValue(t);return parseInt(i,10)||0}lq(t){if(!t)return 0;const i=this.In.getPaddingBottomPropertyValue(t);return parseInt(i,10)||0}rq(t,i){return t>0?0===i?t:Math.min(this.wF.lines,i):i}aq(t,i,e){if(!i)return;void 0===e&&(e=t.nodeValue.split(" "));const s=[...e];if(s.length>1){s.pop(),this.mq(t,`${s.join(" ")}...`);return t.parentNode.offsetHeight>i?this.aq(t,i,s):(this.hq(),`${s.join(" ")}...`)}}mq(t,i){t.nodeValue=i}hq(){this.jN.innerHTML="",this.sq=null}}!function(t){t[t.CardClicked=0]="CardClicked"}(Qh||(Qh={}));const Yh={width:160,height:90},Kh={width:80,height:80};const Zh='<cnx class="cnx-g-card"><cnx class="cnx-g-card-image-container"><cnx class="cnx-g-triangle"></cnx><cnx class="cnx-g-card-image"><cnx class="cnx-g-card-icon"><cnx class="cnx-ui-btn"><cnx class="cnx-icon-button cnx-ui-btn-hoverable cnx-mod-hover"><cnx class="cnx-btn-container"><cnx class="cnx-play-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 4v16l16-8z" fill-rule="evenodd"/></svg></cnx></cnx></cnx></cnx></cnx></cnx></cnx><cnx class="cnx-g-card-text-container"><cnx class="cnx-g-card-text"><cnx-span></cnx-span></cnx></cnx></cnx>';class ta extends g._{constructor(t,i,e,s,o){super(),this.mediator=t,this.Ha=i,this.Lp=e,this.wn=s,this.vi=o,this.$a=()=>{this.vi.metadata.title&&this.vq()},this.gq=()=>{this.mediator.publish(this,Qh[Qh.CardClicked],{payload:this.vi.id})},this.yq=this.Lp.createElementByString(this.bq()),this.Iq=this.yq.getElementsByClassName(I.Ih.CardImage)[0],this.wq=this.yq.getElementsByClassName(I.Ih.CardText)[0],this._q=this.yq.getElementsByClassName(I.Ih.CardTextContainer)[0],this.vi.titleFont&&(0,r.T7)(this._q,{"font-family":this.vi.titleFont});const h=this.Lp.createElement("img");h.onload=()=>{this.Iq.appendChild(h)};const a=this.vi.metadata.getThumbnailUrl(this.Sq().width,this.Sq().height);if((0,n.QM)(a)&&(h.src=a),h.alt=(0,n.$K)(this.vi.metadata.altText)?this.vi.metadata.altText:"",this.vi.style===wo.ProtoGalleryStyleMode.Detailed&&this.vi.metadata.duration){const t=this.Lp.createElementByString(`<cnx class="cnx-g-card-text-info">${(0,de.to)(this.vi.metadata.duration)}</cnx>`);this.vi.bodyFont&&(0,r.T7)(t,{"font-family":this.vi.bodyFont}),this._q.appendChild(t)}this.wn.register(this.yq,this,this.wn),this.subscribe(Jh.Z[Jh.Z.Click],this.wn,(()=>{this.gq()})),this.relay(Jh.Z[Jh.Z.Scroll],this.wn,this,this.mediator),this.Pq=new Xh(this.wq,this.Lp,{lines:3,useNativeClamping:!1}),this.Ha.on(this.yq,this.$a)}bq(){return this.vi.style===wo.ProtoGalleryStyleMode.Visual?'<cnx class="cnx-g-card"><cnx class="cnx-g-triangle"></cnx><cnx class="cnx-g-card-image"></cnx><cnx class="cnx-g-card-text-container"><cnx class="cnx-g-card-text"></cnx></cnx><cnx class="cnx-g-card-icon"><cnx class="cnx-ui-btn"><cnx class="cnx-icon-button cnx-ui-btn-hoverable cnx-mod-hover"><cnx class="cnx-btn-container"><cnx class="cnx-play-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 4v16l16-8z" fill-rule="evenodd"/></svg></cnx></cnx></cnx></cnx></cnx></cnx>':Zh}Sq(){return this.vi.style===wo.ProtoGalleryStyleMode.Visual?Yh:Kh}vq(){const t=this.Pq.getClampedText(this.vi.metadata.title),i=this.Lp.createElementByString(`<cnx-span>${t}</cnx-span>`);(0,r.jG)(i,this.wq)}get $element(){return this.yq}setActiveState(t){t?(0,r.cn)(this.yq,I.Gj.Active):(0,r.IV)(this.yq,I.Gj.Active)}destroy(){this.yq.removeEventListener("click",this.gq),this.Ha.off(this.yq,this.$a)}clampLines(){this.vq()}}const ia=ta;class ea extends g._{constructor(t,i,e,s,n){if(super(),this.mediator=t,this.Ha=i,this.Lp=e,this.wn=s,this.vi=n,this.Aq=!1,this.vi.$slot.innerHTML=`<cnx class="${I.Ih.CardPlaceholder}"></cnx>`,this.vi.style===wo.ProtoGalleryStyleMode.Detailed){const t=e.createElementByString(this.xq(Zh));this.vi.$slot.firstChild.appendChild(t)}this.wn.register(this.vi.$slot,this.mediator,this),this.relay(Jh.Z[Jh.Z.Scroll],this.wn,this,this.mediator)}xq(t){const i=[...Array(12)].map((()=>`<cnx-span style='width: ${10+Math.floor(40*Math.random())}%'></cnx-span> `)).reduce(((t,i)=>t+i),"");return t.replace("<cnx-span></cnx-span>",i)}setCardData(t){this.kq=new ia(this,this.Ha,this.Lp,this.wn,{id:this.vi.id,style:this.vi.style,metadata:t,titleFont:this.vi.titleFont,bodyFont:this.vi.bodyFont}),this.subscribe(Qh[Qh.CardClicked],this.kq,(({payload:t})=>{this.mediator.publish(this,Qh[Qh.CardClicked],{payload:t})})),this.unsubscribeAll(this.wn),this.relay(Jh.Z[Jh.Z.Scroll],this.kq,this,this.mediator),this.kq.setActiveState(this.Aq),this.vi.$slot.innerHTML="",this.vi.$slot.appendChild(this.kq.$element)}setActiveState(t){this.Aq=t,this.kq&&this.kq.setActiveState(this.Aq)}getContainer(){return this.vi.$slot}clampLines(){this.kq.clampLines()}}const sa=ea;class na extends g._{constructor(t,i,e,s,n,o,h,a,c){super(),this.mediator=t,this.Ha=i,this.Lp=e,this.wn=s,this.Sn=n,this.Af=o,this.Tq=h,this.Cq=a,this.Eq=[],this.Mq=[],this.Lq=null,this.Bq=0,this.Oq=(0,r.nw)(this.Sn),this.Dq=(0,r.fj)(this.Sn);const d=this.Tq===wo.ProtoGalleryStyleMode.Detailed?I.Ih.StyleDetailed:I.Ih.StyleVisual;if((0,r.cn)(this.Sn,d),this.Tq===wo.ProtoGalleryStyleMode.Detailed&&(this.Sn.innerHTML=`<cnx class="${I.Ih.ExploreMore}">EXPLORE MORE</cnx>`),this.Jn=e.createElementByString(`<cnx class="${I.Ih.CardRail}"></cnx>`),this.Sn.appendChild(this.Jn),this.Tq===wo.ProtoGalleryStyleMode.Detailed){const t=e.createElementByString(`<cnx class="${I.Ih.FadeOut}"></cnx>`);this.Sn.appendChild(t)}this.Vq(c)}start(){this.jq(),this.Fq()}onResize(t){this.Nq&&(this.Nq.updateWidth(t),this.Uq(),this.$q())}setCurrentIndex(t){const i=this.Bq;this.Bq=t,this.Eq.forEach(((i,e)=>i.card.setActiveState(t===e))),this.Eq[i].card.getContainer().removeAttribute("aria-current"),this.Eq[this.Bq].card.getContainer().setAttribute("aria-current","true"),this.$q()}Vq(t){t.forEach(((t,i)=>{const e=this.Hq(i);this.Jn.appendChild(e.getContainer()),this.Eq.push({card:e,videoSource:t}),this.subscribe(Qh[Qh.CardClicked],e,(({payload:t})=>this.zq(t))),this.relay(Jh.Z[Jh.Z.Scroll],e,this,this.mediator)}))}$q(){if((0,b.BZ)(this.Mq))return;const t=this.Eq[this.Bq].card.getContainer();this.Cq===wo.ProtoGalleryOrientationEnum.Landscape?Wh(t,this.Lp,true):Gh(t,this.Lp,true)}Hq(t){const i=this.Lp.createElementByString(`<cnx class="${I.Ih.CardSlot}" role="button"></cnx>`);return new sa(this,this.Ha,this.Lp,this.wn,{id:t,style:this.Tq,$slot:i,titleFont:this.Oq,bodyFont:this.Dq})}zq(t){this.mediator.publish(this,Ho.ChangeVideo,{payload:{videoIndex:t}})}jq(){this.Eq.forEach((t=>{t.videoSource.getMetadata((i=>{t.card.setCardData(i),t.card.getContainer().setAttribute("aria-label",`Video - ${i.title}`),t.card.clampLines()}))}))}Wq(){this.Mq.forEach((t=>{this.unsubscribeAll(t),this.Jn.removeChild(t.getContainer())})),this.Mq=[]}Gq(){const t=this.Cq===wo.ProtoGalleryOrientationEnum.Portrait?this.Jn.clientWidth:this.Jn.clientHeight,i=this.Eq[0].card.getContainer(),e=this.Cq===wo.ProtoGalleryOrientationEnum.Portrait?i.clientWidth:i.clientHeight,s=Math.ceil(t/e)+1-(this.Eq.length-1);if(s>this.Mq.length-1)for(let t=0;t<=s;t++){const i=this.Hq(t);this.Mq.push(i),this.relay(Jh.Z[Jh.Z.Scroll],i,this,this.mediator),this.Jn.appendChild(i.getContainer())}}Uq(){this.Qq()?(this.Wq(),this.Jq()):(this.Xq(),this.Gq())}Jq(){null===this.Lq&&(this.Lq=new qh.$(this.Jn,{horizontal:this.Cq===wo.ProtoGalleryOrientationEnum.Portrait}),(0,r.cn)(this.Jn,I.Gj.HasCustomScrollbar))}Xq(){null!==this.Lq&&(this.Lq.destroy(),this.Lq=null,(0,r.IV)(this.Jn,I.Gj.HasCustomScrollbar))}Qq(){const t=this.Eq[this.Eq.length-1].card.getContainer();return this.Cq===wo.ProtoGalleryOrientationEnum.Landscape?t.offsetTop+t.clientHeight>this.Jn.clientHeight:t.offsetLeft+t.clientWidth>this.Jn.clientWidth}Fq(){const t=this.Yq();this.Nq=new gt(this.Sn,this.Af,t,I.Rq)}Yq(){return No[this.Cq][this.Tq]}}class ra{get template(){return`<cnx class="cnx-video-title">\n                [[${Wr.r.PinnedTitle}]]\n            </cnx>`.trim()}}var oa=h(2823);class ha extends oa.${constructor(){super(...arguments),this.isAttachedToDom=()=>!!this.$uiContainer.parentNode}zr(t,i,e){}updateCurrentVideo(t){const i=this.getComponent(Wr.r.PinnedTitle);i&&i.updateTitle(t)}getComponent(t){return super.getComponent(t)}onResize(t){(0,r.IV)(this.$uiContainer,this.Uj),(0,r.cn)(this.$uiContainer,t),this.Uj=t}destroy(){this.isAttachedToDom()&&super.destroy()}}var aa=h(6019);class ca extends aa.Y{constructor(t,i,e,s,n){super(t,i,e,s.template,n),this.Kq=s}updateTitle(t){const{clickUrl:i,title:e}=t;if(i){(0,r.Kk)(this.Sn),this.Sn.href=i;const t=this.In.isURLSameDomainToTop(i);this.Sn.target=t?O.bS.Top:O.bS.Blank,this.Sn.setAttribute("title",i)}else this.Sn.removeAttribute("title");(0,n.QM)(e)&&(0,r.jG)(this.Zq(e),this.Sn)}Zq(t){(0,r.bX)(this.Sn.children[0]);const i=this.Kq.textTemplate(t);return this.In.createElementByString(i)}}class da{get template(){return'<a class="cnx-pinned-title">\n        </a>'.trim()}textTemplate(t){return`<cnx class="pinned-title-text">${t}</cnx>`.trim()}}class la extends Zr.A{constructor(){super(...arguments),this.TO={[Wr.r.PinnedTitle]:t=>new ca(t,this.In,this.wn,new da,this.vi.isMobile)},this.CO=t=>i=>{const e=this.TO[t];if(e)return e(i)}}createComponent(t,i){return this.CO(t)(i)||super.createComponent(t,i)}}var ua=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class pa{constructor(t,i){this.MU=t,this.Di=i,this.CV=[],this.BU=new R.x,this.tH={[k.Ez.PlayingState]:()=>{var t;return null===(t=this.iH)||void 0===t?void 0:t.play()},[k.Ez.PausedState]:()=>{var t;return null===(t=this.iH)||void 0===t?void 0:t.pause()}}}get onUIEvent(){return this.BU.asObservable()}destroy(){(0,H.i)(this.CV)}onResize(t){var i;null===(i=this.iH)||void 0===i||i.onResize(t)}enterFullscreen(){}exitFullscreen(){}toggleCaptionButton(t){}togglePlaylistControls(t){}toggleExpandButton(t){}changeState(t){const i=this.tH[t];i&&i()}updateUpNextBox(t,i){}updateActiveCue(t){}updateDefaultCaption(t){}updateCurrentVideo(t){}updateCurrentTime(t,i){}updateVolume(t){}updateQuality(t,i){}start(t,i,e){return ua(this,void 0,void 0,(function*(){const t=yield this.eH();this.iH=new t(this.MU),this.iH.render(),this.CV.push(this.iH.onPause().subscribe((()=>this.BU.next({type:Ko.Pause})))),this.CV.push(this.iH.onPlay().subscribe((()=>this.BU.next({type:Ko.Play}))))}))}eH(){var t;return ua(this,void 0,void 0,(function*(){if(yield(0,e.Up)((()=>ua(this,void 0,void 0,(function*(){return function(t,i,s){const n=`cnx-async-bundle-${(0,e.dz)()}`,o={id:n,src:t};return new Promise(((t,e)=>{(0,r.dZ)(o,s.document.head,s,(()=>{try{i.cnx_webpack_global&&(0,b.BZ)(s.cnx_webpack_global)&&i.cnx_webpack_global.push(...s.cnx_webpack_global)}catch(t){e(t)}t(),(0,r.uC)(n,s.document)}),(()=>{(0,r.uC)(n,h.g.document),e(new Error("script load error"))}),!1)}))}(this.nH(),window,this.Di)})))),!(null===(t=this.Di.cnxAsyncChunks)||void 0===t?void 0:t.litUI))throw new Error("lit bundle not found");return this.Di.cnxAsyncChunks.litUI}))}nH(){return`${u}lit.ui.js`}}var fa=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};const ma=168,va=91;class ga extends rh{constructor(){super(...arguments),this.rH=!1,this.dn=m.ProtoQuartilesEnum.Start,this.oH=new Map}start(){const t=Object.create(null,{start:{get:()=>super.start}});return fa(this,void 0,void 0,(function*(){yield t.start.call(this),this.Hj.next(!0),this.nj.start();try{yield this.iF()}catch(t){}finally{this.nF()}this.zj.next(!0)}))}getCurrentVideoIndex(){return this.ej.currentVideoIndex}getPlaylistLength(){return this.ej.length}vF(t){return fa(this,void 0,void 0,(function*(){(t=Object.assign(Object.assign({},t),{isInApp:(0,n.QM)(this._P.config.bundleID)})).enableNewUI?this.Zj=new pa(this.NO,this.Wg.global):this.Zj=new Mh(this._P.services.GlobalDomUtilsService,this._P.services.InteractionService,this._P.services.ResizeObserver,this.NO,this._P.config.appId),this.oF(),yield this.Zj.start(t,!1,this.Uj),t.isPinned&&this.hH(t)}))}hH(t){t=Object.assign(Object.assign({},t),{isInApp:(0,n.QM)(this._P.config.bundleID)});const i=new ra;this.tF=new ha(this,this.NO.parentElement,this._P.services.GlobalDomUtilsService,i.template,new la(this._P.services.GlobalDomUtilsService,this._P.services.InteractionService,this.NO,t))}floatingChanged(t){var i;null===(i=this.tF)||void 0===i||i.destroy(),t&&(this.hH(super.pF()),this.ej.getCurrentVideoData((t=>{var i;null===(i=this.tF)||void 0===i||i.updateCurrentVideo(t)})))}onEnterCuePoint(){this.Yj.onEnterCuePoint()}onExitCuePoint(){this.Yj.onExitCuePoint()}yF(t){this.Wg.upNextMode===wo.ProtoPlayerUpNextMode.Next&&this.nj.duration-this.nj.currentTime<=6&&!this.rH&&(this.rH=!0,this.ej.getVideoData(this.ej.nextVideoIndex,(t=>{const i=t.getThumbnailUrl(ma,va);this.Zj.updateUpNextBox(i,t.description)}))),this.aH(this.nj.currentTime,this.nj.duration)}cF(){this.rH=!1,this.dn=m.ProtoQuartilesEnum.Start}rF(){switch(this.Wg.upNextMode){case wo.ProtoPlayerUpNextMode.Loop:this.cH();break;case wo.ProtoPlayerUpNextMode.Next:this.dH(),this.Jj.streamFormat=Yo.Autochain;break;case wo.ProtoPlayerUpNextMode.Stop:this.Yj.stop(),this.Zj.changeState(k.Ez.ReplayState)}}nF(){const{preRollBreak:t,postRollBreak:i}=this.Wg,e=(0,n.r)(t),s=(0,n.r)(i);this.Yj=new Zo(this,this.ej,this.nj,e,s,this._P.config.os.os===L.M.Ios,this.Wg.videoPosition),super.nF()}oF(){super.oF(),this.subscriptions.push(this.Zj.onUIEvent.subscribe((t=>{switch(t.type){case Sh.Next:this.mediator.publish(this,y.Uh.UserInteraction,{payload:{playback:!0,clickedNext:!0}}),this.dH(),this.Jj.streamFormat=Yo.UserInitiated;break;case Sh.Replay:this.mediator.publish(this,y.Uh.UserInteraction,{payload:{playback:!0}}),this.cH();break;case Sh.Prev:this.mediator.publish(this,y.Uh.UserInteraction,{payload:{playback:!0,clickedPrev:!0}}),this.lH()}})))}mF(t,i){this.nj=new Ah(this,this._P,this._P.services.GlobalDomUtilsService,this.NO,this._P.services.ResizeObserver,i,t,this.Wg.videoPosition,this.fF)}uH(t,i){return i&&t?Math.floor((0,Bt.dQ)(0,i,0,4,t)):m.ProtoQuartilesEnum.Start}aH(t,i){const e=this.uH(t,i);e>m.ProtoQuartilesEnum.Start&&e!==this.dn&&(this.oH.get(e)||(this.mediator.publish(this,Ho.ContentQuartiles,{payload:e}),this.oH.set(e,!0)),this.dn=e)}lH(){this.setVideo(this.ej.prevVideoIndex,!0),this.Jj.streamFormat=Yo.UserInitiated}dH(){this.setVideo(this.ej.nextVideoIndex)}Oj(t=!0){super.Oj(t),this.oH.clear()}cH(){this.Yj.replay(),this.Oj(!1)}}var ya,ba,Ia=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class wa extends Go{constructor(){super(...arguments),this.pH=!0,this.fH={[z.d.nextVideo]:()=>{this.ih.mediaClick.next({type:N.$.NextClick}),this.nextVideo()},[z.d.previousVideo]:()=>{this.ih.mediaClick.next({type:N.$.PreviousClick}),this.prevVideo()},[z.d.toggleFullscreen]:()=>{this.toggleFullscreen()?this.ih.mediaClick.next({type:N.$.FullScreenClick}):this.ih.mediaClick.next({type:N.$.ExitFullScreenClick})},[z.d.toggleCaptions]:()=>{this.ih.mediaClick.next({type:N.$.SubtitleClick}),this.toggleCaptions()},[z.d.togglePlay]:()=>{this.togglePlay()?this.ih.mediaClick.next({type:N.$.PlayClick}):this.ih.mediaClick.next({type:N.$.PauseClick})},[z.d.toggleMute]:()=>{0===this.wp.volume?this.ih.mediaClick.next({type:N.$.UnmuteClick}):this.ih.mediaClick.next({type:N.$.MuteClick}),this.toggleMute()},[z.d.increaseVolume]:()=>{this.ih.mediaClick.next({type:N.$.VolumeClick}),this.increaseVolume(.1)},[z.d.decreaseVolume]:()=>{this.ih.mediaClick.next({type:N.$.VolumeClick}),this.decreaseVolume(.1)},[z.d.seekForward]:()=>this.seekForward(5),[z.d.seekBackward]:()=>this.seekBackward(5),[z.d.seek0Percent]:()=>this.seekPercentage(0),[z.d.seek10Percent]:()=>this.seekPercentage(10),[z.d.seek20Percent]:()=>this.seekPercentage(20),[z.d.seek30Percent]:()=>this.seekPercentage(30),[z.d.seek40Percent]:()=>this.seekPercentage(40),[z.d.seek50Percent]:()=>this.seekPercentage(50),[z.d.seek60Percent]:()=>this.seekPercentage(60),[z.d.seek70Percent]:()=>this.seekPercentage(70),[z.d.seek80Percent]:()=>this.seekPercentage(80),[z.d.seek90Percent]:()=>this.seekPercentage(90)}}start(){const t=Object.create(null,{start:{get:()=>super.start}});return Ia(this,void 0,void 0,(function*(){try{t.start.call(this),this.mH()}catch(t){(0,o.n)({message:"VideoExperience_start",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}))}nextVideo(){let t=this.wp.getCurrentVideoIndex();t+1>=this.wp.getPlaylistLength()?this.changeVideo(0,!1):this.changeVideo(++t,!1)}prevVideo(){let t=this.wp.getCurrentVideoIndex();0!==t?this.changeVideo(--t,!1):this.changeVideo(this.wp.getPlaylistLength()-1,!1)}getVideoIndex(){return this.wp.getCurrentVideoIndex()}setVideoIndex(t){const i=this.wp.getPlaylistLength();if(t>=i||!(0,n.r)(t+1))throw new Error(`ELEMENTS JS API: Index [${t}] is out of bounds! Please provide a valid video index [0 - ${i}]!`);this.changeVideo(t)}destroy(){this.unsubscribeAll(this.vH),super.destroy()}setVideoPosition(t){if(t>this.duration||!(0,n.r)(t)&&0!==t)throw new Error(`ELEMENTS JS API: The timestamp provided [${t}] is out of bounds! Please provide a valid timestamp [0 - ${this.duration}]!`);this.currentTime=t}seekForward(t){this.currentTime+t>this.duration?this.currentTime=this.duration:this.currentTime+=t}seekBackward(t){this.currentTime-t<0?this.currentTime=0:this.currentTime-=t}seekPercentage(t){this.currentTime=this.duration/100*t}my(t){const i=this.fH[t];i&&i()}zg(){this.Cg.isInAdPod()?this.Jg((()=>{super.zg(),this.Eg.onAdFinished(this.adHandler.linearInImpression,xt.LINEAR,this.Cg.isInAdPod());this.wp.show(!0)})):(super.zg(),this.wp.show(this.pH),this.pH=!0)}Go(){super.Go(),this.gH&&this.yH(),this.vH&&this.vH.onResize(this.$experienceContainer.clientWidth)}generateHTML(){super.generateHTML(),this.Wg.gallery&&this.bH()}DV(){this.wp=new ga(this,this.Wg,this.app,this.$playerContainer,this.breakPointsHandler.currentBreakpointClass)}Xg(){super.Xg(),this.subscribe(ft,this.Eg,(()=>{this.wp.onEnterCuePoint()})),this.subscribe(mt,this.Eg,(()=>{this.wp.onExitCuePoint()}))}yH(){this.Wg.gallery.orientation===wo.ProtoGalleryOrientationEnum.Landscape&&(0,r.T7)(this.gH,{height:`${this.$playerWrapper.clientHeight}px`})}bH(){this.gH=this.app.services.GlobalDomUtilsService.createElementByString('<cnx class="cnx-g-container" role="group" aria-label="Video playlist"></cnx>'),this.$experienceContainer.appendChild(this.gH);const t=this.Wg.gallery.orientation===wo.ProtoGalleryOrientationEnum.Landscape?I.s6.GalleryLandscape:I.s6.GalleryPortrait;(0,r.cn)(this.$experienceContainer,t)}mH(){this.Wg.gallery&&(this.vH=new na(this,this.app.services.ResizeObserver,this.app.services.GlobalDomUtilsService,this.app.services.InteractionService,this.gH,this.app.config.device,this.Wg.gallery.style,this.Wg.gallery.orientation,this.Wg.playlist),this.subscribe(Ho.ChangeVideo,this.vH,(({payload:{videoIndex:t}})=>{this.pH=!this.wp.isHidden,this.Cg.endPod(),this.changeVideo(t,!0),this.wp.getVideoData(t,(t=>{this.mediator.publish(this,$o.GalleryCardClicked,{payload:this.WV(t)}),this.ih.mediaClick.next({type:N.$.GalleryClick})})),this.fg()})),this.subscribe(k.T$.NewVideo,this.wp,(({payload:{videoIndex:t}})=>{this.vH.setCurrentIndex(t)})),this.subscribe(Ho.VideoQueued,this.wp,(({payload:{videoIndex:t}})=>{this.vH.setCurrentIndex(t)})),this.subscribe(Jh.Z[Jh.Z.Scroll],this.vH,(()=>{this.ih.mediaClick.next({type:N.$.ScrollClick})})),this.vH.start(),this.vH.onResize(this.$experienceContainer.clientWidth))}}class _a extends A{constructor(){super(...arguments),this.gp="cnx-el"}createExperience(t,i){t.isInStreamType()?(this.experience=new wa(this,i,this.app.services.UrlSuffixerService,this.Ud,this.th,this.ih,this.sl,this.sp),this.experienceApi=new $h(this.experience)):t.isLiveType()?(this.experience=new Rh(this,i,this.app.services.UrlSuffixerService,this.Ud,this.th,this.ih,this.sl,this.sp),this.experienceApi=new $h(this.experience)):(this.experience=new Uh(this,i,this.app.services.UrlSuffixerService,this.Ud,this.th,this.ih,this.sl,this.sp),this.experienceApi=new jh(this.experience))}isSupportedBreakpoint(t){return!0}subscribeToEvents(){super.subscribeToEvents(),this.playerModel.html&&this.subscribe(Ho.MediaMetaUpdate,this.experience,(({payload:{title:t,description:i}})=>{this.updateMacroContent(this.macroElements.title,t),this.updateMacroContent(this.macroElements.description,i)}))}getApiMethods(){return this.experienceApi.getApiMethods()}}class Sa{constructor(){this.IH=[],this.wH=0,this._H=!1,this.SH=t=>{this.IH.forEach((i=>{t&&t!==i.element||this.PH(i,this.wH)}))}}AH(t){let i=this.IH.find((i=>i.element===t));return i||(i={element:t,list:[],cachedPercentInView:0},this.IH.push(i)),i.list}PH(t,i){t.list.forEach((t=>{!t.callbackSent&&t.threshold<=i?(t.callbackSent=!0,t.timeout=(0,e.ld)(t.callback,t.callbackDelay,!0,this._H)):t.callbackSent&&t.threshold>i&&(t.callbackSent=!1,clearTimeout(t.timeout),t.timeout=(0,e.ld)(t.callback,0,!1,this._H))}))}on(t,i,e){this.AH(t).push({threshold:e.threshold,callbackSent:!1,callbackDelay:e.callbackDelay,timeout:null,callback:i}),this.SH()}off(t,i){const e=this.IH.find((i=>i.element===t));if(e){for(let t=e.list.length;t--;)e.list[t].callback===i&&e.list.splice(t,1);0===e.list.length&&this.IH.splice(this.IH.indexOf(e))}}check(t={threshold:.1}){return this.wH>=t.threshold}triggerRecheck(t){this.SH(t)}xH(t){this._H=t}setViewableThreshold(t){this.wH=t,this.triggerRecheck()}subscribe(t,i){}destroy(){for(let t=this.IH.length;t--;){const i=this.IH[t];for(let t=i.list.length;t--;)clearTimeout(i.list[t].timeout),this.off(i.element,i.list[t].callback)}}}!function(t){t[t.none=0]="none",t[t.friendly=1]="friendly",t[t.safe=2]="safe"}(ya||(ya={}));class Pa{constructor(t,i,s,n=!1){this.Di=t,this.kH=i,this.sl=s,this.IH=[],this.TH=ya.none,this.CH={intersectionObserver:!1,fallbackImplementation:!1},this.EH=null,this.MH=[0,.01,.1,.2,.5],this.LH=250,this.BH=t=>{this.sl.isPageInFocus=t,this.SH()},this.SH=()=>{this.IH.forEach((t=>{const i=this.wH(t.element);this.onViewHandle(t,i)}))},this.OH=()=>{null===this.EH&&(this.EH=setTimeout((()=>{this.SH(),clearTimeout(this.EH),this.EH=null}),this.LH))},this.RH=(0,e.pE)(this.Di).topFrame,this.DH(n),this.VH(),this.jH()}jH(){this.kH.on(this.BH),this.sl.isPageInFocus=this.kH.isDocumentVisible()}DH(t){this.Di.IntersectionObserver&&!t?this.CH.intersectionObserver=!0:this.CH.fallbackImplementation=!0,this.Di.self!==this.Di.top?(this.FH=this.NH(this.Di),null!==this.FH?this.TH=ya.friendly:this.TH=ya.safe):this.FH=this.Di.frameElement}NH(t){let i;try{if(i=t.parent,i===this.Di.top)return t.frameElement}catch(t){return null}return this.NH(i)}VH(){this.CH.intersectionObserver?this.UH=new this.Di.IntersectionObserver(this.onObserverEnter.bind(this),{root:null,rootMargin:"0px",threshold:this.MH}):(this.RH.addEventListener("scroll",this.OH),this.RH.addEventListener("load",this.SH),this.RH.addEventListener("resize",this.SH))}$H(t){return this.IH.find((i=>i.element===t))}wH(t){if(this.TH===ya.safe){const i=this.$H(t);return i?i.cachedPercentInView:0}let i=1;const e=t.getBoundingClientRect(),s={bottomRatio:e.bottom/e.height,topRatio:(this.Di.top.innerHeight-e.top)/e.height,leftRatio:(this.Di.top.innerWidth-e.left)/e.width,rightRatio:e.right/e.width};return Object.keys(s).forEach((t=>{s[t]<=0&&(i=0),s[t]>0&&s[t]<1&&(i*=s[t])})),i}onObserverEnter(t){t.forEach((t=>{this.IH.filter((i=>i.element===t.target)).forEach((i=>{this.onViewHandle(i,t.intersectionRatio)}))}))}onViewHandle(t,i){t.cachedPercentInView=i;const s=this.sl.isPageInFocus;t.list.forEach((t=>{!t.callbackSent&&t.threshold<=i&&s?(t.callbackSent=!0,t.timeout=(0,e.ld)(t.callback,t.callbackDelay,!0)):t.callbackSent&&(t.threshold>i||!s)&&(t.callbackSent=!1,clearTimeout(t.timeout),t.timeout=(0,e.ld)(t.callback,0,!1))}))}on(t,i,s={}){let n=!1;if(this.CH.fallbackImplementation)if(this.TH===ya.friendly&&t.ownerDocument.defaultView!==this.Di.top)t=this.FH;else if(this.TH===ya.safe)return void(0,e.ld)(i,0,!1);let r=this.IH.find((i=>i.element===t));r?n=!0:(r={element:t,list:[],cachedPercentInView:0},this.IH.push(r)),r.list.push({threshold:s.threshold,callbackSent:!1,callbackDelay:s.callbackDelay,timeout:null,callback:i}),this.CH.intersectionObserver?(n&&this.UH.unobserve(t),this.UH.observe(t)):this.CH.fallbackImplementation&&this.SH()}off(t,i){const e=this.IH.find((i=>i.element===t));if(e){let s=e.list.length;for(;s;)s--,e.list[s].callback===i&&e.list.splice(s,1);0===e.list.length&&(this.UH&&this.UH.unobserve(t),this.IH.splice(this.IH.indexOf(e),1))}}check(t={threshold:.1}){if(!t.element)return!1;let i=t.element;this.TH===ya.friendly&&(i=this.FH);const e=this.sl.isPageInFocus;return this.wH(i)>=t.threshold&&e}triggerRecheck(t){this.CH.fallbackImplementation&&t&&this.IH.forEach((i=>{if(i.element===t){const t=this.wH(i.element);this.onViewHandle(i,t)}}))}setViewableThreshold(t){}subscribe(t,i){}destroy(){this.RH.removeEventListener("scroll",this.OH),this.RH.removeEventListener("load",this.SH),this.RH.removeEventListener("resize",this.SH);[].slice.call(this.IH).forEach((t=>{[].slice.call(t.list).forEach((i=>{this.off(t.element,i.callback),this.Di.clearTimeout(i.timeout)}))})),this.kH.off(this.BH),clearTimeout(this.EH)}}function Aa(t){return(0,n.as)(t)&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function xa(t){return Aa(t)?ka({},t):t}function ka(t,i){return function(t,i){const e={};return Aa(t)&&Object.keys(t).forEach((i=>{e[i]=xa(t[i])})),Object.keys(i).forEach((s=>{Aa(i[s])&&t[s]?e[s]=ka(t[s],i[s]):e[s]=xa(i[s])})),e}(t,i)}!function(t){t[t.Normal=0]="Normal",t[t.Buzzfeed=1]="Buzzfeed"}(ba||(ba={}));class Ta{constructor(t=0){this.qH=t,this.HH=16,this.zH=9}getHeightByRatio(t){return Math.round(t/this.HH*this.zH)+this.qH}setExtraHeight(t){this.qH=t}}const Ca=[m.ProtoDeviceType.Smartphone];function Ea(t,i){return function(t){return Ca.indexOf(t)>-1}(i)&&(t===m.ProtoPositionMode.PinnedBottom||t===m.ProtoPositionMode.PinnedTop)}class Ma{constructor(t,i,e={},s){this.extraHeight=i,this.device=s,this.cachedExtraHeight=0,this.isPinnedFloating=Ea(t.floatingScrollPosition,s),this.floatingMode=(0,n.$K)(e.mode)?e.mode:t.floatingMode,(0,b.BZ)(e.devices)?this.floatingDeviceMode=e.devices:this.floatingDeviceMode=(0,b.BZ)(t.floatingDeviceMode)?t.floatingDeviceMode:[m.ProtoDeviceType.Desktop],(0,n.$K)(e.closeButton)?this.floatingCloseButtonMode=e.closeButton:(0,n.$K)(t.floatingCloseButtonMode)?this.floatingCloseButtonMode=t.floatingCloseButtonMode:this.floatingCloseButtonMode=m.ProtoPlayerCloseButtonMode.OnHover,this.floatingPosition=(0,n.$K)(e.fixedPosition)?e.fixedPosition:t.floatingFixedPosition,this.floatingScrollPosition=(0,n.$K)(e.scrollPosition)?e.scrollPosition:t.floatingScrollPosition,this.floatingWidth=(0,n.$K)(e.floatingWidth)?e.floatingWidth:t.floatingWidth||400,this.floatingGutterX=(0,n.$K)(e.floatingGutterX)?e.floatingGutterX:t.floatingGutterX,this.floatingGutterY=(0,n.$K)(e.floatingGutterY)?e.floatingGutterY:t.floatingGutterY,this.pageElement=(0,n.$K)(e.floatingPageElement)?e.floatingPageElement:t.floatingPageElement,this.appendLocation=(0,n.$K)(e.floatingAppendLocation)?e.floatingAppendLocation:t.floatingAppendLocation,this.floatingYAxisPadding=(0,n.$K)(e.floatingYAxisPadding)?e.floatingYAxisPadding:t.floatingYAxisPadding,this.setScrollPosition(this.floatingScrollPosition),(this.isPositionedPinnedBottom||this.isPositionedPinnedTop)&&(this.cachedExtraHeight=i,i=0),this.WH=new Ta(i),this.GH=this.floatingMode!==m.ProtoPlayerFloatingMode.Off}setScrollPosition(t){this.floatingScrollPosition=t,this.isPinnedFloating=Ea(t,this.device),this.QH=t===m.ProtoPositionMode.BottomLeft||t===m.ProtoPositionMode.TopLeft,this.JH=t===m.ProtoPositionMode.BottomRight||t===m.ProtoPositionMode.TopRight,this.XH=t===m.ProtoPositionMode.TopLeft||t===m.ProtoPositionMode.TopRight,this.YH=t===m.ProtoPositionMode.BottomRight||t===m.ProtoPositionMode.BottomLeft,this.KH=t===m.ProtoPositionMode.PinnedTop,this.tz=t===m.ProtoPositionMode.PinnedBottom}get isPositionedLeft(){return this.QH}get isPinnedPlayerFloating(){return this.isPinnedFloating}get isPositionedRight(){return this.JH}get isPositionedTop(){return this.XH}get isPositionedBottom(){return this.YH}get isPositionedPinnedTop(){return this.KH}get isPositionedPinnedBottom(){return this.tz}get hasFloatingCapability(){return this.GH}set isPositionedLeft(t){this.QH=t}set isPinnedPlayerFloating(t){this.isPinnedFloating=t}set isPositionedRight(t){this.JH=t}set isPositionedBottom(t){this.YH=t}set isPositionedTop(t){this.XH=t}set isPositionedPinnedTop(t){this.KH=t}set isPositionedPinnedBottom(t){this.tz=t}set width(t){this.floatingWidth=t}set gutterX(t){this.floatingGutterX=t}set gutterY(t){this.floatingGutterY=t}get width(){return this.floatingWidth}getHeight(t){return`${this.WH.getHeightByRatio(t)}px`}setExtraHeight(t){this.WH.setExtraHeight(t)}getFloatingSettings(){return{scrollPosition:this.floatingScrollPosition,floatingGutterX:this.floatingGutterX,floatingGutterY:this.floatingGutterY,floatingWidth:this.floatingWidth}}}var La=h(1992),Ba=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function o(t){try{a(s.next(t))}catch(t){r(t)}}function h(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,h)}a((s=s.apply(t,i||[])).next())}))};class Oa{constructor(t,i,e){this.iz=!1,this.ez=[],this.sz=[],this.nz=!1,this.wv=t,this.rz=i,this.qu=e}getMetadata(t,i){this.iz?t&&t(this.oz):this.hz(t,i)}setAvailableQualities(t){this.oz.setAvailableQualities(t)}hz(t,i){t&&this.ez.push(t),i&&this.sz.push(i),this.nz||(this.nz=!0,this.az().then((t=>Ba(this,void 0,void 0,(function*(){const i=yield ur.k.loadInsights({id:this.wv,versionId:this.rz,insightsInputType:La.i.Video});this.nz=!1,this.iz=!0,this.oz=this.cz(t,i),this.ez.forEach((t=>t(this.oz))),this.ez=[]})))).catch((()=>{this.nz=!1,this.sz.forEach((t=>t()))})))}}class Ra{constructor(t,i){this.lz=[],this.wv=t,this.hv=i.altText,this.uz=i.outputUrl,this.pz=i.thumbnailUrl,this.fz=i.name,this.mz=i.startDate}getSources(t,i){return null}setAvailableQualities(t){this.lz=t}get hlsFilePath(){return this.uz}getAvailableQualities(){return this.lz}getClosestSourceQuality(t){let i;const e=(0,Bt.DE)(t,this.lz.map((t=>t.videoHeight)));return this.lz.forEach((t=>{t.videoHeight===e&&(i=t)})),i}getHlsSource(){return this.uz}getThumbnailUrl(t,i){return this.pz}get id(){return this.wv}get altText(){return(0,n.$K)(this.hv)?this.hv:""}get title(){return this.fz}get liveStreamStartDate(){return this.mz}getDefaultSubtitle(){return null}get isExternalSource(){return!1}}var Da=h(6224);class Va extends Oa{constructor(){super(...arguments),this.vz=new Da.t(m.ProtoLiveMediaMetadataResponse,"LiveVideoSourceWrapper")}az(){const t=`${Xe.n.endPoints.base.metadata}${this.wv}/${this.rz}_liveStream.bin`;return this.vz.fetchMetadata(t)}cz(t){return new Ra(this.wv,t)}}class ja{constructor(t){this.lz=[],this.wv=t.id,this.gz=t.title,this.hv=t.altText,this.bz=t.description,this.Iz=t.imageUrl,this.VF=t.sources,this.tS=t.clickUrl||"",this.uz=t.hlsFilePath||"",this.wz=t.liveStreamFilePath||"",this._z=t.liveStramStartDate||"",this.zu=t.disableAdvertising,this.VF&&this.VF.forEach((t=>{this.lz.push({label:k.se[t.quality],videoHeight:t.quality,isHD:t.quality>=k.gQ})}))}get id(){return this.wv}get title(){return this.gz}get altText(){return(0,n.$K)(this.hv)?this.hv:""}get description(){return this.bz}get clickUrl(){return this.tS}getSources(t){return[{src:this.VF.find((i=>i.quality===this.getClosestSourceQuality(t).videoHeight)).file,type:new hh(k.L5.H264).type}]}getHlsSource(){return this.wz||this.uz}getAvailableQualities(){return this.lz.sort(((t,i)=>t.videoHeight-i.videoHeight))}getThumbnailUrl(){return this.Iz}get hlsFilePath(){return this.wz||this.uz}getClosestSourceQuality(t){let i;const e=(0,Bt.DE)(t,this.lz.map((t=>t.videoHeight)));return this.lz.forEach((t=>{t.videoHeight===e&&(i=t)})),i}setAvailableQualities(t){this.lz=t}get liveStreamStartDate(){return this._z}getDefaultSubtitle(){return null}get disableAdvertising(){return this.zu}get isExternalSource(){return!0}}class Fa{constructor(t){this.oz=new ja(t)}getMetadata(t){t&&t(this.oz)}setAvailableQualities(t){this.oz.setAvailableQualities(t)}}class Na{constructor(t,i,e,s,n,r,o){var h;if(this.wv=t,this.Sv=e,this.zu=n,this.Pz=r,this.qu=o,this.Az=[],this.xz=[],this.kz=[],this.Tz=[],this.Mz={insights:[]},this.lz=[],this.gz=i.title,this.hv=i.altText,this.bz=i.description,this.tS=i.clickUrl,this.Az=i.keywordList,this.Lz=i.languageId,this.xz=i.trackList,this.Bz=i.cuePoints,this.Oz=i.publishDate,this.xz&&this.xz.length>0){this.xz.forEach((t=>{t.file=this.Sv.appendParamsToUrl(this.Rz(Xe.n.endPoints.base.video,t.file))}));const t=this.xz.findIndex((t=>t.title.indexOf("English")>-1));if(t>-1){const i=this.xz.splice(t,1);this.xz.unshift(...i)}}this.pz=i.thumbnail,this.Dz=i.duration,this.Tz=i.customFields,this.uz=i.hlsFilePath,this.Vz=i.sourceItemId,this.Mz.insights=null===(h=this.Pz)||void 0===h?void 0:h.insights,(0,b.BZ)(i.renditionList)&&(this.kz=this.jz(i.renditionList),this.Fz(i.renditionList))}jz(t){return t.sort(((t,i)=>t.height-i.height))}setAvailableQualities(t){this.lz=t}Fz(t){(0,b.qy)("height",t).forEach(((t,i)=>{this.lz.push({videoHeight:t.height,label:`${t.height}p`,isHD:t.height>=k.gQ})}))}Nz(t,i){return this.kz.find((e=>e.codec===t&&e.height===i))}Rz(t,i){let e=`${t}${this.wv}/`;return(0,n.QM)(this.qu)?e+=`${this.qu}/${i}`:e+=i,e}Uz(t,i){const e=(0,Bt.DE)(t,this.lz.map((t=>t.videoHeight)));return this.Nz(i,e)}get hlsFilePath(){return this.uz}getAvailableQualities(){return this.lz}getClosestSourceQuality(t){let i;const e=(0,Bt.DE)(t,this.lz.map((t=>t.videoHeight)));return this.lz.forEach((t=>{t.videoHeight===e&&(i=t)})),i}getSources(t,i){const e=[];return i.forEach((i=>{const s=this.Uz(t,i.id);(0,b.BZ)(e)||s&&e.push({src:this.Sv.appendParamsToUrl(this.Rz(Xe.n.endPoints.base.video,s.file)),type:i.type})})),e}getHlsSource(){return this.Rz(Xe.n.endPoints.base.video,this.uz)}getThumbnailUrl(t,i){const e=this.Rz(Xe.n.endPoints.base.image,this.pz);return po.getSmartCroppedImageUrl(e,t,i,this.Sv)}getDefaultSubtitle(){const t=this.xz.find((t=>t.title.indexOf("English")>-1));return t||this.xz[0]}get title(){return this.gz}get altText(){return(0,n.$K)(this.hv)?this.hv:""}get description(){return this.bz}get clickUrl(){return this.tS}get keywords(){return this.Az}get languageId(){return this.Lz}get sourceItemId(){return this.Vz}get subtitles(){return(0,b.BZ)(this.xz)?this.xz:void 0}get spriteSheet(){return this.$z}get duration(){return this.Dz}get id(){return this.wv}get customFields(){return this.Tz}get insights(){return this.Mz}get cuePoints(){return this.Bz}get publishDate(){return this.Oz}get sentimentAnalysis(){var t;return null===(t=this.Pz)||void 0===t?void 0:t.sentimentAnalysis}get disableAdvertising(){return this.zu}get isExternalSource(){return!1}}class Ua extends Oa{constructor(t,i,e,s,n,r){super(t,i,s),this.Sv=e,this.qz=n,this.zu=r,this.vz=new Da.t(m.ProtoMediaMetadataResponse,"VideoSourceWrapper")}az(){let t=`${Xe.n.endPoints.base.metadata}${this.wv}/`;return(0,n.QM)(this.qu)?t+=`${this.qu}/${this.rz}_media.bin`:t+=`${this.rz}_media.bin`,this.vz.fetchMetadata(this.Sv.appendParamsToUrl(t))}cz(t,i){let e={};if(this.qz){const{title:t,description:i,clickUrl:s,keywordList:n,customFields:r}=this.qz;e={title:t,description:i,clickUrl:s,keywordList:n,customFields:r}}const s=Object.assign(Object.assign({},t),e);return new Na(this.wv,s,this.Sv,this.rz,this.zu,i,this.qu)}}class $a{constructor(t,i,e,s){this.Sv=t,this.zz=i,this.wF=e,this.Wz=s,this.wF.shouldUseMediaIdListAsPlaylist&&(0,b.BZ)(this.wF.mediaIdList)&&(this.zz=this.zz.filter((({mediaId:t})=>{var i;return null===(i=this.wF.mediaIdList)||void 0===i?void 0:i.includes(t)}))),this.Gz=this.Qz()}get playlist(){return this.Gz}hasExternalLivestream(){var t;return null===(t=this.Wz)||void 0===t?void 0:t.some((({liveStreamFilePath:t})=>(0,n.QM)(t)))}Qz(){return this.Jz(this.Wz)?this.Wz.map((t=>new Fa(t))):this.zz.map((t=>{this.Xz(t);const{mediaId:i,revisionNumber:e,mediaContentVersionId:s,shouldDisableAdvertising:n}=t;if(this.wF.playerType===wo.ProtoElementsTypeEnum.Live)return new Va(i,e,s);const r=this.Yz(i);return new Ua(i,e,this.Sv,s,r,n)}))}Kz(){var t;return null===(t=this.Wz)||void 0===t?void 0:t.some((({id:t})=>this.zz.find((({mediaId:i})=>i===t))))}Yz(t){var i;return null===(i=this.Wz)||void 0===i?void 0:i.find((({id:i})=>i===t))}Jz(t){return!this.Kz()&&(!(0,n.QM)(this.wF.mediaId)&&!(0,b.BZ)(this.wF.mediaIdList)&&!!(0,b.BZ)(t))}Xz({mediaId:t,revisionNumber:i,insightsRevisionNumber:e}){if(this.wF.playerType===wo.ProtoElementsTypeEnum.Live)return void ur.k.markAsUnavailable(t);i===e?ur.k.loadInsights({id:t,versionId:i,insightsInputType:La.i.Video}).catch((()=>null)):(ur.k.markAsUnavailable(t),(0,n.hj)(i)&&(0,n.hj)(e)&&(0,o.n)({message:"ElementsPlayerModel_InsightsRevisionNumberMismatch",exception:`media:${t}, revisionNumber:${i}, insightsRevisionNumber:${e}`,level:o.D.WARN},{shouldSendMaxLog:!1}))}}class qa extends class{constructor(t,i,s,r,h,a,c,d,l,u,p,f,v=0){if(this.global=t,this.targetContainer=i,this.Zz=s,this.Af=r,this.secondLevelDomain=h,this.apiConfig=a,this.isServerlessMode=c,this.supplyChainSettings=d,this.isSeoTraffic=l,this.Sv=u,this.lineItemAbTestInformation=p,this.videoPosition=f,this.sharingDestinations=[],this.disableAdvertising=!1,this.adBreaks=[],this.disableClickUrl=!1,this.moatTrackingEnabled=!1,this.pauseAdWhenFinished=!1,this.loopAdWhenFinished=!1,this.adsMustBeSkippableIfLongerThan=ji.f3,(0,n.QM)(s.initializationSettingsJson))try{const t=JSON.parse(s.initializationSettingsJson);this.apiConfig=ka(this.apiConfig,t)}catch(t){(0,o.n)({message:"invalid_init_json",exception:t.message,callStack:t.callStack,level:o.D.CRITICAL})}if((this.apiConfig.playerMode===ba.Buzzfeed||this.apiConfig.settings.pauseAdWhenFinished)&&(this.pauseAdWhenFinished=!0),this.tW(this.Zz.lineItems),this.soundMode=(0,n.$K)(this.apiConfig.settings.defaultSoundMode)?this.apiConfig.settings.defaultSoundMode:s.soundMode,this.playbackMode=(0,n.$K)(this.apiConfig.settings.playbackMode)?this.apiConfig.settings.playbackMode:s.playbackMode,this.playbackMode===m.ProtoPlayerPlaybackModeEnum.ClickToPlay||this.soundMode===m.ProtoPlayerSoundMode.Mute||(0,e.we)()||(this.soundMode=m.ProtoPlayerSoundMode.Mute),this.html=s.html,this.css=s.css,this.floatingSettings=new Ma(s,v,this.apiConfig.settings.customization.floating,this.Af),s.logoResource||(0,n.QM)(this.apiConfig.settings.customization.logoUrl)){let t=`${Xe.n.endPoints.base.image}${s.playerId}/${s.logoResource}`;t=this.Sv.appendParamsToUrl(t),this.logoUrl=(0,n.QM)(this.apiConfig.settings.customization.logoUrl)?this.apiConfig.settings.customization.logoUrl:t}const g=s.amazonTamSlotId;(0,n.QM)(g)&&(this.amazonTamSlotId=g),(0,n.$K)(this.apiConfig.settings.advertising.macros)&&(this.externalMacros=this.apiConfig.settings.advertising.macros),(0,n.$K)(this.apiConfig.settings.disableAdvertising)&&(this.disableAdvertising=this.apiConfig.settings.disableAdvertising),this.midRollNumber=(0,n.$K)(this.apiConfig.settings.advertising.maxNumberOfMidRolls)?this.apiConfig.settings.advertising.maxNumberOfMidRolls:s.midRollNumber,this.adViewabilityPolicy=s.adViewabilityPolicy,this.preRollBreak=((0,n.$K)(this.apiConfig.settings.advertising.preRollBreak)?(0,de.qe)(this.apiConfig.settings.advertising.preRollBreak,500):s.preRollBreak)*J.s_,this.postRollBreak=((0,n.$K)(this.apiConfig.settings.advertising.postRollBreak)?(0,de.qe)(this.apiConfig.settings.advertising.postRollBreak,500):s.postRollBreak)*J.s_,this.playerId=s.playerId,this.floatingSettings.floatingMode===m.ProtoPlayerFloatingMode.Always?this.closeButtonMode=this.floatingSettings.floatingCloseButtonMode:this.closeButtonMode=(0,n.$K)(this.apiConfig.settings.customization.closeButtonMode)?this.apiConfig.settings.customization.closeButtonMode:s.closeButtonMode,this.isCloseButton=!!this.closeButtonMode||!!this.floatingSettings.floatingCloseButtonMode,this.uiComponentsVisibility={casting:!1,expandButton:(0,n.$K)(this.apiConfig.settings.customization.showExpandButton)?this.apiConfig.settings.customization.showExpandButton:s.expandButton},this.sharingDestinations=void 0,this.adPlaybackMode=s.adPlaybackMode,(0,n.$K)(this.apiConfig.settings.disableClickUrl)&&(this.disableClickUrl=this.apiConfig.settings.disableClickUrl);const{skippability:y,skipAdAfter:b,skipMin:I}=a.settings.advertising.skipAdSettings||{};this.skipAdAfter=(0,n.$K)(b)?b:s.skipAdAfter,this.skippability=(0,n.$K)(y)?y:s.skippability,this.skipMin=(0,n.$K)(I)?I:s.skipMin;const{disableTracking:w}=a.settings._connatixInternals;(w||c||this.isSeoTraffic)&&(this.disableTracking=!0),this.sessionId=this.Zz.sessionId}setPreRollBreak(t){this.preRollBreak=this.iW(this.preRollBreak,t)}setPostRollBreak(t){this.postRollBreak=this.iW(this.postRollBreak,t)}iW(t,i){const e=(0,de.w4)(i);return null===e?t:e}eW(t=!1){this.sW(),this.nW();let i=[...this.rW(),...this.hW()];i=this.aW(i),i=this.cW(i,t),t&&(i=this.dW(i));const e=(0,n.$K)(this.apiConfig.settings.rendering.scrollHijackingProtection)?this.apiConfig.settings.rendering.scrollHijackingProtection:this.Zz.scrollHijackingProtection;this.lineItemSettings={lineItems:i,disableScrollHijackEnforcement:e},this.lW(this.lineItemSettings)}uW(t){return t*J.s_}pW(t,i){i.adTag=(0,n.$K)(t.url)?t.url:i.adTag,i.requestCap=(0,n.$K)(t.contentRequestCap)?t.contentRequestCap:i.requestCap,i.impressionCap=(0,n.$K)(t.contentImpressionCap)?t.contentImpressionCap:i.impressionCap,i.viewability=(0,n.$K)(t.viewability)?t.viewability:i.viewability,i.sound=(0,n.$K)(t.sound)?t.sound:i.sound,i.ignoreFilledRequests=(0,n.$K)(t.ignoreFilledRequests)?t.ignoreFilledRequests:i.ignoreFilledRequests,i.prebidJsBidParamsJSONString=(0,n.$K)(t.prebidJsBidParamsJSONString)?t.prebidJsBidParamsJSONString:i.prebidJsBidParamsJSONString,i.headerBidderTimeout=(0,n.$K)(t.headerBidderTimeout)?t.headerBidderTimeout:i.headerBidderTimeout,i.resetRequestsCapTime=(0,n.$K)(t.resetRequestsCapTime)?t.resetRequestsCapTime:i.resetRequestsCapTime,i.resetImpressionsCapTime=(0,n.$K)(t.resetImpressionsCapTime)?t.resetImpressionsCapTime:i.resetImpressionsCapTime,i.resetCapType=(0,n.$K)(t.resetCapType)?t.resetCapType:i.resetCapType,i.timeBetweenRequests=(0,n.$K)(t.timeBetweenRequests)?t.timeBetweenRequests:i.timeBetweenRequests,i.skipMode=(0,n.$K)(t.skipMode)?t.skipMode:i.skipMode,i.floorPrice=(0,n.$K)(t.floorPrice)?t.floorPrice:i.floorPrice,i.adBreakSettings=(0,n.$K)(t.adBreakSettings)?t.adBreakSettings:i.adBreakSettings,i.pauseAdOutOfView=(0,n.$K)(t.pauseAdOutOfView)?t.pauseAdOutOfView:i.pauseAdOutOfView,i.nonlinearLineItemSettings=(0,n.$K)(t.nonlinearLineItemSettings)?this.fW(t.nonlinearLineItemSettings):i.nonlinearLineItemSettings,i.adType=(0,n.$K)(t.nonlinearLineItemSettings)?m.ProtoAdType.Nonlinear:i.adType}fW(t){const i={nonLinearRequestType:t.nonLinearRequestType?t.nonLinearRequestType:m.ProtoNonlinearRequestType.Banner,nonLinearAdTimeSeconds:t.nonLinearAdTimeSeconds?t.nonLinearAdTimeSeconds:15};return i.nonLinearAdTimeSeconds<15&&(i.nonLinearAdTimeSeconds=15),i.nonLinearAdTimeSeconds>180&&(i.nonLinearAdTimeSeconds=180),i}sW(){this.mW(this.apiConfig.settings.advertising.preRollBreak,m.ProtoAdBreakTypeEnum.PreRoll),this.mW(this.apiConfig.settings.advertising.postRollBreak,m.ProtoAdBreakTypeEnum.PostRoll),this.mW(this.apiConfig.settings.advertising.maxNumberOfMidRolls,m.ProtoAdBreakTypeEnum.MidRoll)}mW(t,i){const e=this.vW(this.apiConfig.settings.advertising.adBreaks,i),s=this.vW(this.Zz.adBreaks,i),r={maxAdPodDuration:0,maxAdSlotDuration:0,numberOfAdSlots:1,types:[i]};e?this.adBreaks.push(e):!(0,n.$K)(t)||e||s?!e&&s&&this.adBreaks.push(s):this.adBreaks.push(r)}vW(t,i){if(!t)return;let e;return t.forEach((t=>{t.types.includes(i)&&(e=Object.assign({},t),e.types=[i])})),e}dW(t){return Tt(t,xt.LINEAR)}cW(t,i=!1){const{adBreaks:e}=this;let s=[];(0,b.BZ)(e)||i||t.forEach((t=>{const i=t.adBreakSettings.adBreakTargeting.find((t=>t.adRollType===m.ProtoAdBreakTypeEnum.MidRoll));i||t.adType===m.ProtoAdType.Nonlinear||s.push(t)}));const n=[];return e.forEach((t=>{t.types.forEach((i=>n.push(Object.assign(Object.assign({},t),{types:[i]}))))})),n.forEach((t=>{s=this.removeCompatibleLineItems(t,s)})),t.filter((t=>!s.includes(t)))}removeCompatibleLineItems(t,i){const e=t.types[0],s=t.numberOfAdSlots>1?m.ProtoLineItemAdBreakTypeEnum.AdPod:m.ProtoLineItemAdBreakTypeEnum.SingleAd;return i.filter((t=>!t.adBreakSettings.adBreakTargeting.some((t=>t.adRollType===e&&(t.adBreakTypeEnum===m.ProtoLineItemAdBreakTypeEnum.All||t.adBreakTypeEnum===s)))))}tW(t){t.forEach((t=>{t.adBreakSettings||this.gW(t),this.yW(t)}))}gW(t){t.adBreakSettings={adBreakTargeting:[{adRollType:m.ProtoAdBreakTypeEnum.PreRoll,adBreakTypeEnum:m.ProtoLineItemAdBreakTypeEnum.All},{adRollType:m.ProtoAdBreakTypeEnum.MidRoll,adBreakTypeEnum:m.ProtoLineItemAdBreakTypeEnum.All},{adRollType:m.ProtoAdBreakTypeEnum.PostRoll,adBreakTypeEnum:m.ProtoLineItemAdBreakTypeEnum.All}]}}yW(t){0===t.requestCap&&(t.requestCap=20)}nW(){this.adBreaks.forEach((t=>{t.maxAdSlotDuration=this.uW(t.maxAdSlotDuration),t.maxAdPodDuration=this.uW(t.maxAdPodDuration),t.numberOfAdSlots<=1?t.maxAdPodDuration=0:t.maxAdSlotDuration>t.maxAdPodDuration&&(t.maxAdSlotDuration=t.maxAdPodDuration)}))}bW(t,i){const e=Object.assign({},i);return this.pW(t,e),(0,n.$K)(t.externalMediaFile)&&(e.externalMediaFile=t.externalMediaFile),(0,n.$K)(t.externalHlsFile)&&(e.externalHlsFile=t.externalHlsFile),e.customCpm=t.cpm,e}rW(){const t=[];if(!(0,b.BZ)(this.apiConfig.settings.advertising.lineItems))return[];const i=this.Zz.lineItems.filter((t=>t.creativeType===m.ProtoCreativeTypeEnum.External));return this.apiConfig.settings.advertising.lineItems.forEach((e=>{if(this.yW(e),this.isServerlessMode){const i=this.IW(),s=this.bW(e,i);t.push(s)}else i.forEach((i=>{if(e.id===i.advertiserLineItemId&&(e.url||e.prebidJsBidParamsJSONString||e.externalMediaFile||e.externalHlsFile)){const s=this.bW(e,i);t.push(s)}}))})),t}hW(){return!0===this.apiConfig.settings.advertising.blockConnatixDemand?[]:this.Zz.lineItems.filter((t=>t.creativeType!==m.ProtoCreativeTypeEnum.External))}aW(t){return t.forEach((t=>{t.creativeType===m.ProtoCreativeTypeEnum.External&&((0,n.QM)(t.prebidJsBidParamsJSONString)?t.creativeType=m.ProtoCreativeTypeEnum.HeaderBidder:t.externalMediaFile||t.externalHlsFile?t.creativeType=m.ProtoCreativeTypeEnum.MediaFile:t.creativeType=m.ProtoCreativeTypeEnum.ThirdParty)})),t}IW(){return m.ProtoLineItem.toObject(m.ProtoLineItem.fromObject({}),{defaults:!0,arrays:!0,objects:!0})}lW(t){this.moatTrackingEnabled=t.lineItems.some((t=>t.moatTrackingEnabled))}}{constructor(t,i,e,s,r,h,a,c,d,l,u,p,f){var v;super(t,i,e,s,r,h,a,c,p,d,l,u),this.global=t,this.targetContainer=i,this.Zz=e,this.wW=h,this.Sv=d,this.lineItemAbTestInformation=l,this.videoPosition=u,this.playlist=[],this.outstreamAdAsContent=!1,this.enableNewUI=!1,this.alwaysDisplayControls=this.apiConfig.settings.customization.alwaysDisplayControls,e.playerType===wo.ProtoElementsTypeEnum.Live&&Ea(this.floatingSettings.floatingScrollPosition,s)&&(this.floatingSettings.floatingMode=wo.ProtoPlayerFloatingMode.Off),this.playerSize=this._W(),this.midRollOnlyOnLongContent=(0,n.$K)(this.apiConfig.settings.advertising.midRollOnlyOnLongContent)?this.apiConfig.settings.advertising.midRollOnlyOnLongContent:e.midRollOnlyOnLongContent,this.uiComponentsVisibility.muteWatermark=(0,n.$K)(this.apiConfig.settings.customization.showMuteWatermark)?this.apiConfig.settings.customization.showMuteWatermark:e.muteWatermark,this.displayAdCountdown=(0,n.$K)(this.apiConfig.settings.customization.displayAdCountdown)?this.apiConfig.settings.customization.displayAdCountdown:e.displayAdCountdown,this.playlistId=e.playlistId,this.playlistThumbnail=(0,n.QM)(this.apiConfig.settings.customization.playlistThumbnail)?this.apiConfig.settings.customization.playlistThumbnail:e.playlistThumbnail,this.accentColor=(0,n.QM)(this.apiConfig.settings.customization.accentColor)?this.apiConfig.settings.customization.accentColor:e.accentColor,this.iconsColor=(0,n.QM)(this.apiConfig.settings.customization.iconsColor)?this.apiConfig.settings.customization.iconsColor:e.iconsColor,this.tooltipTextColor=(0,n.QM)(this.apiConfig.settings.customization.tooltipTextColor)?this.apiConfig.settings.customization.tooltipTextColor:e.tooltipTextColor,this.tooltipBackgroundColor=(0,n.QM)(this.apiConfig.settings.customization.tooltipBackgroundColor)?this.apiConfig.settings.customization.tooltipBackgroundColor:e.tooltipBackgroundColor,this.prefetchOnPreroll=(0,n.$K)(this.apiConfig.settings.advertising.prefetchOnPreroll)?this.apiConfig.settings.advertising.prefetchOnPreroll:e.prefetchOnPreroll,this.minTimeBeforeFirstAd=((0,n.$K)(this.apiConfig.settings.advertising.timeBeforeFirstAd)?this.apiConfig.settings.advertising.timeBeforeFirstAd:e.minTimeBeforeFirstAd)*J.s_,this.timeBetweenAds=((0,n.$K)(this.apiConfig.settings.advertising.timeBetweenAds)?this.apiConfig.settings.advertising.timeBetweenAds:e.timeBetweenAds)*J.s_,this.upNextMode=(0,n.$K)(this.apiConfig.settings.nextVideoMode)?this.apiConfig.settings.nextVideoMode:e.upNextMode,this.closedCaptionDefault=(0,n.$K)(this.apiConfig.settings.customization.closedCaptionDefault)?this.apiConfig.settings.customization.closedCaptionDefault:e.closedCaption,this.logoPosition=(0,n.$K)(this.apiConfig.settings.customization.logoPosition)?this.apiConfig.settings.customization.logoPosition:e.logoPosition,this.playerType=e.playerType,this.playerType!==wo.ProtoElementsTypeEnum.OutStream||!this.apiConfig.settings.outstreamAdAsContent&&this.apiConfig.playerMode!==ba.Buzzfeed||(this.outstreamAdAsContent=!0);((0,n.$K)(this.apiConfig.settings.outstreamSettings.endAdBreakPolicy)?this.apiConfig.settings.outstreamSettings.endAdBreakPolicy===wo.ProtoOutstreamEndAdBreakPolicyEnum.Loop:e.outstreamEndAdBreakPolicy===wo.ProtoOutstreamEndAdBreakPolicyEnum.Loop)&&(this.outstreamAdAsContent=!0,this.loopAdWhenFinished=!0),(0,n.r)(this.minTimeBeforeFirstAd)||this.apiConfig.playerMode===ba.Buzzfeed||this.outstreamAdAsContent||(this.minTimeBeforeFirstAd=10),(0,n.QM)(this.apiConfig._appSettings.bundleID)&&!this.isInApp()&&(0,o.n)({message:"Elements_PlayerModel_bundle_id_for_non_in_app",level:o.D.CRITICAL}),!(0,n.QM)(this.apiConfig._appSettings.bundleID)&&this.isInApp()&&(0,o.n)({message:"Elements_PlayerModel_bundle_id_missing_for_in_app",level:o.D.CRITICAL}),this.videoQuality=(0,n.$K)(this.Zz.videoQuality)?this.Zz.videoQuality:wo.ProtoVideoQuality.Auto;const g=e.playlist.map((({mediaId:t,revisionNumber:i,insightsRevisionNumber:e,mediaContentVersionId:s,disableAdvertising:r})=>(0,n.QM)(t)&&(0,n.hj)(i)?{mediaId:t,revisionNumber:i,insightsRevisionNumber:e,mediaContentVersionId:s,disableAdvertising:r}:null)).filter((t=>!!t)),y=new $a(this.Sv,g,{playerType:this.playerType,mediaId:this.apiConfig.mediaId,mediaIdList:this.apiConfig.mediaIdList,shouldUseMediaIdListAsPlaylist:this.apiConfig.useMediaIdListAsPlaylist},this.apiConfig.settings.playlist);if(y.hasExternalLivestream()&&(this.playerType=wo.ProtoElementsTypeEnum.Live,this.playbackMode=m.ProtoPlayerPlaybackModeEnum.ClickToPlay),this.playlist=y.playlist,this.isOutStreamType()){const t=(0,n.$K)(this.apiConfig.settings.outstreamSettings.initialRendering)?this.apiConfig.settings.outstreamSettings.initialRendering:e.outstreamInitialRendering,i=(0,n.QM)(this.apiConfig.settings.outstreamSettings.houseScreenColor)?this.apiConfig.settings.outstreamSettings.houseScreenColor:e.outstreamHouseBackgroundColor,s=((0,n.$K)(this.apiConfig.settings.outstreamSettings.totalAdBreakLength)?this.apiConfig.settings.outstreamSettings.totalAdBreakLength:e.outstreamTotalAdBreakLength)*J.s_,r=(0,n.$K)(this.apiConfig.settings.outstreamSettings.endAdBreakPolicy)?this.apiConfig.settings.outstreamSettings.endAdBreakPolicy:e.outstreamEndAdBreakPolicy;this.outstreamSettings={initialRendering:t,houseScreenBackgroundColor:i,totalAdBreakLength:s,endAdBreakPolicy:r}}((0,n.$K)(this.apiConfig.settings.gallery.style)&&this.apiConfig.settings.gallery.style!==wo.ProtoGalleryStyleMode.None||!(0,n.$K)(this.apiConfig.settings.gallery.style)&&e.galleryStyle!==wo.ProtoGalleryStyleMode.None)&&this.floatingSettings.floatingMode!==wo.ProtoPlayerFloatingMode.Always&&(this.gallery={style:(0,n.$K)(this.apiConfig.settings.gallery.style)?this.apiConfig.settings.gallery.style:e.galleryStyle,orientation:this.SW()}),this.nonlinearPlayerSettings=(null===(v=this.apiConfig.settings.advertising)||void 0===v?void 0:v.nonlinearPlayerSettings)?this.PW(this.apiConfig.settings.advertising.nonlinearPlayerSettings):this.Zz.nonlinearPlayerSettings,this.eW(this.isOutStreamType()),this.nonlinearPlayerSettings||(this.lineItemSettings.lineItems=this.lineItemSettings.lineItems.filter((t=>t.adType!==m.ProtoAdType.Nonlinear))),this.enableNewUI=f||this.apiConfig.settings.customization.enableNewUI}PW(t){const i={numberOfNonlinearAds:t.numberOfNonlinearAds?t.numberOfNonlinearAds:0,timeSecondsBetweenNonlinear:t.timeSecondsBetweenNonlinear?t.timeSecondsBetweenNonlinear:5,timeSecondsBetweenLinearAndNonlinear:t.timeSecondsBetweenLinearAndNonlinear?t.timeSecondsBetweenLinearAndNonlinear:0};i.numberOfNonlinearAds<0&&(i.numberOfNonlinearAds=0),i.numberOfNonlinearAds>10&&(i.numberOfNonlinearAds=10);i.timeSecondsBetweenNonlinear<1&&(i.timeSecondsBetweenNonlinear=1),i.timeSecondsBetweenNonlinear>180&&(i.timeSecondsBetweenNonlinear=180);return i.timeSecondsBetweenLinearAndNonlinear<0&&(i.timeSecondsBetweenLinearAndNonlinear=0),i.timeSecondsBetweenLinearAndNonlinear>180&&(i.timeSecondsBetweenLinearAndNonlinear=180),i}getPlaylistDetails(){const{playlistName:t,playlistDescription:i,playlistThumbnail:e}=this.wW.settings.customization;return{id:this.Zz.playlistId,name:(0,n.QM)(t)?t:this.Zz.playlistName,description:(0,n.QM)(i)?i:this.Zz.playlistDescription,thumbnail:(0,n.QM)(e)?e:this.Zz.playlistThumbnail}}getPlaylistLength(){return this.Zz.playlist.length}get urlSuffixerService(){return this.Sv}isInApp(){return(0,b.d3)(this.playerType,[wo.ProtoElementsTypeEnum.InStreamInApp])}isInStreamType(){return(0,b.d3)(this.playerType,[wo.ProtoElementsTypeEnum.InStream,wo.ProtoElementsTypeEnum.InStreamInApp])}isOutStreamType(){return(0,b.d3)(this.playerType,[wo.ProtoElementsTypeEnum.OutStream])}isLiveType(){return(0,b.d3)(this.playerType,[wo.ProtoElementsTypeEnum.Live])}uW(t){return this.outstreamAdAsContent?0:super.uW(t)}dW(t){return t.filter((t=>this.playerType===wo.ProtoElementsTypeEnum.InStream||this.playerType===wo.ProtoElementsTypeEnum.InStreamInApp||t.adType!==m.ProtoAdType.Nonlinear))}_W(){return{responsive:(0,n.$K)(this.apiConfig.settings.customization.responsive)?this.apiConfig.settings.customization.responsive:this.Zz.responsive,ratioWidth:(0,n.$K)(this.apiConfig.settings.customization.ratioWidth)?this.apiConfig.settings.customization.ratioWidth:this.Zz.ratioWidth,ratioHeight:(0,n.$K)(this.apiConfig.settings.customization.ratioHeight)?this.apiConfig.settings.customization.ratioHeight:this.Zz.ratioHeight,fixedWidth:(0,n.$K)(this.apiConfig.settings.customization.fixedWidth)?this.apiConfig.settings.customization.fixedWidth:this.Zz.fixedWidth,fixedHeight:(0,n.$K)(this.apiConfig.settings.customization.fixedHeight)?this.apiConfig.settings.customization.fixedHeight:this.Zz.fixedHeight}}SW(){return this.Af===m.ProtoDeviceType.Smartphone||this.Af===m.ProtoDeviceType.Tablet?wo.ProtoGalleryOrientationEnum.Portrait:this.apiConfig.settings.gallery.orientation?this.apiConfig.settings.gallery.orientation:this.Zz.galleryOrientation}}const Ha=Object.assign(Object.assign(Object.assign({},x.Km),$o),qo),za={PlaybackModeEnum:{AutoPlay:m.ProtoPlayerPlaybackModeEnum.Autoplay,ScrollToPlay:m.ProtoPlayerPlaybackModeEnum.ScrollToPlay,ClickToPlay:m.ProtoPlayerPlaybackModeEnum.ClickToPlay},DefaultSoundModeEnum:{On:m.ProtoPlayerSoundMode.On,Off:m.ProtoPlayerSoundMode.Mute,OnHover:m.ProtoPlayerSoundMode.Hover},InsertPositionEnum:{WithinContainer:m.ProtoPlayerInsertMode.WithinContainer,BeforeContainer:m.ProtoPlayerInsertMode.BeforeContainer,AfterContainer:m.ProtoPlayerInsertMode.AfterContainer,ReplaceContainer:m.ProtoPlayerInsertMode.ReplaceContainer,HideContainer:m.ProtoPlayerInsertMode.HideContainer},CloseButtonModeEnum:{Off:m.ProtoPlayerCloseButtonMode.Off,On:m.ProtoPlayerCloseButtonMode.OnHover,OnAfterFirstAd:m.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd,OnHover:m.ProtoPlayerCloseButtonMode.OnHover,OnHoverAfterFirstAd:m.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd,AlwaysOn:m.ProtoPlayerCloseButtonMode.AlwaysOn},QualityEnum:k.se,LineItemExcludedSlotsEnum:{PreRoll:m.ProtoAdSlotsEnum.PreRoll,MidRoll:m.ProtoAdSlotsEnum.MidRoll,PostRoll:m.ProtoAdSlotsEnum.PostRoll},ErrorTypesEnum:{SetupError:x.n9.SetupError,NoPlayer:x.n9.NoPlayer},FloatingModeEnum:{Off:m.ProtoPlayerFloatingMode.Off,OnPageLoad:m.ProtoPlayerFloatingMode.OnPageLoad,AfterInView:m.ProtoPlayerFloatingMode.AfterInView,Always:m.ProtoPlayerFloatingMode.Always},FloatingDevicesEnum:{Desktop:m.ProtoDeviceType.Desktop,Smartphone:m.ProtoDeviceType.Smartphone,Tablet:m.ProtoDeviceType.Tablet,Other:m.ProtoDeviceType.GameConsole},FloatingFixedPositionModeEnum:{Page:m.ProtoFloatingFixedPositionMode.Page,Element:m.ProtoFloatingFixedPositionMode.Element},FloatingScrollPositionEnum:{BottomRight:m.ProtoPositionMode.BottomRight,BottomLeft:m.ProtoPositionMode.BottomLeft,TopRight:m.ProtoPositionMode.TopRight,TopLeft:m.ProtoPositionMode.TopLeft,PinnedTop:m.ProtoPositionMode.PinnedTop,PinnedBottom:m.ProtoPositionMode.PinnedBottom},FloatingStatesEnum:{Float:q.Float,Embed:q.Embed},FloatingAppendLocationEnum:{Above:m.ProtoFloatingAppendLocationEnum.Above,Below:m.ProtoFloatingAppendLocationEnum.Below,Within:m.ProtoFloatingAppendLocationEnum.Within},ImplementationTypeEnum:{Amp:m.ProtoImplementationType.Amp,Web:m.ProtoImplementationType.Web}},Wa=Object.assign(Object.assign({},za),{NextVideoModeEnum:{Next:wo.ProtoPlayerUpNextMode.Next,Loop:wo.ProtoPlayerUpNextMode.Loop,Stop:wo.ProtoPlayerUpNextMode.Stop},LogoPositionEnum:{None:wo.ProtoLogoPositionMode.None,ControlBar:wo.ProtoLogoPositionMode.ControlBar,BottomRight:wo.ProtoLogoPositionMode.BottomRight,BottomLeft:wo.ProtoLogoPositionMode.BottomLeft,TopRight:wo.ProtoLogoPositionMode.TopRight,TopLeft:wo.ProtoLogoPositionMode.TopLeft},PlayerTypesEnum:{InStream:wo.ProtoElementsTypeEnum.InStream,OutStream:wo.ProtoElementsTypeEnum.OutStream,InStreamInApp:wo.ProtoElementsTypeEnum.InStream,Live:wo.ProtoElementsTypeEnum.Live},GalleryStyleModeEnum:{None:wo.ProtoGalleryStyleMode.None,Detailed:wo.ProtoGalleryStyleMode.Detailed,Visual:wo.ProtoGalleryStyleMode.Visual},GalleryOrientationEnum:{Landscape:wo.ProtoGalleryOrientationEnum.Landscape,Portrait:wo.ProtoGalleryOrientationEnum.Portrait},InitialRenderingEnum:{ExpandWithAd:wo.ProtoOutstreamInitialRenderingEnum.ExpandWithAd,FullyRendered:wo.ProtoOutstreamInitialRenderingEnum.FullyRendered},EndAdBreakPolicyEnum:{Hide:wo.ProtoOutstreamEndAdBreakPolicyEnum.Hide,HouseScreen:wo.ProtoOutstreamEndAdBreakPolicyEnum.HouseScreen,Loop:wo.ProtoOutstreamEndAdBreakPolicyEnum.Loop}});function Ga(t,i){const e=t.toObject({},{defaults:!0,arrays:!0,objects:!0}),s=function(t){return t.toObject({},{defaults:!0,arrays:!0,objects:!0})}(i);return e.players.push(s),e.browser=m.Browser.toObject(m.Browser.fromObject({}),{defaults:!0,arrays:!0,objects:!0}),e.geoLocation=m.GeoLocation.toObject(m.GeoLocation.fromObject({}),{defaults:!0,arrays:!0,objects:!0}),e}var Qa=h(1783),Ja=h(5172);class Xa extends Sa{constructor(t,i){super(),this.Di=t;try{this.Yu=new Dh,this.Id()}catch(t){(0,o.n)({message:"omid_verification_client_error",exception:t.message,callStack:t.callStack,level:i?o.D.CRITICAL:o.D.INFO})}}subscribe(t,i){return this.Yu.on(t,i)}Id(){const t=Ja.$.getVerificationClient(this.Di);if(!t)throw new Error("omid_verification_client_not_found");if(this.AW=new t,!this.AW.isSupported())throw new Error("omid_not_implemented");this.xW(),this.ql()}xW(){this.AW.registerSessionObserver((t=>{t&&t.type===Qa._f.sessionError&&(0,o.n)({message:"omid_verification_client_session_error",exception:t.data.message,level:o.D.WARN})}))}ql(){this.AW.addEventListener(Qa._f.geometryChange,(t=>{try{const{percentageInView:i,reasons:e}=t.data.adView,s=[Qa.li.backgrounded,Qa.li.notFound].some((t=>e.includes(t)));this.xH(s);const n=i/100;this.setViewableThreshold(n),this.Yu.trigger(x.rl.OmidViewabilityThreshold,n)}catch(t){(0,o.n)({message:"omid_verification_client_geometry_change_error",exception:t.message,callStack:t.callStack,level:o.D.CRITICAL},{throttle:1})}}))}}const Ya=`cnx-player-css-${i.g.version}`;class Ka extends v.a{ns(){return{id:Ya,src:Xe.n.endPoints.assets.css.elements}}getDelegateHandler(){return{getCurrentPlaybackTime:()=>{if(!this.renderer)return 0;const t=this.renderer.getApiMethods();return t.getPlayerType()===wo.ProtoElementsTypeEnum.OutStream?0:t.getVideoCurrentPosition()},getCurrentVolume:()=>this.renderer.getApiMethods().getVolume()}}getRendererInstance(t,i,e,s,n,r,o,h,a,c){return new _a(this,t,i,e,s,n,r,o,h,a,c)}getViewabilityService(t,i,e){return this.externalAttributes.settings.useExternalViewabilityService?new Sa:this.re?new Xa(window,this.he):new Pa(t.global,i,e,t.isOutStreamType())}getPlayerRequest(t){return(0,e.Up)((()=>is.n.sendProtoRequest({protoResponse:wo.ProtoElementsResponse,protoRequest:wo.ProtoElementsRequest,requestData:t,endpoint:Xe.n.endPoints.api.pls,hasCredentials:!0,queryParams:Object.assign({[rs.Fk]:i.g.version},ds.f.getCidKeyValueObject()),shouldLogErrors:!0})),this.PLAYER_REQUEST_RETRIES_NUMBER)}getPlayerResponse(t){return new Promise(((i,e)=>{this.getPlayerRequest(t).then((t=>{this.setApiHostUrl(t.apiHostUrl),window.parent.connatixDummy&&(0,s.Ph)("connatixDummy",this.pageUrl)&&(t.players[0]=Object.assign(Object.assign({},t.players[0]),window.parent.connatixDummy)),i(t)})).catch((t=>{e(t)}))}))}getPlayerModel(t,i,e,s){const n=new qa(t.insertWindow?t.insertWindow:this.GLOBAL,t.insertContainer,i.players[s],i.browser.device,i.secondLevelDomain,this.externalAttributes,this.isServerlessMode,i.supplyChain,e,i.lineItemAbTestInformation,this.queryParams.cnxVideoPosition,i.isSeoTraffic||this.queryParams.cnxIsSeoTraffic,this.queryParams.cnxEnableNewUi);return 0===n.playlist.length?((0,o.n)({message:"ElementsLoader_no_playlist_items",level:o.D.CRITICAL}),null):n}getApiConfigEnums(){return Wa}getApiConfigEvents(){return Ha}getSpecificRequestData(){const t={localTimestamp:(0,de.x8)()};(0,b.BZ)(this.externalAttributes.mediaIdList)&&(t.useMediaIdListAsPlaylist=this.externalAttributes.useMediaIdListAsPlaylist),this.queryParams.cnxMediaId?t.forceMediaIdList=[this.queryParams.cnxMediaId]:this.externalAttributes.mediaIdList?t.forceMediaIdList=this.externalAttributes.mediaIdList:this.externalAttributes.mediaId&&(t.forceMediaIdList=[this.externalAttributes.mediaId]),this.queryParams.cnxPlaylistId?t.forcePlaylistId=this.queryParams.cnxPlaylistId:this.externalAttributes.playlistId&&!(0,b.BZ)(this.externalAttributes.settings.playlist)&&(t.forcePlaylistId=this.externalAttributes.playlistId),this.queryParams.cnxDebug&&(t.cnxDebug=this.queryParams.cnxDebug);const i=this.externalAttributes.settings.forceSourceItemId;return(0,n.QM)(i)&&(t.forceSourceItemId=i),t}_e(){super._e(),this.externalAttributes.settings.gallery={},this.externalAttributes.settings.outstreamSettings={}}kW(t){t.forEach((t=>{t.ratioWidth=16,t.ratioHeight=9}))}defaultInitFromProto(){const t=Ga(wo.ProtoElementsResponse,wo.ProtoElements);return this.kW(t.players),t}}var Za=h(4772);class tc{constructor(t=!1){this._debugLogging=t,this.TW="eventEmitted",this.Yu=new Dh}subscribe(t){return this.Yu.on(this.TW,t)}unsubscribe(t){this.Yu.remove(this.TW,t)}emitSessionStart(t){const i={videoMetadata:t};this.EW({metadata:i,name:Za.Z.SessionStart})}emitContentComplete(){this.EW({name:Za.Z.ContentComplete})}emitSessionEnd(){this.EW({name:Za.Z.SessionEnd})}emitPlay(){this.EW({name:Za.Z.Play})}emitPause(){this.EW({name:Za.Z.Pause})}emitAdPlay(){this.EW({name:Za.Z.AdPlay})}emitAdPause(){this.EW({name:Za.Z.AdPause})}emitAdPlaying(t){const i={adType:t};this.EW({name:Za.Z.AdPlaying,metadata:i})}emitAdPaused(t){const i={adType:t};this.EW({name:Za.Z.AdPaused,metadata:i})}emitAdImpression(t,i,e){const s={adMetadata:t,customAdMetadata:i,adType:e};this.EW({metadata:s,name:Za.Z.AdImpression})}emitAdComplete(t){const i={adType:t};this.EW({name:Za.Z.AdComplete,metadata:i})}emitAdStopped(t){const i={adType:t};this.EW({name:Za.Z.AdStopped,metadata:i})}emitAdBreakStart(t){const i={adBreakMetadata:t};this.EW({metadata:i,name:Za.Z.AdBreakStart})}emitAdBreakComplete(t){const i={adType:t};this.EW({name:Za.Z.AdBreakComplete,metadata:i})}emitPlayerResized(t){const i={playerDimensionsMetadata:t};this.EW({metadata:i,name:Za.Z.PlayerResized})}emitOnEnterFullscreen(){this.EW({name:Za.Z.OnEnterFullscreen})}emitOnExitFullscreen(){this.EW({name:Za.Z.OnExitFullscreen})}emitOnPlayerCollapsed(){this.EW({name:Za.Z.PlayerCollapsed})}emitOnPlayerExpanded(){this.EW({name:Za.Z.PlayerExpanded})}emitAdError(t){const i={adType:t};this.EW({name:Za.Z.AdError,metadata:i})}emitPlayError(){this.EW({name:Za.Z.PlayError})}emitRenderError(){this.EW({name:Za.Z.RenderError})}emitAdClickThru(t){const i={adType:t};this.EW({name:Za.Z.AdClickThru,metadata:i})}emitAdInteraction(t){const i={adType:t};this.EW({name:Za.Z.AdInteraction,metadata:i})}emitAdVideoStart(t,i){const e={adVideoStartMetadata:t,adType:i};this.EW({metadata:e,name:Za.Z.AdVideoStart})}emitAdLoaded(t,i){const e={adLoadedMetadata:t,adType:i};this.EW({metadata:e,name:Za.Z.AdLoaded})}emitAdStateChange(t,i){const e={adStateChangedMetadata:t,adType:i};this.EW({metadata:e,name:Za.Z.AdStateChange})}emitAdVideoFirstQuartile(t){const i={adType:t};this.EW({name:Za.Z.AdVideoFirstQuartile,metadata:i})}emitAdVideoMidpoint(t){const i={adType:t};this.EW({name:Za.Z.AdVideoMidpoint,metadata:i})}emitAdVideoThirdQuartile(t){const i={adType:t};this.EW({name:Za.Z.AdVideoThirdQuartile,metadata:i})}emitAdVideoComplete(t){const i={adType:t};this.EW({name:Za.Z.AdVideoComplete,metadata:i})}emitVolumeChange(t){this.EW({name:Za.Z.VolumeChange,metadata:{volume:t}})}emitAdVolumeChange(t){const i={adType:t};this.EW({name:Za.Z.AdVolumeChange,metadata:i})}emitAdSkipped(t){const i={adType:t};this.EW({name:Za.Z.AdSkipped,metadata:i})}EW(t){var i;(null===(i=null==t?void 0:t.metadata)||void 0===i?void 0:i.adType)!==m.ProtoAdType.Nonlinear&&(this._debugLogging&&console.log("Connatix Player Elements debugging: ",t),this.Yu.trigger(this.TW,t))}destroy(){this.EW({name:Za.Z.Destroy}),this.Yu.removeAll()}}var ic=h(6027),ec=h(7124);const sc=window.parent,nc=[],rc=(0,r.bZ)(rs.ym,window.document.currentScript);ds.f.customerId=rc,window.addEventListener("unload",(function(t){nc.forEach((t=>t.destroy()))}));const oc=(0,e.pE)(sc).topFrame;ic.e.abServiceType=ic.j.ElementsABService;const hc=(t,i)=>i.AMP_CONTEXT_DATA||t.settings.implementationType===m.ProtoImplementationType.Amp,ac=function(t,i,s,n,h,a,c){var d,l;const u=hc(t,sc),p=new Ka(s,sc,n,u,h,a,c);nc.push(p);const f=function(){const s={id:Ya,src:Xe.n.endPoints.assets.css.elements};(0,e.Up)((()=>function(t){return new Promise(((i,e)=>{if((0,r.rI)(t.id,oc))return i();(0,r.NS)(t,oc.document.head,oc,(()=>i()),(t=>e(t)))}))}(s))).catch((t=>{throw(0,o.n)({message:"Prerender_Elements_Loader_add_css_link",exception:t.message,callStack:t.stack,level:o.D.INFO},{throttle:1e3}),t})).then((()=>{try{(0,r.Nb)(sc),p.updateQueryParams(),p.loadScriptTag(t,i)&&p.insertRenderer()}catch(t){(0,o.n)({message:"Prerender_Elements_main_insertRenderer",exception:t.message,callStack:t.stack,level:o.D.INFO},{throttle:1e3})}})).catch((()=>{}))};n?(p.setInappPageUrl(null===(d=null==t?void 0:t._appSettings)||void 0===d?void 0:d.appPageURL),f()):p.findPageUrl(sc,null===(l=null==t?void 0:t.settings)||void 0===l?void 0:l.ampUrl).then((()=>{f(),p.setClientAb1()})).catch((t=>{(0,o.n)({message:"Prerender_Elements_main_init",exception:t.message,callStack:t.stack,level:o.D.INFO},{throttle:1e3}),p.registerApiError()}))};try{!function(){if((0,e.oC)())return;if(!c)return;Xe.n.bundleDomain=c;const i=a[c],s=c===t.elements;let r=[];sc[i]&&(r=sc[i].cmd),sc[i]=function(){const t={};return t[i]=function(t){var i;t.settings=t.settings||{},t._appSettings=t._appSettings||{},t._appSettings.cmp=t._appSettings.cmp||{},t._appSettings.tcf=t._appSettings.tcf||{},t._appSettings.customJsTargetingObject=t.settings.queryJsTargeting||{},t.settings.customization=t.settings.customization||{},t.settings.rendering=t.settings.rendering||{},t.settings.advertising=t.settings.advertising||{},t.settings.outstreamSettings=t.settings.outstreamSettings||{},t.settings.gallery=t.settings.gallery||{},t.settings._connatixInternals=t.settings._connatixInternals||{},t.settings.plugins=t.settings.plugins||{},t.settings.advertising.skipAdSettings=t.settings.advertising.skipAdSettings||{};return[].includes(null===(i=null==t?void 0:t._appSettings)||void 0===i?void 0:i.bundleID)&&(0,o.n)({level:o.D.INFO,message:"CNX_INAPP_SETTINGS",exception:JSON.stringify(t._appSettings)}),t=(t=>{var i,e,s;const r=Object.assign({},t),o=null===(i=r._appSettings)||void 0===i?void 0:i.cmp;((0,n.QM)(null===(e=r._appSettings)||void 0===e?void 0:e.gdprConsentString)||(0,n.QM)(null===(s=r._appSettings)||void 0===s?void 0:s.gdprParsedVendorString))&&(r._appSettings.cmp={consentString:(0,n.QM)(null==o?void 0:o.consentString)?o.consentString:r._appSettings.gdprConsentString,parsedVendorConsents:(0,n.QM)(null==o?void 0:o.parsedVendorConsents)?o.parsedVendorConsents:r._appSettings.gdprParsedVendorString});const h=Object.assign({},(0,zs.EQ)(Object.assign({},r._appSettings.cmp))),a=Object.assign({},(0,zs.EQ)(Object.assign({},r._appSettings.tcf))),{usPrivacyString:c,deviceID:d,appPageURL:l}=(0,zs.EQ)({usPrivacyString:r._appSettings.usPrivacyString,deviceID:r._appSettings.deviceID,appPageURL:r._appSettings.appPageURL});return r._appSettings=Object.assign(Object.assign({},r._appSettings),{cmp:h,tcf:a,usPrivacyString:c,deviceID:d,appPageURL:l}),r})(t),{render:function(i,e){try{const r=(0,n.QM)(t._appSettings.bundleID),o=(0,n.QM)(t._appSettings.sdkVersion);o&&(t.settings.useExternalViewabilityService=ec.$.shouldUseExternalViewabilityService(t._appSettings.sdkVersion));const h=((t,i)=>{const{settings:{plugins:e}}=t,{cmp:s,tcf:n,usPrivacyString:r,deviceID:o}=t._appSettings,h=hc(t,sc);return{UserManagerService:new f.x(oc,i,h,{cmp:s,tcf:n,usPrivacyString:r,deviceID:o}),EventsStorageService:new tc(e._debugLogging)}})(t,r);ac(t,i,h,r,o,s,e)}catch(t){(0,o.n)({message:"Prerender_Elements_main_initPlayer",exception:t.message,callStack:t.stack,level:o.D.INFO},{throttle:1e3})}}}},t[i].cmd={push:function(t){try{t()}catch(t){(0,o.n)({message:"Prerender_Elements_main_push_callback",level:o.D.INFO,callStack:t.stack,exception:t.message},{throttle:1e3})}}},t[i].configEnums=Wa,t[i].configEvents=Ha,t[i]}(),r.forEach((t=>{try{t()}catch(t){(0,o.n)({message:"Prerender_Elements_main_commands_callback",exception:t.message,callStack:t.stack,level:o.D.INFO},{throttle:1e3})}}))}()}catch(t){(0,o.n)({message:"Prerender_Elements_main",exception:t.message,callStack:t.stack,level:o.D.INFO},{throttle:1e3})}})(),a=h.O(a)})();