From 9847c1118677da602415a25912b189d98a536bdd Mon Sep 17 00:00:00 2001 From: Adam Raine <6752989+adamraine@users.noreply.github.com> Date: Thu, 17 Mar 2022 16:02:27 -0400 Subject: [PATCH] core: resolve redirected script records (#13751) --- .github/workflows/devtools.yml | 2 +- .../test/fixtures/redirects-scripts.html | 15 +++++ .../test/fixtures/unused-javascript.js | 9 +++ lighthouse-cli/test/smokehouse/core-tests.js | 2 + .../test/smokehouse/lighthouse-runners/cli.js | 1 + .../test-definitions/redirects-scripts.js | 66 +++++++++++++++++++ .../byte-efficiency/duplicated-javascript.js | 7 +- .../byte-efficiency/legacy-javascript.js | 7 +- .../byte-efficiency/unminified-javascript.js | 3 +- .../byte-efficiency/unused-javascript.js | 3 +- lighthouse-core/lib/script-helpers.js | 22 +++++++ 11 files changed, 124 insertions(+), 13 deletions(-) create mode 100644 lighthouse-cli/test/fixtures/redirects-scripts.html create mode 100644 lighthouse-cli/test/fixtures/unused-javascript.js create mode 100644 lighthouse-cli/test/smokehouse/test-definitions/redirects-scripts.js create mode 100644 lighthouse-core/lib/script-helpers.js diff --git a/.github/workflows/devtools.yml b/.github/workflows/devtools.yml index 192d91d19ab7..87a3da3e781b 100644 --- a/.github/workflows/devtools.yml +++ b/.github/workflows/devtools.yml @@ -170,5 +170,5 @@ jobs: # errors-expired-ssl errors-infinite-loop # Disabled because Chrome will follow the redirect first, and Lighthouse will only ever see/run the final URL. # redirects-client-paint-server redirects-multiple-server redirects-single-server redirects-single-client - run: yarn smoke --runner devtools --shard=${{ matrix.smoke-test-shard }}/${{ strategy.job-total }} --retries=2 --invert-match a11y byte-efficiency byte-gzip dbw errors-expired-ssl errors-infinite-loop lantern-idle-callback-short legacy-javascript metrics-tricky-tti metrics-tricky-tti-late-fcp oopif-requests perf-budgets perf-diagnostics-third-party perf-fonts perf-frame-metrics perf-preload perf-trace-elements pwa redirects-client-paint-server redirects-history-push-state redirects-multiple-server redirects-single-server redirects-single-client screenshot seo-passing seo-tap-targets + run: yarn smoke --runner devtools --shard=${{ matrix.smoke-test-shard }}/${{ strategy.job-total }} --retries=2 --invert-match a11y byte-efficiency byte-gzip dbw errors-expired-ssl errors-infinite-loop lantern-idle-callback-short legacy-javascript metrics-tricky-tti metrics-tricky-tti-late-fcp oopif-requests perf-budgets perf-diagnostics-third-party perf-fonts perf-frame-metrics perf-preload perf-trace-elements pwa redirects-client-paint-server redirects-history-push-state redirects-multiple-server redirects-single-server redirects-single-client redirects-scripts screenshot seo-passing seo-tap-targets working-directory: ${{ github.workspace }}/lighthouse diff --git a/lighthouse-cli/test/fixtures/redirects-scripts.html b/lighthouse-cli/test/fixtures/redirects-scripts.html new file mode 100644 index 000000000000..afc3d8faa573 --- /dev/null +++ b/lighthouse-cli/test/fixtures/redirects-scripts.html @@ -0,0 +1,15 @@ + + + + + + + + +

I have a script that redirects

+ + + + diff --git a/lighthouse-cli/test/fixtures/unused-javascript.js b/lighthouse-cli/test/fixtures/unused-javascript.js new file mode 100644 index 000000000000..8238dad10661 --- /dev/null +++ b/lighthouse-cli/test/fixtures/unused-javascript.js @@ -0,0 +1,9 @@ +/** + * @license Copyright 2022 The Lighthouse Authors. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + */ + +/*eslint-disable*/ + +(()=>{var t={5186:function(t,i){"use strict";var e=this&&this.T||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,"R",{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 h=e(t),o=h.next();!o.done;o=h.next()){var a=o.value;r.push(this.deepClone(a))}}catch(t){i={error:t}}finally{try{o&&!o.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}return t instanceof Array?r:new t.constructor(r)}var c={};for(var l in t)t.hasOwnProperty(l)&&(c[l]=this.deepClone(t[l]));return c}},t}();i.Cloneable=s},7061:function(t,i,e){"use strict";var s,n=this&&this.B||(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.F||function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(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(h,o)}a((s=s.apply(t,i||[])).next())}))},h=this&&this.U||function(t,i){var e,s,n,r,h={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;h;)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 h.label++,{value:r[1],done:!1};case 5:h.label++,s=r[1],r=[0];continue;case 7:r=h.ops.pop(),h.trys.pop();continue;default:if(!(n=(n=h.trys).length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){h=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]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 h(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,o;return h(this,(function(h){switch(h.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),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.fetchJson(r)];case 3:return h.sent(),this.cacheLanguage(),[3,5];case 4:throw o=h.sent(),new a.GVLError("unable to load language: "+o.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),h={};return("purpose"===t&&e?this["by"+r+"VendorMap"][i+""][e]:this["by"+(s?"Special":"")+r+"VendorMap"][i+""]).forEach((function(t){h[t+""]=n.vendors[t+""]})),h},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 l.ConsentLanguages,i.latestFilename="vendor-list.json",i.versionedFilename="archives/vendor-list-v[VERSION].json",i.languageFilename="purposes-[LANG].json",i}(o.Cloneable);i.GVL=u},6056:(t,i)=>{"use strict";Object.defineProperty(i,"R",{value:!0});var e=function(){function t(){}return t.absCall=function(t,i,e,s){return new Promise((function(n,r){var h=new XMLHttpRequest;h.withCredentials=e,h.addEventListener("load",(function(){if(h.readyState==XMLHttpRequest.DONE)if(h.status>=200&&h.status<300){var t=h.response;if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}n(t)}else r(new Error("HTTP Status: "+h.status+" response type: "+h.responseType))})),h.addEventListener("error",(function(){r(new Error("error"))})),h.addEventListener("abort",(function(){r(new Error("aborted"))})),null===i?h.open("GET",t,!0):h.open("POST",t,!0),h.responseType="json",h.timeout=s,h.ontimeout=function(){r(new Error("Timeout "+s+"ms "+t))},h.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.B||(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,"R",{value:!0});var r=e(5186),h=e(5458),o=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){o.GVL.isInstanceOf(t)||(t=new o.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 h.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 h.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 h.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 h.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 h.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 h.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 h.TCModelError("numCustomPurposes",t)},enumerable:!0,configurable:!0}),i.prototype.updated=function(){this.lastUpdated=new Date},i.consentLanguages=o.GVL.consentLanguages,i}(r.Cloneable);i.TCModel=c},2381:(t,i,e)=>{"use strict";var s=e(7170),n=e(250),r=e(2082),h=e(6382),o=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 h="";e{"use strict";Object.defineProperty(i,"R",{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{"use strict";Object.defineProperty(i,"R",{value:!0});var s=e(250),n=function(){function t(){}var i,e,n,r,h,o,a,c,l,u,d,p,f,v,g,m,y,b;return i=s.Fields.cmpId,e=s.Fields.cmpVersion,n=s.Fields.consentLanguage,r=s.Fields.consentScreen,h=s.Fields.created,o=s.Fields.isServiceSpecific,a=s.Fields.lastUpdated,c=s.Fields.policyVersion,l=s.Fields.publisherCountryCode,u=s.Fields.publisherLegitimateInterests,d=s.Fields.publisherConsents,p=s.Fields.purposeConsents,f=s.Fields.purposeLegitimateInterests,v=s.Fields.purposeOneTreatment,g=s.Fields.specialFeatureOptins,m=s.Fields.useNonStandardStacks,y=s.Fields.vendorListVersion,b=s.Fields.version,t[i]=12,t[e]=12,t[n]=12,t[r]=6,t[h]=36,t[o]=1,t[a]=36,t[c]=6,t[l]=12,t[u]=24,t[d]=24,t[p]=24,t[f]=24,t[v]=1,t[g]=12,t[m]=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,"R",{value:!0});var s=e(4479),n=e(2219),r=e(9836),h=e(8780),o=e(5458),a=e(4731),c=e(250),l=function(){function t(){}return t.encode=function(t,i){var e,h=this;try{e=this.fieldSequence[""+t.version][i]}catch(e){throw new o.EncodingError("Unable to encode version: "+t.version+", segment: "+i)}var l="";return i!==c.Segment.CORE&&(l=r.IntEncoder.encode(c.SegmentIDs.KEY_TO_ID[i],n.BitLength.segmentType)),e.forEach((function(e){var s=t[e],c=r.FieldEncoderMap[e],u=n.BitLength[e];void 0===u&&h.isPublisherCustom(e)&&(u=+t[a.Fields.numCustomPurposes]);try{l+=c.encode(s,u)}catch(t){throw new o.EncodingError("Error encoding "+i+"->"+e+": "+t.message)}})),s.Base64Url.encode(l)},t.decode=function(t,i,e){var h=this,l=s.Base64Url.decode(t),u=0;return e===c.Segment.CORE&&(i.version=r.IntEncoder.decode(l.substr(u,n.BitLength[a.Fields.version]),n.BitLength[a.Fields.version])),e!==c.Segment.CORE&&(u+=n.BitLength.segmentType),this.fieldSequence[""+i.version][e].forEach((function(t){var e=r.FieldEncoderMap[t],s=n.BitLength[t];if(void 0===s&&h.isPublisherCustom(t)&&(s=+i[a.Fields.numCustomPurposes]),0!==s){var c=l.substr(u,s);if(e===r.VendorVectorEncoder?i[t]=e.decode(c,i.version):i[t]=e.decode(c,s),Number.isInteger(s))u+=s;else{if(!Number.isInteger(i[t].bitLength))throw new o.DecodingError(t);u+=i[t].bitLength}}})),i},t.isPublisherCustom=function(t){return 0===t.indexOf("publisherCustom")},t.fieldSequence=new h.FieldSequence,t}();i.SegmentEncoder=l},818:(t,i,e)=>{"use strict";Object.defineProperty(i,"R",{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 h=t.version-1;if(!this.processor[h])throw new s.EncodingError("Invalid version: "+t.version);return this.processor[h](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,h){if(r){var o=i.vendors[h];if(!o||o.deletedDate)e.unset(h);else if(0===o[s].length)if("legIntPurposes"===s&&0===o.purposes.length&&0===o.legIntPurposes.length&&o.specialPurposes.length>0);else if(t.isServiceSpecific)if(0===o.flexiblePurposes.length)e.unset(h);else{for(var a=t.publisherRestrictions.getRestrictions(h),c=!1,l=0,u=a.length;l{"use strict";Object.defineProperty(i,"R",{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,"R",{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,"R",{value:!0});var s=e(250),n=e(632),r=e(3101),h=e(8937),o=e(2082),a=e(835),c=e(5889),l=e(3283),u=function(){function t(){}var i,e,u,d,p,f,v,g,m,y,b,w,x,S,_,A,P,k,I,T,C,M,E,L,O,R;return i=s.Fields.version,e=s.Fields.created,u=s.Fields.lastUpdated,d=s.Fields.cmpId,p=s.Fields.cmpVersion,f=s.Fields.consentScreen,v=s.Fields.consentLanguage,g=s.Fields.vendorListVersion,m=s.Fields.policyVersion,y=s.Fields.isServiceSpecific,b=s.Fields.useNonStandardStacks,w=s.Fields.specialFeatureOptins,x=s.Fields.purposeConsents,S=s.Fields.purposeLegitimateInterests,_=s.Fields.purposeOneTreatment,A=s.Fields.publisherCountryCode,P=s.Fields.vendorConsents,k=s.Fields.vendorLegitimateInterests,I=s.Fields.publisherRestrictions,T=s.Fields.vendorsDisclosed,C=s.Fields.vendorsAllowed,M=s.Fields.publisherConsents,E=s.Fields.publisherLegitimateInterests,L=s.Fields.numCustomPurposes,O=s.Fields.publisherCustomConsents,R=s.Fields.publisherCustomLegitimateInterests,t[i]=o.IntEncoder,t[e]=r.DateEncoder,t[u]=r.DateEncoder,t[d]=o.IntEncoder,t[p]=o.IntEncoder,t[f]=o.IntEncoder,t[v]=a.LangEncoder,t[g]=o.IntEncoder,t[m]=o.IntEncoder,t[y]=n.BooleanEncoder,t[b]=n.BooleanEncoder,t[w]=h.FixedVectorEncoder,t[x]=h.FixedVectorEncoder,t[S]=h.FixedVectorEncoder,t[_]=n.BooleanEncoder,t[A]=a.LangEncoder,t[P]=l.VendorVectorEncoder,t[k]=l.VendorVectorEncoder,t[I]=c.PurposeRestrictionVectorEncoder,t.segmentType=o.IntEncoder,t[T]=l.VendorVectorEncoder,t[C]=l.VendorVectorEncoder,t[M]=h.FixedVectorEncoder,t[E]=h.FixedVectorEncoder,t[L]=o.IntEncoder,t[O]=h.FixedVectorEncoder,t[R]=h.FixedVectorEncoder,t}();i.FieldEncoderMap=u},8937:(t,i,e)=>{"use strict";Object.defineProperty(i,"R",{value:!0});var s=e(632),n=e(5458),r=e(250),h=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,h=1;h<=i;h++)s.BooleanEncoder.decode(t[h-1])&&e.set(h);return e.bitLength=t.length,e},t}();i.FixedVectorEncoder=h},2082:(t,i,e)=>{"use strict";Object.defineProperty(i,"R",{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{"use strict";Object.defineProperty(i,"R",{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,h=s.IntEncoder.decode(t.slice(e),e)+65;return String.fromCharCode(r)+String.fromCharCode(h)},t}();i.LangEncoder=r},5889:(t,i,e)=>{"use strict";Object.defineProperty(i,"R",{value:!0});var s=e(2219),n=e(632),r=e(5458),h=e(2082),o=e(250),a=function(){function t(){}return t.encode=function(t){var i=h.IntEncoder.encode(t.numRestrictions,s.BitLength.numRestrictions);return t.isEmpty()||t.getRestrictions().forEach((function(e){i+=h.IntEncoder.encode(e.purposeId,s.BitLength.purposeId),i+=h.IntEncoder.encode(e.restrictionType,s.BitLength.restrictionType);for(var r=t.getVendors(e),o=r.length,a=0,c=0,l="",u=function(i){var e=r[i];0===c&&(a++,c=e);var u=r[o-1],d=t.gvl.vendorIds;if(i===o-1||r[i+1]>function(t){for(;++t<=u&&!d.has(t););return t}(e)){var p=!(e===c);l+=n.BooleanEncoder.encode(p),l+=h.IntEncoder.encode(c,s.BitLength.vendorId),p&&(l+=h.IntEncoder.encode(e,s.BitLength.vendorId)),c=0}},d=0;d{"use strict";var e;Object.defineProperty(i,"R",{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,"R",{value:!0});var s=e(250),n=e(7170),r=e(2082),h=e(632),o=e(8937),a=e(1938),c=e(5458),l=function(){function t(){}return t.encode=function(t){var i,e=[],s=[],o=r.IntEncoder.encode(t.maxId,n.BitLength.maxId),c="",l=n.BitLength.maxId+n.BitLength.encodingType,u=l+t.maxId,d=2*n.BitLength.vendorId+n.BitLength.singleOrRange+n.BitLength.numEntries,p=l+n.BitLength.numEntries;return t.forEach((function(r,o){c+=h.BooleanEncoder.encode(r),(i=t.maxId>d&&p{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"R",{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,"R",{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,"R",{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,"R",{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,"R",{value:!0}),s(e(4014)),s(e(1333))},1265:function(t,i){"use strict";var e,s=this&&this.B||(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,"R",{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.B||(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,"R",{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.B||(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,"R",{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.B||(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,"R",{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,"R",{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.B||(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,"R",{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(ti.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:ti.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,"R",{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,"R",{value:!0}),(e=i.DeviceDisclosureStorageAccessType||(i.DeviceDisclosureStorageAccessType={})).COOKIE="cookie",e.WEB="web",e.APP="app"},4731:(t,i)=>{"use strict";Object.defineProperty(i,"R",{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.B||(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,"R",{value:!0});var r=e(5186),h=e(5458),o=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 h.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===o.RestrictionType.NOT_ALLOWED||this.restrictionType===o.RestrictionType.REQUIRE_CONSENT||this.restrictionType===o.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.B||(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.T||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,"R",{value:!0});var h=e(4649),o=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 o.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),h=n.next();!h.done;h=n.next())s=h.value}catch(i){t={error:i}}finally{try{h&&!h.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 o.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{"use strict";var e;Object.defineProperty(i,"R",{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,"R",{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,"R",{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.B||(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.U||function(t,i){var e,s,n,r,h={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;h;)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 h.label++,{value:r[1],done:!1};case 5:h.label++,s=r[1],r=[0];continue;case 7:r=h.ops.pop(),h.trys.pop();continue;default:if(!(n=(n=h.trys).length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){h=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]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 o.TCModelError("set()",t,"must be positive integer array, positive integer, Set, 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}(h.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,"R",{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{"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,h=[],o=0,a=0;i>2],n=(3&c)<<4,a=1;break;case 1:h[o++]=s[n|c>>4],n=(15&c)<<2,a=2;break;case 2:h[o++]=s[n|c>>6],h[o++]=s[63&c],a=0}o>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,h)),o=0)}return a&&(h[o++]=s[n],h[o++]=61,1===a&&(h[o++]=61)),r?(o&&r.push(String.fromCharCode.apply(String,h.slice(0,o))),r.join("")):String.fromCharCode.apply(String,h.slice(0,o))};var h="invalid encoding";e.decode=function(t,i,e){for(var s,r=e,o=0,a=0;a1)break;if(void 0===(c=n[c]))throw Error(h);switch(o){case 0:s=c,o=1;break;case 1:i[e++]=s<<2|(48&c)>>4,s=c,o=2;break;case 2:i[e++]=(15&s)<<4|(60&c)>>2,s=c,o=3;break;case 3:i[e++]=(3&s)<<6|c,o=0}}if(1===o)throw Error(h);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 h=Object.keys(t),o=new Array(h.length+1),a=new Array(h.length),c=0;c{"use strict";function i(){this.W={}}t.exports=i,i.prototype.on=function(t,i,e){return(this.W[t]||(this.W[t]=[])).push({fn:i,ctx:e||this}),this},i.prototype.off=function(t,i){if(void 0===t)this.W={};else if(void 0===i)this.W[t]=[];else for(var e=this.W[t],s=0;s{"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{"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 h(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 o(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?h:o,t.readFloatBE=s?o:h}():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 h(t,i,e){var s=t(i,e),n=2*(s>>31)+1,r=s>>>23&255,h=8388607&s;return 255===r?h?NaN:n*(1/0):0===r?1401298464324817e-60*n*h:n*Math.pow(2,r-150)*(h+8388608)}t.writeFloatLE=i.bind(null,e),t.writeFloatBE=i.bind(null,s),t.readFloatLE=h.bind(null,n),t.readFloatBE=h.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 h(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 o(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?h:o,t.readDoubleBE=s?o:h}():function(){function i(t,i,e,s,n,r){var h=s<0?1:0;if(h&&(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((h<<31|2146435072)>>>0,n,r+e);else{var o;if(s<22250738585072014e-324)t((o=s/5e-324)>>>0,n,r+i),t((h<<31|o/4294967296)>>>0,n,r+e);else{var a=Math.floor(Math.log(s)/Math.LN2);1024===a&&(a=1023),t(4503599627370496*(o=s*Math.pow(2,-a))>>>0,n,r+i),t((h<<31|a+1023<<20|1048576*o&1048575)>>>0,n,r+e)}}}function h(t,i,e,s,n){var r=t(s,n+i),h=t(s,n+e),o=2*(h>>31)+1,a=h>>>20&2047,c=4294967296*(1048575&h)+r;return 2047===a?c?NaN:o*(1/0):0===a?5e-324*o*c:o*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=h.bind(null,n,0,4),t.readDoubleBE=h.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;r0&&".."!==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,h=s;return function(e){if(e<1||e>n)return t(e);h+e>s&&(r=t(s),h=0);var o=i.call(r,h,h+=e);return 7&h&&(h=1+(7|h)),o}}},4997:(t,i)=>{"use strict";var e=i;e.length=function(t){for(var i=0,e=0,s=0;s191&&s<224?r[h++]=(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[h++]=55296+(s>>10),r[h++]=56320+(1023&s)):r[h++]=(15&s)<<12|(63&t[i++])<<6|63&t[i++],h>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,r)),h=0);return n?(h&&n.push(String.fromCharCode.apply(String,r.slice(0,h))),n.join("")):String.fromCharCode.apply(String,r.slice(0,h))},e.write=function(t,i,e){for(var s,n,r=e,h=0;h>6|192,i[e++]=63&s|128):55296==(64512&s)&&56320==(64512&(n=t.charCodeAt(h+1)))?(s=65536+((1023&s)<<10)+(1023&n),++h,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,h=(t&&t.exports,"object"==typeof e.g&&e.g);h.global!==h&&h.window;var o=function(t){this.message=t};(o.prototype=new Error).name="InvalidCharacterError";var a=function(t){throw new o(t)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,u={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,h="",o=-1,l=t.length-r;++o>18&63)+c.charAt(n>>12&63)+c.charAt(n>>6&63)+c.charAt(63&n);return 2==r?(i=t.charCodeAt(o)<<8,e=t.charCodeAt(++o),h+=c.charAt((n=i+e)>>10)+c.charAt(n>>4&63)+c.charAt(n<<2&63)+"="):1==r&&(n=t.charCodeAt(o),h+=c.charAt(n>>2)+c.charAt(n<<4&63)+"=="),h},decode:function(t){var i=(t=String(t).replace(l,"")).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="",h=-1;++h>(-2*n&6)));return r},version:"0.1.0"};void 0===(s=function(){return u}.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,h=i.vendorListVersion,o=i.purposeIdBitString,a=i.maxVendorId,c=i.created,l=i.lastUpdated,u=i.isRange,d=i.defaultConsent,p=i.vendorIdBitString,f=i.vendorRangeList,v=i.cmpVersion,g=i.consentScreen,m=i.consentLanguage,y={version:e,cmpId:s,vendorListVersion:h,allowedPurposeIds:n(o),maxVendorId:a,created:c,lastUpdated:l,cmpVersion:v,consentScreen:g,consentLanguage:m};if(u){var b=f.reduce((function(t,i){for(var e=i.isRange,s=i.startVendorId,n=i.endVendorId,r=e?n:s,h=s;h<=r;h+=1)t[h]=!0;return t}),{});y.allowedVendorIds=[];for(var w=1;w<=a;w+=1)(d&&!b[w]||!d&&b[w])&&-1===y.allowedVendorIds.indexOf(w)&&y.allowedVendorIds.push(w)}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,h=n.vendorVersionMap;function o(t,i,e){return parseInt(t.substr(i,e),2)}function a(t,i,e){return new Date(100*o(t,i,e))}function c(t){var i=o(t);return String.fromCharCode(i+65).toLowerCase()}function l(t,i,e){var s=t.substr(i,e);return c(s.slice(0,e/2))+c(s.slice(e/2))}function u(t){var i=t.input,e=t.output,s=t.startPosition,n=t.field,r=n.type,h=n.numBits,c=n.decoder,u=n.validator,p=n.listCount;if("function"==typeof u&&!u(e))return{newPosition:s};if("function"==typeof c)return c(i,e,s);var f,v,g="function"==typeof h?h(e):h;switch(r){case"int":return{fieldValue:o(i,s,g)};case"bool":return{fieldValue:(f=i,v=s,1===parseInt(f.substr(v,1),2))};case"date":return{fieldValue:a(i,s,g)};case"bits":return{fieldValue:i.substr(s,g)};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 h=e,o=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:"0",e="",s=0;s1&&void 0!==arguments[1]?arguments[1]:h,e=o(t,0,r);if("number"!=typeof e)throw new Error("ConsentString - Unknown version number in the string to decode");if(!h[e])throw new Error("ConsentString - Unsupported version "+e+" in the string to decode");var s=i[e].fields;return d({input:t,fields:s}).decodedObject}(l,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}}]}]}}}},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 h(t,i,e,s){if(i.resolvedType)if(i.resolvedType instanceof n){t("switch(d%s){",s);for(var r=i.resolvedType.values,h=Object.keys(r),o=0;o>>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 o(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{"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>>3){");for(var e=0;e>>3){")("case 1: k=r.%s(); break",o.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[o.keyType]?i('%s[typeof k==="object"?util.longToHash(k):k]=value',c):i("%s[k]=value",c)):o.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{"use strict";t.exports=function(t){for(var i,e=r.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),o=t.fieldsArray.slice().sort(r.compareFieldsById),a=0;a>>0,8|n.mapKey[c.keyType],c.keyType),void 0===d?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,i):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|d,u,i),e("}")("}")):c.repeated?(e("if(%s!=null&&%s.length){",i,i),c.packed&&void 0!==n.packed[u]?e("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",u,i)("w.ldelim()"):(e("for(var i=0;i<%s.length;++i)",i),void 0===d?h(e,c,l,i+"[i]"):e("w.uint32(%i).%s(%s[i])",(c.id<<3|d)>>>0,u,i)),e("}")):(c.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,c.name),void 0===d?h(e,c,l,i):e("w.uint32(%i).%s(%s)",(c.id<<3|d)>>>0,u,i))}return e("return w")};var s=e(7025),n=e(7063),r=e(9935);function h(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=h;var s=e(3243);((h.prototype=Object.create(s.prototype)).constructor=h).className="Enum";var n=e(9313),r=e(9935);function h(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 h=Object.keys(i),o=0;o{"use strict";t.exports=c;var s=e(3243);((c.prototype=Object.create(s.prototype)).constructor=c).className="Field";var n,r=e(7025),h=e(7063),o=e(9935),a=/^required|optional|repeated$/;function c(t,i,e,n,r,c,l){if(o.isObject(n)?(l=r,c=n,n=r=void 0):o.isObject(r)&&(l=c,c=r,r=void 0),s.call(this,t,c),!o.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!o.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&&!o.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=!!o.Long&&void 0!==h.long[e],this.bytes="bytes"===e,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.K=null,this.comment=l}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.K&&(this.K=!1!==this.getOption("packed")),this.K}}),c.prototype.setOption=function(t,i,e){return"packed"===t&&(this.K=null),s.prototype.setOption.call(this,t,i,e)},c.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return o.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=h.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=o.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;o.base64.test(this.typeDefault)?o.base64.decode(this.typeDefault,t=o.newBuffer(o.base64.length(this.typeDefault)),0):o.utf8.write(this.typeDefault,t=o.newBuffer(o.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=o.emptyObject:this.repeated?this.defaultValue=o.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=o.decorateType(i).name:i&&"object"==typeof i&&(i=o.decorateEnum(i).name),function(n,r){o.decorateType(n.constructor).add(new c(r,t,i,e,{default:s}))}},c.tt=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.tt(s.Root),s.Namespace.tt(s.Type,s.Service,s.Enum),s.Root.tt(s.Type),s.Field.tt(s.Type)},9482:(t,i,e)=>{"use strict";var s=i;function n(){s.util.tt(),s.Writer.tt(s.BufferWriter),s.Reader.tt(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=h;var s=e(3548);((h.prototype=Object.create(s.prototype)).constructor=h).className="MapField";var n=e(7063),r=e(9935);function h(t,i,e,n,h,o){if(s.call(this,t,i,n,void 0,void 0,h,o),!r.isString(e))throw TypeError("keyType must be a string");this.keyType=e,this.resolvedKeyType=null,this.map=!0}h.fromJSON=function(t,i){return new h(t,i.id,i.keyType,i.type,i.options,i.comment)},h.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])},h.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)},h.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 h(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{"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,h,o,a,c,l){if(n.isObject(h)?(a=h,h=o=void 0):n.isObject(o)&&(a=o,o=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=!!h||void 0,this.responseType=r,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=l}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=u;var s=e(3243);((u.prototype=Object.create(s.prototype)).constructor=u).className="Namespace";var n,r,h,o=e(3548),a=e(7598),c=e(9935);function l(t,i){if(t&&t.length){for(var e={},s=0;si)return!0;return!1},u.isReservedName=function(t,i){if(t)for(var e=0;e0;){var s=t.shift();if(e.nested&&e.nested[s]){if(!((e=e.nested[s])instanceof u))throw Error("path conflicts with non-namespace objects")}else e.add(e=new u(s))}return i&&e.addJSON(i),e},u.prototype.resolveAll=function(){for(var t=this.nestedArray,i=0;i-1)return s}else if(s instanceof u&&(s=s.lookup(t.slice(1),i,!0)))return s}else for(var n=0;n{"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.et(this)},r.prototype.onRemove=function(t){var i=t.root;i instanceof s&&i.st(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 h=r[t];n.setProperty(h,e,i)}else(r={})[t]=n.setProperty({},e,i),s.push(r)}else{var o={};o[t]=i,s.push(o)}return this},r.prototype.setOptions=function(t,i){if(t)for(var e=Object.keys(t),s=0;s{"use strict";t.exports=h;var s=e(3243);((h.prototype=Object.create(s.prototype)).constructor=h).className="OneOf";var n=e(3548),r=e(9935);function h(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 o(t){if(t.parent)for(var i=0;i-1&&this.oneof.splice(i,1),t.partOf=null,this},h.prototype.onAdd=function(t){s.prototype.onAdd.call(this,t);for(var i=0;i{"use strict";t.exports=a;var s,n=e(9693),r=n.LongBits,h=n.utf8;function o(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,l="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")},u=function(){return n.Buffer?function(t){return(a.create=function(t){return n.Buffer.isBuffer(t)?new s(t):l(t)})(t)}:l};function d(){var t=new r(0,0),i=0;if(!(this.len-this.pos>4)){for(;i<3;++i){if(this.pos>=this.len)throw o(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 o(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 o(this,8);return new r(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}a.create=u(),a.prototype.nt=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,o(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 o(this,4);return p(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|p(this.buf,this.pos+=4)},a.prototype.float=function(){if(this.pos+4>this.len)throw o(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 o(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 o(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,e):i===e?new this.buf.constructor(0):this.nt.call(this.buf,i,e)},a.prototype.string=function(){var t=this.bytes();return h.read(t,0,t.length)},a.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw o(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw o(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.tt=function(t){s=t,a.create=u(),s.tt();var i=n.Long?"toLong":"toNumber";n.merge(a.prototype,{int64:function(){return d.call(this)[i](!1)},uint64:function(){return d.call(this)[i](!0)},sint64:function(){return d.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.tt=function(){n.Buffer&&(r.prototype.nt=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.tt()},9424:(t,i,e)=>{"use strict";t.exports=u;var s=e(9313);((u.prototype=Object.create(s.prototype)).constructor=u).className="Root";var n,r,h,o=e(3548),a=e(7025),c=e(7598),l=e(9935);function u(t){s.call(this,"",t),this.deferred=[],this.files=[]}function d(){}u.fromJSON=function(t,i){return i||(i=new u),t.options&&i.setOptions(t.options),i.addJSON(t.nested)},u.prototype.resolvePath=l.path.resolve,u.prototype.fetch=l.fetch,u.prototype.load=function t(i,e,s){"function"==typeof e&&(s=e,e=void 0);var n=this;if(!s)return l.asPromise(t,n,i,e);var o=s===d;function a(t,i){if(s){var e=s;if(s=null,o)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 h)return e}return null}function u(t,i){try{if(l.isString(i)&&"{"===i.charAt(0)&&(i=JSON.parse(i)),l.isString(i)){r.filename=t;var s,h=r(i,n,e),u=0;if(h.imports)for(;u-1))if(n.files.push(t),t in h)o?u(t,h[t]):(++f,setTimeout((function(){--f,u(t,h[t])})));else if(o){var e;try{e=l.fs.readFileSync(t).toString("utf8")}catch(t){return void(i||a(t))}u(t,e)}else++f,n.fetch(t,(function(e,r){--f,s&&(e?i?f||a(null,n):a(e):u(t,r))}))}var f=0;l.isString(i)&&(i=[i]);for(var v,g=0;g-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{"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,h){if(!r)throw TypeError("request must be specified");var o=this;if(!h)return s.asPromise(t,o,i,e,n,r);if(o.rpcImpl)try{return o.rpcImpl(i,e[o.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(t,e){if(t)return o.emit("error",t,i),h(t);if(null!==e){if(!(e instanceof n))try{e=n[o.responseDelimited?"decodeDelimited":"decode"](e)}catch(t){return o.emit("error",t,i),h(t)}return o.emit("data",e,i),h(null,e)}o.end(!0)}))}catch(t){return o.emit("error",t,i),void setTimeout((function(){h(t)}),0)}else setTimeout((function(){h(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=o;var s=e(9313);((o.prototype=Object.create(s.prototype)).constructor=o).className="Service";var n=e(4429),r=e(9935),h=e(5994);function o(t,i){s.call(this,t,i),this.methods={},this.rt=null}function a(t){return t.rt=null,t}o.fromJSON=function(t,i){var e=new o(t,i.options);if(i.methods)for(var s=Object.keys(i.methods),r=0;r{"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),h=e(3548),o=e(6039),a=e(7513),c=e(8368),l=e(1408),u=e(1173),d=e(9935),p=e(4928),f=e(5305),v=e(4497),g=e(3996),m=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.ht=null,this.J=null,this.ot=null,this.ct=null}function b(t){return t.ht=t.J=t.ot=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this.ht)return this.ht;this.ht={};for(var t=Object.keys(this.fields),i=0;i{"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 h(t,i){var e=0,s={};for(i|=0;e{"use strict";var s,n,r=t.exports=e(9693),h=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;s0)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 h.decorated||(h.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 h=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 o=String.prototype.charCodeAt;n.fromHash=function(t){return t===h?r:new n((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.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;n0)},s.Buffer=function(){try{var t=s.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),s.lt=null,s.ut=null,s.newBuffer=function(t){return"number"==typeof t?s.Buffer?s.ut(t):new s.Array(t):s.Buffer?s.lt(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-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{"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{"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 h=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),h["@type"]=s,h}return this.toObject(t,i)}}},1173:(t,i,e)=>{"use strict";t.exports=u;var s,n=e(9693),r=n.LongBits,h=n.base64,o=n.utf8;function a(t,i,e){this.fn=t,this.len=i,this.next=void 0,this.val=e}function c(){}function l(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function u(){this.len=0,this.head=new a(c,0,0),this.tail=this.head,this.states=null}var d=function(){return n.Buffer?function(){return(u.create=function(){return new s})()}:function(){return new u}};function p(t,i,e){i[e]=255&t}function f(t,i){this.len=t,this.next=void 0,this.val=i}function v(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 g(t,i,e){i[e]=255&t,i[e+1]=t>>>8&255,i[e+2]=t>>>16&255,i[e+3]=t>>>24}u.create=d(),u.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype.dt=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},u.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},u.prototype.int32=function(t){return t<0?this.dt(v,10,r.fromNumber(t)):this.uint32(t)},u.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},u.prototype.uint64=function(t){var i=r.from(t);return this.dt(v,i.length(),i)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(t){var i=r.from(t).zzEncode();return this.dt(v,i.length(),i)},u.prototype.bool=function(t){return this.dt(p,1,t?1:0)},u.prototype.fixed32=function(t){return this.dt(g,4,t>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(t){var i=r.from(t);return this.dt(g,4,i.lo).dt(g,4,i.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(t){return this.dt(n.float.writeFloatLE,4,t)},u.prototype.double=function(t){return this.dt(n.float.writeDoubleLE,8,t)};var m=n.Array.prototype.set?function(t,i,e){i.set(t,e)}:function(t,i,e){for(var s=0;s>>0;if(!i)return this.dt(p,1,0);if(n.isString(t)){var e=u.alloc(i=h.length(t));h.decode(t,e,0),t=e}return this.uint32(i).dt(m,i,t)},u.prototype.string=function(t){var i=o.length(t);return i?this.uint32(i).dt(o.write,i,t):this.dt(p,1,0)},u.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new a(c,0,0),this.len=0,this},u.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},u.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},u.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},u.tt=function(t){s=t,u.create=d(),s.tt()}},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 h(t,i,e){t.length<40?n.utf8.write(t,i,e):i.utf8Write?i.utf8Write(t,e):i.write(t,e)}r.tt=function(){r.alloc=n.ut,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>>0;return this.uint32(i),i&&this.dt(r.writeBytesBuffer,i,t),this},r.prototype.string=function(t){var i=n.Buffer.byteLength(t);return this.uint32(i),i&&this.dt(h,i,t),this},r.tt()},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,h={__proto__:[]}instanceof Array,o=!r&&!h,a={create:r?function(){return st(Object.create(null))}:h?function(){return st({__proto__:null})}:function(){return st({})},has:o?function(t,e){return i.call(t,e)}:function(t,i){return i in t},get:o?function(t,e){return i.call(t,e)?t[e]:void 0}:function(t,i){return t[i]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&{DEBUG_MODE:!1}&&"true"==={DEBUG_MODE:!1}.REFLECT_METADATA_USE_MAP_POLYFILL,u=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,d=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?it():Set,p=new(l||"function"!=typeof WeakMap?et():WeakMap);function f(t,i,e,s){if(B(e)){if(!z(t))throw new TypeError;if(!W(i))throw new TypeError;return A(t,i)}if(!z(t))throw new TypeError;if(!F(i))throw new TypeError;if(!F(s)&&!B(s)&&!D(s))throw new TypeError;return D(s)&&(s=void 0),P(t,i,e=H(e),s)}function v(t,i){function e(e,s){if(!F(e))throw new TypeError;if(!B(s)&&!G(s))throw new TypeError;E(t,i,e,s)}return e}function g(t,i,e,s){if(!F(e))throw new TypeError;return B(s)||(s=H(s)),E(t,i,e,s)}function m(t,i,e){if(!F(i))throw new TypeError;return B(e)||(e=H(e)),I(t,i,e)}function y(t,i,e){if(!F(i))throw new TypeError;return B(e)||(e=H(e)),T(t,i,e)}function b(t,i,e){if(!F(i))throw new TypeError;return B(e)||(e=H(e)),C(t,i,e)}function w(t,i,e){if(!F(i))throw new TypeError;return B(e)||(e=H(e)),M(t,i,e)}function x(t,i){if(!F(t))throw new TypeError;return B(i)||(i=H(i)),L(t,i)}function S(t,i){if(!F(t))throw new TypeError;return B(i)||(i=H(i)),O(t,i)}function _(t,i,e){if(!F(i))throw new TypeError;B(e)||(e=H(e));var s=k(i,e,!1);if(B(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 A(t,i){for(var e=t.length-1;e>=0;--e){var s=(0,t[e])(i);if(!B(s)&&!D(s)){if(!W(s))throw new TypeError;i=s}}return i}function P(t,i,e,s){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(i,e,s);if(!B(r)&&!D(r)){if(!F(r))throw new TypeError;s=r}}return s}function k(t,i,e){var s=p.get(t);if(B(s)){if(!e)return;s=new u,p.set(t,s)}var n=s.get(i);if(B(n)){if(!e)return;n=new u,s.set(i,n)}return n}function I(t,i,e){if(T(t,i,e))return!0;var s=Z(i);return!D(s)&&I(t,s,e)}function T(t,i,e){var s=k(i,e,!1);return!B(s)&&U(s.has(t))}function C(t,i,e){if(T(t,i,e))return M(t,i,e);var s=Z(i);return D(s)?void 0:C(t,s,e)}function M(t,i,e){var s=k(i,e,!1);if(!B(s))return s.get(t)}function E(t,i,e,s){k(e,s,!0).set(t,i)}function L(t,i){var e=O(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 d,h=[],o=0,a=e;o=0&&t=this.vt.length?(this.ft=-1,this.vt=i,this.gt=i):this.ft++,{value:e,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this.ft>=0&&(this.ft=-1,this.vt=i,this.gt=i),t},t.prototype.return=function(t){return this.ft>=0&&(this.ft=-1,this.vt=i,this.gt=i),{value:t,done:!0}},t}();return function(){function i(){this.vt=[],this.gt=[],this.bt=t,this.wt=-2}return Object.defineProperty(i.prototype,"size",{get:function(){return this.vt.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.gt[i]:void 0},i.prototype.set=function(t,i){var e=this.xt(t,!0);return this.gt[e]=i,this},i.prototype.delete=function(i){var e=this.xt(i,!1);if(e>=0){for(var s=this.vt.length,n=e+1;n{"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.Pt=i,e}return(0,s.ZT)(i,t),Object.defineProperty(i.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),i.prototype.kt=function(i){var e=t.prototype.kt.call(this,i);return!e.closed&&i.next(this.Pt),e},i.prototype.getValue=function(){var t=this,i=t.hasError,e=t.thrownError,s=t.Pt;if(i)throw e;return this.It(),s},i.prototype.next=function(i){t.prototype.next.call(this,this.Pt=i)},i}(e(6716).x)},1480:(t,i,e)=>{"use strict";e.d(i,{y:()=>u});var s=e(5642),n=e(5720),r=e(6766),h=e(278);function o(t){return 0===t.length?h.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),l=e(8846),u=function(){function t(t){t&&(this.kt=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,h=this,o=(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,l.x)((function(){var t=h,i=t.operator,e=t.source;o.add(i?i.call(o,e):e?h.kt(o):h.Tt(o))})),o},t.prototype.Tt=function(t){try{return this.kt(t)}catch(i){t.error(i)}},t.prototype.forEach=function(t,i){var e=this;return new(i=d(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.kt=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{"use strict";e.d(i,{x:()=>c});var s=e(655),n=e(1480),r=e(5720),h=(0,e(1819).d)((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),o=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 l(this,this);return i.operator=t,i},i.prototype.It=function(){if(this.closed)throw new h},i.prototype.next=function(t){var i=this;(0,a.x)((function(){var e,n;if(i.It(),!i.isStopped){var r=i.observers.slice();try{for(var h=(0,s.XA)(r),o=h.next();!o.done;o=h.next()){o.value.next(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}}}))},i.prototype.error=function(t){var i=this;(0,a.x)((function(){if(i.It(),!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.It(),!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.Tt=function(i){return this.It(),t.prototype.Tt.call(this,i)},i.prototype.kt=function(t){return this.It(),this.Ct(t),this.Mt(t)},i.prototype.Mt=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,o.P)(n,t)})))},i.prototype.Ct=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 l(t,i)},i}(n.y),l=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.kt=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:()=>m,Lv:()=>p});var s=e(655),n=e(8474),r=e(5720),h=e(3912),o=e(5);function a(){}var c=l("C",void 0,void 0);function l(t,i,e){return{kind:t,value:i,error:e}}var u=e(8380),d=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=w,e}return(0,s.ZT)(i,t),i.create=function(t,i,e){return new m(t,i,e)},i.prototype.next=function(t){this.isStopped?b(function(t){return l("N",t,void 0)}(t),this):this.Et(t)},i.prototype.error=function(t){this.isStopped?b(l("E",void 0,t),this):(this.isStopped=!0,this.Lt(t))},i.prototype.complete=function(){this.isStopped?b(c,this):(this.isStopped=!0,this.Ot())},i.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},i.prototype.Et=function(t){this.destination.next(t)},i.prototype.Lt=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},i.prototype.Ot=function(){try{this.destination.complete()}finally{this.unsubscribe()}},i}(r.w0),f=Function.prototype.bind;function v(t,i){return f.call(t,i)}var g=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}(),m=function(t){function i(i,e,s){var r,o,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&&h.v.useDeprecatedNextContext?((o=Object.create(i)).unsubscribe=function(){return a.unsubscribe()},r={next:i.next&&v(i.next,o),error:i.error&&v(i.error,o),complete:i.complete&&v(i.complete,o)}):r=i;return a.destination=new g(r),a}return(0,s.ZT)(i,t),i}(p);function y(t){h.v.useDeprecatedSynchronousErrorHandling?(0,d.O)(t):(0,o.h)(t)}function b(t,i){var e=h.v.onStoppedNotification;e&&u.z.setTimeout((function(){return e(t,i)}))}var w={closed:!0,next:a,error:function(t){throw t},complete:a}},5720:(t,i,e)=>{"use strict";e.d(i,{Lc:()=>a,w0:()=>o,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}})),h=e(3699),o=function(){function t(t){this.initialTeardown=t,this.closed=!1,this.Rt=null,this.Bt=null}var i;return t.prototype.unsubscribe=function(){var t,i,e,h,o;if(!this.closed){this.closed=!0;var a=this.Rt;if(a)if(this.Rt=null,Array.isArray(a))try{for(var c=(0,s.XA)(a),u=c.next();!u.done;u=c.next()){u.value.remove(this)}}catch(i){t={error:i}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}else a.remove(this);var d=this.initialTeardown;if((0,n.m)(d))try{d()}catch(t){o=t instanceof r?t.errors:[t]}var p=this.Bt;if(p){this.Bt=null;try{for(var f=(0,s.XA)(p),v=f.next();!v.done;v=f.next()){var g=v.value;try{l(g)}catch(t){o=null!=o?o:[],t instanceof r?o=(0,s.ev)((0,s.ev)([],(0,s.CR)(o)),(0,s.CR)(t.errors)):o.push(t)}}}catch(t){e={error:t}}finally{try{v&&!v.done&&(h=f.return)&&h.call(f)}finally{if(e)throw e.error}}}if(o)throw new r(o)}},t.prototype.add=function(i){var e;if(i&&i!==this)if(this.closed)l(i);else{if(i instanceof t){if(i.closed||i.Dt(this))return;i.jt(this)}(this.Bt=null!==(e=this.Bt)&&void 0!==e?e:[]).push(i)}},t.prototype.Dt=function(t){var i=this.Rt;return i===t||Array.isArray(i)&&i.includes(t)},t.prototype.jt=function(t){var i=this.Rt;this.Rt=Array.isArray(i)?(i.push(t),i):i?[i,t]:t},t.prototype.$t=function(t){var i=this.Rt;i===t?this.Rt=null:Array.isArray(i)&&(0,h.P)(i,t)},t.prototype.remove=function(i){var e=this.Bt;e&&(0,h.P)(e,i),i instanceof t&&i.$t(this)},t.EMPTY=((i=new t).closed=!0,i),t}(),a=o.EMPTY;function c(t){return t instanceof o||t&&"closed"in t&&(0,n.m)(t.remove)&&(0,n.m)(t.add)&&(0,n.m)(t.unsubscribe)}function l(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}},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,h){var o=t.call(this,i)||this;return o.onFinalize=r,o.shouldUnsubscribe=h,o.Et=e?function(t){try{e(t)}catch(t){i.error(t)}}:t.prototype.Et,o.Lt=n?function(t){try{n(t)}catch(t){i.error(t)}finally{this.unsubscribe()}}:t.prototype.Lt,o.Ot=s?function(){try{s()}catch(t){i.error(t)}finally{this.unsubscribe()}}:t.prototype.Ot,o}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)})))}))}},8380:(t,i,e)=>{"use strict";e.d(i,{z:()=>n});var s=e(655),n={setTimeout:function(){for(var t=[],i=0;i{"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,{x:()=>r,O:()=>h});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,h=e.error;if(n=null,r)throw h}}else t()}function h(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})},8474:(t,i,e)=>{"use strict";function s(t){return"function"==typeof t}e.d(i,{m:()=>s})},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)}))}},5055:(t,i,e)=>{"use strict";e.d(i,{Zr:()=>s,rl:()=>n,Km:()=>r,n9:()=>h});const s={FullscreenChanged:"fullscreenChanged",PlayerFloatChanged:"playerFloatChanged",FloatingEnterStart:"floatingEnterStart",FloatingEnterStop:"floatingEnterStop",FloatingExitStart:"floatingExitStart",FloatingExitStop:"floatingExitStop"},n={OmidViewabilityThreshold:"OmidViewabilityThreshold"},r=Object.assign(Object.assign(Object.assign(Object.assign({Ready:"ready",Removed:"removed",SetupError:"setupError",IsViewable:"isViewable",SizeChanged:"sizeChanged",BrandingClicked:"brandingClicked",ImpressionPrice:"impressionPrice",ImpressionRevenue:"impressionRevenue"},{Play:"play",Pause:"pause",QualityChanged:"qualityChanged",PlayError:"playError",VolumeChanged:"volumeChanged"}),s),n),{AdClick:"adClick",AdPlay:"adPlay",AdPause:"adPause",AdImpression:"adImpression",AdCompleted25:"adCompleted25",AdCompleted50:"adCompleted50",AdCompleted75:"adCompleted75",AdCompleted100:"adCompleted100",AdSkipped:"adSkipped",AdError:"adError",AdStopped:"adStopped",AdCompanion:"adCompanion"});var h;!function(t){t.SetupError="SetupError",t.NoPlayer="NoPlayer",t.RenderError="RenderError"}(h||(h={}))},2817:(t,i,e)=>{"use strict";var s,n;e.d(i,{lI:()=>s,do:()=>n,Ht:()=>r,bS:()=>h}),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={}));const r=[{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 h;!function(t){t.Self="_self",t.Blank="_blank",t.Parent="_parent",t.Top="_top"}(h||(h={}))},2820:(t,i,e)=>{"use strict";var s,n,r;e.d(i,{Gj:()=>s,s6:()=>n,s_:()=>r,Rq:()=>h,vF:()=>o,Ig:()=>a,Ng:()=>c,iu:()=>l,ed:()=>u,QO:()=>d,Yk:()=>p,_7:()=>f,jG:()=>v,PK:()=>g,hQ:()=>m,sN:()=>b,oV:()=>w,pT:()=>x,Hs:()=>S,mr:()=>_}),function(t){t.Invisible="cnx-mod-invisible",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.AdOverlayType="cnx-in-ad-overlay",t.AdNonLinearType="cnx-in-ad-nonlinear",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.HideNonLinearAd="cnx-in-hide-non-linear",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"}(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 h={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"},o={Xxl:"cnx-bp-xxl-st",Xl:"cnx-bp-xl-st",Lg:"cnx-bp-lg-st",Md:"cnx-bp-md-st",Sm:"cnx-bp-sm-st",Xs:"cnx-bp-xs-st",Xxs:"cnx-bp-xxs-st"};var a,c,l,u,d,p,f;!function(t){t.Responsive="cnx-size-responsive",t.Fixed="cnx-size-fixed"}(a||(a={})),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"}(c||(c={})),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"}(l||(l={})),function(t){t.InheritTitleFontFamily="cnx-inherit-title-font-family",t.InheritBodyFontFamily="cnx-inherit-body-font-family"}(u||(u={})),function(t){t.Connatix="#0099FF",t.Icons="#FFFFFF",t.PrimaryBackground="#F1F1F1",t.PrimaryForeground="#000000",t.SecondaryBackground="#000000",t.SecondaryForeground="#F1F1F1",t.AccentForeground="#FFFFFF"}(d||(d={})),function(t){t.CaptionContainer="cnx-captions-text-holder"}(p||(p={})),function(t){t.MainClass="cnx-float",t.TransitionClass="cnx-float-transition",t.AlwaysFloating="cnx-always-floating"}(f||(f={}));const v={FadeOutBase:"cnx-fade-out-base",FadeOut:"cnx-fade-out",FadeInBase:"cnx-fade-in-base",FadeIn:"cnx-fade-in"};var g,m,y;!function(t){t.CurrentSlide="cnx-slide-current",t.NextSlide="cnx-slide-next",t.SlideLeft="cnx-slide-left",t.SlideRight="cnx-slide-right"}(g||(g={})),function(t){t.OpacityInTransition="cnx-tooltip-animation-in"}(m||(m={})),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"}(y||(y={}));const b={MainContainer:"cnx-main-container",MainContainerFlex:"cnx-main-container-flex",PlayerWrapper:"cnx-player-wrapper",ImagePlaceholder:"cnx-image-placeholder"},w="cnx-ratio",x="cnx-hide-video",S={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"}},45:(t,i,e)=>{"use strict";e.d(i,{g:()=>s,x:()=>n});const s=JSON.parse('{"version":154690,"domainPrefix":"","logToConsole":false,"logToServer":true,"env":"production"}'),n=!0},782:(t,i,e)=>{"use strict";var s,n;e.d(i,{Xh:()=>s,Uh:()=>n,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"}},5049:(t,i,e)=>{"use strict";e.d(i,{x:()=>s});const s="//securepubads.g.doubleclick.net/tag/js/gpt.js"},2157:(t,i,e)=>{"use strict";e.d(i,{XY:()=>n,f3:()=>r,xs:()=>h,fJ:()=>o,kd:()=>a});var s=e(289);const n=200,r=31,h={[s.ProtoAdType.Video]:2e3,[s.ProtoAdType.Overlay]:1e3,[s.ProtoAdType.Nonlinear]:1e3},o=.5,a="connatix.com"},308:(t,i,e)=>{"use strict";e.d(i,{a:()=>n,M:()=>r});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={}))},7577:(t,i,e)=>{"use strict";e.d(i,{br:()=>s,Fk:()=>n,Kp:()=>r,a8:()=>h,ym:()=>o});const s="https://connatix.com/privacy-policy/",n="v",r="pid",h="sid",o="cid"},9115:(t,i,e)=>{"use strict";e.d(i,{T9:()=>s,p7:()=>n,uD:()=>r,s_:()=>h,Y0:()=>o,ti:()=>a,oG:()=>c});const s=/(\d\d):(\d\d):(\d\d)(\.(\d\d\d))?/,n=36e5,r=6e4,h=1e3,o=60,a=864e5,c=60},9078:(t,i,e)=>{"use strict";var s,n;e.d(i,{zc:()=>s,fI:()=>n,r5:()=>r}),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"},1730:(t,i,e)=>{"use strict";e.d(i,{j:()=>s,e:()=>o});var s,n=e(8423);class r{}r.clientAb0=(0,n.Vm)([50,50]),r.clientAb1=(0,n.Vm)([50,50]);class h{}h.clientAb0=(0,n.Vm)([50,50]),h.clientAb1=(0,n.Vm)([50,50]),function(t){t[t.ElementsABService=0]="ElementsABService",t[t.PlayspaceABService=1]="PlayspaceABService"}(s||(s={}));class o{static get clientAb0(){return this.getABValueForKey("clientAb0")}static get clientAb1(){return this.getABValueForKey("clientAb1")}static getABValueForKey(t){return this.abServiceType===s.PlayspaceABService?h[t]:r[t]}}},5348:(t,i,e)=>{"use strict";e.d(i,{$:()=>h});const s="ats-liveramp-envelope-request";var n=e(289),r=e(8423);class h{static getEnvelopeFromParentAts(t){var i;return(null===(i=h.envelope)||void 0===i?void 0:i.envelope)?Promise.resolve():new Promise((i=>{if(!t.ats)return h.communicateViaPostMessage(t),void i();t.ats.retrieveEnvelope().then((e=>{e?(h.envelope=JSON.parse(e),i()):(h.communicateViaPostMessage(t),i())}))}))}static communicateViaPostMessage(t){h.dispatchEnvelopeRequestEvent(t),h.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&&(h.envelope=JSON.parse(t.data.result),window.removeEventListener("message",h.receiveEnvelopeListener))}static addEnvelopeListener(){window.addEventListener("message",h.receiveEnvelopeListener,!1)}static getEnvelopeWithConsent(t,i){return new Promise(((e,s)=>{i.isConsentConnatix()?h.getEnvelopeFromParentAts(t).then((()=>{var t;(null===(t=h.envelope)||void 0===t?void 0:t.envelope)?e(h.envelope.envelope):setTimeout((()=>s()),500)})):setTimeout((()=>s()),500)}))}static getEnvelope(t,i){(0,r.Up)((()=>h.getEnvelopeWithConsent(t,i))).catch((()=>{}))}static setEnvelopeStatus(t){h.envelopeStatus=t}static getValidEnvelope(){var t;return(null===(t=h.envelope)||void 0===t?void 0:t.envelope)&&h.envelopeStatus===n.LiveRampEnvelopeStatusEnum.Ok?h.envelope.envelope:null}static wasRequestEnhanced(t){var i;return(null===(i=h.envelope)||void 0===i?void 0:i.envelope)&&t===n.LiveRampEnvelopeStatusEnum.Ok}}h.envelope=null,h.envelopeStatus=n.LiveRampEnvelopeStatusEnum.Ok},4280:(t,i,e)=>{"use strict";e.d(i,{_:()=>d});var s=e(5049);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 h=e(1561),o=e(8423),a=e(7726),c=e(7427),l=e(6515),u=e(4975);class d{static get isBannerBlocked(){return this.Ut}static onAdBlockerDetected(){return this.Nt.asObservable().pipe((0,u.h)((t=>null!==t)))}static detectUsingCSS(t){try{let i=!1;t.document.body.insertAdjacentHTML("beforeend",this.zt());const e=t.document.getElementById(r);return 0!==e.getBoundingClientRect().height&&0!==e.getBoundingClientRect().width||(i=!0),t.document.body.removeChild(e),this.qt(i),i}catch(t){return this.qt(!1),!1}}static detectUsingScript(){return new Promise((t=>{const i=(0,o.pE)(window).topFrame,e=i=>{this.Nt.next(i),this.Nt.complete(),t(i)};i.googletag&&e(!1),(0,h.dZ)({src:s.x},i.document.head,i,(()=>i.googletag&&(0,c.QM)(i.googletag.getVersion())?e(!1):e(!0)),(()=>e(!0)))}))}static qt(t){null!==this.Ut&&this.Ut!==t&&(0,a.n)({message:"AdBlockerDetection_changed_after_new_global",level:a.D.INFO,exception:`${this.Ut}`},{throttle:2,sendMaxLog:!1}),this.Ut=t,this.Ut&&(this.Nt.next(!0),this.Nt.complete())}static zt(){return`
`}}d.Ut=null,d.Nt=new l.X(null)},7417:(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={}))},497:(t,i,e)=>{"use strict";e.d(i,{S:()=>s});class s{}s.MaxLogOverflow=1e3,s.maxLogOverflowCount={},s.logCount={},s.maxLogSent={},s.sessionId="",s.pageFocus=!1,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]},1886:(t,i,e)=>{"use strict";e.d(i,{f:()=>n});var s=e(7577);class n{static getCidKeyValueObject(){return!!this.customerId&&{[s.ym]:this.customerId}}}n.customerId=null},7910:(t,i,e)=>{"use strict";e.d(i,{X:()=>a});var s=e(308),n=e(8423),r=e(2817),h=e(6615),o=e(7427);class a{constructor(t){this.Wt=t,this.Gt=100,this.Jt=(0,n.pE)(window).topFrame,this.Qt=s.a.indexOf(this.Wt.browser.device)>-1,this.Xt=(0,n.dz)(),this.Yt={browserType:this.Kt(),browserVersion:this.Wt.browser.browserVersion},this.Zt=this.ii(),this.ei=this.pageUrl.substr(0,this.Gt),this.si=(0,h._Y)(this.ei)}Kt(){let t;return Object.keys(r.lI).forEach((i=>{this.Wt.browser.browserType.toLowerCase().includes(r.lI[i])&&(t=r.lI[i])})),t}ii(){let t,i=0;const e=this.Wt.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.Wt.browser.device}get browser(){return this.Yt}get os(){return this.Zt}get geoLocation(){return this.Wt.geoLocation}get pageUrl(){return this.Wt.pageUrl||""}get pageUrlTrunc(){return this.ei}get pageDomain(){return this.si}get isMobile(){return this.Qt}get isInApp(){return(0,o.QM)(this.Wt.bundleID)}get isInAppAndroid(){return this.isInApp&&this.os.os===s.M.Android}get playerId(){return this.Wt.playerId}get appId(){return this.Xt}get bundleID(){return(0,o.QM)(this.Wt.iOSAppID)?this.Wt.iOSAppID:this.Wt.bundleID}get domainURL(){return this.Wt.domainURL}get storeURL(){return this.Wt.storeURL}get explorationMode(){return this.Wt.explorationMode}get appName(){return this.Wt.appName}get appCategories(){return this.Wt.appCategories}get appVersion(){return this.Wt.appVersion}get sdkVersion(){return this.Wt.sdkVersion}get appPrivacyPolicy(){return this.Wt.appPrivacyPolicy}get appIsPaid(){return this.Wt.appIsPaid}get deviceId(){return this.Wt.deviceId}get topWindow(){return this.Jt}get appPageURL(){return this.Wt.appPageURL}get isOVPDomain(){return this.Wt.isOVPDomain}}},1995:(t,i,e)=>{"use strict";e.d(i,{C:()=>s});class s{constructor(){this.ni=!1,this.promise=new Promise(((t,i)=>{this.ri=t,this.oi=i}))}ai(){this.ni||(this.ni=!0)}resolve(t){this.ai(),this.ri(t)}reject(t){this.ai(),this.oi(t)}get isPending(){return!this.ni}}},7754:(t,i,e)=>{"use strict";e.d(i,{P:()=>a});var s,n=e(7427),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 h={[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},o="cnx_fraud_sensor";class a{constructor(t,i,e,s){this.ci=t,this.ui=i,this.di=e,this.pi(s)}addFraudSensorScript(){if(this.ui.getElementById(o))return;const t={id:o,src:this.ci.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.ui.insertScript(t,null,"FraudSensor_script_error")}pi(t){t=(0,n.QM)(t)?t:"00000000-0000-0000-0000-000000000000";const{lookupId:i,lookupResponseCode:e,publisherAdsTxt:s,deviceIdentifier:r}=this.di,o=h[this.di.deviceType];this.ci.setPublisherId(s),this.ci.setUserId(t),this.ci.setFraudSensorMacros({lookupId:i,lookupResponseCode:e,deviceType:o,mediaType:2,deviceIdentifier:r})}}},8804:(t,i,e)=>{"use strict";e.d(i,{a:()=>z});var s=e(289),n=e.n(s),r=e(7726),h=e(8423),o=e(1561),a=e(9446),c=e(7398),l=e(6438),u=e(7910),d=e(6615),p=e(45),f=e(497),v=e(7427),g=e(3030),m=e(5055),y=e(2356),b=e(1730),w=e(7272),x=e(3352),S=e(1580),_=e(3217),A=e(3810),P=e(5880),k=e(782),I=e(2820),T=e(649),C=e(7754),M=e(6284),E=e(3640),L=e(4280),O=e(2645),R=e(6243),B=e(7382),D=e(5732),j=e(4974),F=e(525),$=e(8852),V=e(7577),U=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(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(h,o)}a((s=s.apply(t,i||[])).next())}))};const N="player_instance",H=",";class z extends P._{constructor(t,i,e,s,n,r,h){super(),this.services=t,this.GLOBAL=i,this.vi=e,this.gi=s,this.mi=n,this.yi=r,this.readyCallback=h,this.bi={},this.wi="",this.xi=100,this.Si=1e3,this.isServerlessMode=!1,this._i=!1,this.Ai=[],this.Pi="{{omidVerificationClient}}",this.ki=[],this.vi&&this.Ii(),L._.detectUsingCSS(this.GLOBAL),this.Ti=(0,o.sw)(this.GLOBAL)}initUrlSuffixer(t){const i=new O.f;if(t.bandwidthLoggingState===s.ProtoBandwidthLoggingEnum.Disabled)return i;const e=this.Ci(t);return i.setUrlParams({domain:F.n.bundleDomain,urlParams:[(0,$.IS)(e,t.playerId)]}),i}Mi(){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}Ei(t){const i=this.GLOBAL.frameElement;if(!(0,o.GF)(i))return;let e=!0;i&&t&&(e=!1),e?(0,o.MV)(i):(0,o.Ho)(i)}Li(t,i){try{return this.Oi(t,i)}catch(t){return null}}Ri(t){let i;try{i=eval(t)}catch(e){i=t.replace(/\[(\d+)]/g,":nth-child($1)")}return i}Bi(t,i){const e=this.Li(t,i);return null===e?new Promise((e=>{setTimeout((()=>{e(this.Bi(t,i))}),this.xi)})):Promise.resolve(e)}Di(t,i){const e=this.Ri(t);return Promise.resolve(this.Bi(e,i))}Oi(t,i){let e;return t.split(/(\.cnxEq\(\d+\))/).filter((t=>t)).forEach((t=>{e=t.includes("cnxEq")?this.ji(e,t):e?e.querySelectorAll(t):(0,o.Wb)(t,i)})),e?(e.hasOwnProperty("length")&&(e=e.length>0?e[0]:null),e):null}ji(t,i){const e=/\d+/g.exec(i),s=parseInt(e[0],10);return s>t.length?(0,g.Sz)(t)[t.length-1]:(0,g.Sz)(t)[s]}Fi(){return this.gi?s.ProtoImplementationType.Amp:s.ProtoImplementationType.Web}$i(t,i){const e=(0,h.pE)(this.GLOBAL);let s;return s=(0,v.$K)(this.externalAttributes.settings.rendering.forceInsertPath)?this.externalAttributes.settings.rendering.forceInsertPath:i.forceInsertPath,new Promise(((n,r)=>{let h=(0,o.G$)(this.wi,this.GLOBAL);if(s||t.tag.parentNode===this.GLOBAL.document.head&&(!e.topChildFrame||i.renderInFrame)){let t,s,r;e.topChildFrame&&(0,o.IV)(e.topChildFrame.frameElement,I.Gj.DisplayNone),t=(0,v.QM)(this.externalAttributes.settings.rendering.containerSelector)?this.externalAttributes.settings.rendering.containerSelector:i.containerSelector,s=(0,v.$K)(this.externalAttributes.settings.rendering.insertPosition)?this.externalAttributes.settings.rendering.insertPosition:i.insertPosition,r=(0,v.$K)(this.externalAttributes.settings.rendering.position)?this.externalAttributes.settings.rendering.position:i.position,this.Di(t,e.topFrame).then((t=>{this.Vi(t,h,s,r),n({insertContainer:h,insertWindow:e.topFrame})}))}else e.topChildFrame&&!i.renderInFrame?(h=(0,o.G$)(this.wi,e.topFrame),e.topChildFrame.frameElement.parentNode.insertBefore(h,e.topChildFrame.frameElement),(0,o.cn)(e.topChildFrame.frameElement,I.Gj.DisplayNone),n({insertContainer:h,insertWindow:e.topFrame})):(t.tag.parentNode.insertBefore(h,t.tag),n({insertContainer:h}))}))}Ui(t,i,e){(0,o.IS)(i,t,e)}Ni(t,i,e){switch(e){case s.ProtoPlayerInsertMode.BeforeContainer:t.parentElement.insertBefore(i,t);break;case s.ProtoPlayerInsertMode.ReplaceContainer:t.parentElement.insertBefore(i,t),(0,o.bX)(t);break;case s.ProtoPlayerInsertMode.HideContainer:t.parentElement.insertBefore(i,t),(0,o.MV)(t);break;case s.ProtoPlayerInsertMode.AfterContainer:t.nextElementSibling?t.parentElement.insertBefore(i,t.nextElementSibling):t.parentElement.appendChild(i)}}Vi(t,i,e,n){e===s.ProtoPlayerInsertMode.WithinContainer?this.Ui(t,i,n):this.Ni(t,i,e)}Hi(t,i=[]){t.lineItems=[...t.lineItems,...i];const e=t.lineItems.length;t.lineItems=(0,g.qy)("advertiserLineItemId",t.lineItems),e!==t.lineItems.length&&(0,r.n)({level:r.D.WARN,message:"Loader_duplicated_adsources",callStack:"_"})}zi(t,i){const e=t.players[i],{playerModel:n,globalDomUtilsService:r,urlSuffixerService:h}=this.bi[i];if(this.qi(t.cookieSyncUrls),this.services.UserManagerService.setGeoLocation(t.geoLocation),f.S.sessionId=e.sessionId,this.Wi.addPlayerSession(e.playerId,e.sessionId),!n)return void this.registerApiError(m.n9.SetupError,"No playlist was provided!");const o=new u.X({iOSAppID:this.vi&&!this.mi?t.iOSAppID:null,browser:t.browser,geoLocation:t.geoLocation,pageUrl:this.pageUrl,playerId:n.playerId,explorationMode:t.explorationMode,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.yi}),a=new y.v(r),d=this.getViewabilityService(n,a);L._.detectUsingCSS(n.global);const p=new l.c(n,t.geoLocation,o.pageUrl,o.pageDomain,this.externalAttributes._appSettings,this.Ti,t.publisherNetworkCode),g={services:{GlobalDomUtilsService:r,ViewabilityService:d,TrackingService:this.Gi(n,t,i),ResizeObserver:new c.a(n.global),UserManagerService:this.services.UserManagerService,MacrosService:p,EventsStorageService:this.services.EventsStorageService,PageFocusService:a,InteractionService:new M.k(n.global,o.isMobile),UrlSuffixerService:h},config:o};L._.isBannerBlocked&&g.services.TrackingService.trackSessionAdBlocker(s.ProtoAdBlockDetectionTypeEnum.Banner),g.services.UserManagerService.setPageUrl(g.config.pageUrl);const b=this.Fi();g.services.TrackingService.setImplementationTypeOnMeta(b),n.externalMacros&&g.services.MacrosService.addExtraMacros(n.externalMacros),g.services.UserManagerService.onEvent([w.k.CCPA_INFO_RECEIVED]).then((()=>{g.services.MacrosService.setUsPrivacyString(g.services.UserManagerService.getUsPrivacyString())})),g.services.UserManagerService.onEvent([w.k.CONSENT_DATA_UPDATE]).then((()=>{g.services.TrackingService.updateMetadataModel({userId:g.services.UserManagerService.getTrackableUser()});const t=g.services.UserManagerService.getConsentPayload();if(g.services.TrackingService.hasGdprConsentPayload=(0,v.QM)(t),this.services.UserManagerService.gdprConsentMode===s.ProtoGdprConsentModeEnum.NoConsent||this.vi){const t=n.lineItemSettings.lineItems.filter((t=>(0,v.QM)(t.vendorId))).every((t=>this.services.UserManagerService.isConsent(t.vendorId)));this.services.UserManagerService.gdprConsentMode=t?s.ProtoGdprConsentModeEnum.AllGood:s.ProtoGdprConsentModeEnum.NotAllDemandConsent}}));const x={wasPlayerReloaded:this.Wi.wasPlayerReloaded(e.playerId),wasPlayerInView:this.Wi.getSessionInView(e.playerId)};this.renderer=this.getRendererInstance(n,g,x,this.externalAttributes._appSettings),this.subscribe(k.Xh.SessionView,this.renderer,(()=>{this.Wi.addSessionInView(e.playerId)})),this.subscribe(k.Xh.SessionRendered,this.renderer,(()=>{this.Qi(p,r,g.config)}));const S=Object.assign({configEnums:this.getApiConfigEnums(),configEvents:this.getApiConfigEvents()},this.renderer.getApiMethods());let _=e.customJsCode;if(_){const t=`${N}_${g.config.appId}`;this.GLOBAL[t]=S,_=_.cnx_replaceAll(`"{{${N}}}"`,`window.${t}`)}this.renderer.init((()=>{this.Xi(_)}))?this.registerApiSuccess(S):this.registerApiError(m.n9.RenderError,"Player size under supported value")}Gi(t,i,e){return t.disableTracking?new x.G:new a.e({userManagerService:this.services.UserManagerService,browser:i.browser,geoLocation:i.geoLocation,playerId:t.playerId,userId:this.services.UserManagerService.getTrackableUser(),sessionId:i.players[e].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:i.players[e].abTestId,explorationMode:i.explorationMode,bundleAbId:i.bundleAbId,bundlePart:i.bundlePart})}Xi(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,o.ML)(n.document.head,n,r.trim())}Ii(){if(this.Pi.includes("{{omidVerificationClient"))return;const t={useSafeMode:!1,global:window};this.Xi(decodeURI(this.Pi),t)}Yi(){const{playerId:t,parseDomain:i}=this.Ki;return this.Zi(t,i).catch((t=>{const i=new Error(t);throw(0,r.n)({callStack:i.stack,level:r.D.CRITICAL,exception:i.message,message:"Prerender_Loader_player_id_call_get_pls"},{throttle:1e3}),this.registerApiError(m.n9.SetupError,"player data call error"),this.te(),i}))}ie(t){return U(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 j.k.loadPageInsights({insightsInputType:D.i.Page,id:t.hashedPageUrl})),e&&e.callFraudSensor){const{lookupId:t,lookupResponseCode:s,publisherAdsTxt:n}=e;this.di={lookupId:t,lookupResponseCode:s,publisherAdsTxt:n,deviceType:i.device}}b.e.serverAb0=t.serverAb0,b.e.serverAb1=t.serverAb1,(0,g.BZ)(t.players)?(t.players.length>1&&(this.Mi(),this._i=!0),Object.keys(t.players).forEach((i=>{this.se(t,this.Ki,i)}))):this.registerApiError(m.n9.NoPlayer,`No player available for given player id:${this.Ki.playerId}`),this.te()}))}te(){this.ne(),this.re()}re(){setTimeout((()=>{if(!this._i){const t=this.Ai[0];this.readyCallback&&this.readyCallback(t.apiErrorObj,t.apiConfigObj)}this.he()}))}he(){this.Ai.filter((t=>t.apiErrorObj)).forEach((()=>{this.services.EventsStorageService.emitRenderError()}))}se(t,i,e){const s=t.players[e],{playerModel:n}=this.bi[e];this.Ei(s.renderInFrame),this.zi(t,e),this.ae(n,this.renderer.playerContainer)}Zi(t,i=!1){let e={parseDomain:i,referrer:this.Ti,pageUrl:this.pageUrl,tokens:[t]};e.bundleId=this.externalAttributes._appSettings.bundleID,this.queryParams.cnxLineItemId&&(e.forceLineItemIds=this.queryParams.cnxLineItemId.split(H).filter((t=>(0,v.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,v.as)(s)&&Object.keys(s).length>0&&(e.queryJsTargeting=(0,h.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=p.g.version,e.es6=p.x,e.userId=this.services.UserManagerService.getForcedTrackableUser(),e.isConsentConnatix=this.services.UserManagerService.isConsentConnatix(),e.clientAb0=b.e.clientAb0,e.clientAb1=b.e.clientAb1,e.implementationType=this.Fi(),e.reloadedPlayers=this.Wi.getCookiePlayersSession(),e=Object.assign(Object.assign({},e),this.getSpecificRequestData()),this.Ki.playerId?this.getPlayerResponse(e,this.Ki.playerId||"serverless"):new Promise(((t,i)=>{this.isServerlessMode=!0,t(this.defaultInitFromProto())}))}ce(){const t=(0,d.Ph)("cnxVideoPosition",this.pageUrl),i=parseInt((0,d.Ph)("cnxStoryPosition",this.pageUrl),10);return{cnxStoryId:(0,d.Ph)("cnxStoryId",this.pageUrl),cnxLineItemId:(0,d.Ph)("cnxLineItemId",this.pageUrl),cnxPlayerId:(0,d.Ph)("cnxPlayerId",this.pageUrl),cnxMediaId:(0,d.Ph)("cnxMediaId",this.pageUrl),cnxPlaylistId:(0,d.Ph)("cnxPlaylistId",this.pageUrl),cnxVideoPosition:t?parseInt(t,10):null,cnxExplorationMode:"true"===(0,d.Ph)("cnxExplorationMode",this.pageUrl),cnxStoryPosition:(0,v.r)(i)?i:null,cnxSkipAdsFlag:"true"===(0,d.Ph)("cnxSkipAdsFlag",this.pageUrl),cnxReloadTime:parseInt((0,d.Ph)("cnxReloadTime",this.pageUrl),10),cnxOverrideLineitems:"true"===(0,d.Ph)("cnxOverrideLineitems",this.pageUrl),cnxIsSeoTraffic:"true"===(0,d.Ph)("cnxIsSeoTraffic",this.pageUrl)}}ae(t,i){const e=this.getDelegateHandler(),s=new S.N(this.GLOBAL,this.services.EventsStorageService,e,t,i);this.yi?L._.isBannerBlocked||this.ki.push(L._.onAdBlockerDetected().subscribe((t=>{t||s.start()}))):s.start()}Qi(t,i,e){if(!this.di)return;const s=this.services.UserManagerService.getTrackableUser();this.di.deviceIdentifier=e.bundleID;const n=new C.P(t,i,this.di,s);this.yi?this.ki.push(L._.onAdBlockerDetected().subscribe((t=>{t||n.addFraudSensorScript()}))):n.addFraudSensorScript()}qi(t){L._.isBannerBlocked||(this.yi?this.ki.push(L._.onAdBlockerDetected().subscribe((i=>{i||this.services.UserManagerService.setThirdPartySyncUrls(t)}))):this.services.UserManagerService.setThirdPartySyncUrls(t))}le(){const t=B.$.getSessionClient(this.GLOBAL);t?this.ue=new _.Z(t,this.services.EventsStorageService,this.externalAttributes._appSettings.sdkVersion):(0,r.n)({message:"OmidSessionClient not found.",level:r.D.CRITICAL})}de(t){const i=()=>new Promise(((i,e)=>{const s=this.pe();t.addCssStylesheetToHead(s,(()=>i()),(t=>e(t)))}));return(0,h.Up)((()=>i())).catch((t=>{throw(0,r.n)({message:"Loader_add_css_link",exception:t,level:r.D.INFO}),new Error(t)}))}Ci(t){return t.bandwidthLoggingState===s.ProtoBandwidthLoggingEnum.Enabled?V.Kp:t.bandwidthLoggingState===s.ProtoBandwidthLoggingEnum.SaaS?V.a8:void 0}setApiHostUrl(t){F.n.apiHostUrl=t}setInappPageUrl(t){(0,v.QM)(t)&&(this.pageUrl=t)}updateQueryParams(){this.queryParams=this.ce()}loadScriptTag(t,i){let e;if(this.externalAttributes=t,i&&(e=this.GLOBAL.document.getElementById(i)),!e)return(0,r.n)({message:"Loader_no_script_id",exception:`${t.playerId}`,level:r.D.WARN}),this.registerApiError(m.n9.SetupError,"Could not locate any script tag ids in the page"),!1;const s=(0,v.as)(t.settings.plugins.adobeAnalyticsSettings);return this.mi&&this.le(),this.Ki={parseDomain:s,playerId:t.playerId,tag:e},!0}insertRenderer(){try{this.Wi=new A.e(this.queryParams.cnxReloadTime),this.Ei();const t=()=>{try{this.Yi().then((t=>{const i=[];t.players.forEach(((e,s)=>{t.players[s].limitClientSideApiUse&&this.Mi();const n=this.$i(this.Ki,e).then((i=>{this.Hi(e,t.lineItems);const n=this.initUrlSuffixer(e),r=this.getPlayerModel(i,t,n,s.toString()),h=new T.m(r.global);return(0,E.u)(r.lineItemSettings.lineItems),this.bi[s]={playerModel:r,globalDomUtilsService:h,urlSuffixerService:n},this.de(h)})).catch((t=>{this.registerApiError(m.n9.SetupError,"rendering error"),(0,r.n)({message:"Loader_send_data_to_renderer",exception:t.message,callStack:t.stack,level:r.D.CRITICAL})}));i.push(n)})),Promise.all(i).then((()=>this.ie(t)))}))}catch(t){(0,r.n)({message:"Prerender_Loader_do_player_call",callStack:t.stack,exception:t.message,level:r.D.WARN},{throttle:1e3})}};this.ne=this.services.UserManagerService.registerPlsCall(t)}catch(t){(0,r.n)({message:"Prerender_Loader_insert_renderer",exception:t.message,callStack:t.stack,level:r.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,h.lU)((0,h.pE)(this.GLOBAL),this.GLOBAL)}catch(t){}if(!this.pageUrl||0===this.pageUrl.length)return e||(0,r.n)({message:"Prerender_Loader_find_page_url",level:r.D.INFO},{throttle:1e3}),new Promise((e=>{setTimeout((()=>{this.findPageUrl(t,i,!0).then((()=>e()))}),this.Si)}));try{return this.pageUrl=(0,d.sH)(this.pageUrl),Promise.resolve()}catch(t){return(0,r.n)({message:"Loader_find_page_url",exception:t.message,callStack:t.stack,level:r.D.CRITICAL}),Promise.reject()}}registerApiError(t=m.n9.SetupError,i=""){this.Ai.push({apiErrorObj:{type:t,message:i}})}registerApiSuccess(t){this.Ai.push({apiConfigObj:t})}destroy(){this.renderer&&this.renderer.destroy(),(0,R.i)(this.ki)}}},3810:(t,i,e)=>{"use strict";e.d(i,{e:()=>h});var s=e(8423),n=e(7726),r=e(9115);class h{constructor(t){this.RELOAD_TIME=r.ti,this.RELOAD_COOKIES="cnx_player_reload",this.SESSION_IN_VIEW_FLAG="_sessionWasViewed",this.fe={},this.ve={},this.ge={},this.Jt=(0,s.pE)(window).topFrame,this.me(t);try{this.ye()}catch(t){(0,n.n)({message:"PlayerReloader_cookie_fetch_failed",level:n.D.WARN,exception:t})}}wasPlayerReloaded(t){return!!this.fe[t]}addPlayerSession(t,i){this.ve[t]=i}getCookiePlayersSession(){return this.fe}addSessionInView(t){this.ve[t]+=this.SESSION_IN_VIEW_FLAG}getSessionInView(t){return this.ge[t]}me(t){setTimeout((()=>{this.be(),this.Jt.location.reload()}),t||this.RELOAD_TIME)}ye(){decodeURIComponent(this.Jt.document.cookie).split(";").forEach((t=>{const i=t.split("=");i[0].includes(this.RELOAD_COOKIES)&&(this.fe=JSON.parse(i[1]))})),this.xe(),this.Se()}xe(){Object.keys(this.fe).forEach((t=>{const i=this.fe[t].indexOf(this.SESSION_IN_VIEW_FLAG);i>-1&&(this.fe[t]=this.fe[t].substr(0,i),this.ge[t]=!0)}))}Se(){this.Jt.document.cookie=`${this.RELOAD_COOKIES}=; expires = Thu, 01 Jan 1970 00:00:00 GMT; path=/`}be(){Object.keys(this.ge).forEach((t=>{this.ve[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.Jt.document.cookie=`${this.RELOAD_COOKIES}=${JSON.stringify(this.ve)}; expires=${t.toUTCString()}; path=/`}}},7593:(t,i,e)=>{"use strict";e.d(i,{t:()=>o});var s=e(8423),n=e(7726),r=e(7427),h=e(158);class o{constructor(t,i){this._e=t,this.Ae=i,this.Pe=(t,i)=>new Promise(((e,s)=>{h.n.sendProtoRequest({ProtoResponse:this._e,endpoint:t,requestType:"GET",logError:!0,timeout:i}).then((t=>{e(t)})).catch((t=>{s(t)}))}))}fetchMetadata(t,i=5,e=!0,n){const h=t=>403===this.ke(t);return new Promise(((o,a)=>{(0,s.Up)((()=>this.Pe(t,n)),i,h).then((i=>{if((0,r.as)(i))return o(i);const e=new Error("invalid metadata");return this.Ie({url:t,metadata:i,e}),a(e)})).catch((i=>{e&&this.Ie({url:t,e:i}),a(i)}))}))}Ie(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.Ae}_${e}:${JSON.stringify(t)}`,callStack:t.e&&t.e.stack,level:n.D.CRITICAL})}ke(t){if(t&&t.message){const i=t.message.split("status:")[1];return i?parseInt(i.slice(0,3),10):null}return null}}},5880:(t,i,e)=>{"use strict";e.d(i,{_:()=>n});var s=e(3030);class n{constructor(){this.Te={}}subscribe(t,i,e){this.Te[t]||(this.Te[t]=[]),this.Te[t].push({context:i,func:e})}unsubscribe(t,i,e){this.Te[t]&&(this.Te[t]=this.Te[t].filter((t=>!(t.context===i&&(t.func===e||!e)))))}unsubscribeAll(t){Object.keys(this.Te).forEach((i=>{this.Te[i]=this.Te[i].filter((i=>i.context!==t))}))}publish(t,i,e={payload:void 0}){Object.prototype.hasOwnProperty.call(this.Te,i)&&this.Te[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)}))}}},1580:(t,i,e)=>{"use strict";e.d(i,{N:()=>p});var s,n=e(1561);class r{constructor(t){this.Ce=[],this.Me=t=>{this.Ce.push(t)},this.Ee=t.subscribe(this.Me)}get cachedEvents(){return this.Ce}destroy(){this.Ce=null,this.Ee()}}!function(t){t.AdobeAnalytics="AdobeAnalytics",t.MoatAnalytics="MoatAnalytics"}(s||(s={}));var h=e(7427),o=e(7726),a=e(3030),c=e(8423),l=e(6615),u=e(45),d=e(525);class p{constructor(t,i,e,s,n){this.Le=i,this.Oe=e,this.Re=s,this.Be=n,this.De=[],this.je=t=>{try{this.Fe(t);const i=this.De.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.Re.apiConfig.settings.plugins,{secondLevelDomain:h,playerId:o}=this.Re,a={cachedEvents:e,adobeAnalyticsSettings:s,moatAnalyticsSettings:n,_debugLogging:r,secondLevelDomain:h,playerId:o,pageName:this.$e,pageUrl:this.Ue,version:u.g.version,delegateHandlers:this.Oe,playerContainer:this.Be,playerWindow:window};t.getInstance().start(this.Le,a)}catch(t){(0,o.n)({callStack:t.stack,exception:t.message,level:o.D.CRITICAL,message:"PluginsHandler_initPlugin"})}};const r=(0,c.pE)(t);this.Ne=r.topFrame,this.Ue=(0,c.lU)(r,this.Ne),this.Ue=(0,l.sH)(this.Ue),this.$e=(0,l._Y)(this.Ue)}start(){this.He(),this.ze(),this.Ne.cnxPlugins.pluginsHandlers.push(this.je)}He(){let t=[];Array.isArray(this.Ne.cnxPlugins)&&this.Ne.cnxPlugins.length>0&&(t=this.Ne.cnxPlugins,t.forEach((t=>this.je(t)))),(0,h.as)(this.Ne.cnxPlugins)||this.We(t)}ze(){const t=this.Ge();(0,a.BZ)(t)&&this.Je(t)}Qe(t){const i=this.Ne.cnxPlugins.cachedPlugins;if((0,a.BZ)(i))return i.find((i=>i.type===t))}Fe(t){this.Qe(t.type)||this.Ne.cnxPlugins.cachedPlugins.push(t)}We(t){this.Ne.cnxPlugins={cachedPlugins:t,pluginsHandlers:[],push:function(t){this.pluginsHandlers.forEach((i=>{i(t)}))}}}Je(t){t.forEach((t=>{this.Qe(t)||this.De.push({name:t,started:!1,eventsCacheHandler:new r(this.Le)})})),this.De.forEach((({name:t})=>this.Xe(t)))}Ye(t){return Object.values(t).every((t=>(0,h.QM)(t)))}Ge(){const t=[];return this.Re.apiConfig.settings.plugins.adobeAnalyticsSettings&&this.Ye(this.Re.apiConfig.settings.plugins.adobeAnalyticsSettings)&&t.push(s.AdobeAnalytics),this.Re.moatTrackingEnabled&&t.push(s.MoatAnalytics),t}Xe(t){const i={id:`cnx-${t}`,src:""};switch(t){case s.AdobeAnalytics:i.src=d.n.endPoints.assets.plugins.adobeAnalytics;break;case s.MoatAnalytics:i.src=d.n.endPoints.assets.plugins.moatAnalytics}this.Ne.document.getElementById(i.id)||(0,n.dZ)(i,this.Ne.document.head,this.Ne,null,null,!0,"PluginsHandler_unable_to_insert_plugin_script")}}},5874:(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},3344:(t,i,e)=>{"use strict";e.d(i,{cv:()=>s,jI:()=>n,fi:()=>r,yA:()=>h,Ve:()=>o,sm:()=>a,qZ:()=>c,_f:()=>l,li:()=>u});const s="Connatix";var n,r,h,o,a,c,l,u;!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"}(h||(h={})),function(t){t.SessionStart="sessionStart",t.SessionError="sessionError",t.SessionFinish="sessionFinish"}(o||(o={})),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"}(l||(l={})),function(t){t.backgrounded="backgrounded",t.notFound="notFound"}(u||(u={}))},3217:(t,i,e)=>{"use strict";e.d(i,{Z:()=>u});var s,n,r=e(3344),h=e(3121),o=e(4959);!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.Ke(t);this.Ze&&this.Ze.name===i||this.mediator.publish(this,n.StateChanged,{payload:{state:i}}),this.Ze={dimensions:t,name:i},this.ts||i!==s.Normal||(this.ts=Object.assign({},this.Ze))}setPlayerState(t){this.Ze&&this.Ze.name===t||this.mediator.publish(this,n.StateChanged,{payload:{state:t}}),this.Ze={name:t},this.ts||t!==s.Normal||(this.ts=Object.assign({},this.Ze))}get currentState(){return this.Ze&&this.Ze.name}Ke(t){if(!this.ts)return s.Normal;const{width:i,height:e}=this.ts.dimensions,n=i*e,r=t.width*t.height;switch(!0){case nr:return s.Collapsed;default:return s.Normal}}}var c=e(5880),l=e(7726);class u extends c._{constructor(t,i,e){super(),this.es=t,this.Le=i,this.ss=new a(this),this.ns=!1,this.rs={[h.Z.AdError]:()=>this.hs(),[h.Z.PlayError]:()=>this.cs(),[h.Z.RenderError]:()=>this.ls(),[h.Z.AdImpression]:()=>this.us(),[h.Z.AdComplete]:()=>this.ds(),[h.Z.AdVideoStart]:({adVideoStartMetadata:t})=>this.ps(t),[h.Z.AdVideoFirstQuartile]:()=>this.vs(),[h.Z.AdVideoMidpoint]:()=>this.gs(),[h.Z.AdVideoThirdQuartile]:()=>this.ys(),[h.Z.AdVideoComplete]:()=>this.bs(),[h.Z.VolumeChange]:({volume:t})=>this.ws(t),[h.Z.AdPause]:()=>this.Ss(),[h.Z.AdPlay]:()=>this._s(),[h.Z.AdSkipped]:()=>this.As(),[h.Z.AdClickThru]:()=>this.Ps(),[h.Z.AdInteraction]:()=>this.ks(),[h.Z.AdLoaded]:({adLoadedMetadata:t})=>this.Is(t),[h.Z.AdStateChange]:({adStateChangedMetadata:t})=>this.Ts(t),[h.Z.PlayerResized]:({playerDimensionsMetadata:t})=>this.Cs(t),[h.Z.OnEnterFullscreen]:()=>this.Es(),[h.Z.PlayerCollapsed]:()=>this.Ls(),[h.Z.PlayerExpanded]:()=>this.Os(),[h.Z.Destroy]:()=>this.unsubscribeAll(this.ss)},this.Rs=t=>{try{const i=this.rs[t.name];if(!i)return;i(t.metadata)}catch(t){(0,l.n)({message:"SessionClientWrapper_omsdk__onEventStorageEvent",exception:t.message,callStack:t.callStack,level:l.D.WARN})}};try{const{AdSession:t,AdEvents:i,MediaEvents:s}=this.es,r=this.Bs(e);this.Ds=new t(r),this.js=new i(this.Ds),this.$s=new s(this.Ds),this.Le.subscribe(this.Rs),this.subscribe(n.StateChanged,this.ss,(({payload:{state:t}})=>{this.Vs(t)})),this.Us()}catch(t){(0,l.n)({message:"SessionClientWrapper_omsdk_classes_init_err",exception:t.message,callStack:t.callStack,level:l.D.WARN})}}hs(){this.Ds.error(r.jI.Video,h.Z.AdError)}cs(){this.Ds.error(r.jI.Video,h.Z.PlayError)}ls(){this.Ds.error(r.jI.Generic,h.Z.RenderError)}Bs(t){const{Partner:i,Context:e}=this.es;return new e(new i(r.cv,t))}us(){this.ns=!0,this.js.impressionOccurred();const t=this.ss.currentState;t!==s.Normal&&this.Vs(t)}ds(){this.ns=!1}ps(t){const{duration:i,mediaPlayerVolume:e}=t;this.$s.start(i,e)}vs(){this.$s.firstQuartile()}gs(){this.$s.midpoint()}ys(){this.$s.thirdQuartile()}bs(){this.$s.complete()}ws(t){this.ns&&this.$s.volumeChange(t)}Ss(){this.$s.pause()}_s(){this.$s.resume()}As(){this.$s.skipped()}Ps(){this.$s.adUserInteraction(r.fi.Click)}ks(){this.$s.adUserInteraction(r.fi.InvitationAccept)}Is(t){const{isSkippable:i,skipOffset:e,isAutoPlay:s}=t,{VastProperties:n}=this.es,r=new n(i,e,s,this.Ns);this.js.loaded(r)}Ts({state:t}){this.Ns=r.yA[o.I[t]]}Vs(t){t&&this.$s.playerStateChange(t)}zs(t){this.ss.computeState(t)}Ws(t){this.ss.setPlayerState(t)}Cs(t){this.zs(t)}Es(){this.Ws(s.Fullscreen)}Ls(){this.Ws(s.Minimized)}Os(){this.Ws(s.Normal)}Us(){this.Ds.registerSessionObserver((t=>{t.type===r.Ve.SessionStart?this.Gs(t):t.type===r.Ve.SessionError&&(0,l.n)({message:"SessionClientWrapper_omsdk_session_error",exception:t.type,callStack:JSON.stringify(t),level:l.D.WARN},{throttle:1,sendMaxLog:!1})}))}Gs(t){t.data.creativeType===r.qZ.DefinedByJavascript&&this.Ds.setCreativeType(r.qZ.Video),t.data.impressionType===r.sm.DefinedByJavascript&&this.Ds.setImpressionType(r.sm.BeginToRender)}}},7382:(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{String.prototype.cnx_replaceAll=function(t,i){return this.split(t).join(i)}},3640:(t,i,e)=>{"use strict";e.d(i,{u:()=>u,A:()=>d});var s=e(7593),n=e(289),r=e(525),h=e(7427),o=e(7726);const a=new s.t(n.ProtoAdDomainBlockingResponse,"AdDomainBlockingService");let c;const l=new Map;function u(t){c||(c=new Promise((i=>{const e=t.find((t=>t.blockedDomainsRevisionNumber));if(!e)return void i();const{publisherLineItemId:s,blockedDomainsRevisionNumber:n}=e,h=`${r.n.endPoints.base.lineItems}${s}/blockedDomains_${n}.bin`;a.fetchMetadata(h,2).then((t=>{l.set(s,t.domains),i()})).catch((()=>{(0,o.n)({message:"AdDomainBlockingService_fetchBlockedDomains_endpoint_unavailable",level:o.D.CRITICAL},{throttle:2,sendMaxLog:!1}),i()}))})))}function d(t,i){return new Promise((e=>{(0,h.QM)(i)?c.then((()=>{l.has(t)&&l.get(t).some((t=>i.includes(t)))?e(!0):e(!1)})):e(!1)}))}},525:(t,i,e)=>{"use strict";e.d(i,{n:()=>a});var s=e(6615),n=e(45),r=e(8423),h=e(7427);class o{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",logging:t.tracking+"e",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.Js(t.assets)}player.css`,playspace:`${this.Js(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/prebid6.7.0-1.js`}}}Js(t){return"development"===n.g.env?`//cd.${a.bundleDomain}/`:`${t}p/${n.g.version}/`}}class a{static set bundleDomain(t){this.Qs=t}static get bundleDomain(){if(!(0,h.QM)(this.Qs))throw new Error("bundleDomain missing");return this.Qs}static set apiHostUrl(t){this.Ys=t,a.Ks=a.Zs()}static tn(t){let i=`capi{{env}}.${t}`;return this.Ys&&(i=this.Ys),{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 Zs(){const t=(0,s.Ph)("cnxEnv",(0,r.pE)(window).topFrame.location.href);t&&(n.g.domainPrefix=`-${t}`);const i=this.tn(this.bundleDomain);return Object.keys(i).forEach((t=>{i[t]=i[t].replace("{{env}}",n.g.domainPrefix)})),new o(i)}static get endPoints(){return null===a.Ks&&(a.Ks=a.Zs()),a.Ks}}a.Ks=null},4959:(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}},3121:(t,i,e)=>{"use strict";e.d(i,{Z:()=>n});const s=e(9078).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"})},649:(t,i,e)=>{"use strict";e.d(i,{m:()=>c});var s=e(8423),n=e(1561),r=e(525),h=e(3030),o=e(7726),a=e(7427);class c{constructor(t){this.createElement=(t,i=this.Ne)=>i.document.createElement(t),this.Ne=t,this.addPreconnect()}get global(){return this.Ne}addCssString(t,i=""){return(0,n.uc)(t,i,this.Ne)}addPreconnect(){(0,n.tp)(r.n.endPoints.base.video,this.Ne),(0,n.tp)(r.n.endPoints.base.core,this.Ne),(0,n.tp)(r.n.endPoints.base.image,this.Ne)}getLineHeightPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("line-height")}getFontSizePropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("font-size")}getFontWeightPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("font-weight")}getTransformPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("transform")}getPaddingTopPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("padding-top")}getPaddingBottomPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("padding-bottom")}getMarginTopPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("margin-top")}getMarginBottomPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("margin-bottom")}getMarginLeftPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("margin-left")}getMarginRightPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("margin-right")}createElementByString(t,i=this.Ne){return(0,n.G$)(t,i)}createDocumentFragment(t=this.Ne){return t.document.createDocumentFragment()}isHttpsProtocolUsed(){return(0,n.eA)(this.Ne)}isURLSameDomainToTop(t){return(0,n.uh)(t,this.Ne)}isDetachedFromDOM(t){let i=t;for(;i.parentNode;)if(i=i.parentNode,i===this.Ne.document.body)return!1;return!0}querySelector(t,i=this.Ne){let e;try{e=i.document.querySelector(t)}catch(t){}return e}addCssStylesheetToHead(t,i,e){const s=this.Ne.document;s.getElementById(t.id)?(0,a.mf)(i)&&i():(0,n.NS)(t,s.head,this.Ne,i,e)}getFullscreenKeys(t){return(0,n.S0)(t||this.Ne.document)}exitFullscreen(t,i){(i||this.Ne.document)[t]()}getDocumentProperty(t){return this.Ne.document[t]}addEventListenerOnGlobal(t,i,e,s=!1){(e?this.Ne.document:this.Ne).addEventListener(t,i,s)}removeEventListenerOnGlobal(t,i,e,s=!1){(e?this.Ne.document:this.Ne).removeEventListener(t,i,s)}trackWithImages(t,i){(0,s.Hh)(t,this.Ne,i)}getElementCoordinates(t){let{top:i,left:e}=t.getBoundingClientRect();const{width:s,height:n}=t.getBoundingClientRect();return i+=this.Ne.pageYOffset,e+=this.Ne.pageXOffset,{clientX:e,clientY:i,width:s,height:n}}requestAnimationFrameHelper(t){return(0,n.PM)(this.Ne,t)}cancelRequestAnimationFrame(t){return(0,n.h_)(this.Ne,t)}getGlobalLocationProperties(){const t=this.Ne.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.Ne.open(t,i)}getComputedTranslateX(t){let i=0;const e=(0,n.Dx)(t,this.Ne).getPropertyValue("transform").match(/^matrix\((.+)\)$/);return(0,h.BZ)(e)&&(i=parseFloat(e[1].split(", ")[4])),i}getBodyDimensions(){try{const t=(0,s.pE)(this.Ne).topFrame.document.body;let{offsetWidth:i,offsetHeight:e}=t;const r=(0,n.Dx)(t,this.Ne);return i+=parseInt(r.marginLeft,10)+parseInt(r.marginRight,10),e+=parseInt(r.marginTop,10)+parseInt(r.marginBottom,10),{width:i,height:e}}catch(t){return(0,o.n)({message:"DomUtils_error_getting_body_dimensions",exception:t.message,callStack:t.stack,level:o.D.CRITICAL}),{width:0,height:0}}}getViewportWidth(){return(0,s.pE)(this.Ne).topFrame.document.body.clientWidth}getViewportHeight(){return(0,s.pE)(this.Ne).topFrame.innerHeight}getGlobalClosestTop(){return(0,s.pE)(this.Ne)}stripHtmlTags(t){return(0,n.ju)(t,this.Ne)}getComputedStyle(t,i){return(0,n.Dx)(t,this.Ne,i)}getElementById(t){return(0,n.rI)(t,this.Ne)}getElementsByClassName(t){return(0,n.Fs)(t,this.Ne)}insertScript(t,i,e){this.Ne.document.getElementById(t.id)?(0,a.mf)(i)&&i():(0,n.dZ)(t,this.Ne.document.head,this.Ne,i,null,!0,e)}destroy(){}}},4974:(t,i,e)=>{"use strict";e.d(i,{k:()=>d});var s=e(7593),n=e(289),r=e(525),h=e(7726),o=e(5732),a=e(8423),c=e(7427),l=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(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(h,o)}a((s=s.apply(t,i||[])).next())}))};const u={insights:[],sentimentAnalysis:void 0};class d{static loadInsights(t){const{id:i}=t;let e=d.insightsPromiseStore.get(i);return e||(e=new Promise((i=>{const e=d.requestUrlBuilder(t);d.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,h.n)({message:"LoadInsightIndexesService_endpoint_unavailable",exception:e,callStack:`${t}`,level:h.D.WARN},{sendMaxLog:!1}),i(u)}))})),d.insightsPromiseStore.set(i,e)),e}static loadPageInsights(t){return l(this,void 0,void 0,(function*(){const i=yield d.loadInsights(t);return d.pageInsights={insights:i.insights},d.pageInsights}))}static requestUrlBuilder({insightsInputType:t,id:i,versionId:e}){return t===o.i.Page||(0,c.$K)(e)||(0,h.n)({message:"LoadInsightIndexesService_requestUrlBuilder_noVersionIdProvided",exception:`Type: ${t}, id: ${i}`,level:h.D.CRITICAL}),t===o.i.Page?`${r.n.endPoints.base.insights}${i}/insights.bin`:`${r.n.endPoints.base.insights}${i}/${e}/insights.bin`}static markAsUnavailable(t){d.insightsPromiseStore.get(t)||d.insightsPromiseStore.set(t,Promise.resolve(u))}}d.mediaMetadataHandler=new s.t(n.ProtoInsightsResponse,"InsightsLoaderService"),d.insightsPromiseStore=new Map},5732:(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={}))},5256:(t,i,e)=>{"use strict";var s,n,r,h;e.d(i,{qs:()=>s,HT:()=>n,WR:()=>r,Av:()=>h}),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"}(h||(h={}))},6284:(t,i,e)=>{"use strict";e.d(i,{k:()=>d});var s=e(2820),n=e(5874),r=e(5256),h=e(3030),o=e(1561);const a=0;function c(t){return t.button===a}var l=e(2231),u=e(7427);class d{constructor(t,i,e){this.en=t,this.Qt=i,this.mediator=null,this.nn=30,this.rn=250,this.hn=25,this.an=[],this.ln={},this.un=0,this.dn=0,this.pn=!0,this.vn=null,this.gn=!1,this.mn=!1,this.yn=!1,this.bn=!1,this.wn=0,this.xn=0,this.Sn=null,this._n=null,this.An=null,this.Pn=!0,this.kn=!1,this.In=t=>{this.Qt?(t.element.addEventListener("touchstart",this.Tn,{passive:!0}),t.element.addEventListener("touchmove",this.Cn,{passive:!0}),t.element.addEventListener("touchend",this.Mn),t.element.addEventListener("touchcancel",this.En),t.element.addEventListener("mouseup",this.Ln)):(t.element.addEventListener("mousedown",this.Rn),t.element.addEventListener("mouseup",this.Ln))},this.Bn=t=>{this.Qt?(t.element.removeEventListener("touchstart",this.Tn),t.element.removeEventListener("touchmove",this.Cn),t.element.removeEventListener("touchend",this.Mn),t.element.removeEventListener("touchcancel",this.En),t.element.removeEventListener("mouseup",this.Ln)):(t.element.removeEventListener("mousedown",this.Rn),t.element.removeEventListener("mouseup",this.Ln))},this.Tn=t=>{t.stopPropagation();const i=this.Dn(t);this.An=i,this.mn=!1,this.jn(i,r.WR.Hold)&&this.Fn(t);const e=this.$n(t);this.dn=e.eventX,this.un=e.eventY,this.Vn(t,i,r.HT.InteractionStart),this.pn=!0},this.Cn=t=>{t.stopPropagation();const i=this.Dn(t),e=this.$n(t);if(this.pn&&(Math.abs(e.deltaXFromStart)>this.hn||Math.abs(e.deltaYFromStart)>this.hn)&&(this.pn=!1),this.gn||this.jn(i,r.WR.Swipe)){if(null===this.Sn&&this.Un(i,e),this.Sn===r.qs.Y)return;null===this._n&&(this._n=(0,o.PM)(this.en,(()=>{this._n=null,this.Hn(e.deltaXFromStart),i.mediator.publish(i.context,n.Z[n.Z.SwipeMove],{payload:e.deltaXFromStart})})))}},this.Mn=t=>{const i=this.Dn(t);if(this.kn=!1,this.An===i){const e=this.$n(t);t.cancelable&&this.jn(i,r.WR.Hold)&&Math.abs(e.deltaXFromStart)=this.hn?this.Pn&&i.mediator.publish(i.context,n.Z[n.Z.Scroll]):!this.pn||this.yn||this.mn||(this.kn=!0)}this.An=null},this.En=t=>{const i=this.Dn(t);this.zn(t,i),this.An=null},this.Rn=t=>{if(!c(t))return void this.Wn(r.HT.InteractionStart,t);const i=this.Dn(t);this.An=i,t.stopPropagation(),t.preventDefault(),this.jn(i,r.WR.Hold)&&this.Fn(t),this.Vn(t,i,r.HT.InteractionStart)},this.Ln=t=>{const i=this.Dn(t);return this.kn?(i.mediator.publish(i.context,n.Z[n.Z.Click]),void(this.kn=!1)):c(t)&&this.An?(t.stopPropagation(),t.preventDefault(),this.Vn(t,this.An,r.HT.Interaction),this.Vn(t,this.An,r.HT.InteractionEnd),(this.gn||this.jn(i,r.WR.Hold))&&this.Gn(t),this.An===i&&(this.Vn(t,i,r.HT.Click),i.mediator.publish(i.context,n.Z[n.Z.Click])),void(this.An=null)):(this.Wn(r.HT.Interaction,t),void this.Wn(r.HT.InteractionEnd,t))},this.Jn=t=>{if(!c(t))return this.Wn(r.HT.Interaction,t),void this.Wn(r.HT.InteractionEnd,t);this.An=null},this.Qn=t=>{if(!c(t)||!this.An)return this.Wn(r.HT.Interaction,t),void this.Wn(r.HT.InteractionEnd,t);this.Vn(t,this.An,r.HT.Interaction),this.Vn(t,this.An,r.HT.InteractionEnd),(this.gn||this.jn(this.An,r.WR.Hold))&&this.Gn(t),this.An=null};const{leftTapSizeThreshold:s,holdTriggerDuration:h,scrollThreshold:a}=Object.assign({},e);this.nn=s||this.nn,this.rn=h||this.rn,this.hn=a||this.hn,this.en.document.addEventListener("mousedown",this.Jn),this.en.document.addEventListener("mouseup",this.Qn)}register(t,i,e,s={},n=[]){const r={element:t,mediator:i,context:e,callbacks:s||{},allowedSpecialInteractions:n,disabledSpecialInteractions:[]};this.an.push(r),this.In(r)}unregister(t){const i=this.an.find((i=>i.element===t));i&&(this.an=this.an.filter((i=>i.element!==t)),this.Bn(i))}unregisterAll(t){const i=this.an.filter((i=>i.mediator===t));i.forEach(this.Bn),this.an=(0,h.V7)(this.an,i)}addGlobalActions(t,i){Object.keys(Object.assign({},i)).forEach((e=>{this.ln[e]=this.ln[e]||[],this.ln[e].push({initiator:t,action:i[e]})}))}removeGlobalActions(t){Object.keys(this.ln).forEach((i=>{this.ln[i].some((i=>i.initiator===t))&&(this.ln[i]=this.ln[i].filter((i=>i.initiator!==t)))}))}disableSpecialInteractions(t){const i=this.Xn(t);i&&(i.disabledSpecialInteractions=(0,h.gX)(i.allowedSpecialInteractions))}enableSpecialInteractions(t){const i=this.Xn(t);i&&(i.disabledSpecialInteractions=[])}getNonInterruptibleInteractions(){return[n.Z.HoldStart,n.Z.HoldEnd,n.Z.SwipeMove,n.Z.SwipeEnd,n.Z.Scroll]}disableScrollEvent(){this.Pn=!1}enableScrollEvent(){this.Pn=!0}destroy(){clearTimeout(this.vn),this.an.forEach(this.Bn),this.en.document.removeEventListener("mousedown",this.Jn),this.en.document.removeEventListener("mouseup",this.Qn)}Yn(t){const i=this.Dn(t),e=i.element.getBoundingClientRect(),s=this.Kn(t),n=e.width,r=(0,l.dQ)(0,n,0,100,s);this.Zn(i,this.nn,r)}Zn(t,i,e){e{this.gn=!0,this.pn&&(this.yn=!0,i.mediator.publish(i.context,n.Z[n.Z.HoldStart]))}),this.rn)}Gn(t){clearTimeout(this.vn);const i=this.Dn(t);(0,o.IV)(i.element,s.Gj.OnHold),this.gn?(this.gn=!1,this.yn&&(this.yn=!1,i.mediator.publish(i.context,n.Z[n.Z.HoldEnd]))):(this.mn=!0,this.Yn(t))}zn(t,i,e){e=e||this.$n(t),t.stopPropagation(),this.Vn(t,i,r.HT.Interaction),this.Vn(t,i,r.HT.InteractionEnd),(this.gn||this.bn||this.pn&&this.jn(i,r.WR.Hold))&&this.Gn(t),(this.bn||this.jn(i,r.WR.Swipe))&&this.tr(i,e)}Un(t,i){this.Sn=this.qn(i),this.Sn===r.qs.X&&(this.bn=!0,this.gn||(clearTimeout(this.vn),this.vn=null,this.gn=!0,t.mediator.publish(t.context,n.Z[n.Z.HoldStart])))}tr(t,i){if(this.bn){const e=this.ir(i);t.mediator.publish(t.context,n.Z[n.Z.SwipeEnd],{payload:e})}(0,o.h_)(this.en,this._n),this._n=null,this.bn=!1,this.dn=null,this.un=null,this.Sn=null,this.wn=0,this.xn=0}Hn(t){this.xn=Math.abs(t.deltaYFromStart)?r.qs.X:r.qs.Y}ir(t){return t.deltaXFromStart-this.wn<0?r.Av.Left:r.Av.Right}$n(t){const i=t.changedTouches[0];return{deltaXFromStart:i.clientX-this.dn,deltaYFromStart:i.clientY-this.un,eventX:i.clientX,eventY:i.clientY}}Dn(t){return this.An||this.Xn(t.currentTarget)}Xn(t){return this.an.find((i=>i.element===t))}Kn(t){const i=this.Dn(t);if(this.Qt){return t.changedTouches[0].clientX-i.element.getBoundingClientRect().left}return t.offsetX}jn(t,i){return t.allowedSpecialInteractions.includes(i)&&!t.disabledSpecialInteractions.includes(i)}Vn(t,i,e){const s=i.callbacks[e];(0,u.mf)(s)&&s(t),this.Wn(e,t)}Wn(t,i){var e;null===(e=this.ln[t])||void 0===e||e.forEach((t=>{t.action(i)}))}}},6438:(t,i,e)=>{"use strict";e.d(i,{c:()=>u});var s,n,r=e(289),h=e(8423),o=e(1561),a=e(2157),c=e(7427),l=e(7726);!function(t){function i(t,i,n,r){const h=t[i];if(!(0,c.QM)(h))return;if(!e(h,r))return;const o=s(h,r);n.has(o)?t[i]=n.get(o):delete t[i]}function e(t,i){return 0===t.indexOf(i[0])&&t.indexOf(i[1],i[1].length)===t.length-i[0].length}function s(t,i){return t.substring(t.indexOf(i[0])+1,t.lastIndexOf(i[1]))}t.searchAndReplaceMacrosInJson=function t(e,s,n){const r=Object.keys(e),h=r.filter((t=>!(0,c.as)(e[t]))),o=r.filter((t=>(0,c.as)(e[t])));return h.forEach((t=>{i(e,t,s,n)})),o.forEach((i=>{t(e[i],s,n)})),e},t.replaceMacrosOnCurrentLevelIfNeeded=i,t.isMacroString=e,t.extractMacroPlaceholder=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.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 u{constructor(t,i,e,s,h,o,l){this.er=new Map,this.sr="[",this.nr="]",this.er.set(n.Autoplay,t.playbackMode===r.ProtoPlayerPlaybackModeEnum.Autoplay),this.er.set(n.UserAgent,navigator.userAgent),this.er.set(n.UserLong,i.lon),this.er.set(n.UserLat,i.lat),this.er.set(n.Ip,i.ip),this.rr(h),this.hr(o),this.ar(e),this.cr(),this.er.set(n.Domain,s),this.er.set(n.CnxSupplierId,a.kd),this.er.set(n.SessionId,t.sessionId),(0,c.QM)(l)&&this.er.set(n.AdxPublisherNetworkCode,`,${l}`)}rr(t){this.er.set(n.AppBundle,t.bundleID),this.er.set(n.AppName,t.appName),this.er.set(n.AppUrl,t.storeURL)}hr(t){this.er.set(n.SourceReferrer,t)}cr(){const t=(0,o.w6)()?1:0;this.er.set(n.DoNotTrack,t)}ar(t){this.er.set(n.PageUrl,t),this.er.set(n.Url,t),this.er.set(n.Publisher,t),this.er.set(n.Site,t),this.er.set(n.DescriptionUrl,t)}lr(){const t=(0,h.qs)();this.er.set(n.CashBuster,t),this.er.set(n.Random,t),this.er.set(n.Ctd,t)}ur(t){return t.split("?")[0]}dr(t){return t.split("?").slice(1).join("?")}pr(t,i){const e=this.ur(t),s=this.vr(this.dr(t),i);return`${e}${s?`?${s}`:""}`}vr(t,i,e=!1){let n=t;const r=n.split("&"),h=[this.sr,this.nr];try{r.forEach((t=>{const r=t.split("=");if(r[1])if(s.isMacroString(r[1],h))n=n.replace(r[1],this.gr(r[1].toLowerCase(),i,e));else if(decodeURIComponent(r[1]).split("=").length>1){const t=this.vr(decodeURIComponent(r[1]),i,!0);n=n.replace(r[1],encodeURIComponent(t))}}))}catch(i){throw(0,l.n)({message:"MacrosService_handleMacros",exception:i.message,callStack:t,level:l.D.CRITICAL},{throttle:1}),i}return n=this.yr(n,i),this.wr(n)}wr(t){return t.includes(this.sr)&&(t=t.cnx_replaceAll(this.sr,encodeURIComponent(this.sr))),t.includes(this.nr)&&(t=t.cnx_replaceAll(this.nr,encodeURIComponent(this.nr))),t}gr(t,i,e){let s,n=t;return i.forEach(((t,i)=>{for(;n.includes(this.sr+i.toLowerCase()+this.nr);)s=e?t:encodeURIComponent(t),n=n.replace(this.sr+i.toLowerCase()+this.nr,s)})),n}yr(t,i){const e=`${this.sr}${n.AdxPublisherNetworkCode}${this.nr}`;return t.includes(e)?i.has(n.AdxPublisherNetworkCode)?t.cnx_replaceAll(e,i.get(n.AdxPublisherNetworkCode)):t.cnx_replaceAll(e,""):t}setAdWidth(t){this.er.set(n.Width,Math.floor(t))}setAdHeight(t){this.er.set(n.Height,Math.floor(t))}setSubId(t){this.er.set(n.SubId,t)}setGDPR(t){this.er.set(n.Gdpr,t)}setUUID(t){this.er.set(n.Uuid,t)}setGDPRConsent(t){this.er.set(n.GdprConsent,t)}setConsent(t){this.er.set(n.Consent,t)}setVideoId(t){this.er.set(n.VideoId,t)}setVideoTime(t){this.er.set(n.VideoTime,Math.floor(t))}setVideoUrl(t){this.er.set(n.VideoUrl,t)}setVideoDescription(t){this.er.set(n.VideoDescription,t)}setVideoDuration(t){this.er.set(n.VideoDuration,t),this.er.set(n.ContentLength,t)}setVideoTitle(t){let i;this.er.set(n.VideoTitle,t),this.er.set(n.MediaTitle,t),t&&(i=t.split(" ").join(",")),this.er.set(n.VideoKeywords,i)}setAdPosition(t="midRoll"){this.er.set(n.AdPosition,t)}setupMacros(t){return this.lr(),this.pr(t,this.er)}replaceMacrosInJsonString(t){const i=[this.sr,this.nr],e=JSON.parse(t),n=s.searchAndReplaceMacrosInJson(e,this.er,i);return JSON.stringify(n)}addExtraMacros(t){const i=Object.values(n);Object.keys(t).filter((t=>!i.includes(t.toUpperCase()))).forEach((i=>{this.er.set(i,t[i])}))}getExtraMacros(){const t=Object.values(n),i={};return this.er.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.er.set(n.UsPrivacyString,i)}setUserId(t){this.er.set(n.FraudSensorUserId,t)}setPublisherId(t){this.er.set(n.PublisherId,t)}setFraudSensorMacros(t){this.er.set(n.FraudSensorDeviceType,t.deviceType),this.er.set(n.FraudSensorLookupId,t.lookupId),this.er.set(n.FraudSensorLookupResponseCode,t.lookupResponseCode),this.er.set(n.FraudSensorMediaType,t.mediaType),this.er.set(n.FraudSensorDeviceIdentifier,t.deviceIdentifier)}destroy(){}}},2356:(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.Sr=t,this._r=[],this.Ar(),this.Pr()}on(t){this._r.push(t),t(this.isDocumentVisible())}off(t){this._r=this._r.filter((i=>i!==t))}Ar(){void 0!==this.Sr.getDocumentProperty(s.hidden)?(this.kr=s.hidden,this.Ir=n.visibilitychange):void 0!==this.Sr.getDocumentProperty(s.msHidden)?(this.kr=s.msHidden,this.Ir=n.msvisibilitychange):void 0!==this.Sr.getDocumentProperty(s.webkitHidden)&&(this.kr=s.webkitHidden,this.Ir=n.webkitvisibilitychange)}Pr(){this.Sr.addEventListenerOnGlobal(this.Ir,(()=>{this._r.forEach((t=>{t(this.isDocumentVisible())}))}),!0,!1)}isDocumentVisible(){return!this.Sr.getDocumentProperty(this.kr)}}},7398:(t,i,e)=>{"use strict";e.d(i,{a:()=>q});var s,n=e(7726),r=e(1561),h=[],o="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)},l=function(t,i){this.inlineSize=t,this.blockSize=i,c(this)},u=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}(),d=function(t){return t instanceof SVGElement&&"getBBox"in t},p=function(t){if(d(t)){var i=t.getBBox(),e=i.width,s=i.height;return!e&&!s}var n=t,r=n.offsetWidth,h=n.offsetHeight;return!(r||h||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)},v="undefined"!=typeof window?window:{},g=new WeakMap,m=/auto|scroll/,y=/^tb|vertical/,b=/msie|trident/i.test(v.navigator&&v.navigator.userAgent),w=function(t){return parseFloat(t||"0")},x=function(t,i,e){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=!1),new l((e?i:t)||0,(e?t:i)||0)},S=c({devicePixelContentBoxSize:x(),borderBoxSize:x(),contentBoxSize:x(),contentRect:new u(0,0,0,0)}),_=function(t,i){if(void 0===i&&(i=!1),g.has(t)&&!i)return g.get(t);if(p(t))return g.set(t,S),S;var e=getComputedStyle(t),s=d(t)&&t.ownerSVGElement&&t.getBBox(),n=!b&&"border-box"===e.boxSizing,r=y.test(e.writingMode||""),h=!s&&m.test(e.overflowY||""),o=!s&&m.test(e.overflowX||""),a=s?0:w(e.paddingTop),l=s?0:w(e.paddingRight),f=s?0:w(e.paddingBottom),v=s?0:w(e.paddingLeft),_=s?0:w(e.borderTopWidth),A=s?0:w(e.borderRightWidth),P=s?0:w(e.borderBottomWidth),k=v+l,I=a+f,T=(s?0:w(e.borderLeftWidth))+A,C=_+P,M=o?t.offsetHeight-C-t.clientHeight:0,E=h?t.offsetWidth-T-t.clientWidth:0,L=n?k+T:0,O=n?I+C:0,R=s?s.width:w(e.width)-L-E,B=s?s.height:w(e.height)-O-M,D=R+k+E+T,j=B+I+M+C,F=c({devicePixelContentBoxSize:x(Math.round(R*devicePixelRatio),Math.round(B*devicePixelRatio),r),borderBoxSize:x(D,j,r),contentBoxSize:x(R,B,r),contentRect:new u(v,a,R,B)});return g.set(t,F),F},A=function(t,i,e){var n=_(t,e),r=n.borderBoxSize,h=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(i){case s.DEVICE_PIXEL_CONTENT_BOX:return o;case s.BORDER_BOX:return r;default:return h}},P=function(t){var i=_(t);this.target=t,this.contentRect=i.contentRect,this.borderBoxSize=c([i.borderBoxSize]),this.contentBoxSize=c([i.contentBoxSize]),this.devicePixelContentBoxSize=c([i.devicePixelContentBoxSize])},k=function(t){if(p(t))return 1/0;for(var i=0,e=t.parentNode;e;)i+=1,e=e.parentNode;return i},I=function(){var t=1/0,i=[];h.forEach((function(e){if(0!==e.activeTargets.length){var s=[];e.activeTargets.forEach((function(i){var e=new P(i.target),n=k(i.target);s.push(e),i.lastReportedSize=A(i.target,i.observedBox),nt?i.activeTargets.push(e):i.skippedTargets.push(e))}))}))},C=function(){var t,i=0;for(T(i);h.some((function(t){return t.activeTargets.length>0}));)i=I(),T(i);return h.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:o}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=o),window.dispatchEvent(t)),i>0},M=[],E=function(t){if(!a){var i=0,e=document.createTextNode("");new MutationObserver((function(){return M.splice(0).forEach((function(t){return t()}))})).observe(e,{characterData:!0}),a=function(){e.textContent=""+(i?i--:i++)}}M.push(t),a()},L=0,O={attributes:!0,characterData:!0,childList:!0,subtree:!0},R=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],B=function(t){return void 0===t&&(t=0),Date.now()+t},D=!1,j=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=B(t);e=function(){var e=!1;try{e=C()}finally{if(D=!1,t=s-B(),!L)return;e?i.run(1e3):t>0?i.run(t):i.start()}},E((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,O)};document.body?i():v.addEventListener("DOMContentLoaded",i)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),R.forEach((function(i){return v.addEventListener(i,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),R.forEach((function(i){return v.removeEventListener(i,t.listener,!0)})),this.stopped=!0)},t}()),F=function(t){!L&&t>0&&j.start(),!(L+=t)&&j.stop()},$=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=A(this.target,this.observedBox,!0);return t=this.target,d(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}(),V=function(t,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=i},U=new WeakMap,N=function(t,i){for(var e=0;e=0&&(n&&h.splice(h.indexOf(e),1),e.observationTargets.splice(s,1),F(-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}(),z=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.");H.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");H.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");H.unobserve(this,t)},t.prototype.disconnect=function(){H.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();class q{constructor(t){this.Tr=[],this.Cr=(t,i)=>{t.forEach((t=>{this.Mr(t.target).forEach((t=>{t&&((0,r.Tp)(t.element),t.callback(t.element))}))}))};try{const i=t.ResizeObserver||z;this.Er=new i(this.Cr)}catch(t){(0,n.n)({message:"ResizeObserver_constructor",callStack:t.stack,exception:t.message,level:n.D.CRITICAL})}}on(t,i){this.Lr(t,i)||(this.Tr.push({element:t,callback:i}),this.Er.observe(t))}off(t,i){const e=this.Lr(t,i);if(!e)return;this.Er.unobserve(e.element);const s=this.Tr.indexOf(e);s>=0&&this.Tr.splice(s,1)}destroy(){if(this.Tr)for(;this.Tr.length>0;)this.Tr.pop();this.Er.disconnect()}Mr(t){return this.Tr.filter((i=>i.element===t))}Lr(t,i){return this.Tr.find((e=>e.element===t&&e.callback===i))}}},3352:(t,i,e)=>{"use strict";e.d(i,{G:()=>s});class s{setNewMedia(){}updateMediaMetadata(){}setMediaStart(){}setContentStart(){}setSessionPlayback(){}setSessionViewability(){}trackSessionRendered(){}trackSessionViewability(){}trackMediaQuartile(){}trackMediaClick(){}setAdStart(){}startBidTrackingInterval(){}addPrebid(){}addPostBid(){}addBid(){}trackAuctionInfoForBid(){}trackVideoAdImpression(){}trackVideoAdImpressionViewable(){}trackVideoAdQuartile(){}trackAdClick(){}trackAdOpportunity(){}trackSessionAdBlocker(){}getMetadataModel(){}getPlayerSize(){return{playerWidth:0,playerHeight:0}}updateMetadataModel(){}updatePlayerDimensions(t,i){}setIsConsentPayload(){}destroy(){}publish(){}setImplementationTypeOnMeta(){}trackHeavyAdIntervention(){}}},9446:(t,i,e)=>{"use strict";e.d(i,{e:()=>b});var s=e(158),n=e(289),r=e(45),h=e(525),o=e(5880),a=e(7427),c=e(1730),l=e(7577),u=e(8423),d=e(3030),p=e(497),f=(e(7417),e(6716)),v=e(4974),g=e(1886),m=e(9115);class y{constructor(){this.Or=null,this.Rr=0}Br(){if(null===this.Or)return;const t=(new Date).getTime();this.Rr=t-this.Or}startCountingTime(){this.Or=(new Date).getTime()}stopCountingTime(){this.Br(),this.Or=null}fetchTime(t){this.Br();const i=Math.round(this.Rr/m.s_);return this.Rr=0,null!==this.Or&&this.startCountingTime(),i>t?t:i}}class b extends o._{constructor({userId:t,playerId:i,geoLocation:e,browser:s,sessionId:n,pageUrl:h,bundleId:o,Dr:a,userManagerService:l,customParam1:p,customParam2:v,customParam3:g,customParam4:m,customParam5:b,abTestId:w,explorationMode:x,bundleAbId:S,bundlePart:_}){super(),this.hasGdprConsentPayload=!1,this.jr={},this.Fr={},this.$r=!1,this.Vr=!1,this.Ur=!1,this.Nr=!1,this.Hr=[],this.zr=[],this.qr=[],this.Wr=5e3,this.Gr=!1,this.Jr=[{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}],this.Qr=0,this.Xr=0,this.Yr=0,this.Kr=new f.x,this.th=new f.x,this.ih=new f.x;(0,d.d3)(i,[])?this.jr.trackAllRequests=!0:this.jr.trackAllRequests=1===(0,u.Vm)([99,1]),this.eh=l,this.jr.userId=t,this.jr.playerId=i,this.jr.geo=e,this.jr.browser=s,this.jr.version=r.g.version,this.jr.sessionId=n,this.jr.clientAb0=c.e.clientAb0,this.jr.clientAb1=c.e.clientAb1,this.jr.serverAb0=c.e.serverAb0,this.jr.serverAb1=c.e.serverAb1,this.jr.pageUrl=h,this.jr.bundleId=o,this.jr.customParam1=p,this.jr.customParam2=v,this.jr.customParam3=g,this.jr.customParam4=m,this.jr.customParam5=b,this.jr.bundleAbId=S,this.jr.bundlePart=_,this.jr.abTestId=w,this.sh=new y,this.nh=new y,this.rh=x}hh(t,i=n.ProtoTrackingRequest,e,r=!0){return this.jr.pageInFocus=p.S.pageFocus,s.n.sendProtoBeaconRequest({endpoint:t,ProtoRequest:i,requestData:Object.assign({trackingRequestMeta:r?this.jr:void 0},e),logError:!1})}oh(t,i=n.ProtoTrackingRequest,e){this.jr.pageInFocus=p.S.pageFocus;const h=s.n.sendProtoRequest({endpoint:t,ProtoRequest:i,ProtoResponse:n.ProtoTrackingResponse,requestData:Object.assign({trackingRequestMeta:this.jr},e),queryParams:Object.assign({[l.Fk]:r.g.version},g.f.getCidKeyValueObject()),withCredentials:!0,logError:!0});return h.then((t=>{var i;const s=t.platformCappedLineItemIdList;(0,d.BZ)(s)&&this.Kr.next(s);const{impressionRevenue:n,adServerLineItemName:r}=t;if((0,a.r)(n)&&(0,a.QM)(r)&&this.th.next({impressionRevenue:n,adServerLineItemName:r}),(0,a.$K)(t.viewability)){const s=null===(i=e)||void 0===i?void 0:i.advertiserLineItemId;this.ih.next([s,t.viewability])}})).catch((t=>{})),h}ah(t,i,e=n.ProtoMediaTrackingRequest){const s=Object.assign({},i);(0,a.QM)(this.Fr.mediaId)&&(s.mediaGuid=this.Fr.mediaId),this.oh(t,e,s)}lh(){var t;this.Gr||(this.Gr=!0,this.oh(h.n.endPoints.tracking.playerStart,n.ProtoPlayerStartRequest,{pageInsightIndexes:null===(t=v.k.pageInsights)||void 0===t?void 0:t.insights}))}dh(t,i,e=n.ProtoMediaTrackingRequest){var s;return this.oh(t,e,Object.assign({mediaGuid:this.Fr.mediaId,insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,pageInsightIndexes:null===(s=v.k.pageInsights)||void 0===s?void 0:s.insights},i))}ph(t){this.ah(h.n.endPoints.tracking.media_quartile,{baseMeta:this.Fr,mediaId:this.Fr.mediaId,insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,quartile:t})}fh(){this.gh(this.zr,this.Hr,this.qr),this.zr=[],this.Hr=[],this.qr=[]}gh(t,i,e){if(0===t.length&&0===i.length&&0===e.length)return;e.forEach((t=>{t.error&&t.error.length>0&&(t.error=t.error.substring(0,500))}));const s={mediaGuid:this.Fr.mediaId,prebids:t,bids:i,postBids:e,logEveryting:this.jr.trackAllRequests,hasGdprConsentPayload:this.hasGdprConsentPayload,gdprConsentMode:this.eh.gdprConsentMode,useExploration:this.rh};this.oh(h.n.endPoints.tracking.bids,n.ProtoBidTrackingsRequest,s)}mh(t){var i;this.oh(h.n.endPoints.tracking.ad_click,n.ProtoAdClickTrackingRequest,Object.assign({mediaGuid:this.Fr.mediaId,insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,pageInsightIndexes:null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights},t))}yh(t){this.hh(h.n.endPoints.tracking.heavy_ad_intervention,n.ProtoHeavyAdTrackingRequest,t)}bh(){const t=this.Jr[this.Qr];clearTimeout(this.wh),this.wh=setTimeout((()=>{this.xh(t.delay),(0,a.r)(t.timesRepeatDelay)&&t.timesRepeatDelay--,0===t.timesRepeatDelay&&this.Qr++,this.bh()}),1e3*t.delay)}xh(t){var i;this.oh(h.n.endPoints.tracking.session_time,n.ProtoSessionTimeTrackingRequest,{trackingRequestMeta:this.jr,sessionTime:t,timePlayed:this.sh.fetchTime(t),timePlayedInView:this.nh.fetchTime(t),pageInsightIndexes:null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights})}Sh(t){return t.playerWidth=this.Xr,t.playerHeight=this.Yr,t}get onLineItemPlatformCapped(){return this.Kr.asObservable()}get onLineItemViewabilityChange(){return this.ih.asObservable()}get onImpressionRevenue(){return this.th.asObservable()}setNewMedia(t){this.Fr=t}updateMediaMetadata(t){this.Fr=t}setImplementationTypeOnMeta(t){this.jr.implementationType=t}setMediaStart(){this.ph(n.ProtoQuartilesEnum.Start)}setContentStart(){this.lh()}setSessionPlayback(t){this.Ur!==t&&(this.Ur=t,this.Nr&&this.Ur&&this.nh.startCountingTime(),this.Ur?this.sh.startCountingTime():(this.sh.stopCountingTime(),this.nh.stopCountingTime()))}setSessionViewability(t){this.Nr!==t&&(this.Nr=t,this.Nr&&this.Ur?this.nh.startCountingTime():this.Nr||this.nh.stopCountingTime())}trackSessionRendered(t){var i;if(this.$r)return;this.oh(h.n.endPoints.tracking.session_rendered,n.ProtoTrackingRequest,{playerHeight:this.Yr,playerWidth:this.Xr,hasAdBlocker:t,bundleName:"connatix.playspace.js",pageInsightIndexes:null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights}),this.$r=!0,this.bh()}trackSessionViewability(){var t;!this.Vr&&this.Gr&&(this.oh(h.n.endPoints.tracking.session_view,n.ProtoSessionViewRequest,{pageInsightIndexes:null===(t=v.k.pageInsights)||void 0===t?void 0:t.insights}),this.Vr=!0)}trackMediaQuartile(t){this.ph(t)}trackMediaClick(t=n.ProtoMediaClickTypeEnum.Click){const i={type:t,clickUrl:t===n.ProtoMediaClickTypeEnum.UrlClick?this.Fr.clickUrl:void 0,insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,slideTitle:this.Fr.slideTitle,slideNumber:this.Fr.slideNumber,slideMediaType:this.Fr.slideMediaType};this.ah(h.n.endPoints.tracking.media_click,i,n.ProtoMediaClickTrackingRequest)}setAdStart(){this.lh()}startBidTrackingInterval(){this._h=setInterval((()=>{this.fh()}),this.Wr)}addPrebid(t){t=this.Sh(t),this.zr.push(t)}addPostBid(t){t=this.Sh(t),(0,a.HD)(t.error)||(t.error=JSON.stringify(t.error)),this.qr.push(t)}addBid(t){t=this.Sh(t),this.Hr.push(t)}trackAuctionInfoForBid(t){this.oh(h.n.endPoints.tracking.auctionInformation,n.ProtoAuctionInfoRequest,t)}trackVideoAdImpression(t){return t=this.Sh(t),this.dh(h.n.endPoints.tracking.ad_impression,t,n.ProtoVideoAdImpressionRequest)}trackVideoAdImpressionViewable(t){return this.dh(h.n.endPoints.tracking.ad_impression_viewable,t,n.ProtoVideoAdImpressionViewableRequest)}trackVideoAdQuartile(t){var i;t=Object.assign(Object.assign({},t),{insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,pageInsightIndexes:null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights}),this.ah(h.n.endPoints.tracking.ad_quartile,t,n.ProtoVideoAdQuartilesRequest)}trackAdClick(t){this.mh(t)}trackAdOpportunity(t){var i;const{sessionId:e}=this.jr;t.sessionId=e,t.pageInsightIndexes=null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights,this.oh(h.n.endPoints.tracking.adOpportunity,n.ProtoAdOpportunityRequest,t)}trackSessionAdBlocker(t){this.oh(h.n.endPoints.tracking.sessionAdBlocker,n.ProtoSessionAdBlockerRequest,{trackingRequestMeta:this.jr,adBlockDetectionType:t})}getMetadataModel(){return this.jr}getPlayerSize(){return{playerWidth:this.Xr,playerHeight:this.Yr}}updateMetadataModel(t){this.jr=Object.assign(Object.assign({},this.jr),t)}updatePlayerDimensions(t,i){this.Xr=t,this.Yr=i}trackHeavyAdIntervention(t){this.yh(t)}destroy(){clearInterval(this.wh),clearInterval(this._h)}}},2645:(t,i,e)=>{"use strict";e.d(i,{f:()=>h});var s=e(3030),n=e(6615),r=e(7427);class h{constructor(){this.Ah={},this.kh={domain:"",urlParams:[]},this.ignoredDomains=[]}setQueryParams(t){this.Ah=t}setUrlParams(t){this.kh=t}appendParamsToUrl(t){return this.isIgnoredDomain(t)?t:this.Ih(t)}appendQueryParamsToUrl(t){return this.isIgnoredDomain(t)?t:this.Th(t,Object.keys(this.Ah).map((t=>({paramName:t,paramValue:this.Ah[t]}))))}Ih(t){if(!(0,s.BZ)(Object.keys(this.kh))||!(0,s.BZ)(this.kh.urlParams)||!t.includes(this.kh.domain))return t;const i=this.kh.urlParams.reduce(((t,i)=>`${t}${i}`),"");return t.replace(this.kh.domain,this.kh.domain+"/"+i)}Th(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))}}},9207:(t,i,e)=>{"use strict";var s;e.d(i,{Q:()=>s}),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={}))},7272:(t,i,e)=>{"use strict";e.d(i,{k:()=>K,x:()=>it});var s,n=e(8423);!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 h=e(158),o=e(289),a=e(525),c=e(7427),l=e(7577),u=e(45);class d{constructor(t){this.Ch=t,this.Mh=!0,this.Eh="",this.Lh=!1,this.Oh=[]}static getInstance(t){const i=(0,n.pE)(t).topFrame;return i.cnx_usr_storage||(i.cnx_usr_storage=new d(i)),i.cnx_usr_storage}get userId(){if((0,c.QM)(this.Rh))return this.Rh.split("_")[0]}set userId(t){this.Rh=t}get isCcpaApplicable(){return this.Mh}set isCcpaApplicable(t){this.Mh=t}get usPrivacyString(){return this.Eh}set usPrivacyString(t){this.Eh=t}get consentPayload(){return this.Bh}set consentPayload(t){this.Bh||(this.Bh=t)}getScope(){return this.Ch}syncDemandPartner(t){if(this.userId){const i={userId:this.userId,demandPartner:parseInt(t.demandPartner,10),demandPartnerUserId:t.demandPartnerUserId};h.n.sendProtoRequest({ProtoRequest:o.ProtoUserSyncRequest,endpoint:a.n.endPoints.api.syncUrls,requestData:i,queryParams:{[l.Fk]:u.g.version},logError:!0}).then((t=>{})).catch((t=>{}))}}registerPlsCall(t){return this.Lh?(this.Oh.push(t),()=>{}):this.userId?(t(),()=>{}):(this.Lh=!0,t(),()=>{this.Lh=!1,this.Oh.forEach((t=>t())),this.Oh=[]})}}var p,f,v=e(2324),g=e(7726),m=e(3030);!function(t){t.USER_ID="cnx_userId"}(p||(p={}));class y{constructor(t,i){this.Dh=t,this.Ne=i,this.jh={[p.USER_ID]:30},this.Fh=["Facebook App","Google App","Flipboard App","Instagram App","Pinterest App"],this.$h=!1}Vh({name:t,value:i}){t===p.USER_ID&&(this.Dh.userId=this.Nh(i))}zh(t){let i="";const e=this.jh[t.name];if(e){i=`; expires=${new Date((0,v.XF)(e)).toUTCString()}`}this.Ne.document.cookie=`${t.name}=${t.value}${i}; path=/`}qh(t,i){if(!(0,m.BZ)(t))return;const e={cookieList:t,secureMode:i?o.ProtoCookieSecureModeEnum.Unsecure:o.ProtoCookieSecureModeEnum.Auto,browserInfo:this.Wh};return h.n.sendProtoRequest({requestData:e,ProtoRequest:o.ProtoCookieSyncRequest,endpoint:a.n.endPoints.api.cookie,withCredentials:!0,queryParams:{[l.Fk]:u.g.version},logError:!1}).catch((t=>(0,g.n)({message:"UserCookieManager_setThirdPartyCookie",exception:t.message,callStack:t.callStack,level:g.D.CRITICAL})))}Nh(t){return t.split("_")[0]}Gh(t){try{const i=t+"=",e=decodeURIComponent(this.Ne.document.cookie).split(";");for(let t of e){for(;" "===t.charAt(0);)t=t.substring(1);if(t.includes(i))return this.Nh(t.substring(i.length,t.length))}}catch(t){}return""}getUserId(){return this.Dh.userId}syncFirstPartyCookie(t){const i={name:t,value:"",timestamp:(0,v.XF)(this.jh[t])};t===p.USER_ID&&(i.value=this.Dh.userId),(0,c.QM)(i.value)&&this.zh(i)}syncThirdPartyCookieList(t){const i=[p.USER_ID],e=[];i.forEach((t=>{t===p.USER_ID&&(0,c.QM)(this.Dh.userId)&&e.push({name:p.USER_ID,value:this.Dh.userId,timestamp:(0,v.XF)(this.jh[p.USER_ID])})})),this.qh(e,t)}setBrowserInfo(t,i){this.Wh=t,this.$h=this.Fh.includes(t.browserType),this.$h&&i&&this.syncThirdPartyCookieList(this.$h)}setUserInformation(t){t&&this.Vh({name:p.USER_ID,value:t.userId})}fetchCookies(){[p.USER_ID].map((t=>({name:t,value:this.Gh(t)}))).filter((({value:t})=>(0,c.QM)(t))).forEach((t=>this.Vh(t)))}get unsecuredCookieSync(){return this.$h}}!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 w{constructor(t,i){this.Qh=t,this.Yh=i,this.apiType=f.CmpApi,this.Kh={},this.Bh=null,this.Zh=t=>new Promise(((i,e)=>{try{const e="string"==typeof t.data?JSON.parse(t.data):t.data;if("object"==typeof e&&e.io)if(e.io.callId===this.eo){const t=e.io.returnValue&&e.io.returnValue.vendorConsents;this.so(t).then((()=>i(this.eo)))}else if(e.io.callId===this.no){const t=e.io.returnValue&&e.io.returnValue.consentData;this.ro(t).then((()=>i(this.no)))}}catch(t){e()}}))}isApiOnPage(){return null!==this.Qh||null!==this.Yh}bindToApi(){return null!==this.Qh?new Promise(((t,i)=>{this.ho(this.Qh).then((()=>t())).catch((t=>i(t)))})):null!==this.Yh?this.oo(this.Yh):Promise.reject()}isConsentForVendor(t){return!!this.Kh[t]}getConsentPayload(){return this.Bh}setInAppConsentData(t){this.so(t),this.ro(t.consentString)}hasIvtConsent(){return this.isConsentForVendor(s.Connatix)}isConsentForPurposes(t){return!0}oo(t){this.no=(0,n.qs)(),this.eo=(0,n.qs)();const i={};return new Promise((e=>{const s=t=>{this.Zh(t).then((t=>{i[t]=!0,i[this.no]&&i[this.eo]&&(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({ao:{command:n,parameter:null,callId:this.eo}},"*"),t.postMessage({ao:{command:r,parameter:null,callId:this.no}},"*")}))}ho(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.so(i).then((()=>s()))}}))})),r=new Promise((e=>{t[i](s,null,((t,i)=>{if(i){const{consentData:i}=t;this.ro(i).then((()=>e()))}}))}));return Promise.all([n,r])}return Promise.reject()}so(t){return(0,c.as)(t)?(this.Kh=t,Promise.resolve()):Promise.reject()}ro(t){return(0,c.HD)(t)?(this.Bh=t,Promise.resolve()):Promise.reject()}}var x=e(1561),S=e(8462),_=e(2381);const A=(t,i)=>{const e=b[i].windowPropertyName;return(0,x.uq)(t,e)},P=(t,i)=>{const e=b[i].framePropertyName;return(0,x.wl)(t,e)},k=(t,i)=>null!==A(t,i)||null!==P(t,i),I=t=>{const i=_.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=S.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{let s;try{s=i(t)}catch(t){}if((0,c.as)(s))return s;try{s=e(t)}catch(t){}return s},M=t=>{var i;return(0,c.QM)(null===(i=t)||void 0===i?void 0:i.tcString)},E=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,I,T)),(0,c.as)(e)?e:(0,c.QM)(t)?(e=C(t,T,I),(0,c.as)(e)?e:((0,g.n)({message:"UserManagerService_getDecodedConsentData",exception:"cmpEncodedString failed to decode",callStack:JSON.stringify({cmpEncodedString:t,tcfEncodedString:i}),level:g.D.CRITICAL}),null)):((0,g.n)({message:"UserManagerService_getDecodedConsentData",exception:"tcfEncodedString failed to decode",callStack:JSON.stringify({tcfEncodedString:i}),level:g.D.CRITICAL}),null)};class O{constructor(t,i){this.co=t,this.uo=i,this.apiType=f.TcfApi,this.po=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.fo&&s.fo.callId===this.vo){const t=s.fo.returnValue.tcString;this.so(t).then((()=>i(this.vo))).catch((t=>e()))}}catch(t){e()}}))}isApiOnPage(){return null!==this.co||null!==this.uo}bindToApi(){return null!==this.co?new Promise(((t,i)=>{this.ho(this.co).then((()=>t())).catch((t=>i(t)))})):null!==this.uo?this.oo(this.uo):Promise.reject()}isConsentForVendor(t){var i,e;return!!(null===(i=this.mo)||void 0===i?void 0:i.vendorConsents)&&!!(null===(e=this.mo)||void 0===e?void 0:e.vendorConsents[t])}getConsentPayload(){var t;return null===(t=this.mo)||void 0===t?void 0:t.tcString}setInAppConsentData(t){this.mo=Object.assign(Object.assign({},this.mo),t)}hasIvtConsent(){return!0}isConsentForPurposes(t){var i;return!!(null===(i=this.mo)||void 0===i?void 0:i.purposeConsents)&&t.every((t=>!!this.mo.purposeConsents[t]))}oo(t){this.vo=(0,n.qs)();const i={};return new Promise((e=>{const s=t=>{this.po(t).then((t=>{i[t]=!0,i[this.vo]&&(window.removeEventListener("message",s,!1),e())})).catch((t=>{}))};window.addEventListener("message",s,!1);const n=b[f.TcfApi].getVendorConsentDataMethodName;t.postMessage({yo:{command:n,parameter:null,callId:this.vo}},"*")}))}ho(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.co[i](e,2,((e,n)=>{if(n&&("useractioncomplete"===e.eventStatus||"tcloaded"===e.eventStatus)){const n=e.tcString;this.so(n).then((()=>t())),this.co[i](s,2,(()=>{}),e.listenerId)}}))})):Promise.reject()}so(t){const i=L({tcfEncodedString:t});return M(i)?(this.mo=i,Promise.resolve()):Promise.reject()}}var R=e(9207);const B=[R.Q.P1,R.Q.P2,R.Q.P4,R.Q.P7,R.Q.P8];class D{constructor(t,i,e={}){var s,n;this.bo=t,this.Ne=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}),h=this.wo(r);null!==h?(this.xo(h),(M(r)||E(r))&&this.So.setInAppConsentData(r)):(0,g.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:g.D.CRITICAL})}setPageUrl(t){this.Ue=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 h;if(!(0,c.QM)(r))return void(0,g.n)({level:g.D.INFO,message:"AMP_no_consent_string_provided",callStack:JSON.stringify(t),exception:this.Ue});if(n===s)return void(0,g.n)({message:"UserConsentApiManager_CCPA_encoded_string_from_amp_not_used",level:g.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL_${this.Ue}`},{throttle:2,sendMaxLog:!1});const o=L({tcfEncodedString:r,cmpEncodedString:r});M(o)?h=new O(null,null):E(o)&&(h=new w(null,null)),h?h?(this.So=h,this.So.setInAppConsentData(o)):(0,g.n)({message:"UserConsentApiManager_amp_userConsentApi_not_found",level:g.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL__${this.Ue}`},{sendMaxLog:!1,throttle:2}):(0,g.n)({message:"UserConsentApiManager_encoded_string_not_tcf_and_not_cmp",level:g.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL__${this.Ue}`},{throttle:2,sendMaxLog:!1})}isConsentRequired(){return this.bo}isConsent(t,i=[]){if(this.isConsentRequired()){return this.So.isConsentForVendor(t)&&this.So.isConsentForPurposes(i)}return!0}isConsentConnatix(){return this.isConsent(s.Connatix,B)}getConsentDataPayload(){return this.So.getConsentPayload()}bindToConsentApi(){return this.So.bindToApi()}isConsentApiOnPage(){return this.So.isApiOnPage()}hasIVTConsent(){return this.So.hasIvtConsent()}getConsentApiType(){return this.So.apiType}xo(t){const i=A(this.Ne,t),e=P(this.Ne,t);t===f.TcfApi?this.So=new O(i,e):this.So=new w(i,e)}wo(t){if(M(t))return f.TcfApi;if(E(t))return f.CmpApi;if(k(this.Ne,f.TcfApi))return f.TcfApi;return k(this.Ne,f.CmpApi)?f.CmpApi:f.TcfApi}}var j=e(6615);const F="PUBMATIC",$="predirect",V="UserThirdPartySyncManager_Pubmatic",U="CookieSync_syncScript_not_properly_loaded",N="CookieSync_param_not_parsed_properly",H=(t,i)=>{if(!window.PubMaticSync)return q(U,F),!1;const e=Number.parseInt(t,10);return(0,c.kE)(e)?!!(0,c.QM)(i)||(q(N,F,$),!1):(q(N,F,"p"),!1)},z=(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)},q=(t,i,e="")=>{(0,g.n)({message:t,callStack:i,exception:e,level:g.D.CRITICAL},{throttle:1,sendMaxLog:!1})};class W{constructor(t,i){this._o=t,this.bo=i,this.Ao=[]}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}Po(t,i){try{if(this.ko(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,x.dZ)({src:t.url},i.document.head,i,null,null,1===(0,n.Vm)([95,5]),"UserManager_unable_to_insert_sync_url_script");return!0}catch(t){return!1}}ko(t){switch(t.vendorId){case s.Rubicon:case s.Pubmatic:return!0;default:return!!t.url.includes("yellowblue.io")}}syncUrls(t,i){this.Ao.forEach((e=>{if(this._o.isConsent(e.vendorId)&&!e.synced){if(e.vendorId===s.Pubmatic)return void((t,i,e)=>new Promise(((s,n)=>{const r=(0,j.Ph)("p",t),h=(0,j.Ph)($,t);if(window.PubMaticSync){if(!H(r,h))return void n();z(r,h,i,e),s(!0)}else(0,x.dZ)({src:"//ads.pubmatic.com/AdServer/js/userSync.js"},window.document.head,window,(()=>{H(r,h)?(z(r,h,i,e),s(!0)):n()}),(()=>{n()}),!0,V)})))(e.url,this._o.isConsentRequired(),this._o.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),h.n.trackPixel(e.url),void(e.synced=!0);if(e.url.includes("sync.technoratimedia.com/services"))return h.n.trackPixel(e.url),void(e.synced=!0);if(e.url.includes("pixel.advertising.com")&&(e.url=e.url.replace("gdpr=","gdpr="+(this._o.isConsentRequired()?1:0)),e.url=e.url.replace("gdpr_consent=","gdpr_consent=0")),e.url=this.replaceuserIdMacros(e.url,t),this.bo){e.url=(0,j.Bp)(e.url,"gdpr","1");const t=this._o.getConsentDataPayload();e.url=(0,j.Bp)(e.url,"gdpr_consent",t)}this.Po(e,i)&&(e.synced=!0)}}))}setSyncUrls(t={}){return!(this.Ao.length>0)&&(this.Ao=[],Object.keys(t).forEach((i=>{this.Ao.push({vendorId:i,url:t[i],synced:!1})})),!0)}}var G=e(1995);const J={California:5332921},Q={US:6252001};var X;!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"}(X||(X={}));class Y{constructor(t,i){this.Dh=t,this.Io=1,this.To="__uspapi",this.Co="getUSPData",this.Mo={isPending:!0,isRejected:!1,isDelayed:!1,promise:new Promise((()=>{}))},this.Eo(i)}getUsPrivacyString(){if(this.Dh.usPrivacyString||this.Dh.isCcpaApplicable)return this.Dh.usPrivacyString}isCcpaApplicable(){return this.Dh.isCcpaApplicable}isSellUserAllowed(){return!this.Dh.isCcpaApplicable||this.Lo()}setGeoLocation(t){this.Oo=t,t.subdivisionId!==J.California&&(this.Dh.isCcpaApplicable=!1)}fetchUsPrivacyString(){return this.Ro()&&this.Bo(),this.isCcpaApplicable()?new Promise((t=>{this.getUsPrivacyString()?t():t(this.Do())})):Promise.resolve()}Do(){return this.Mo.promise=new Promise(((t,i)=>{const e=this.Dh.getScope()[this.To];e?(this.jo=!0,e(this.Co,this.Io,((e,s)=>{s?(this.Eo(e.uspString),t()):i()}))):i()})),this.makeQuerablePromise(this.Mo),this.Mo.promise}Lo(){return!this.Dh.usPrivacyString||(0,m.d3)(this.Dh.usPrivacyString,r)}Eo(t){this.Dh.usPrivacyString=t}Ro(){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,v.k$)(t,i)}Bo(){const{countryGeoId:t,subdivisionId:i}=this.Oo;t===Q.US&&(0,g.n)({message:"UserCcpaManager_logCCPA",level:g.D.INFO,callStack:JSON.stringify(i),exception:this.Dh.usPrivacyString})}ccpaInfoLogging(t){this.isCcpaApplicable()&&this.jo&&(this.Mo.isPending?((0,g.n)({message:X.CCPA_Pending,exception:"CCPA_Pending_At_Start_AdRequest",level:g.D.INFO,callStack:t}),this.Mo.isDelayed=!0,this.Fo=t):this.Mo.isRejected&&(0,g.n)({message:X.CCPA_Error,exception:"CCPA_Error_At_Start_AdRequest",level:g.D.INFO,callStack:t}))}makeQuerablePromise(t){t.promise.then((()=>{t.isPending=!1,t.isDelayed&&(0,g.n)({message:X.CCPA_Delayed_Success,exception:"CCPA_Success_After_Delay",level:g.D.INFO,callStack:this.Fo})})).catch((i=>{throw t.isRejected=!0,t.isPending=!1,t.isDelayed&&(0,g.n)({message:X.CCPA_Delayed_Failure,exception:"CCPA_Failed_After_Delay",level:g.D.INFO,callStack:this.Fo}),i}))}}var K,Z,tt=e(5348);!function(t){t.CCPA_INFO_RECEIVED="ccpaInfoReceived",t.CONSENT_DATA_UPDATE="consentDataUpdate"}(K||(K={})),function(t){t.SYNC_URLS_RECEIVED="thirdPartySyncUrlsReceived",t.USER_INFO_RECEIVED="userInfoReceived"}(Z||(Z={}));class it{constructor(t,i,e,s={}){this.vi=i,this.gi=e,this._appSettings=s,this.gdprConsentMode=o.ProtoGdprConsentModeEnum.Unknown,this.$o={},this.Vo="",this.Uo=!1,this.zo=()=>{!this._o.isConsentRequired()||this.vi?this.resolveEvent(K.CONSENT_DATA_UPDATE):(this.gdprConsentMode=this._o.isConsentApiOnPage()||this.gi?o.ProtoGdprConsentModeEnum.NoConsent:o.ProtoGdprConsentModeEnum.NoCmp,this._o.bindToConsentApi().then((()=>{this.isConsentConnatix()||(this.gdprConsentMode=o.ProtoGdprConsentModeEnum.NoConnatixConsent),this.resolveEvent(K.CONSENT_DATA_UPDATE)})).catch((t=>{})))},this.Wo=()=>{tt.$.getEnvelope(this.Jt,this._o)},this.Go=()=>{this.isConsentConnatix()&&(this.onEvent([Z.USER_INFO_RECEIVED]).then((()=>{this.Uo&&(this.Jo.syncThirdPartyCookieList(),this.Jo.unsecuredCookieSync&&this.Jo.syncThirdPartyCookieList(this.Jo.unsecuredCookieSync),this.Jo.syncFirstPartyCookie(p.USER_ID))})),this.onEvent([Z.SYNC_URLS_RECEIVED,K.CONSENT_DATA_UPDATE,K.CCPA_INFO_RECEIVED]).then((()=>{if(this.isConsentConnatix()&&this.Qo.isSellUserAllowed())try{this.Xo.syncUrls(this.Dh.userId,this.Dh.getScope())}catch(t){(0,g.n)({level:g.D.WARN,message:"UserManager_syncUrls",exception:t.message,callStack:t.stack})}})))};try{this.Jt=t,this.Dh=d.getInstance(t),this.vi||(this.Jo=new y(this.Dh,t));const{cmp:i,tcf:e}=this._appSettings;this._o=new D(!!this.Vo,t,{cmp:i,tcf:e}),this.Xo=new W(this._o,this.isGDPR()),this.Qo=new Y(this.Dh,this._appSettings.usPrivacyString),this.Yo()}catch(t){(0,g.n)({callStack:t.stack,exception:t.message,message:"UserManager_constructor",level:g.D.CRITICAL})}}get identityEnvelope(){return tt.$.getValidEnvelope()}Yo(){this.Jo&&this.Jo.fetchCookies(),this.zo(),this.onEvent([K.CONSENT_DATA_UPDATE]).then((()=>{this.Wo(),setTimeout((()=>{try{if(this.vi)return;this.Go()}catch(t){(0,g.n)({callStack:t.stack,exception:t.message,message:"UserManager_consent_data_received",level:g.D.CRITICAL})}}),0)}))}Ko(t){return void 0===this.$o[t]&&(this.$o[t]=new G.C,this.$o[t].promise.catch((()=>this.$o[t].reject()))),this.$o[t]}resolveEvent(t,i){this.Ko(t).resolve(i)}setAmpUserConsent(t){this._o.setAmpUserConsent(t),this.resolveEvent(K.CONSENT_DATA_UPDATE)}setPageUrl(t){this._o&&this._o.setPageUrl(t)}onEvent(t){const i=t.map((t=>this.Ko(t).promise));return Promise.all(i)}isConsent(t,i){return this._o.isConsent(t,i)}isConsentConnatix(){return this._o.isConsentConnatix()}ccpaInfoLogging(t){this.Qo.ccpaInfoLogging(t)}getConsentPayload(){return this._o.getConsentDataPayload()}isConsentRequired(){return this._o.isConsentRequired()}setThirdPartySyncUrls(t){this.vi||this.Xo.setSyncUrls(t)&&this.resolveEvent(Z.SYNC_URLS_RECEIVED)}setGeoLocation(t){this.Qo.setGeoLocation(t),this.Qo.fetchUsPrivacyString().then((()=>{this.resolveEvent(K.CCPA_INFO_RECEIVED)})).catch((()=>{this.resolveEvent(K.CCPA_INFO_RECEIVED)}))}getUserId(){if(this.isConsentConnatix()&&this.Jo)return this.Jo.getUserId()}Zo(){return this.Jo&&this.Jo.getUserId()}setUserInformation(t){this.Jo&&(this.Jo.setUserInformation(t),this.resolveEvent(Z.USER_INFO_RECEIVED),!this.vi&&this.isConsentConnatix()&&this.Jo.syncFirstPartyCookie(p.USER_ID))}isGDPR(){return!!this.Vo}getUsPrivacyString(){return this.Qo.getUsPrivacyString()}isCcpaApplicable(){return this.Qo.isCcpaApplicable()}isSellUserAllowed(){return this.vi||this.Qo.isSellUserAllowed()}getDeviceId(){if(this.isConsentConnatix())return this._appSettings.deviceID}ta(){return this._appSettings.deviceID}getTrackableUser(){return this.vi?this.getDeviceId():this.getUserId()}getForcedTrackableUser(){return this.vi?this.ta():this.Zo()}registerPlsCall(t){return this.isConsentConnatix()||(this.Uo=!0),this.Dh.registerPlsCall(t)}setBrowserInfo(t){this.Jo&&this.Jo.setBrowserInfo(t,this.isConsentConnatix())}getGdprConsentApiType(){return this._o.getConsentApiType()}}},3030:(t,i,e)=>{"use strict";e.d(i,{d3:()=>h,qo:()=>o,qy:()=>a,Sz:()=>c,ti:()=>l,BZ:()=>u,fn:()=>d,Gg:()=>p,V7:()=>f,tN:()=>v,gX:()=>g,sj:()=>m,ee:()=>y});var s=e(7427),n=e(7726),r=e(9065);e(8423);function h(t,i){return i.indexOf(t)>-1}function o(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 l(t){const i=[];for(const e in t)e&&parseInt(e,10)>=0&&i.push(t[e]);return i}function u(t){return t&&t.length>0}function d(t){return t.every((t=>(0,s.kE)(t)))}function p(t){let i="[";for(let e=0;e!i.includes(t)))}function v(t,i){return t.filter((t=>i.includes(t)))}function g(t){return t.filter(((i,e)=>t.indexOf(i)===e))}function m(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}},1561:(t,i,e)=>{"use strict";e.d(i,{MV:()=>d,Ho:()=>p,T7:()=>f,aQ:()=>v,bX:()=>g,NS:()=>m,dZ:()=>y,ML:()=>b,cn:()=>w,IV:()=>x,pv:()=>S,og:()=>_,L_:()=>A,rI:()=>P,Dx:()=>k,Fs:()=>I,uc:()=>T,tp:()=>C,G$:()=>M,Q1:()=>E,S0:()=>L,Tp:()=>O,PM:()=>R,h_:()=>B,nw:()=>j,fj:()=>F,LT:()=>$,jG:()=>V,IS:()=>U,Vt:()=>N,BE:()=>H,oG:()=>z,U6:()=>W,Ji:()=>G,GF:()=>J,SH:()=>Q,ju:()=>X,w6:()=>Y,uq:()=>K,wl:()=>Z,Wb:()=>tt,eA:()=>it,Nb:()=>et,sw:()=>st,uh:()=>nt,Kk:()=>rt,AX:()=>ht,UR:()=>ot,_w:()=>at,bZ:()=>ct});var s=e(2817),n=e(7427),r=e(3030),h=e(2820),o=e(8423),a=e(6615),c=e(7577),l=e(7726);function u(t,i){t&&(t.style.display=i?"":"none")}function d(t){u(t,!1)}function p(t){u(t,!0)}function f(t,i){for(const e in i)i.hasOwnProperty(e)&&(t.style[e]=i[e])}function v(t,...i){i.forEach((i=>{t.style[i]=""}))}function g(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function m(t,i,e,s,r){if(i)try{const h=e.document.createElement("link");return h.id=t.id,h.type="text/css",h.rel="stylesheet",h.href=t.src,(0,n.mf)(s)&&(h.onload=()=>{s()}),(0,n.mf)(r)&&(h.onerror=t=>{i.removeChild(h),(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,h)}`)}),i.appendChild(h),h}catch(t){return null}}function y(t,i,e,s,r,h=!0,o){try{const a=e.document.createElement("script");return a.src=t.src,a.async=!0,a.type="text/javascript",t.id&&(a.id=t.id),(0,n.mf)(s)&&(a.onload=()=>{s()}),a.onerror=e=>{i.removeChild(a),h&&(0,l.n)({message:o,exception:"script_load_error",callStack:t.src,level:l.D.INFO},{throttle:2,sendMaxLog:!1}),(0,n.mf)(r)&&r()},i.appendChild(a),a}catch(i){return h&&(0,l.n)({message:o,exception:`script_insert_error_${i.message}_${i.stack}`,callStack:t.src,level:l.D.CRITICAL},{throttle:2,sendMaxLog:!1}),(0,n.mf)(r)&&r(),null}}function b(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 x(t,...i){t&&t.classList.remove(...i)}function S(t,i){return t&&t.classList.contains(i)}function _(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 P=(t,i)=>i.document.getElementById(t),k=(t,i,e)=>i.getComputedStyle(t,e),I=(t,i)=>i.document.getElementsByClassName(t);function T(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 C(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 E(t,i){i>0?(t.removeAttribute("muted"),t.muted=!1):(t.setAttribute("muted",""),t.muted=!0)}function L(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 B(t,i){return(t.cancelAnimationFrame||t.webkitCancelAnimationFrame||function(t){return clearTimeout(t)})(i)}function D(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,$(e)):null}(t,i);return s?function(t,i){return t.getPropertyValue(i)}(s,e):null}function j(t){const i=D(["h1","h2"],t,"font-family");return i||"inherit"}function F(t){const i=D(["p"],t,"font-family");return i||"inherit"}function $(t){try{return t.ownerDocument.defaultView}catch(t){return null}}function V(t,i){t&&i&&(Array.isArray(t)?t.forEach((t=>i.appendChild(t))):i.appendChild(t))}function U(t,i,e){let s=!1;const n=(0,r.Sz)(i.children);for(let i=0;i{})){const e=function(s){"opacity"===s.propertyName&&(x(t,h.jG.FadeOutBase,h.jG.FadeOut),i(),t.removeEventListener("transitionend",e))};w(t,h.jG.FadeOutBase),q(t),O(t),t.addEventListener("transitionend",e),w(t,h.jG.FadeOut)}function G(t,i=(()=>{})){const e=function(s){"opacity"===s.propertyName&&(x(t,h.jG.FadeInBase,h.jG.FadeIn),i(),t.removeEventListener("transitionend",e))};w(t,h.jG.FadeInBase),q(t),O(t),t.addEventListener("transitionend",e),w(t,h.jG.FadeIn)}function J(t){const i=$(t);if(!i)return!0;const{display:e,opacity:s}=k(t,i);return"none"===e||"0"===s}function Q(t,i){return null===t.firstChild?t.appendChild(i):t.insertBefore(i,t.firstChild)}function X(t,i){const e=i.document.createElement("div");return e.innerHTML=t||"",e.innerText}function Y(){const t=window.navigator&&window.navigator.doNotTrack||window.doNotTrack;return"1"===t||"yes"===t}function K(t,i){const e=(0,o.pE)(t).topFrame;return e[i]?e:null}function Z(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 tt(t,i){let e=[];try{e=e.slice.call(i.document.querySelectorAll(t),0)}catch(t){}return e}function it(t){return(0,o.pE)(t).topFrame.location.protocol.includes("https")}function et(t){if(!it(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 st(t){return(0,o.pE)(t).topFrame.document.referrer}function nt(t,i){const e=(0,o.pE)(i).topFrame.location.hostname,s=(0,o.bx)(t);return s&&s.hostname===e}function rt(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 ht(t,i){try{t.onclick=t=>{const{tagName:e,className:s}=t.target;(0,l.n)({message:`${i} - click on tag:${e} class:${s}`,level:l.D.INFO})}}catch(t){(0,l.n)({message:`${i}_Error - iframe click`,level:l.D.WARN,callStack:t.stack})}}function ot(t){setTimeout((()=>{let i=t.currentTime+.01;i>t.duration&&(i=.01),t.currentTime=i}),0)}function at(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 ct(t,i){if(!i||"SCRIPT"!==i.tagName)return(0,l.n)({message:"Prerender_Elements_getgetCustomerId_no_currentScript",level:l.D.CRITICAL}),null;const e=i.src;return(0,a.Ph)(c.ym,e)}},8423:(t,i,e)=>{"use strict";e.d(i,{qs:()=>o,dz:()=>a,lU:()=>c,bx:()=>l,pE:()=>u,Hh:()=>d,Vm:()=>p,we:()=>f,ld:()=>v,Of:()=>g,Xf:()=>m,Up:()=>y,oC:()=>b,rM:()=>w});var s=e(6615),n=e(7427),r=e(9065),h=e(3030);function o(){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 a(){return o().replace(/-/g,"")}function c(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 l(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 u(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 d(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 o=i?`${i}[${s}]`:s,a=t[s];if((0,n.as)(a))e.push(`${encodeURIComponent(o)}=${(0,r.H)(a)}`);else if(Array.isArray(a))e.push(`${encodeURIComponent(o)}=${(0,h.Gg)(a)}`);else if(null!=a){const t=encodeURIComponent(a),i=encodeURIComponent(o);t&&i&&e.push(`${i}=${t}`)}})),e.join("&")}(e)}`)}))}function p(t){const i=Math.floor(100*Math.random());let e=0,s=0;for(let n=0;n{})),t=!i.paused,i.pause()}catch(t){}return t}function v(t,i=0,...e){return setTimeout((()=>{t.apply(this,e)}),i)}function g(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 m(t,i){try{const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);let s=parseInt(e[1],16),n=parseInt(e[2],16),r=parseInt(e[3],16);s/=255,n/=255,r/=255;const h=Math.max(s,n,r),o=Math.min(s,n,r);let a,c,l=(h+o)/2;if(h===o)a=c=0;else{const t=h-o;switch(c=l>.5?t/(2-h-o):t/(h+o),h){case s:a=(n-r)/t+(n{t().then(s).catch((h=>{1===i||(0,n.mf)(e)&&e(h)?r(h):y(t,i-1,e).then(s,r)}))}))}function b(){const t=!!window.MSInputMethodContext&&!!document.documentMode,i=navigator.userAgent.toLowerCase().includes("msie");return t||i}function w(t){return Object.keys(t).reduce(((i,e)=>Object.assign(Object.assign({},i),{[e]:`${t[e]}`})),{})}},6615:(t,i,e)=>{"use strict";e.d(i,{Ph:()=>r,Bp:()=>h,CK:()=>o,_Y:()=>a,sH:()=>l});var s=e(7427);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 h(t,i,e){const s=new RegExp(`([?&])${i}=.*?(&|$)`,"i"),n=o(t);return t.match(s)?e?t.replace(s,`$1${i}=${e}$2`):t.replace(s,"$1"):`${t}${n}${i}=${e}`}function o(t){return t.includes("?")?"&":"?"}function a(t){if((0,s.QM)(t))return t.includes("://")?t.split("/")[2]:t.split("/")[0]}function c(t,i){return`${"http"+(/(\/s\/)+/.test(t.replace(i,""))?"s":"")}://${i}`}function l(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 c(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 c(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 l(t=decodeURIComponent(i[1]),!1)}(t)),t}},7726:(t,i,e)=>{"use strict";e.d(i,{D:()=>c,n:()=>u});var s=e(45),n=e(497);var r=e(8423),h=e(158),o=e(525);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 l={throttle:30,sendMaxLog:!0,pacing:0};function u(t,i={}){if(!((i=Object.assign(Object.assign({},l),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)&&u({message:"Logging_max_log_overflow_1000",exception:t.message,callStack:t.callStack,level:c.CRITICAL,sessionId:n.S.sessionId},{sendMaxLog:!1,throttle:100}),n.S.isMaxLog(t.message,i.throttle))i.sendMaxLog&&!n.S.isMaxLogSent(t.message)&&(n.S.setMaxLogSent(t.message),u({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=o.n.bundleDomain}catch(t){}const n="https://pl."+e;t.ddsource="browser",t.service="player",i.sendBeacon?h.n.sendJsonBeaconRequest(t,n):h.n.fetchXhttpRequest({requestUrl:n,requestType:"POST",withCredentials:!1},JSON.stringify(t))}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)}}},2231:(t,i,e)=>{"use strict";e.d(i,{dQ:()=>n,DE:()=>r,aX:()=>h,Tc:()=>o,oK:()=>a,ON:()=>c,uc:()=>l,dO:()=>u});var s=e(7427);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 h(t,i){let e=t,s=i;for(;0!==e&&0!==s;)e>s?e%=s:s%=e;return 0===e?s:e}function o(t,i){return i/100*t}function a(t,i){const e=Math.pow(10,i);return Math.round(t*e)/e}function c(t){return!(0,s.r)(t.width)||!(0,s.r)(t.height)}function l(t){const i=[{value:1,symbol:""},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"}],e=/\.0+$|(\.[0-9]*[1-9])0+$/;let s;for(s=i.length-1;s>0&&!(t>=i[s].value);s--);return t/i[s].value1;e--)t%e==0&&i%e==0&&(t/=e,i/=e);return{widthRatio:t,heightRatio:i}}},9065:(t,i,e)=>{"use strict";e.d(i,{H:()=>s});e(8423);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('"',"")}},6243:(t,i,e)=>{"use strict";function s(t=[]){t.forEach((t=>t.unsubscribe()))}e.d(i,{i:()=>s})},8852:(t,i,e)=>{"use strict";e.d(i,{f5:()=>r,J5:()=>h,EQ:()=>o,k0:()=>a,V7:()=>c,Ft:()=>l,hF:()=>u,IS:()=>d});var s=e(7726),n=e(7427);function r(t,i){return t.replace(/(?:\r\n|\r|\n)/g,i)}function h(t){return t.replace(/[-—]/g,"‑")}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 a(t){return/<[a-z/][\s\S]*>/i.test(t)}function c(t,i){const e=i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),s=new RegExp(`<${e}>(.*?)`,"g");return t.replace(s,((t,e)=>e.split(" ").map((t=>`<${i}>${t}`)).join(" ")))}function l(t){return!!t.match(/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/)}function u(t){return t.replace(/^\s+|\s+$|\s+(?=\s)/g,"")}function d(t,i){return`${t}-${i}`}},2324:(t,i,e)=>{"use strict";e.d(i,{pP:()=>r,QI:()=>h,XF:()=>o,to:()=>a,VG:()=>c,k$:()=>l,H8:()=>u,qe:()=>d,w4:()=>p});var s=e(9115),n=e(7427);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 h(t,i){return/^\d+(\.\d+)?%$/g.test(t)?i?i*parseFloat(t.replace("%",""))/100:null:r(t)}function o(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){const i=Date.parse(t+" GMT");if(!(0,n.kE)(i))return;const e=Math.floor((Date.parse(new Date(Date.now()).toUTCString())-i)/1e3);if(!(0,n.r)(e))return"just now";const s=[{value:1,symbol:"s"},{value:60,symbol:"m"},{value:3599,symbol:"h"},{value:86399,symbol:"d"}];let r;for(r=s.length-1;r>0&&!(e>=s[r].value);r--);return Math.floor(e/s[r].value).toFixed(0)+s[r].symbol+" ago"}function l(t,i){const e=Date.now();return!(ei)}function u(t){return Math.floor((Date.now()-t)/s.s_)}function d(t,i){return t>=i?t/s.s_:t}function p(t){return(0,n.kE)(t)?t*s.s_:null}},7427:(t,i,e)=>{"use strict";function s(t){return"string"==typeof t}function n(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r(t){return n(t)&&t>0}function h(t){return s(t)&&t.length>0}function o(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 l(t){try{if(t.contentWindow||t.contentDocument)return!0}catch(t){}return!1}e.d(i,{HD:()=>s,kE:()=>n,r:()=>r,QM:()=>h,$K:()=>o,mf:()=>a,as:()=>c,cL:()=>l})},158:(t,i,e)=>{"use strict";e.d(i,{n:()=>s});var s,n=e(8423),r=e(7427),h=e(6615),o=e(7726);!function(t){let i;!function(t){t.DumpJson="Dump Json"}(i||(i={}));function e(t,i){return(0,r.as)(i)?(Object.keys(i).forEach((e=>t=(0,h.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 h=new XMLHttpRequest;return h.open(i,t,!0),e.length>0&&h.setRequestHeader("Content-Type",e),s.length>0&&(h.responseType=s),h.timeout=r,h.withCredentials=n,h}(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,i,e){try{const s=(0,n.Vm)([95,5]);!s||i&&0!==Object.keys(i).length||(0,o.n)({message:"empty_proto_request",callStack:"empty_function_argument",exception:e,level:o.D.INFO},{sendMaxLog:!1});const r=t.fromObject(i);!s||r&&0!==Object.keys(r).length||(0,o.n)({message:"empty_proto_request",callStack:"empty_fromObject_result",exception:e,level:o.D.INFO},{sendMaxLog:!1});const h=t.encode(r).finish();return!s||h&&0!==Object.keys(h).length||(0,o.n)({message:"empty_proto_request",callStack:"empty_encode_result",exception:e,level:o.D.INFO},{sendMaxLog:!1}),h}catch(t){throw(0,o.n)({exception:e,level:o.D.CRITICAL,callStack:JSON.stringify(i),message:"Protobuf_encode"},{throttle:10}),Error()}}function c(t,e,n="POST",r,h,a,c){return function(t,e,s,n){return new Promise(((r,h)=>{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){(0,o.n)({exception:`${s}__${t.message}`,message:"Protobuf_decode",callStack:t.stack,level:o.D.WARN},{throttle:10})}a.errorMessage===i.DumpJson&&(0,o.n)({message:i.DumpJson,exception:JSON.stringify(n),callStack:s,level:o.D.INFO}),a&&a.errorMessage&&"500"===a.errorMessage&&h(a.errorMessage),r(a)}})).catch((t=>{h(t)}))}))}(t,s({requestUrl:e,requestType:n,withCredentials:h,contentType:"POST"===n?"multipart/form-data":"",responseType:"arraybuffer",timeout:a},r),e,c)}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:s,endpoint:r,requestType:h,withCredentials:l,queryParams:u,logError:d,timeout:p}){const f=s?a(i,s,r):null;return c(t,r=e(r,u),h,f,l,p,s).catch((t=>{throw d&&(0,n.Vm)([95,5])&&(0,o.n)({message:"Xhr_error",exception:r,callStack:`${t}, requestData: ${JSON.stringify(s)}`,level:o.D.INFO}),new Error(t)}))},t.sendProtoBeaconRequest=function({ProtoRequest:t,requestData:i,endpoint:s,queryParams:n=null}){s=e(s,n);const r=i?a(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,o.n)({message:"Xhr_trackPixel",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}}(s||(s={}))},655:(t,i,e)=>{"use strict";e.d(i,{ZT:()=>n,mG:()=>r,Jh:()=>h,XA:()=>o,CR:()=>a,ev:()=>c,qq:()=>l,FC:()=>u,KL:()=>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 h(t){try{a(s.next(t))}catch(t){r(t)}}function o(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(h,o)}a((s=s.apply(t,i||[])).next())}))}function h(t,i){var e,s,n,r,h={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;h;)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 h.label++,{value:r[1],done:!1};case 5:h.label++,s=r[1],r=[0];continue;case 7:r=h.ops.pop(),h.trys.pop();continue;default:if(!(n=h.trys,(n=n.length>0&&n[n.length-1])||6!==r[0]&&2!==r[0])){h=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]=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),h=[];try{for(;(void 0===i||i-- >0)&&!(s=r.next()).done;)h.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 h}function c(t,i,e){if(e||2===arguments.length)for(var s,n=0,r=i.length;n1||o(t,i)}))})}function o(t,i){try{(e=n[t](i)).value instanceof l?Promise.resolve(e.value.v).then(a,c):u(r[0][2],e)}catch(t){u(r[0][3],t)}var e}function a(t){o("next",t)}function c(t){o("throw",t)}function u(t,i){t(i),r.shift(),r.length&&o(r[0][0],r[0][1])}}function d(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,e=t[Symbol.asyncIterator];return e?e.call(t):(t=o(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},490:function(t){"undefined"!=typeof window&&(t.exports=function(t){var i={};function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:s})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"R",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.R)return t;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(s,n,function(i){return t[i]}.bind(null,n));return s},e.n=function(t){var i=t&&t.R?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="/dist/",e(e.s=13)}([function(t,i,e){"use strict";e.d(i,"a",(function(){return l})),e.d(i,"b",(function(){return u}));var s=e(5);function n(){}var r={trace:n,debug:n,log:n,warn:n,info:n,error:n},h=r;function o(t,i){return"["+t+"] > "+i}var a=Object(s.a)();function c(t){var i=a.console[t];return i?function(){for(var e=arguments.length,s=new Array(e),n=0;n1?i-1:0),s=1;s0)return i.subarray(s,s+n)},t.ia=function(t,i){var e=0;return e=(127&t[i])<<21,e|=(127&t[i+1])<<14,(e|=(127&t[i+2])<<7)|127&t[i+3]},t.getTimeStamp=function(i){for(var e=t.getID3Frames(i),s=0;s>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:l+=String.fromCharCode(r);break;case 12:case 13:o=t[u++],l+=String.fromCharCode((31&r)<<6|63&o);break;case 14:o=t[u++],a=t[u++],l+=String.fromCharCode((15&r)<<12|(63&o)<<6|(63&a)<<0)}}return l},t}();function h(){var t=Object(n.a)();return s||void 0===t.TextDecoder||(s=new t.TextDecoder("utf-8")),s}var o=r.aa;i.a=r},function(t,i,e){"use strict";function s(){return"undefined"==typeof window?self:window.cnxRenderWindow?window.cnxRenderWindow:window}e.d(i,"a",(function(){return s}))},function(t,i,e){var s,n,r,h,o;s=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,n=/^([^\/?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,h=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(t,i,e){if(e=e||{},t=t.trim(),!(i=i.trim())){if(!e.alwaysNormalize)return t;var s=o.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");return s.path=o.normalizePath(s.path),o.buildURLFromParts(s)}var r=o.parseURL(i);if(!r)throw new Error("Error trying to parse relative URL.");if(r.scheme)return e.alwaysNormalize?(r.path=o.normalizePath(r.path),o.buildURLFromParts(r)):i;var h=o.parseURL(t);if(!h)throw new Error("Error trying to parse base URL.");if(!h.netLoc&&h.path&&"/"!==h.path[0]){var a=n.exec(h.path);h.netLoc=a[1],h.path=a[2]}h.netLoc&&!h.path&&(h.path="/");var c={scheme:h.scheme,netLoc:r.netLoc,path:null,params:r.params,query:r.query,fragment:r.fragment};if(!r.netLoc&&(c.netLoc=h.netLoc,"/"!==r.path[0]))if(r.path){var l=h.path,u=l.substring(0,l.lastIndexOf("/")+1)+r.path;c.path=o.normalizePath(u)}else c.path=h.path,r.params||(c.params=h.params,r.query||(c.query=h.query));return null===c.path&&(c.path=e.alwaysNormalize?o.normalizePath(r.path):r.path),o.buildURLFromParts(c)},parseURL:function(t){var i=s.exec(t);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(r,"");t.length!==(t=t.replace(h,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o},function(t,i){t.exports=void 0},function(t,i,e){"use strict";var s=Object.prototype.hasOwnProperty,n="~";function r(){}function h(t,i,e){this.fn=t,this.context=i,this.once=e||!1}function o(t,i,e,s,r){if("function"!=typeof e)throw new TypeError("The listener must be a function");var o=new h(e,s||t,r),a=n?n+i:i;return t.ca[a]?t.ca[a].fn?t.ca[a]=[t.ca[a],o]:t.ca[a].push(o):(t.ca[a]=o,t.la++),t}function a(t,i){0==--t.la?t.ca=new r:delete t.ca[i]}function c(){this.ca=new r,this.la=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var t,i,e=[];if(0===this.la)return e;for(i in t=this.ca)s.call(t,i)&&e.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(t){var i=n?n+t:t,e=this.ca[i];if(!e)return[];if(e.fn)return[e.fn];for(var s=0,r=e.length,h=new Array(r);s>>8^255&g^99,t[p]=g,i[g]=p;var m=d[p],y=d[m],b=d[y],w=257*d[g]^16843008*g;s[p]=w<<24|w>>>8,n[p]=w<<16|w>>>16,r[p]=w<<8|w>>>24,h[p]=w,w=16843009*b^65537*y^257*m^16843008*p,a[g]=w<<24|w>>>8,c[g]=w<<16|w>>>16,l[g]=w<<8|w>>>24,u[g]=w,p?(p=m^d[d[d[b^m]]],f^=d[d[f]]):p=f=1}},i.expandKey=function(t){for(var i=this.uint8ArrayToUint32Array_(t),e=!0,s=0;s>>5}function v(t,i){return!!(i+1>>6),!((o=(60&i[e+2])>>>2)>f.length-1))return l=(1&i[e+2])<<2,l|=(192&i[e+3])>>>6,a.b.log("manifest codec:"+r+",ADTS data:type:"+h+",sampleingIndex:"+o+"["+f[o]+"Hz],channelConfig:"+l),/firefox/i.test(d)?o>=6?(h=5,u=new Array(4),c=o-3):(h=2,u=new Array(2),c=o):-1!==d.indexOf("android")?(h=2,u=new Array(2),c=o):(h=5,u=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&o>=6?c=o-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(o>=6&&1===l||/vivaldi/i.test(d))||!r&&1===l)&&(h=2,u=new Array(2)),c=o)),u[0]=h<<3,u[0]|=(14&o)>>1,u[1]|=(1&o)<<7,u[1]|=l<<3,5===h&&(u[1]|=(14&c)>>1,u[2]=(1&c)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[o],channelCount:l,codec:"mp4a.40."+h,manifestCodec:p};t.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o})}(i,e,r,h);t.config=o.config,t.samplerate=o.samplerate,t.channelCount=o.channelCount,t.codec=o.codec,t.manifestCodec=o.manifestCodec,a.b.log("parsed codec:"+t.codec+",rate:"+o.samplerate+",nb channel:"+o.channelCount)}}function y(t){return 9216e4/t}function b(t,i,e,s,n){var r=function(t,i,e,s,n){var r,h,o=t.length;if(r=p(t,i),h=f(t,i),(h-=r)>0&&i+r+h<=o)return{headerLength:r,frameLength:h,stamp:e+s*n}}(i,e,s,n,y(t.samplerate));if(r){var h=r.stamp,o=r.headerLength,a=r.frameLength,c={unit:i.subarray(e+o,e+o+a),pts:h,dts:h};return t.samples.push(c),{sample:c,length:a+o}}}var w=e(4),x=function(){function t(t,i,e){this.observer=t,this.config=e,this.remuxer=i}var i=t.prototype;return i.resetInitSegment=function(t,i,e,s){this.ua={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:i,duration:s,inputTimeScale:9e4}},i.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var i=(w.a.getID3Data(t,0)||[]).length,e=t.length;ii.length)){var r=this.parseHeader(i,e);if(r&&e+r.frameLength<=i.length){var h=s+n*(9e4*r.samplesPerFrame/r.sampleRate),o={unit:i.subarray(e,e+r.frameLength),pts:h,dts:h};return t.config=[],t.channelCount=r.channelCount,t.samplerate=r.sampleRate,t.samples.push(o),{sample:o,length:r.frameLength}}}},parseHeader:function(t,i){var e=t[i+1]>>3&3,s=t[i+1]>>1&3,n=t[i+2]>>4&15,r=t[i+2]>>2&3,h=t[i+2]>>1&1;if(1!==e&&0!==n&&15!==n&&3!==r){var o=3===e?3-s:3===s?3:4,a=1e3*_.BitratesMap[14*o+n-1],c=3===e?0:2===e?1:2,l=_.SamplingRateMap[3*c+r],u=t[i+3]>>6==3?1:2,d=_.SamplesCoefficients[e][s],p=_.BytesInSlot[s],f=8*d*p;return{sampleRate:l,channelCount:u,frameLength:parseInt(d*a/l+h,10)*p,samplesPerFrame:f}}},isHeaderPattern:function(t,i){return 255===t[i]&&224==(224&t[i+1])&&0!=(6&t[i+1])},isHeader:function(t,i){return!!(i+1t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(i=t>>3)>>3,this.bytesAvailable-=i,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},i.readBits=function(t){var i=Math.min(this.bitsAvailable,t),e=this.word>>>32-i;return t>32&&a.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=i,this.bitsAvailable>0?this.word<<=i:this.bytesAvailable>0&&this.loadWord(),(i=t-i)>0&&this.bitsAvailable?e<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},i.skipUEG=function(){this.skipBits(1+this.skipLZ())},i.skipEG=function(){this.skipBits(1+this.skipLZ())},i.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},i.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},i.readBoolean=function(){return 1===this.readBits(1)},i.readUByte=function(){return this.readBits(8)},i.readUShort=function(){return this.readBits(16)},i.readUInt=function(){return this.readBits(32)},i.skipScalingList=function(t){var i,e=8,s=8;for(i=0;i=t.length)return void e();if(!(t[i].unit.length<32)){var s=this.decrypter.isSync();if(this.decryptAacSample(t,i,e,s),!s)return}}},i.getAvcEncryptedData=function(t){for(var i=16*Math.floor((t.length-48)/160)+16,e=new Int8Array(i),s=0,n=32;n<=t.length-16;n+=160,s+=16)e.set(t.subarray(n,n+16),s);return e},i.getAvcDecryptedUnit=function(t,i){i=new Uint8Array(i);for(var e=0,s=32;s<=t.length-16;s+=160,e+=16)t.set(i.subarray(e,e+16),s);return t},i.decryptAvcSample=function(t,i,e,s,n,r){var h=this.discardEPB(n.data),o=this.getAvcEncryptedData(h),a=this;this.decryptBuffer(o.buffer,(function(o){n.data=a.getAvcDecryptedUnit(h,o),r||a.decryptAvcSamples(t,i,e+1,s)}))},i.decryptAvcSamples=function(t,i,e,s){for(;;i++,e=0){if(i>=t.length)return void s();for(var n=t[i].units;!(e>=n.length);e++){var r=n[e];if(!(r.length<=48||1!==r.type&&5!==r.type)){var h=this.decrypter.isSync();if(this.decryptAvcSample(t,i,e,s,r,h),!h)return}}}},t}(),I={video:1,audio:2,id3:3,text:4},T=function(){function t(t,i,e,s){this.observer=t,this.config=e,this.typeSupported=s,this.remuxer=i,this.sampleAes=null}var i=t.prototype;return i.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new k(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(i){var e=t.da(i);return!(e<0||(e&&a.b.warn("MPEG2-TS detected but first sync word found @ offset "+e+", junk ahead ?"),0))},t.da=function(t){for(var i=Math.min(1e3,t.length-564),e=0;e>4>1){if((u=o+5+i[o+4])===o+188)continue}else u=o+4;switch(l){case b:c&&(_&&(d=T(_))&&C(d,!1),_={data:[],size:0}),_&&(_.data.push(i.subarray(u,o+188)),_.size+=o+188-u);break;case w:c&&(A&&(d=T(A))&&(m.isAAC?M(d):E(d)),A={data:[],size:0}),A&&(A.data.push(i.subarray(u,o+188)),A.size+=o+188-u);break;case x:c&&(P&&(d=T(P))&&L(d),P={data:[],size:0}),P&&(P.data.push(i.subarray(u,o+188)),P.size+=o+188-u);break;case 0:c&&(u+=i[u]+1),S=this.pa=k(i,u);break;case S:c&&(u+=i[u]+1);var R=I(i,u,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=R.avc)>0&&(g.pid=b),(w=R.audio)>0&&(m.pid=w,m.isAAC=R.isAAC),(x=R.id3)>0&&(y.pid=x),f&&!v&&(a.b.log("reparse from beginning"),f=!1,o=O-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:f=!0}}else this.observer.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_&&(d=T(_))?(C(d,!0),g.pesData=null):g.pesData=_,A&&(d=T(A))?(m.isAAC?M(d):E(d),m.pesData=null):(A&&A.size&&a.b.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=A),P&&(d=T(P))?(L(d),y.pesData=null):y.pesData=P,null==this.sampleAes?this.remuxer.remux(m,g,y,this.ga,e,r,h):this.decryptAndRemux(m,g,y,this.ga,e,r,h)},i.decryptAndRemux=function(t,i,e,s,n,r,h){if(t.samples&&t.isAAC){var o=this;this.sampleAes.decryptAacSamples(t.samples,0,(function(){o.decryptAndRemuxAvc(t,i,e,s,n,r,h)}))}else this.decryptAndRemuxAvc(t,i,e,s,n,r,h)},i.decryptAndRemuxAvc=function(t,i,e,s,n,r,h){if(i.samples){var o=this;this.sampleAes.decryptAvcSamples(i.samples,0,0,(function(){o.remuxer.remux(t,i,e,s,n,r,h)}))}else this.remuxer.remux(t,i,e,s,n,r,h)},i.destroy=function(){this.Pa=this.ka=void 0,this.ma=0},i.ya=function(t,i){return(31&t[i+10])<<8|t[i+11]},i.ba=function(t,i,e,s){var n,r,h={audio:-1,avc:-1,id3:-1,isAAC:!0};for(n=i+3+((15&t[i+1])<<8|t[i+2])-4,i+=12+((15&t[i+10])<<8|t[i+11]);i1;){var d=new Uint8Array(u[0].length+u[1].length);d.set(u[0]),d.set(u[1],u[0].length),u[0]=d,u.splice(1,1)}if(1===((i=u[0])[0]<<16)+(i[1]<<8)+i[2]){if((s=(i[4]<<8)+i[5])&&s>t.size-6)return null;if(192&(e=i[7])&&((h=536870912*(14&i[9])+4194304*(255&i[10])+16384*(254&i[11])+128*(255&i[12])+(254&i[13])/2)>4294967295&&(h-=8589934592),64&e?((o=536870912*(14&i[14])+4194304*(255&i[15])+16384*(254&i[16])+128*(255&i[17])+(254&i[18])/2)>4294967295&&(o-=8589934592),h-o>54e5&&(a.b.warn(Math.round((h-o)/9e4)+"s delta between PTS and DTS, align them"),h=o)):o=h),c=(n=i[8])+9,t.size<=c)return null;t.size-=c,r=new Uint8Array(t.size);for(var p=0,f=u.length;pv){c-=v;continue}i=i.subarray(c),v-=c,c=0}r.set(i,l),l+=v}return s&&(s-=n+3),{data:r,pts:h,dts:o,len:s}}return null},i.pushAccesUnit=function(t,i){if(t.units.length&&t.frame){var e=i.samples,s=e.length;if(isNaN(t.pts)){if(!s)return void i.dropped++;var n=e[s-1];t.pts=n.pts,t.dts=n.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||i.sps&&(s||this.contiguous)?(t.id=s,e.push(t)):i.dropped++}t.debug.length&&a.b.log(t.pts+"/"+t.dts+":"+t.debug)},i.xa=function(t,i){var e,s,n,r=this,h=this.fa,o=this.Ia(t.data),a=this.avcSample,c=!1,l=this.pushAccesUnit.bind(this),u=function(t,i,e,s){return{key:t,pts:i,dts:e,units:[],debug:s}};t.data=null,a&&o.length&&!h.audFound&&(l(a,h),a=this.avcSample=u(!1,t.pts,t.dts,"")),o.forEach((function(i){switch(i.type){case 1:s=!0,a||(a=r.avcSample=u(!0,t.pts,t.dts,"")),a.frame=!0;var o=i.data;if(c&&o.length>4){var d=new P(o).readSliceType();2!==d&&4!==d&&7!==d&&9!==d||(a.key=!0)}break;case 5:s=!0,a||(a=r.avcSample=u(!0,t.pts,t.dts,"")),a.key=!0,a.frame=!0;break;case 6:s=!0,(e=new P(r.discardEPB(i.data))).readUByte();for(var p=0,f=0,v=!1,g=0;!v&&e.bytesAvailable>1;){p=0;do{p+=g=e.readUByte()}while(255===g);f=0;do{f+=g=e.readUByte()}while(255===g);if(4===p&&0!==e.bytesAvailable){if(v=!0,181===e.readUByte()&&49===e.readUShort()&&1195456820===e.readUInt()&&3===e.readUByte()){var m=e.readUByte(),y=31&m,b=[m,e.readUByte()];for(n=0;n16){var x=[];for(n=0;n<16;n++)x.push(e.readUByte().toString(16)),3!==n&&5!==n&&7!==n&&9!==n||x.push("-");var S=f-16,_=new Uint8Array(S);for(n=0;n0){if(i.pts>=t[e-1].pts)t.push(i);else for(var s=e-1;s>=0;s--)if(i.pts=0)s={data:t.subarray(u,r-a-1),type:n},l.push(s);else{var d=this.Ca();if(d&&(c&&r<=4-c&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-c)),(e=r-a-1)>0)){var p=new Uint8Array(d.data.byteLength+e);p.set(d.data,0),p.set(t.subarray(0,e),d.data.byteLength),d.data=p}}r=0&&a>=0&&(s={data:t.subarray(u,h),type:n,state:a},l.push(s)),0===l.length){var f=this.Ca();if(f){var v=new Uint8Array(f.data.byteLength+t.byteLength);v.set(f.data,0),v.set(t,f.data.byteLength),f.data=v}}return o.naluState=a,l},i.discardEPB=function(t){for(var i,e,s=t.byteLength,n=[],r=1;r1&&(a.b.log("AAC: align PTS for overlapping frames by "+Math.round((x-p)/90)),p=x)}for(;r>24&255,i[1]=s>>16&255,i[2]=s>>8&255,i[3]=255&s,i.set(t,4),n=0,s=8;n>24&255,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))},t.mdia=function(i){return t.box(t.types.mdia,t.mdhd(i.timescale,i.duration),t.hdlr(i.type),t.minf(i))},t.mfhd=function(i){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i]))},t.minf=function(i){return"audio"===i.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(i)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(i))},t.moof=function(i,e,s){return t.box(t.types.moof,t.mfhd(i),t.traf(s,e))},t.moov=function(i){for(var e=i.length,s=[];e--;)s[e]=t.trak(i[e]);return t.box.apply(null,[t.types.moov,t.mvhd(i[0].timescale,i[0].duration)].concat(s).concat(t.mvex(i)))},t.mvex=function(i){for(var e=i.length,s=[];e--;)s[e]=t.trex(i[e]);return t.box.apply(null,[t.types.mvex].concat(s))},t.mvhd=function(i,e){e*=i;var s=Math.floor(e/(E+1)),n=Math.floor(e%(E+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,n>>24,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,r)},t.sdtp=function(i){var e,s,n=i.samples||[],r=new Uint8Array(4+n.length);for(s=0;s>>8&255),r.push(255&n),r=r.concat(Array.prototype.slice.call(s));for(e=0;e>>8&255),h.push(255&n),h=h.concat(Array.prototype.slice.call(s));var o=t.box(t.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|i.sps.length].concat(r).concat([i.pps.length]).concat(h))),a=i.width,c=i.height,l=i.pixelRatio[0],u=i.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>8&255,255&a,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,255&l,u>>24,u>>16&255,u>>8&255,255&u])))},t.esds=function(t){var i=t.config.length;return new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t.config).concat([6,1,2]))},t.mp4a=function(i){var e=i.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i.channelCount,0,16,0,0,0,0,e>>8&255,255&e,0,0]),t.box(t.types.esds,t.esds(i)))},t.mp3=function(i){var e=i.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i.channelCount,0,16,0,0,0,0,e>>8&255,255&e,0,0]))},t.stsd=function(i){return"audio"===i.type?i.isAAC||"mp3"!==i.codec?t.box(t.types.stsd,t.STSD,t.mp4a(i)):t.box(t.types.stsd,t.STSD,t.mp3(i)):t.box(t.types.stsd,t.STSD,t.avc1(i))},t.tkhd=function(i){var e=i.id,s=i.duration*i.timescale,n=i.width,r=i.height,h=Math.floor(s/(E+1)),o=Math.floor(s%(E+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,0,0,0,0,h>>24,h>>16&255,h>>8&255,255&h,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,255&n,0,0,r>>8&255,255&r,0,0]))},t.traf=function(i,e){var s=t.sdtp(i),n=i.id,r=Math.floor(e/(E+1)),h=Math.floor(e%(E+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,h>>24,h>>16&255,h>>8&255,255&h])),t.trun(i,s.length+16+20+8+16+8+8),s)},t.trak=function(i){return i.duration=i.duration||4294967295,t.box(t.types.trak,t.tkhd(i),t.mdia(i))},t.trex=function(i){var e=i.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(i,e){var s,n,r,h,o,a,c=i.samples||[],l=c.length,u=12+16*l,d=new Uint8Array(u);for(e+=8+u,d.set([0,0,15,1,l>>>24&255,l>>>16&255,l>>>8&255,255&l,e>>>24&255,e>>>16&255,e>>>8&255,255&e],0),s=0;s>>24&255,r>>>16&255,r>>>8&255,255&r,h>>>24&255,h>>>16&255,h>>>8&255,255&h,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12+16*s);return t.box(t.types.trun,d)},t.initSegment=function(i){t.types||t.init();var e,s=t.moov(i);return(e=new Uint8Array(t.FTYP.byteLength+s.byteLength)).set(t.FTYP),e.set(s,t.FTYP.byteLength),e},t}();function O(t,i,e,s){void 0===e&&(e=1),void 0===s&&(s=!1);var n=t*i*e;return s?Math.round(n):n}function R(t,i){return void 0===i&&(i=!1),O(t,1e3,1/9e4,i)}function B(t,i){return void 0===i&&(i=1),O(t,9e4,1/i)}var D,j=B(10),F=B(.2),$=function(){function t(t,i,e,s){this.observer=t,this.config=i,this.typeSupported=e;var n=navigator.userAgent;this.isSafari=s&&s.indexOf("Apple")>-1&&n&&!n.match("CriOS"),this.ISGenerated=!1}var i=t.prototype;return i.destroy=function(){},i.resetTimeStamp=function(t){this.Pa=this.ka=t},i.resetInitSegment=function(){this.ISGenerated=!1},i.remux=function(t,i,e,n,r,h,o){if(this.ISGenerated||this.generateIS(t,i,r),this.ISGenerated){var c=t.samples.length,l=i.samples.length,u=r,d=r;if(c&&l){var p=(t.samples[0].pts-i.samples[0].pts)/i.inputTimeScale;u+=Math.max(0,p),d+=Math.max(0,-p)}if(c){t.timescale||(a.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,i,r));var f,v=this.remuxAudio(t,u,h,o);l&&(v&&(f=v.endPTS-v.startPTS),i.timescale||(a.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,i,r)),this.remuxVideo(i,d,h,f,o))}else if(l){var g=this.remuxVideo(i,d,h,0,o);g&&t.codec&&this.remuxEmptyAudio(t,u,h,g)}}e.samples.length&&this.remuxID3(e,r),n.samples.length&&this.remuxText(n,r),this.observer.trigger(s.a.FRAG_PARSED)},i.generateIS=function(t,i,e){var r,h,o=this.observer,c=t.samples,l=i.samples,u=this.typeSupported,d="audio/mp4",p={},f={tracks:p},v=void 0===this.Pa;if(v&&(r=h=1/0),t.config&&c.length&&(t.timescale=t.samplerate,a.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(u.mpeg?(d="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),p.audio={container:d,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array:L.initSegment([t]),metadata:{channelCount:t.channelCount}},v&&(r=h=c[0].pts-t.inputTimeScale*e)),i.sps&&i.pps&&l.length){var g=i.inputTimeScale;i.timescale=g,p.video={container:"video/mp4",codec:i.codec,initSegment:L.initSegment([i]),metadata:{width:i.width,height:i.height}},v&&(r=Math.min(r,l[0].pts-g*e),h=Math.min(h,l[0].dts-g*e),this.observer.trigger(s.a.INIT_PTS_FOUND,{initPTS:r}))}Object.keys(p).length?(o.trigger(s.a.FRAG_PARSING_INIT_SEGMENT,f),this.ISGenerated=!0,v&&(this.Pa=r,this.ka=h)):o.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},i.remuxVideo=function(t,i,e,r,h){var o,c,l,u,d,p,f,v=8,g=t.timescale,m=t.samples,y=[],b=m.length,w=this.Ma,x=this.Pa,S=this.nextAvcDts,_=this.isSafari;if(0!==b){_&&(e|=m.length&&S&&(h&&Math.abs(i-S/g)<.1||Math.abs(m[0].pts-S-x)1?a.b.log("AVC: "+R(I,!0)+" ms hole between fragments detected,filling it"):I<-1&&a.b.log("AVC: "+R(-I,!0)+" ms overlapping between fragments detected"),d=S,m[0].dts=d,u=Math.max(u-I,S),m[0].pts=u,a.b.log("Video: PTS/DTS adjusted: "+R(u,!0)+"/"+R(d,!0)+", delta: "+R(I,!0)+" ms")),k=m[m.length-1],f=Math.max(k.dts,0),p=Math.max(k.pts,0,f),_&&(o=Math.round((f-d)/(m.length-1)));for(var T=0,C=0,M=0;M0?U-1:U].dts;if(Y.stretchShortVideoTrack){var Z=Y.maxBufferHole,tt=Math.floor(Z*g),it=(r?u+r*g:this.nextAudioPts)-N.pts;it>tt?((o=it-K)<0&&(o=K),a.b.log("It is approximately "+R(it,!1)+" ms to the next segment; using duration "+R(o,!1)+" ms for the last video frame.")):o=K}else o=K}q=Math.round(N.pts-N.dts)}y.push({size:z,duration:o,cts:q,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:N.key?2:1,isNonSync:N.key?0:1}})}this.nextAvcDts=f+o;var et=t.dropped;if(t.nbNalu=0,t.dropped=0,y.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var st=y[0].flags;st.dependsOn=2,st.isNonSync=0}t.samples=y,l=L.moof(t.sequenceNumber++,d,t),t.samples=[];var nt={data1:l,data2:c,startPTS:u/g,endPTS:(p+o)/g,startDTS:d/g,endDTS:this.nextAvcDts/g,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:et};return this.observer.trigger(s.a.FRAG_PARSING_DATA,nt),nt}},i.remuxAudio=function(t,i,e,r){var h,o,c,l,u,d,p=t.inputTimeScale,f=t.timescale,v=p/f,g=(t.isAAC?1024:1152)*v,m=this.Ma,y=this.Pa,b=!t.isAAC&&this.typeSupported.mpeg,w=b?0:8,x=t.samples,S=[],_=this.nextAudioPts;if(e|=x.length&&_&&(r&&Math.abs(i-_/p)<.1||Math.abs(x[0].pts-_-y)<20*g),x.forEach((function(t){t.pts=t.dts=m(t.pts-y,i*p)})),0!==(x=x.filter((function(t){return t.pts>=0}))).length){if(e||(_=r?i*p:x[0].pts),t.isAAC)for(var A=this.config.maxAudioFramesDrift,P=0,k=_;P=A*g&&I0&&H0&&((o=M.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(o=U.subarray()),D+=z*o.length);else if(H<-12){a.b.log("drop overlapping AAC sample, expected/parsed/delta: "+R(_,!0)+" ms / "+R(N,!0)+" ms / "+R(-H,!0)+" ms"),D-=U.byteLength;continue}N=_}if(u=N,!(D>0))return;D+=w;try{c=new Uint8Array(D)}catch(t){return void this.observer.trigger(s.a.ERROR,{type:n.b.MUX_ERROR,details:n.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:D,reason:"fail allocating audio mdat "+D})}b||(new DataView(c.buffer).setUint32(0,D),c.set(L.types.mdat,4));for(var q=0;q=2&&(G=S[B-2].duration,h.duration=G),B){this.nextAudioPts=_=d+v*G,t.samples=S,l=b?new Uint8Array:L.moof(t.sequenceNumber++,u/v,t),t.samples=[];var J=u/p,Q=_/p,X={data1:l,data2:c,startPTS:J,endPTS:Q,startDTS:J,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:B};return this.observer.trigger(s.a.FRAG_PARSING_DATA,X),X}return null}},i.remuxEmptyAudio=function(t,i,e,s){var n=t.inputTimeScale,r=n/(t.samplerate?t.samplerate:n),h=this.nextAudioPts,o=(void 0!==h?h:s.startDTS*n)+this.ka,c=s.endDTS*n+this.ka,l=1024*r,u=Math.ceil((c-o)/l),d=M.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(a.b.warn("remux empty Audio"),d){for(var p=[],f=0;f4294967296;)t+=e;return t},t}(),V=function(){function t(t){this.observer=t}var i=t.prototype;return i.destroy=function(){},i.resetTimeStamp=function(){},i.resetInitSegment=function(){},i.remux=function(t,i,e,n,r,h,o,a){var c=this.observer,l="";t&&(l+="audio"),i&&(l+="video"),c.trigger(s.a.FRAG_PARSING_DATA,{data1:a,startPTS:r,startDTS:r,type:l,hasAudio:!!t,hasVideo:!!i,nb:1,dropped:0}),c.trigger(s.a.FRAG_PARSED)},t}(),U=Object(c.a)();try{D=U.performance.now.bind(U.performance)}catch(t){a.b.debug("Unable to use Performance API on this environment"),D=U.Date.now}var N=function(){function t(t,i,e,s){this.observer=t,this.typeSupported=i,this.config=e,this.vendor=s}var i=t.prototype;return i.destroy=function(){var t=this.demuxer;t&&t.destroy()},i.push=function(t,i,e,n,r,h,o,a,c,u,d,p){var f=this;if(t.byteLength>0&&null!=i&&null!=i.key&&"AES-128"===i.method){var v=this.decrypter;null==v&&(v=this.decrypter=new l(this.observer,this.config));var g=D();v.decrypt(t,i.key.buffer,i.iv.buffer,(function(t){var l=D();f.observer.trigger(s.a.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:l}}),f.pushDecrypted(new Uint8Array(t),i,new Uint8Array(e),n,r,h,o,a,c,u,d,p)}))}else this.pushDecrypted(new Uint8Array(t),i,new Uint8Array(e),n,r,h,o,a,c,u,d,p)},i.pushDecrypted=function(t,i,e,r,h,o,a,c,l,u,d,p){var f=this.demuxer;if(!f||(a||c)&&!this.probe(t)){for(var v=this.observer,g=this.typeSupported,m=this.config,y=[{demux:T,remux:$},{demux:S.a,remux:V},{demux:x,remux:$},{demux:C,remux:$}],b=0,w=y.length;b0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,i){t.data&&(i+=t.start,t=t.data);var e=t[i]<<8|t[i+1];return e<0?65536+e:e},t.readUint32=function(t,i){t.data&&(i+=t.start,t=t.data);var e=t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3];return e<0?4294967296+e:e},t.writeUint32=function(t,i,e){t.data&&(i+=t.start,t=t.data),t[i]=e>>24,t[i+1]=e>>16&255,t[i+2]=e>>8&255,t[i+3]=255&e},t.findBox=function(i,e){var s,n,r,h,o,a,c=[];if(i.data?(o=i.start,r=i.end,i=i.data):(o=0,r=i.byteLength),!e.length)return null;for(s=o;s1?s+n:r,t.bin2str(i.subarray(s+4,s+8))===e[0]&&(1===e.length?c.push({data:i,start:s+8,end:a}):(h=t.findBox({data:i,start:s+8,end:a},e.slice(1))).length&&(c=c.concat(h))),s=a;return c},t.parseSegmentIndex=function(i){var e,s=t.findBox(i,["moov"])[0],n=s?s.end:null,r=0,h=t.findBox(i,["sidx"]);if(!h||!h[0])return null;e=[];var o=(h=h[0]).data[0];r=0===o?8:16;var a=t.readUint32(h,r);r+=4,r+=0===o?8:16,r+=2;var c=h.end+0,l=t.readUint16(h,r);r+=2;for(var u=0;u>>31)return void console.warn("SIDX has hierarchical references (not supported)");var v=t.readUint32(h,d);d+=4,e.push({referenceSize:f,subsegmentDuration:v,info:{duration:v/a,start:c,end:c+f-1}}),c+=f,r=d+=4}return{earliestPresentationTime:0,timescale:a,version:o,referencesCount:l,references:e,moovEndOffset:n}},t.parseInitSegment=function(i){var e=[];return t.findBox(i,["moov","trak"]).forEach((function(i){var n=t.findBox(i,["tkhd"])[0];if(n){var r=n.data[n.start],h=0===r?12:20,o=t.readUint32(n,h),a=t.findBox(i,["mdia","mdhd"])[0];if(a){h=0===(r=a.data[a.start])?12:20;var c=t.readUint32(a,h),l=t.findBox(i,["mdia","hdlr"])[0];if(l){var u={soun:"audio",vide:"video"}[t.bin2str(l.data.subarray(l.start+8,l.start+12))];if(u){var d=t.findBox(i,["mdia","minf","stbl","stsd"]);if(d.length){d=d[0];var p=t.bin2str(d.data.subarray(d.start+12,d.start+16));s.b.log("MP4Demuxer:"+u+":"+p+" found")}e[o]={timescale:c,type:u},e[u]={timescale:c,id:o}}}}}})),e},t.getStartDTS=function(i,e){var s,n,r;return s=t.findBox(e,["moof","traf"]),n=[].concat.apply([],s.map((function(e){return t.findBox(e,["tfhd"]).map((function(s){var n,r;return n=t.readUint32(s,4),r=i[n].timescale||9e4,t.findBox(e,["tfdt"]).map((function(i){var e,s;return e=i.data[i.start],s=t.readUint32(i,4),1===e&&(s*=Math.pow(2,32),s+=t.readUint32(i,8)),s}))[0]/r}))}))),r=Math.min.apply(null,n),isFinite(r)?r:0},t.offsetStartDTS=function(i,e,s){t.findBox(e,["moof","traf"]).map((function(e){return t.findBox(e,["tfhd"]).map((function(n){var h=t.readUint32(n,4),o=i[h].timescale||9e4;t.findBox(e,["tfdt"]).map((function(i){var e=i.data[i.start],n=t.readUint32(i,4);if(0===e)t.writeUint32(i,4,n-s*o);else{n*=Math.pow(2,32),n+=t.readUint32(i,8),n-=s*o,n=Math.max(n,0);var h=Math.floor(n/(r+1)),a=Math.floor(n%(r+1));t.writeUint32(i,4,h),t.writeUint32(i,8,a)}}))}))}))},i.append=function(i,e,s,r){var h=this.initData;h||(this.resetInitSegment(i,this.audioCodec,this.videoCodec,!1),h=this.initData);var o,a=this.initPTS;if(void 0===a){var c=t.getStartDTS(h,i);this.initPTS=a=c-e,this.observer.trigger(n.a.INIT_PTS_FOUND,{initPTS:a})}t.offsetStartDTS(h,i,a),o=t.getStartDTS(h,i),this.remuxer.remux(h.audio,h.video,null,null,o,s,r,i)},i.destroy=function(){},t}();i.a=h},function(t,i,e){function s(t){var i={};function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.r=function(t){Object.defineProperty(t,"R",{value:!0})},e.n=function(t){var i=t&&t.R?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="/",e.oe=function(t){throw console.error(t),t};var s=e(e.s=ENTRY_MODULE);return s.default||s}var n="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function r(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function h(t,i,s){var h={};h[s]=[];var o=i.toString(),a=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!a)return h;for(var c,l=a[1],u=new RegExp("(\\\\n|\\W)"+r(l)+n,"g");c=u.exec(o);)"dll-reference"!==c[3]&&h[s].push(c[3]);for(u=new RegExp("\\("+r(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)'+n,"g");c=u.exec(o);)t[c[2]]||(h[s].push(c[1]),t[c[2]]=e(c[1]).m),h[c[2]]=h[c[2]]||[],h[c[2]].push(c[4]);for(var d,p=Object.keys(h),f=0;f0}),!1)}t.exports=function(t,i){i=i||{};var n={main:e.m},r=i.all?{main:Object.keys(n.main)}:function(t,i){for(var e={main:[i]},s={main:[]},n={main:{}};o(e);)for(var r=Object.keys(e),a=0;a1?e-1:0),n=1;n1?e-1:0),n=1;n1?i-1:0),s=1;s>8*(15-e)&255;return i},n.setDecryptDataFromLevelKey=function(t,i){var e=t;return t&&t.method&&t.uri&&!t.iv&&((e=new v(t.baseuri,t.reluri)).method=t.method,e.iv=this.createInitializationVector(i)),e},i=t,(e=[{key:"url",get:function(){return!this.La&&this.relurl&&(this.La=Object(r.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this.La},set:function(t){this.La=t}},{key:"byteRange",get:function(){return this.Oa?this.Oa:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this.Ra)return null;if(!this.Ra&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&c.b.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this.Ra=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this.Ra}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(o.a)(this.programDateTime))return null;var t=Object(o.a)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&g(i.prototype,e),s&&g(i,s),t}();function y(t,i){for(var e=0;eNumber.MAX_SAFE_INTEGER?1/0:i},i.hexadecimalInteger=function(t){if(this[t]){var i=(this[t]||"0x").slice(2);i=(1&i.length?"0":"")+i;for(var e=new Uint8Array(i.length/2),s=0;sNumber.MAX_SAFE_INTEGER?1/0:i},i.decimalFloatingPoint=function(t){return parseFloat(this[t])},i.enumeratedString=function(t){return this[t]},i.decimalResolution=function(t){var i=w.exec(this[t]);if(null!==i)return{width:parseInt(i[1],10),height:parseInt(i[2],10)}},t.parseAttrList=function(t){var i,e={};for(x.lastIndex=0;null!==(i=x.exec(t));){var s=i[2];0===s.indexOf('"')&&s.lastIndexOf('"')===s.length-1&&(s=s.slice(1,-1)),e[i[1]]=s}return e},t}(),_={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function A(t,i){return MediaSource.isTypeSupported((i||"video")+'/mp4;codecs="'+t+'"')}var P=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,k=/#EXT-X-MEDIA:(.*)/g,I=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),T=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,C=/\.(mp4|m4s|m4v|m4a)$/i,M=function(){function t(){}return t.findGroup=function(t,i){for(var e=0;e2?(i=e.shift()+".",i+=parseInt(e.shift()).toString(16),i+=("000"+parseInt(e.shift()).toString(16)).substr(-4)):i=t,i},t.resolve=function(t,i){return t=L(i,t),r.buildAbsoluteURL(i,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(i,e){var s,n=[];function r(t,i){["video","audio"].forEach((function(e){var s=t.filter((function(t){return function(t,i){var e=_[i];return!!e&&!0===e[t.slice(0,4)]}(t,e)}));if(s.length){var n=s.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));i[e+"Codec"]=n.length>0?n[0]:s[0],t=t.filter((function(t){return-1===s.indexOf(t)}))}})),i.unknownCodecs=t}for(P.lastIndex=0;null!=(s=P.exec(i));){var h={},o=h.attrs=new S(s[1]);h.url=t.resolve(s[2],e);var a=o.decimalResolution("RESOLUTION");a&&(h.width=a.width,h.height=a.height),h.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),h.name=o.NAME,r([].concat((o.CODECS||"").split(/[ ,]+/)),h),h.videoCodec&&-1!==h.videoCodec.indexOf("avc1")&&(h.videoCodec=t.convertAVC1ToAVCOTI(h.videoCodec)),n.push(h)}return n},t.parseMasterPlaylistMedia=function(i,e,s,n){var r;void 0===n&&(n=[]);var h=[],o=0;for(k.lastIndex=0;null!==(r=k.exec(i));){var a=new S(r[1]);if(a.TYPE===s){var c={id:o++,groupId:a["GROUP-ID"],name:a.NAME||a.LANGUAGE,type:s,default:"YES"===a.DEFAULT,autoselect:"YES"===a.AUTOSELECT,forced:"YES"===a.FORCED,lang:a.LANGUAGE};if(a.URI&&(c.url=t.resolve(a.URI,e)),n.length){var l=t.findGroup(n,c.groupId);c.audioCodec=l?l.codec:n[0].codec}h.push(c)}}return h},t.parseLevelPlaylist=function(t,i,e,s,n){var r,h,a,l=0,u=0,d=new b(i),p=0,f=null,g=new m,y=null;for(I.lastIndex=0;null!==(r=I.exec(t));){var w=r[1];if(w){g.duration=parseFloat(w);var x=(" "+r[2]).slice(1);g.title=x||null,g.tagList.push(x?["INF",w,x]:["INF",w])}else if(r[3]){if(Object(o.a)(g.duration)){var _=l++;g.type=s,g.start=u,a&&(g.levelkey=a),g.sn=_,g.level=e,g.cc=p,g.urlId=n,g.baseurl=i,g.relurl=(" "+r[3]).slice(1),g.relurl=L(g.baseurl,g.relurl),E(g,f),d.fragments.push(g),f=g,u+=g.duration,g=new m}}else if(r[4]){var A=(" "+r[4]).slice(1);f?g.setByteRange(A,f):g.setByteRange(A)}else if(r[5])g.rawProgramDateTime=(" "+r[5]).slice(1),g.tagList.push(["PROGRAM-DATE-TIME",g.rawProgramDateTime]),null===y&&(y=d.fragments.length);else{if(!(r=r[0].match(T))){c.b.warn("No matches on slow regex match for level playlist!");continue}for(h=1;h=0&&(a.method=O,a.key=null,a.iv=B));break;case"START":var D=new S(P).decimalFloatingPoint("TIME-OFFSET");Object(o.a)(D)&&(d.startTimeOffset=D);break;case"MAP":var j=new S(P);g.relurl=j.URI,j.BYTERANGE&&g.setByteRange(j.BYTERANGE),g.baseurl=i,g.level=e,g.type=s,g.sn="initSegment",g.relurl=L(g.baseurl,g.relurl),d.initSegment=g,(g=new m).rawProgramDateTime=d.initSegment.rawProgramDateTime;break;default:c.b.warn("line parsed but not handled: "+r)}}}return(g=f)&&!g.relurl&&(d.fragments.pop(),u-=g.duration),d.totalduration=u,d.averagetargetduration=u/d.fragments.length,d.endSN=l-1,d.startCC=d.fragments[0]?d.fragments[0].cc:0,d.endCC=p,!d.initSegment&&d.fragments.length&&d.fragments.every((function(t){return C.test(t.relurl)}))&&(c.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(g=new m).relurl=d.fragments[0].relurl,g.baseurl=i,g.level=e,g.type=s,g.sn="initSegment",g.relurl=L(g.baseurl,g.relurl),d.initSegment=g,d.needSidxRanges=!0),y&&function(t,i){for(var e=t[i],s=i-1;s>=0;s--){var n=t[s];n.programDateTime=e.programDateTime-1e3*n.duration,e=n}}(d.fragments,y),d},t}();function E(t,i){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):i&&i.programDateTime&&(t.programDateTime=i.endProgramDateTime),Object(o.a)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}function L(t,i){var e=r.parseURL(t);return e&&e.query&&(i+=e.query),i}var O=window.performance,R=function(t){var i,e;function r(i){var e;return(e=t.call(this,i,a.a.MANIFEST_LOADING,a.a.LEVEL_LOADING,a.a.AUDIO_TRACK_LOADING,a.a.SUBTITLE_TRACK_LOADING)||this).loaders={},e}e=t,(i=r).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e,r.canHaveQualityLevels=function(t){return t!==s.AUDIO_TRACK&&t!==s.SUBTITLE_TRACK},r.mapContextToLevelType=function(t){switch(t.type){case s.AUDIO_TRACK:return n.AUDIO;case s.SUBTITLE_TRACK:return n.SUBTITLE;default:return n.MAIN}},r.getResponseUrl=function(t,i){var e=t.url;return void 0!==e&&0!==e.indexOf("data:")||(e=i.url),e};var l=r.prototype;return l.createInternalLoader=function(t){var i=this.hls.config,e=i.pLoader,s=i.loader,n=new(e||s)(i);return t.loader=n,this.loaders[t.type]=n,n},l.getInternalLoader=function(t){return this.loaders[t.type]},l.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},l.destroyInternalLoaders=function(){for(var t in this.loaders){var i=this.loaders[t];i&&i.destroy(),this.resetInternalLoader(t)}},l.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},l.onManifestLoading=function(t){this.load({url:t.url,type:s.MANIFEST,level:0,id:null,responseType:"text"})},l.onLevelLoading=function(t){this.load({url:t.url,type:s.LEVEL,level:t.level,id:t.id,responseType:"text"})},l.onAudioTrackLoading=function(t){this.load({url:t.url,type:s.AUDIO_TRACK,level:null,id:t.id,responseType:"text"})},l.onSubtitleTrackLoading=function(t){this.load({url:t.url,type:s.SUBTITLE_TRACK,level:null,id:t.id,responseType:"text"})},l.load=function(t){var i=this.hls.config;c.b.debug("Loading playlist of type "+t.type+", level: "+t.level+", id: "+t.id);var e,n,r,h,o=this.getInternalLoader(t);if(o){var a=o.context;if(a&&a.url===t.url)return c.b.trace("playlist request ongoing"),!1;c.b.warn("aborting previous loader for type: "+t.type),o.abort()}switch(t.type){case s.MANIFEST:e=i.manifestLoadingMaxRetry,n=i.manifestLoadingTimeOut,r=i.manifestLoadingRetryDelay,h=i.manifestLoadingMaxRetryTimeout;break;case s.LEVEL:e=0,h=0,r=0,n=i.levelLoadingTimeOut;break;default:e=i.levelLoadingMaxRetry,n=i.levelLoadingTimeOut,r=i.levelLoadingRetryDelay,h=i.levelLoadingMaxRetryTimeout}o=this.createInternalLoader(t);var l={timeout:n,maxRetry:e,retryDelay:r,maxRetryDelay:h},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return c.b.debug("Calling internal loader delegate for URL: "+t.url),o.load(t,l,u),!0},l.loadsuccess=function(t,i,e,s){if(void 0===s&&(s=null),e.isSidxRequest)return this.Da(t,e),void this.ja(t,i,e,s);if(this.resetInternalLoader(e.type),"string"!=typeof t.data)throw new Error('expected responseType of "text" for PlaylistLoader');var n=t.data;i.tload=O.now(),0===n.indexOf("#EXTM3U")?n.indexOf("#EXTINF:")>0||n.indexOf("#EXT-X-TARGETDURATION:")>0?this.Fa(t,i,e,s):this.$a(t,i,e,s):this.Va(t,e,"no EXTM3U delimiter",s)},l.loaderror=function(t,i,e){void 0===e&&(e=null),this.Ua(i,e,!1,t)},l.loadtimeout=function(t,i,e){void 0===e&&(e=null),this.Ua(i,e,!0)},l.$a=function(t,i,e,s){var n=this.hls,h=t.data,o=r.getResponseUrl(t,e),l=M.parseMasterPlaylist(h,o);if(l.length){var u=l.map((function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}})),d=M.parseMasterPlaylistMedia(h,o,"AUDIO",u),p=M.parseMasterPlaylistMedia(h,o,"SUBTITLES");if(d.length){var f=!1;d.forEach((function(t){t.url||(f=!0)})),!1===f&&l[0].audioCodec&&!l[0].attrs.AUDIO&&(c.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),d.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}n.trigger(a.a.MANIFEST_LOADED,{levels:l,audioTracks:d,subtitles:p,url:o,stats:i,networkDetails:s})}else this.Va(t,e,"no level found in manifest",s)},l.Fa=function(t,i,e,n){var h=this.hls,c=e.id,l=e.level,u=e.type,d=r.getResponseUrl(t,e),p=Object(o.a)(c)?c:0,f=Object(o.a)(l)?l:p,v=r.mapContextToLevelType(e),g=M.parseLevelPlaylist(t.data,d,f,v,p);if(g.tload=i.tload,u===s.MANIFEST){var m={url:d,details:g};h.trigger(a.a.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:d,stats:i,networkDetails:n})}if(i.tparsed=O.now(),g.needSidxRanges){var y=g.initSegment.url;this.load({url:y,isSidxRequest:!0,type:u,level:l,levelDetails:g,id:c,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else e.levelDetails=g,this.ja(t,i,e,n)},l.Da=function(t,i){if("string"==typeof t.data)throw new Error("sidx request must be made with responseType of array buffer");var e=d.a.parseSegmentIndex(new Uint8Array(t.data));if(e){var s=e.references,n=i.levelDetails;s.forEach((function(t,i){var e=t.info;if(n){var s=n.fragments[i];0===s.byteRange.length&&s.setByteRange(String(1+e.end-e.start)+"@"+String(e.start))}})),n&&n.initSegment.setByteRange(String(e.moovEndOffset)+"@0")}},l.Va=function(t,i,e,s){this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:e,networkDetails:s})},l.Ua=function(t,i,e,n){var r,o;void 0===e&&(e=!1),void 0===n&&(n=null),c.b.info("A network error occured while loading a "+t.type+"-type playlist");var l=this.getInternalLoader(t);switch(t.type){case s.MANIFEST:r=e?h.a.MANIFEST_LOAD_TIMEOUT:h.a.MANIFEST_LOAD_ERROR,o=!0;break;case s.LEVEL:r=e?h.a.LEVEL_LOAD_TIMEOUT:h.a.LEVEL_LOAD_ERROR,o=!1;break;case s.AUDIO_TRACK:r=e?h.a.AUDIO_TRACK_LOAD_TIMEOUT:h.a.AUDIO_TRACK_LOAD_ERROR,o=!1;break;default:o=!1}l&&(l.abort(),this.resetInternalLoader(t.type));var u={type:h.b.NETWORK_ERROR,details:r,fatal:o,url:t.url,loader:l,context:t,networkDetails:i};n&&(u.response=n),this.hls.trigger(a.a.ERROR,u)},l.ja=function(t,i,e,n){var h=e.type,o=e.level,c=e.id,l=e.levelDetails;if(l&&l.targetduration)if(r.canHaveQualityLevels(e.type))this.hls.trigger(a.a.LEVEL_LOADED,{details:l,level:o||0,id:c||0,stats:i,networkDetails:n});else switch(h){case s.AUDIO_TRACK:this.hls.trigger(a.a.AUDIO_TRACK_LOADED,{details:l,id:c,stats:i,networkDetails:n});break;case s.SUBTITLE_TRACK:this.hls.trigger(a.a.SUBTITLE_TRACK_LOADED,{details:l,id:c,stats:i,networkDetails:n})}else this.Va(t,e,"invalid target duration",n)},r}(u),B=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.FRAG_LOADING)||this).loaders={},e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){var i=this.loaders;for(var e in i){var s=i[e];s&&s.destroy()}this.loaders={},t.prototype.destroy.call(this)},n.onFragLoading=function(t){var i=t.frag,e=i.type,s=this.loaders,n=this.hls.config,r=n.fLoader,h=n.loader;i.loaded=0;var a,l,u,d=s[e];d&&(c.b.warn("abort previous fragment loader for type: "+e),d.abort()),d=s[e]=i.loader=n.fLoader?new r(n):new h(n),a={url:i.url,frag:i,responseType:"arraybuffer",progressData:!1};var p=i.byteRangeStartOffset,f=i.byteRangeEndOffset;Object(o.a)(p)&&Object(o.a)(f)&&(a.rangeStart=p,a.rangeEnd=f),l={timeout:n.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:n.fragLoadingMaxRetryTimeout},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},d.load(a,l,u)},n.loadsuccess=function(t,i,e,s){void 0===s&&(s=null);var n=t.data,r=e.frag;r.loader=void 0,this.loaders[r.type]=void 0,this.hls.trigger(a.a.FRAG_LOADED,{payload:n,frag:r,stats:i,networkDetails:s})},n.loaderror=function(t,i,e){void 0===e&&(e=null);var s=i.frag,n=s.loader;n&&n.abort(),this.loaders[s.type]=void 0,this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.FRAG_LOAD_ERROR,fatal:!1,frag:i.frag,response:t,networkDetails:e})},n.loadtimeout=function(t,i,e){void 0===e&&(e=null);var s=i.frag,n=s.loader;n&&n.abort(),this.loaders[s.type]=void 0,this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i.frag,networkDetails:e})},n.loadprogress=function(t,i,e,s){void 0===s&&(s=null);var n=i.frag;n.loaded=t.loaded,this.hls.trigger(a.a.FRAG_LOAD_PROGRESS,{frag:n,stats:t,networkDetails:s})},s}(u),D=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.KEY_LOADING)||this).loaders={},e.decryptkey=null,e.decrypturl=null,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){for(var i in this.loaders){var e=this.loaders[i];e&&e.destroy()}this.loaders={},t.prototype.destroy.call(this)},n.onKeyLoading=function(t){var i=t.frag,e=i.type,s=this.loaders[e];if(i.decryptdata){var n=i.decryptdata.uri;if(n!==this.decrypturl||null===this.decryptkey){var r=this.hls.config;if(s&&(c.b.warn("abort previous key loader for type:"+e),s.abort()),!n)return void c.b.warn("key uri is falsy");i.loader=this.loaders[e]=new r.loader(r),this.decrypturl=n,this.decryptkey=null;var h={url:n,frag:i,responseType:"arraybuffer"},o={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:r.fragLoadingRetryDelay,maxRetryDelay:r.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};i.loader.load(h,o,l)}else this.decryptkey&&(i.decryptdata.key=this.decryptkey,this.hls.trigger(a.a.KEY_LOADED,{frag:i}))}else c.b.warn("Missing decryption data on fragment in onKeyLoading")},n.loadsuccess=function(t,i,e){var s=e.frag;s.decryptdata?(this.decryptkey=s.decryptdata.key=new Uint8Array(t.data),s.loader=void 0,delete this.loaders[s.type],this.hls.trigger(a.a.KEY_LOADED,{frag:s})):c.b.error("after key load, decryptdata unset")},n.loaderror=function(t,i){var e=i.frag,s=e.loader;s&&s.abort(),delete this.loaders[e.type],this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.KEY_LOAD_ERROR,fatal:!1,frag:e,response:t})},n.loadtimeout=function(t,i){var e=i.frag,s=e.loader;s&&s.abort(),delete this.loaders[e.type],this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:e})},s}(u),j="NOT_LOADED",F="APPENDING",$="PARTIAL",V="OK",U=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.BUFFER_APPENDED,a.a.FRAG_BUFFERED,a.a.FRAG_LOADED)||this).bufferPadding=.2,e.fragments=Object.create(null),e.timeRanges=Object.create(null),e.config=i.config,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,u.prototype.destroy.call(this),t.prototype.destroy.call(this)},n.getBufferedFrag=function(t,i){var e=this.fragments,s=Object.keys(e).filter((function(s){var n=e[s];if(n.body.type!==i)return!1;if(!n.buffered)return!1;var r=n.body;return r.startPTS<=t&&t<=r.endPTS}));if(0===s.length)return null;var n=s.pop();return e[n].body},n.detectEvictedFragments=function(t,i){var e,s,n=this;Object.keys(this.fragments).forEach((function(r){var h=n.fragments[r];if(!0===h.buffered){var o=h.range[t];if(o){e=o.time;for(var a=0;a=s&&i<=n){r.push({startPTS:Math.max(t,e.start(o)),endPTS:Math.min(i,e.end(o))});break}if(ts)r.push({startPTS:Math.max(t,e.start(o)),endPTS:Math.min(i,e.end(o))}),h=!0;else if(i<=s)break}return{time:r,partial:h}},n.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn},n.getPartialFragment=function(t){var i,e,s,n=this,r=null,h=0;return Object.keys(this.fragments).forEach((function(o){var a=n.fragments[o];n.isPartial(a)&&(e=a.body.startPTS-n.bufferPadding,s=a.body.endPTS+n.bufferPadding,t>=e&&t<=s&&(i=Math.min(t-e,s-t),h<=i&&(r=a.body,h=i)))})),r},n.getState=function(t){var i=this.getFragmentKey(t),e=this.fragments[i],s=j;return void 0!==e&&(s=e.buffered?!0===this.isPartial(e)?$:V:F),s},n.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},n.isTimeBuffered=function(t,i,e){for(var s,n,r=0;r=s&&i<=n)return!0;if(i<=s)return!1}return!1},n.onFragLoaded=function(t){var i=t.frag;Object(o.a)(i.sn)&&!i.bitrateTest&&(this.fragments[this.getFragmentKey(i)]={body:i,range:Object.create(null),buffered:!1})},n.onBufferAppended=function(t){var i=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach((function(t){var e=i.timeRanges[t];i.detectEvictedFragments(t,e)}))},n.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},n.hasFragment=function(t){var i=this.getFragmentKey(t);return void 0!==this.fragments[i]},n.removeFragment=function(t){var i=this.getFragmentKey(t);delete this.fragments[i]},n.removeAllFragments=function(){this.fragments=Object.create(null)},s}(u),N={search:function(t,i){for(var e=0,s=t.length-1,n=null,r=null;e<=s;){var h=i(r=t[n=(e+s)/2|0]);if(h>0)e=n+1;else{if(!(h<0))return r;s=n-1}}return null}},H=function(){function t(){}return t.isBuffered=function(t,i){try{if(t)for(var e=t.buffered,s=0;s=e.start(s)&&i<=e.end(s))return!0}catch(t){}return!1},t.bufferInfo=function(t,i,e){try{if(t){var s,n=t.buffered,r=[];for(s=0;sh&&(s[r-1].end=t[n].end):s.push(t[n])}else s.push(t[n])}else s=t;for(var o,a=0,c=i,l=i,u=0;u=d&&i1?i-1:0),s=1;si?(s.duration=r-s.start,s.duration<0&&c.b.warn("negative duration computed for frag "+s.sn+",level "+s.level+", there should be some duration drift between playlist and fragment!")):(n.duration=s.start-r,n.duration<0&&c.b.warn("negative duration computed for frag "+n.sn+",level "+n.level+", there should be some duration drift between playlist and fragment!")):n.start=e>i?s.start+s.duration:Math.max(s.start-n.duration,0)}function tt(t,i,e,s,n,r){var h=e;if(Object(o.a)(i.startPTS)){var a=Math.abs(i.startPTS-e);Object(o.a)(i.deltaPTS)?i.deltaPTS=Math.max(a,i.deltaPTS):i.deltaPTS=a,h=Math.max(e,i.startPTS),e=Math.min(e,i.startPTS),s=Math.max(s,i.endPTS),n=Math.min(n,i.startDTS),r=Math.max(r,i.endDTS)}var c=e-i.start;i.start=i.startPTS=e,i.maxStartPTS=h,i.endPTS=s,i.startDTS=n,i.endDTS=r,i.duration=s-e;var l,u,d,p=i.sn;if(!t||pt.endSN)return 0;for(l=p-t.startSN,(u=t.fragments)[l]=i,d=l;d>0;d--)Z(u,d,d-1);for(d=l;de.startCC||t&&t.cct&&e.start?-1:0}function ht(t,i,e){var s=1e3*Math.min(i,e.duration+(e.deltaPTS?e.deltaPTS:0));return(e.endProgramDateTime||0)-s>t}var ot=function(){function t(t,i,e,s){this.config=t,this.media=i,this.fragmentTracker=e,this.hls=s,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var i=t.prototype;return i.poll=function(t){var i=this.config,e=this.media,s=this.stalled,n=e.currentTime,r=e.seeking,h=this.seeking&&!r,o=!this.seeking&&r;if(this.seeking=r,n===t){if((o||h)&&(this.stalled=null),!e.paused&&!e.ended&&0!==e.playbackRate&&e.buffered.length){var a=H.bufferInfo(e,n,0),l=a.len>0,u=a.nextStart||0;if(l||u){if(r){if(a.len>2||!u||u-n>2)return;this.moved=!1}if(!this.moved&&this.stalled){var d=Math.max(u,a.start||0)-n;if(d>0&&d<=2)return void this.Na(null)}var p=self.performance.now();if(null!==s){var f=p-s;!r&&f>=250&&this.Ha(a.len);var v=H.bufferInfo(e,n,i.maxBufferHole);this.za(v,f)}else this.stalled=p}}}else if(this.moved=!0,null!==s){if(this.stallReported){var g=self.performance.now()-s;c.b.warn("playback not stuck anymore @"+n+", after "+Math.round(g)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},i.za=function(t,i){var e=this.config,s=this.fragmentTracker,n=this.media.currentTime,r=s.getPartialFragment(n);r&&this.Na(r)||t.len>e.maxBufferHole&&i>1e3*e.highBufferWatchdogPeriod&&(c.b.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this.qa())},i.Ha=function(t){var i=this.hls,e=this.media;this.stallReported||(this.stallReported=!0,c.b.warn("Playback stalling at @"+e.currentTime+" due to low buffer"),i.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},i.Na=function(t){for(var i=this.config,e=this.hls,s=this.media,n=s.currentTime,r=0,o=0;o=r&&n0&&-1===t&&(c.b.log("override startPosition with lastCurrentTime @"+i.toFixed(3)),t=i),this.state=lt,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=ct},d.stopLoad=function(){this.forceStartLoad=!1,t.prototype.stopLoad.call(this)},d.doTick=function(){switch(this.state){case gt:this.fragLoadError=0;break;case lt:this.Ga();break;case bt:var t=this.levels[this.level];t&&t.details&&(this.state=lt);break;case pt:var i=window.performance.now(),e=this.retryDate;(!e||i>=e||this.media&&this.media.seeking)&&(c.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=lt)}this.Ja(),this.Qa()},d.Ga=function(){var t=this.hls,i=t.config,e=this.media;if(void 0!==this.levelLastLoaded&&(e||!this.startFragRequested&&i.startFragPrefetch)){var s;s=this.loadedmetadata?e.currentTime:this.nextLoadPosition;var n=t.nextLoadLevel,r=this.levels[n];if(r){var h,o=r.bitrate;h=o?Math.max(8*i.maxBufferSize/o,i.maxBufferLength):i.maxBufferLength,h=Math.min(h,i.maxMaxBufferLength);var l=H.bufferInfo(this.mediaBuffer?this.mediaBuffer:e,s,i.maxBufferHole),u=l.len;if(!(u>=h)){c.b.trace("buffer length of "+u.toFixed(3)+" is below max of "+h.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=n;var d=r.details;if(!d||d.live&&this.levelLastLoaded!==n)this.state=bt;else{if(this.Xa(l,d)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(a.a.BUFFER_EOS,p),void(this.state=mt)}this.Ya(s,l,d)}}}}},d.Ya=function(t,i,e){var s=this.fragPrevious,n=this.level,r=e.fragments,h=r.length;if(0!==h){var o,a=r[0].start,l=r[h-1].start+r[h-1].duration,u=i.end;if(e.initSegment&&!e.initSegment.data)o=e.initSegment;else if(e.live){var d=this.config.initialLiveManifestSize;if(hp&&p>u.currentTime&&(c.b.log("buffer end: "+i.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+p.toFixed(3)),u.currentTime=p),this.nextLoadPosition=p}if(t.PTSKnown&&i>s&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(n)if(t.hasProgramDateTime)c.b.log("live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),a=function(t,i,e){if(null===i||!Array.isArray(t)||!t.length||!Object(o.a)(i))return null;if(i<(t[0].programDateTime||0))return null;if(i>=(t[t.length-1].endProgramDateTime||0))return null;e=e||0;for(var s=0;s=t.startSN&&f<=t.endSN){var v=r[f-t.startSN];n.cc===v.cc&&(a=v,c.b.log("live playlist, switching playlist, load frag with next SN: "+a.sn))}a||(a=N.search(r,(function(t){return n.cc-t.cc})))&&c.b.log("live playlist, switching playlist, load frag with same CC: "+a.sn)}a||(a=r[Math.min(h-1,Math.round(h/2))],c.b.log("live playlist, switching playlist, unknown, load middle frag : "+a.sn))}return a},d.Za=function(t,i,e,s,n,r,h){var o,a=this.hls.config;if(o=nr-a.maxFragLookUpTolerance?0:a.maxFragLookUpTolerance):s[e-1],o){var l=o.sn-h.startSN,u=i&&o.level===i.level,d=s[l-1],p=s[l+1];if(i&&o.sn===i.sn)if(u&&!o.backtracked)if(o.sna.maxBufferHole&&i.dropped&&l?(o=d,c.b.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(o=p,c.b.log("Re-loading fragment with SN: "+o.sn))}else o=null;else o.backtracked&&(p&&p.backtracked?(c.b.warn("Already backtracked from fragment "+p.sn+", will not backtrack to fragment "+o.sn+". Loading fragment "+p.sn),o=p):(c.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),o.dropped=0,d?(o=d).backtracked=!0:l&&(o=null)))}return o},d.tc=function(t){this.state=ut,this.hls.trigger(a.a.KEY_LOADING,{frag:t})},d.ic=function(t){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,"initSegment"!==t.sn&&(this.startFragRequested=!0),Object(o.a)(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||i===j||i===$?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(a.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new Y(this.hls,"main")),this.state=dt):i===F&&this.ec(t.duration)&&this.fragmentTracker.removeFragment(t)},d.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,n.MAIN)},d.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},d.Qa=function(){var t,i,e=this.media;if(e&&e.readyState&&!1===e.seeking&&((i=e.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=i),H.isBuffered(e,i)?t=this.getBufferedFrag(i):H.isBuffered(e,i+.1)&&(t=this.getBufferedFrag(i+.1)),t)){var s=t;if(s!==this.fragPlaying){this.hls.trigger(a.a.FRAG_CHANGED,{frag:s});var n=s.level;this.fragPlaying&&this.fragPlaying.level===n||this.hls.trigger(a.a.LEVEL_SWITCHED,{level:n}),this.fragPlaying=s}}},d.immediateLevelSwitch=function(){if(c.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t,i=this.media;i?(t=i.paused,i.pause()):t=!0,this.previouslyPaused=t}var e=this.fragCurrent;e&&e.loader&&e.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},d.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,H.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},d.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var i,e,s;if((e=this.getBufferedFrag(t.currentTime))&&e.startPTS>1&&this.flushMainBuffer(0,e.startPTS-1),t.paused)i=0;else{var n=this.hls.nextLoadLevel,r=this.levels[n],h=this.fragLastKbps;i=h&&this.fragCurrent?this.fragCurrent.duration*r.bitrate/(1e3*h)+1:0}if((s=this.getBufferedFrag(t.currentTime+i))&&(s=this.followingBufferedFrag(s))){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(s.maxStartPTS,Number.POSITIVE_INFINITY)}}},d.flushMainBuffer=function(t,i){this.state=gt;var e={startOffset:t,endOffset:i};this.altAudio&&(e.type="video"),this.hls.trigger(a.a.BUFFER_FLUSHING,e)},d.onMediaAttached=function(t){var i=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("seeked",this.onvseeked),i.addEventListener("ended",this.onvended);var e=this.config;this.levels&&e.autoStartLoad&&this.hls.startLoad(e.startPosition),this.gapController=new ot(e,i,this.fragmentTracker,this.hls)},d.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(c.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var i=this.levels;i&&i.forEach((function(t){t.details&&t.details.fragments.forEach((function(t){t.backtracked=void 0}))})),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},d.onMediaSeeked=function(){var t=this.media,i=t?t.currentTime:void 0;Object(o.a)(i)&&c.b.log("media seeked to "+i.toFixed(3)),this.tick()},d.onManifestLoading=function(){c.b.log("trigger BUFFER_RESET"),this.hls.trigger(a.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},d.onManifestParsed=function(t){var i,e=!1,s=!1;t.levels.forEach((function(t){(i=t.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(e=!0),-1!==i.indexOf("mp4a.40.5")&&(s=!0))})),this.audioCodecSwitch=e&&s,this.audioCodecSwitch&&c.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=t.altAudio,this.levels=t.levels,this.startFragRequested=!1;var n=this.config;(n.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(n.startPosition)},d.onLevelLoaded=function(t){var i=t.details,e=t.level,s=this.levels[this.levelLastLoaded],n=this.levels[e],r=i.totalduration,h=0;if(c.b.log("level "+e+" loaded ["+i.startSN+","+i.endSN+"],duration:"+r),i.live){var l=n.details;l&&i.fragments.length>0?(function(t,i){i.initSegment&&t.initSegment&&(i.initSegment=t.initSegment);var e,s=0;if(it(t,i,(function(t,n){s=t.cc-n.cc,Object(o.a)(t.startPTS)&&(n.start=n.startPTS=t.startPTS,n.endPTS=t.endPTS,n.duration=t.duration,n.backtracked=t.backtracked,n.dropped=t.dropped,e=n),i.PTSKnown=!0})),i.PTSKnown){if(s){c.b.log("discontinuity sliding from playlist, take drift into account");for(var n=i.fragments,r=0;rs.length))for(var r=0;r0,this.nc())}},d.nc=function(){if(!(this.state!==vt||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var i=this.mediaBuffer?this.mediaBuffer:this.media;c.b.log("main buffered : "+et.toString(i.buffered)),this.fragPrevious=t;var e=this.stats;e.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*e.total/(e.tbuffered-e.tfirst)),this.hls.trigger(a.a.FRAG_BUFFERED,{stats:e,frag:t,id:"main"}),this.state=lt}this.tick()}},d.onError=function(t){var i=t.frag||this.fragCurrent;if(!i||"main"===i.type){var e=!!this.media&&H.isBuffered(this.media,this.media.currentTime)&&H.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case h.a.FRAG_LOAD_ERROR:case h.a.FRAG_LOAD_TIMEOUT:case h.a.KEY_LOAD_ERROR:case h.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var s=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);c.b.warn("mediaController: frag loading failed, retry in "+s+" ms"),this.retryDate=window.performance.now()+s,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=pt}else c.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=yt;break;case h.a.LEVEL_LOAD_ERROR:case h.a.LEVEL_LOAD_TIMEOUT:this.state!==yt&&(t.fatal?(this.state=yt,c.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==bt||(this.state=lt));break;case h.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==ft&&this.state!==vt||(e?(this.ec(this.config.maxBufferLength),this.state=lt):(c.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},d.ec=function(t){var i=this.config;return i.maxMaxBufferLength>=t&&(i.maxMaxBufferLength/=2,c.b.warn("main:reduce max buffer length to "+i.maxMaxBufferLength+"s"),!0)},d.Ja=function(){var t=this.media;if(t&&0!==t.readyState){var i=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&i.length?(this.loadedmetadata=!0,this.rc()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,i)}},d.onFragLoadEmergencyAborted=function(){this.state=lt,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},d.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;t&&this.fragmentTracker.detectEvictedFragments(f.VIDEO,t.buffered),this.state=lt,this.fragPrevious=null},d.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},d.rc=function(){var t=this.media,i=t.currentTime,e=t.seeking?i:this.startPosition;i!==e&&e>=0&&(c.b.log("target start position not buffered, seek to buffered.start(0) "+e+" from current time "+i+" "),t.currentTime=e)},d.sc=function(t){var i=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&(c.b.log("swapping playlist audio codec"),i&&(i=-1!==i.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),i},r=s,(l=[{key:"state",set:function(t){if(this.state!==t){var i=this.state;this.Wa=t,c.b.log("main stream-controller: "+i+"->"+t),this.hls.trigger(a.a.STREAM_STATE_TRANSITION,{previousState:i,nextState:t})}},get:function(){return this.Wa}},{key:"currentLevel",get:function(){var t=this.media;if(t){var i=this.getBufferedFrag(t.currentTime);if(i)return i.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this.hc},set:function(t){this.hc=t}}])&&wt(r.prototype,l),u&&wt(r,u),s}(function(t){var i,e;function s(){return t.apply(this,arguments)||this}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.doTick=function(){},n.startLoad=function(){},n.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=ct},n.Xa=function(t,i){var e=this.fragCurrent,s=this.fragmentTracker;if(!i.live&&e&&!e.backtracked&&e.sn===i.endSN&&!t.nextStart){var n=s.getState(e);return n===$||n===V}return!1},n.onMediaSeeking=function(){var t=this.config,i=this.media,e=this.mediaBuffer,s=this.state,n=i?i.currentTime:null,r=H.bufferInfo(e||i,n,this.config.maxBufferHole);if(Object(o.a)(n)&&c.b.log("media seeking to "+n.toFixed(3)),s===dt){var h=this.fragCurrent;if(0===r.len&&h){var a=t.maxFragLookUpTolerance,l=h.start-a,u=h.start+h.duration+a;nu?(h.loader&&(c.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),h.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=lt):c.b.log("seeking outside of buffer but within currently loaded fragment range")}}else s===mt&&(0===r.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=lt);i&&(this.lastCurrentTime=n),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=n),this.tick()},n.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},n.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},n.onHandlerDestroyed=function(){this.state=ct,this.fragmentTracker=null},n.computeLivePosition=function(t,i){var e=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*i.targetduration;return t+Math.max(0,i.totalduration-e)},s}(function(t){var i,e;function s(i){for(var e,s=arguments.length,n=new Array(s>1?s-1:0),r=1;r1&&(this.clearNextTick(),this.ac=self.setTimeout(this.oc,0)),this.dc=0)},n.doTick=function(){},s}(u)));function St(t,i){for(var e=0;e0){i=e[0].bitrate,e.sort((function(t,i){return t.bitrate-i.bitrate})),this.fc=e;for(var u=0;u=0&&t1&&u.loadError0){var i=this.currentLevelIndex,e=t.urlId,s=t.url[e];c.b.log("Attempt loading level index "+i+" with URL-id "+e),this.hls.trigger(a.a.LEVEL_LOADING,{url:s,level:i,id:e})}}},n=s,(r=[{key:"levels",get:function(){return this.fc}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var i=this.fc;i&&(t=Math.min(t,i.length-1),this.currentLevelIndex===t&&i[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this.gc&&(this.gc=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this.vc},set:function(t){this.vc=t}},{key:"startLevel",get:function(){if(void 0===this.gc){var t=this.hls.config.startLevel;return void 0!==t?t:this.vc}return this.gc},set:function(t){this.gc=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&St(n.prototype,r),o&&St(n,o),s}(u),Pt=e(4);function kt(t,i){var e;try{e=new Event("addtrack")}catch(t){(e=document.createEvent("Event")).initEvent("addtrack",!1,!1)}e.track=t,i.dispatchEvent(e)}var It=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.MEDIA_ATTACHED,a.a.MEDIA_DETACHING,a.a.FRAG_PARSING_METADATA,a.a.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,e.media=void 0,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){u.prototype.destroy.call(this)},n.onMediaAttached=function(t){this.media=t.media,this.media},n.onMediaDetaching=function(){!function(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}(this.id3Track),this.id3Track=void 0,this.media=void 0},n.getID3Track=function(t){for(var i=0;io&&(c.b.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),o=h+.25);for(var a=0;at[t.length-1].endTime)return t[t.length-1];for(var e=0,s=t.length-1;e<=s;){var n=Math.floor((s+e)/2);if(it[n].endTime))return t[n];e=n+1}}return t[e].endTime-i=this.minWeight_},i.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},i.destroy=function(){},t}();function Mt(t,i){for(var e=0;e500*e.duration/o){var l=t.levels,u=Math.max(1,r.bw?r.bw/8:1e3*r.loaded/h),d=l[e.level],p=d.realBitrate?Math.max(d.realBitrate,d.bitrate):d.bitrate,f=r.total?r.total:Math.max(r.loaded,Math.round(e.duration*p/8)),v=i.currentTime,g=(f-r.loaded)/u,m=(H.bufferInfo(i,v,t.config.maxBufferHole).end-v)/o;if(m<2*e.duration/o&&g>m){var y;for(y=e.level-1;y>n;y--){var b=l[y].realBitrate?Math.max(l[y].realBitrate,l[y].bitrate):l[y].bitrate;if(e.duration*b/(6.4*u)=s;l--){var u=a[l];if(u){var d=u.details,p=d?d.totalduration/d.fragments.length:i,f=!!d&&d.live,v=void 0;v=l<=t?h*e:o*e;var g=a[l].realBitrate?Math.max(a[l].realBitrate,a[l].bitrate):a[l].bitrate,m=g*p/v;if(c.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+l+"/"+Math.round(v)+"/"+g+"/"+p+"/"+r+"/"+m),v>g&&(!m||f&&!this.bitrateTestDelay||m=0)return p;c.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var f=o?Math.min(o,s.maxStarvationDelay):s.maxStarvationDelay,v=s.abrBandWidthFactor,g=s.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;m&&(f=(o?Math.min(o,s.maxLoadingDelay):s.maxLoadingDelay)-m,c.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),v=g=1)}return p=this.bc(h,o,u,n,i,d+f,v,g,e),Math.max(p,0)}}])&&Mt(n.prototype,r),l&&Mt(n,l),s}(u),Ot=G(),Rt=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.MEDIA_ATTACHING,a.a.MEDIA_DETACHING,a.a.MANIFEST_PARSED,a.a.BUFFER_RESET,a.a.BUFFER_APPENDING,a.a.BUFFER_CODECS,a.a.BUFFER_EOS,a.a.BUFFER_FLUSHING,a.a.LEVEL_PTS_UPDATED,a.a.LEVEL_UPDATED)||this).wc=null,e.xc=null,e.Sc=10,e._c=null,e.Ac=null,e.Pc=!1,e.kc=!1,e.config=void 0,e.audioTimestampOffset=void 0,e.bufferCodecEventsExpected=0,e.Ic=0,e.media=null,e.mediaSource=null,e.segments=[],e.parent=void 0,e.appending=!1,e.appended=0,e.appendError=0,e.flushBufferCounter=0,e.tracks={},e.pendingTracks={},e.sourceBuffer={},e.flushRange=[],e.Cc=function(){c.b.log("media source opened"),e.hls.trigger(a.a.MEDIA_ATTACHED,{media:e.media});var t=e.mediaSource;t&&t.removeEventListener("sourceopen",e.Cc),e.checkPendingTracks()},e.Mc=function(){c.b.log("media source closed")},e.Ec=function(){c.b.log("media source ended")},e.Oc=function(){if(e.audioTimestampOffset&&e.sourceBuffer.audio){var t=e.sourceBuffer.audio;c.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+e.audioTimestampOffset),t.timestampOffset=e.audioTimestampOffset,delete e.audioTimestampOffset}e.Pc&&e.doFlush(),e.kc&&e.checkEos(),e.appending=!1;var i=e.parent,s=e.segments.reduce((function(t,e){return e.parent===i?t+1:t}),0),n={},r=e.sourceBuffer;for(var h in r){var o=r[h];if(!o)throw Error("handling source buffer update end error: source buffer for "+h+" uninitilized and unable to update buffered TimeRanges.");n[h]=o.buffered}e.hls.trigger(a.a.BUFFER_APPENDED,{parent:i,pending:s,timeRanges:n}),e.Pc||e.doAppending(),e.updateMediaElementDuration(),0===s&&e.flushLiveBackBuffer()},e.Rc=function(t){c.b.error("sourceBuffer error:",t),e.hls.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.config=i.config,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){u.prototype.destroy.call(this)},n.onLevelPtsUpdated=function(t){var i=t.type,e=this.tracks.audio;if("audio"===i&&e&&"audio/mpeg"===e.container){var s=this.sourceBuffer.audio;if(!s)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(s.timestampOffset-t.start)>.1){var n=s.updating;try{s.abort()}catch(t){c.b.warn("can not abort audio buffer: "+t)}n?this.audioTimestampOffset=t.start:(c.b.warn("change mpeg audio timestamp offset from "+s.timestampOffset+" to "+t.start),s.timestampOffset=t.start)}}},n.onManifestParsed=function(t){this.bufferCodecEventsExpected=this.Ic=t.altAudio?2:1,c.b.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},n.onMediaAttaching=function(t){var i=this.media=t.media;if(i&&Ot){var e=this.mediaSource=new Ot;e.addEventListener("sourceopen",this.Cc),e.addEventListener("sourceended",this.Ec),e.addEventListener("sourceclose",this.Mc),i.src=window.URL.createObjectURL(e),this.Ac=i.src}},n.onMediaDetaching=function(){c.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){c.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.Cc),t.removeEventListener("sourceended",this.Ec),t.removeEventListener("sourceclose",this.Mc),this.media&&(this.Ac&&this.hls.config.cnxRenderWindow.URL.revokeObjectURL(this.Ac),this.media.src===this.Ac?(this.media.removeAttribute("src"),this.media.load()):c.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this.Ac=null,this.bufferCodecEventsExpected=this.Ic,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(a.a.MEDIA_DETACHED)},n.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,i=this.pendingTracks,e=Object.keys(i).length;(e&&!t||2===e)&&(this.createSourceBuffers(i),this.pendingTracks={},this.doAppending())},n.onBufferReset=function(){var t=this.sourceBuffer;for(var i in t){var e=t[i];try{e&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(e),e.removeEventListener("updateend",this.Oc),e.removeEventListener("error",this.Rc))}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},n.onBufferCodecs=function(t){var i=this;Object.keys(this.sourceBuffer).length||(Object.keys(t).forEach((function(e){i.pendingTracks[e]=t[e]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},n.createSourceBuffers=function(t){var i=this.sourceBuffer,e=this.mediaSource;if(!e)throw Error("createSourceBuffers called when mediaSource was null");for(var s in t)if(!i[s]){var n=t[s];if(!n)throw Error("source buffer exists for track "+s+", however track does not");var r=n.levelCodec||n.codec,o=n.container+";codecs="+r;c.b.log("creating sourceBuffer("+o+")");try{var l=i[s]=e.addSourceBuffer(o);l.addEventListener("updateend",this.Oc),l.addEventListener("error",this.Rc),this.tracks[s]={buffer:l,codec:r,id:n.id,container:n.container,levelCodec:n.levelCodec}}catch(t){c.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:o})}}this.hls.trigger(a.a.BUFFER_CREATED,{tracks:this.tracks})},n.onBufferAppending=function(t){this.Pc||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},n.onBufferEos=function(t){for(var i in this.sourceBuffer)if(!t.type||t.type===i){var e=this.sourceBuffer[i];e&&!e.ended&&(e.ended=!0,c.b.log(i+" sourceBuffer now EOS"))}this.checkEos()},n.checkEos=function(){var t=this.sourceBuffer,i=this.mediaSource;if(i&&"open"===i.readyState){for(var e in t){var s=t[e];if(s){if(!s.ended)return;if(s.updating)return void(this.kc=!0)}}c.b.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{i.endOfStream()}catch(t){c.b.warn("exception while calling mediaSource.endOfStream()")}this.kc=!1}else this.kc=!1},n.onBufferFlushing=function(t){t.type?this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}):(this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"video"}),this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},n.flushLiveBackBuffer=function(){if(this._c){var t=this.config.liveBackBufferLength;if(isFinite(t)&&!(t<0))if(this.media)for(var i=this.media.currentTime,e=this.sourceBuffer,s=Object.keys(e),n=i-Math.max(t,this.Sc),r=s.length-1;r>=0;r--){var h=s[r],o=e[h];if(o){var l=o.buffered;l.length>0&&n>l.start(0)&&this.removeBufferRange(h,o,0,n)&&this.hls.trigger(a.a.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n})}}else c.b.error("flushLiveBackBuffer called without attaching media")}},n.onLevelUpdated=function(t){var i=t.details;i.fragments.length>0&&(this.xc=i.totalduration+i.fragments[0].start,this.Sc=i.averagetargetduration||i.targetduration||10,this._c=i.live,this.updateMediaElementDuration())},n.updateMediaElementDuration=function(){var t,i=this.config;if(null!==this.xc&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var e in this.sourceBuffer){var s=this.sourceBuffer[e];if(s&&!0===s.updating)return}t=this.media.duration,null===this.wc&&(this.wc=this.mediaSource.duration),!0===this._c&&!0===i.liveDurationInfinity?(c.b.log("Media Source duration is set to Infinity"),this.wc=this.mediaSource.duration=1/0):(this.xc>this.wc&&this.xc>t||!Object(o.a)(t))&&(c.b.log("Updating Media Source duration to "+this.xc.toFixed(3)),this.wc=this.mediaSource.duration=this.xc)}},n.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this.Pc=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this.Pc=!1;var i=0,e=this.sourceBuffer;try{for(var s in e){var n=e[s];n&&(i+=n.buffered.length)}}catch(t){c.b.error("error while accessing sourceBuffer.buffered")}this.appended=i,this.hls.trigger(a.a.BUFFER_FLUSHED)}},n.doAppending=function(){var t=this.config,i=this.hls,e=this.segments,s=this.sourceBuffer;if(Object.keys(s).length){if(!this.media||this.media.error)return this.segments=[],void c.b.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var n=e.shift();if(n)try{var r=s[n.type];if(!r)return void this.Oc();if(r.updating)return void e.unshift(n);r.ended=!1,this.parent=n.parent,r.appendBuffer(n.data),this.appendError=0,this.appended++,this.appending=!0}catch(s){c.b.error("error while trying to append buffer:"+s.message),e.unshift(n);var o={type:h.b.MEDIA_ERROR,parent:n.parent,details:"",fatal:!1};22===s.code?(this.segments=[],o.details=h.a.BUFFER_FULL_ERROR):(this.appendError++,o.details=h.a.BUFFER_APPEND_ERROR,this.appendError>t.appendErrorMaxRetry&&(c.b.log("fail "+t.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],o.fatal=!0)),i.trigger(a.a.ERROR,o)}}}},n.flushBuffer=function(t,i,e){var s=this.sourceBuffer;if(!Object.keys(s).length)return!0;var n="null";if(this.media&&(n=this.media.currentTime.toFixed(3)),c.b.log("flushBuffer,pos/start/end: "+n+"/"+t+"/"+i),this.flushBufferCounter>=this.appended)return c.b.warn("abort flushing too many retries"),!0;var r=s[e];if(r){if(r.ended=!1,r.updating)return c.b.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(e,r,t,i))return this.flushBufferCounter++,!1}return c.b.log("buffer flushed"),!0},n.removeBufferRange=function(t,i,e,s){try{for(var n=0;n.5){var l="null";return this.media&&(l=this.media.currentTime.toString()),c.b.log("sb remove "+t+" ["+o+","+a+"], of ["+r+","+h+"], pos:"+l),i.remove(o,a),!0}}}catch(t){c.b.warn("removeBufferRange failed",t)}return!1},s}(u);function Bt(t,i){for(var e=0;ethis.autoLevelCapping&&i.streamController.nextLevelSwitch(),this.autoLevelCapping=i.autoLevelCapping}}},o.getMaxLevel=function(t){var i=this;if(!this.levels)return-1;var e=this.levels.filter((function(e,n){return s.isLevelAllowed(n,i.restrictedLevels)&&n<=t}));return s.getMaxLevelByMediaSize(e,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},s.isLevelAllowed=function(t,i){return void 0===i&&(i=[]),-1===i.indexOf(t)},s.getMaxLevelByMediaSize=function(t,i,e){if(!t||t&&!t.length)return-1;for(var s,n,r=t.length-1,h=0;h=i||o.height>=e)&&(s=o,!(n=t[h+1])||s.width!==n.width||s.height!==n.height)){r=h;break}}return r},n=s,h=[{key:"contentScaleFactor",get:function(){return 1}}],(r=[{key:"mediaWidth",get:function(){var t,i=this.media;return i&&(t=i.width||i.clientWidth||i.offsetWidth,t*=s.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t,i=this.media;return i&&(t=i.height||i.clientHeight||i.offsetHeight,t*=s.contentScaleFactor),t}}])&&Bt(n.prototype,r),h&&Bt(n,h),s}(u),Ft=window.performance,$t=function(t){var i,e;function s(i){return t.call(this,i,a.a.MEDIA_ATTACHING)||this}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},n.onMediaAttaching=function(t){var i=this.hls.config;i.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof this.hls.config.cnxRenderWindow.HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod))},n.checkFPS=function(t,i,e){var s=Ft.now();if(i){if(this.lastTime){var n=s-this.lastTime,r=e-this.lastDroppedFrames,h=i-this.lastDecodedFrames,o=1e3*r/n,l=this.hls;if(l.trigger(a.a.FPS_DROP,{currentDropped:r,currentDecoded:h,totalDroppedFrames:e}),o>0&&r>l.config.fpsDroppedMonitoringThreshold*h){var u=l.currentLevel;c.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(a.a.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,l.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=e,this.lastDecodedFrames=i}},n.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var i=t.getVideoPlaybackQuality();this.checkFPS(t,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},s}(u),Vt=window,Ut=Vt.performance,Nt=Vt.XMLHttpRequest,Ht=function(){function t(t){t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}var i=t.prototype;return i.destroy=function(){this.abort(),this.loader=null},i.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},i.load=function(t,i,e){this.context=t,this.config=i,this.callbacks=e,this.stats={trequest:Ut.now(),retry:0},this.retryDelay=i.retryDelay,this.loadInternal()},i.loadInternal=function(){var t,i=this.context;t=this.loader=new Nt;var e=this.stats;e.tfirst=0,e.loaded=0;var s=this.xhrSetup;try{if(s)try{s(t,i.url)}catch(e){t.open("GET",i.url,!0),s(t,i.url)}t.readyState||t.open("GET",i.url,!0)}catch(e){return void this.callbacks.onError({code:t.status,text:e.message},i,t)}i.rangeEnd&&t.setRequestHeader("Range","bytes="+i.rangeStart+"-"+(i.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=i.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},i.readystatechange=function(t){var i=t.currentTarget,e=i.readyState,s=this.stats,n=this.context,r=this.config;if(!s.aborted&&e>=2)if(window.clearTimeout(this.requestTimeout),0===s.tfirst&&(s.tfirst=Math.max(Ut.now(),s.trequest)),4===e){var h=i.status;if(h>=200&&h<300){var o,a;s.tload=Math.max(s.tfirst,Ut.now()),a="arraybuffer"===n.responseType?(o=i.response).byteLength:(o=i.responseText).length,s.loaded=s.total=a;var l={url:i.responseURL,data:o};this.callbacks.onSuccess(l,s,n,i)}else s.retry>=r.maxRetry||h>=400&&h<499?(c.b.error(h+" while loading "+n.url),this.callbacks.onError({code:h,text:i.statusText},n,i)):(c.b.warn(h+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,r.maxRetryDelay),s.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),r.timeout)},i.loadtimeout=function(){c.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},i.loadprogress=function(t){var i=t.currentTarget,e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total);var s=this.callbacks.onProgress;s&&s(e,this.context,null,i)},t}();e(7),function(t){t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready"}(Dt||(Dt={}));var zt=function(){var t=window.cnxRenderWindow;return void 0!==t&&t.navigator&&t.navigator.requestMediaKeySystemAccess?t.navigator.requestMediaKeySystemAccess.bind(t.navigator):null}();function qt(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Wt=function(t){for(var i=1;ii)return s;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,i=this.autoLevelCapping;return-1===i&&t&&t.length?t.length-1:i}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var i=this.audioTrackController;i&&(i.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var i=this.subtitleTrackController;i&&(i.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var i=this.subtitleTrackController;i&&(i.subtitleDisplay=t)}}]),s}(Q);Yt.defaultConfig=void 0}]).default)},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},trackAllRequests:{type:"bool",id:19},customParam1:{type:"string",id:20},customParam2:{type:"string",id:21},customParam3:{type:"string",id:22},abTestId:{type:"string",id:24},pageInFocus:{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}}},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:{Dc:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:49,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},headerBidderBids:{type:"string",id:21},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},floorPrices:{rule:"repeated",type:"double",id:38,options:{packed:!1}},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},floorPriceData:{rule:"repeated",type:"FloorPriceModel",id:56},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},items:{rule:"repeated",type:"string",id:2},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}}},FloorPriceModel:{fields:{price:{type:"double",id:1},factor:{type:"double",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}}}},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}}},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},videoIndexes:{rule:"repeated",type:"string",id:15}}},ProtoNonlinearPlayerSettings:{fields:{numberOfNonlinearAds:{type:"int32",id:1},timeSecondsBetweenNonlinear:{type:"int32",id:2,options:{default:5}},timeSecondsBetweenLinearAndNonlinear:{type:"int32",id:3}}},ProtoRtbRequest:{fields:{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}}},ProtoRtbRequestLineItemEntry:{oneofs:{jc:{oneof:["cachedFloorPrice"]},Dc:{oneof:["predictedFloorPrice"]}},fields:{cachedFloorPrice:{type:"double",id:2,options:{proto3_optional:!0}},predictedFloorPrice:{type:"double",id:9,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}}},ProtoRtbResponse:{fields:{lineItemResponses:{rule:"repeated",type:"ProtoRtbLineItem",id:3},liveRampEnvelopeStatus:{type:"LiveRampEnvelopeStatusEnum",id:4}}},ProtoRtbBid:{oneofs:{Fc:{oneof:["floorPriceFactor"]},$c:{oneof:["floorPriceBypassReason"]}},fields:{floorPriceFactor:{type:"double",id:28,options:{proto3_optional:!0}},floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:29,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},floorPriceFactorIndex:{type:"int32",id:12},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},liveRampAts:{type:"bool",id:27}}},ProtoRtbNoBid:{fields:{connatixReason:{type:"ConnatixNoBidReasonEnum",id:1},partnerReason:{type:"PartnerNoBidReasonEnum",id:2},syncedUser:{type:"bool",id:3},requestedFloorPrice:{type:"double",id:4},floorPriceFactorIndex:{type:"int32",id:5},partnerCustomHeaders:{type:"string",id:6}}},ProtoRtbLineItem:{oneofs:{Dc:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:5,options:{proto3_optional:!0}},id:{type:"string",id:1},cachedFloorPrice:{type:"double",id:2},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:{fields:{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}}},ProtoAdOpportunityRequest:{fields:{sessionId:{type:"string",id:1},trackingRequestMeta:{type:"MetadataModel",id:2},adBreak:{type:"ProtoAdBreakTypeEnum",id:3},playerWidth:{type:"int32",id:4},pageInsightIndexes:{rule:"repeated",type:"string",id:5}}},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}}},ProtoPrebid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{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},predictedFloorPrice:{type:"double",id:13},playerWidth:{type:"int32",id:14},playerHeight:{type:"int32",id:15}}},ProtoBid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{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},predictedFloorPrice:{type:"double",id:17},playerWidth:{type:"int32",id:18},playerHeight:{type:"int32",id:19},floorPriceFactor:{type:"double",id:20},floorPriceFactorBypassReason:{type:"int32",id:21}}},ProtoPostBid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{type:"bool",id:3},timeSpent:{type:"int32",id:4},error:{type:"string",id:5},loaded:{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},predictedFloorPrice:{type:"double",id:21},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},liveRampAts:{type:"bool",id:27},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoBidTrackingsRequest:{fields:{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},logEveryting:{type:"bool",id:7},hasGdprConsentPayload:{type:"bool",id:10},gdprConsentMode:{type:"ProtoGdprConsentModeEnum",id:11},useExploration:{type:"bool",id:12}}},ProtoHeavyAdTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},advertiserLineItemId:{type:"string",id:2},heavyAdBlockTypeEnum:{type:"ProtoHeavyAdBlockTypeEnum",id:3}}},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}}},ProtoMediaTrackingRequest:{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}}},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}}},ProtoTrackingRequest:{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}}},ProtoTrackingResponse:{oneofs:{Vc:{oneof:["viewability"]}},fields:{viewability:{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:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},syncedUser:{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},useExploration:{type:"bool",id:26},auctionInformation:{type:"ProtoAuctionInformation",id:27},playerWidth:{type:"int32",id:28},requestNumber:{type:"int32",id:29},predictedFloorPrice:{type:"double",id:30},floorPrice:{type:"double",id:31},floorPriceFactor:{type:"double",id:44},floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:45},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},liveRampAts:{type:"bool",id:43},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoVideoAdImpressionViewableRequest:{fields:{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}}},ProtoVideoAdQuartilesRequest:{fields:{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}}},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}},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}},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}},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}},ProtoNonlinearRequestType:{values:{Banner:0,Video: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}},FloorPriceBypassReasonEnum:{values:{MinCpm:0,FixedCpm:1,VideoOrBannerMin:2,PubMinFloor:3,AdvMinFloor:4,BidInHand:5}},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}},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}}},ProtoPlaylistItem:{oneofs:{Uc:{oneof:["insightsRevisionNumber"]}},fields:{insightsRevisionNumber:{type:"int32",id:4,options:{proto3_optional:!0}},mediaId:{type:"string",id:1},revisionNumber:{type:"int32",id:2},mediaContentVersionId:{type:"string",id:3}}},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}}},ProtoElementsResponse:{fields:{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}}},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:{Dc:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:49,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},headerBidderBids:{type:"string",id:21},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},floorPrices:{rule:"repeated",type:"double",id:38,options:{packed:!1}},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},floorPriceData:{rule:"repeated",type:"FloorPriceModel",id:56},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},items:{rule:"repeated",type:"string",id:2},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}}},FloorPriceModel:{fields:{price:{type:"double",id:1},factor:{type:"double",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}}},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}},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}},ProtoTrackerType:{values:{Image:0,Javascript:1}},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}},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}}})})?s.apply(i,n):s)||(t.exports=r)},5648:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.playspace||(t.roots.playspace=new t.Root)).addJSON({ProtoPlayspaceVideoSlideRendition:{fields:{width:{type:"int32",id:1},height:{type:"int32",id:2},videoUrl:{type:"string",id:3},codec:{type:"ProtoPlayspaceCodecEnum",id:4}}},ProtoPlayspaceVideoSettings:{fields:{renditions:{rule:"repeated",type:"ProtoPlayspaceVideoSlideRendition",id:1}}},ProtoSlideCapabilityMetadata:{fields:{label:{type:"string",id:1}}},ProtoPlayspaceSlideCapability:{fields:{type:{type:"ProtoPlayspaceSlideCapabilitiesEnum",id:1},metadata:{type:"ProtoSlideCapabilityMetadata",id:2}}},ProtoFallbackStoryResponse:{fields:{storyId:{type:"string",id:1},activeVersionId:{type:"string",id:2}}},ProtoPlayspaceMediaMetadataResponse:{fields:{slides:{rule:"repeated",type:"ProtoPlayspaceSlideMetadata",id:1},storyTitle:{type:"string",id:2}}},ProtoPlayspaceSlideMetadata:{fields:{mediaType:{type:"ProtoMediaTypeEnum",id:1},title:{type:"string",id:2},clickUrl:{type:"string",id:3},imageUrl:{type:"string",id:4},slideDuration:{type:"int32",id:5},videoRendition:{type:"ProtoPlayspaceVideoSettings",id:6},type:{type:"ProtoPlayspaceSlideTypeEnum",id:7},coverMetadata:{type:"ProtoPlayspaceCoverMetadata",id:8},descriptionMetadata:{type:"ProtoPlayspaceDescriptionMetadata",id:9},bulletListMetadata:{type:"ProtoPlayspaceBulletListMetadata",id:10},quoteMetadata:{type:"ProtoPlayspaceQuoteMetadata",id:12},instagramMetadata:{type:"ProtoPlayspaceInstagramMetadata",id:16},capabilityList:{rule:"repeated",type:"ProtoPlayspaceSlideCapability",id:13},portraitImageUrl:{type:"string",id:14},mediaContext:{type:"ProtoMediaContextEnum",id:15},altText:{type:"string",id:17}}},ProtoPlayspaceCoverMetadata:{fields:{title:{type:"string",id:1},subtitle:{type:"string",id:2}}},ProtoPlayspaceDescriptionChunk:{fields:{text:{type:"string",id:1},colorScheme:{type:"ProtoPlayspaceColorSchemeEnum",id:2}}},ProtoPlayspaceDescriptionMetadata:{fields:{chunkList:{rule:"repeated",type:"ProtoPlayspaceDescriptionChunk",id:1},label:{type:"ProtoPlayspaceDescriptionChunk",id:2}}},ProtoBulletOptions:{fields:{title:{type:"string",id:1},description:{type:"string",id:2}}},ProtoPlayspaceBulletListMetadata:{fields:{title:{type:"string",id:1},items:{rule:"repeated",type:"ProtoBulletOptions",id:2}}},ProtoPlayspaceQuoteMetadata:{fields:{text:{type:"string",id:1},source:{type:"string",id:2}}},ProtoPlayspaceInstagramMetadata:{fields:{handle:{type:"string",id:1},createdDate:{type:"string",id:2},likes:{type:"string",id:3},comments:{type:"string",id:4}}},ProtoPlayspaceColorPrimary:{fields:{background:{type:"string",id:1,options:{default:"#F1F1F1"}},foreground:{type:"string",id:2,options:{default:"#000000"}}}},ProtoPlayspaceColorSecondary:{fields:{background:{type:"string",id:1,options:{default:"#000000 "}},foreground:{type:"string",id:2,options:{default:"#F1F1F1"}}}},ProtoPlayspaceColorAccent:{fields:{background:{type:"string",id:1},foreground:{type:"string",id:2}}},ProtoPlayspaceRequest:{fields:{tokens:{rule:"repeated",type:"string",id:1},pageUrl:{type:"string",id:3},userId:{type:"string",id:5},forcePlayerId:{type:"string",id:7},forceStoryId:{type:"string",id:8},version:{type:"int32",id:9},clientAb0:{type:"int32",id:10},clientAb1:{type:"int32",id:11},forceLineItemIds:{rule:"repeated",type:"string",id:12},customParam1:{type:"string",id:14},customParam2:{type:"string",id:15},customParam3:{type:"string",id:16},forceExploration:{type:"bool",id:17},es6:{type:"bool",id:18},bundleId:{type:"string",id:19},parseDomain:{type:"bool",id:20},implementationType:{type:"ProtoImplementationType",id:21},queryJsTargeting:{keyType:"string",type:"string",id:22},isConsentConnatix:{type:"bool",id:23,options:{default:!0}},reloadedPlayers:{keyType:"string",type:"string",id:25},disableTracking:{type:"bool",id:27},referrer:{type:"string",id:28},customParam4:{type:"string",id:29},customParam5:{type:"string",id:30}}},ProtoPlayspace:{fields:{playerId:{type:"string",id:1},playbackMode:{type:"ProtoPlayerPlaybackModeEnum",id:2},soundMode:{type:"ProtoPlayerSoundMode",id:3},endOfCycleMode:{type:"ProtoEndOfSlideCycleMode",id:4},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}},slidesBetweenAds:{type:"int32",id:14},minSlidesBeforeFirstAd:{type:"int32",id:15},adViewabilityPolicy:{type:"ProtoAdViewabilityPolicy",id:16},casting:{type:"bool",id:18},sharingDestinations:{rule:"repeated",type:"ProtoSharingDestination",id:19,options:{packed:!1}},expandButton:{type:"bool",id:20},closeButtonMode:{type:"ProtoPlayerCloseButtonMode",id:21},floatingMode:{type:"ProtoPlayerFloatingMode",id:22},floatingDeviceMode:{rule:"repeated",type:"ProtoDeviceType",id:23,options:{packed:!1}},floatingCloseButtonMode:{type:"ProtoPlayerCloseButtonMode",id:24},floatingFixedPosition:{type:"ProtoFloatingFixedPositionMode",id:25},floatingPageElement:{type:"string",id:26},floatingUseElementWidth:{type:"bool",id:27},floatingScrollPosition:{type:"ProtoPositionMode",id:28},floatingGutterX:{type:"int32",id:29},floatingGutterY:{type:"int32",id:30},floatingWidth:{type:"int32",id:31},html:{type:"string",id:35},lineItems:{rule:"repeated",type:"ProtoLineItem",id:37},adPlaybackMode:{type:"ProtoAdPlaybackMode",id:38},css:{type:"string",id:39},sessionId:{type:"string",id:40},orientation:{type:"ProtoPlayerOrientationEnum",id:41},orientationBreakpoint:{type:"int32",id:42},activeVersion:{type:"string",id:43},storyId:{type:"string",id:44},floatingAppendLocation:{type:"ProtoFloatingAppendLocationEnum",id:50},floatingYAxisPadding:{type:"int32",id:51},contentTitleTextColor:{type:"string",id:57},useAccentColorForProgressBar:{type:"bool",id:58},primaryColorList:{type:"ProtoPlayspaceColorPrimary",id:59},secondaryColorList:{type:"ProtoPlayspaceColorSecondary",id:60},accentColorList:{type:"ProtoPlayspaceColorAccent",id:61},customJsCode:{type:"string",id:62},initializationSettingsJson:{type:"string",id:63},publisherName:{type:"string",id:64},skipAdAfter:{type:"int32",id:66,options:{default:5}},adBreaks:{rule:"repeated",type:"ProtoAdBreak",id:67},amazonTamSlotId:{type:"string",id:68},limitClientSideApiUse:{type:"bool",id:69},abTestId:{type:"string",id:70},skipMin:{type:"int32",id:71,options:{default:31}},skippability:{type:"ProtoPlayerSkippabilityType",id:72},logoResource:{type:"string",id:73},activeVersionHasInsights:{type:"bool",id:74},bandwidthLoggingState:{type:"ProtoBandwidthLoggingEnum",id:76}}},ProtoPlayspaceResponse:{fields:{errorMessage:{type:"string",id:1},players:{rule:"repeated",type:"ProtoPlayspace",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}}},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}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},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:{Dc:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:49,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},headerBidderBids:{type:"string",id:21},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},floorPrices:{rule:"repeated",type:"double",id:38,options:{packed:!1}},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},floorPriceData:{rule:"repeated",type:"FloorPriceModel",id:56},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},items:{rule:"repeated",type:"string",id:2},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}}},FloorPriceModel:{fields:{price:{type:"double",id:1},factor:{type:"double",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}}}},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}}}},ProtoPlayspaceCodecEnum:{values:{h264:0,hevc:1}},ProtoPlayerOrientationEnum:{values:{Mixed:0,Portrait:1,Landscape:2}},ProtoEndOfSlideCycleMode:{values:{Loop:0,Stop:1}},ProtoPlayspaceColorSchemeEnum:{values:{Default:0,Accent:1,Primary:2,Secondary:3}},ProtoPlayspaceSlideTypeEnum:{values:{Default:0,Cover:1,Description:2,BulletList:3,Stock:4,Quote:5,Instagram:6}},ProtoPlayspaceSlideCapabilitiesEnum:{values:{VolumeControls:0,PlaybackControls:1,PlaylistControls:2,CtaButton:3,TopStoryTitle:4,TopSlideTitle:5}},ProtoMediaContextEnum:{values:{None:0,Logo:1}},ProtoMediaTypeEnum:{values:{Image:0,Video:1}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}},ProtoTrackerType:{values:{Image:0,Javascript:1}},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}},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}},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}},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}}})})?s.apply(i,n):s)||(t.exports=r)},3204:t=>{"use strict";t.exports='\n'},3653:t=>{"use strict";t.exports=''},1505:t=>{"use strict";t.exports=''},2040:t=>{"use strict";t.exports='\n'},3475:t=>{"use strict";t.exports='\n'},1215:t=>{"use strict";t.exports='\n'},5522:t=>{"use strict";t.exports=''},9479:t=>{"use strict";t.exports='\n'},1954:t=>{"use strict";t.exports=''},7089:t=>{"use strict";t.exports='\n'},3409:t=>{"use strict";t.exports='\n'},889:t=>{"use strict";t.exports=''},6514:t=>{"use strict";t.exports=''},89:t=>{"use strict";t.exports='\n'},4670:t=>{"use strict";t.exports=''},1639:t=>{"use strict";t.exports='\n'},834:t=>{"use strict";t.exports='\n'},4562:t=>{"use strict";t.exports='\n'},4368:t=>{"use strict";t.exports=''},9335:t=>{"use strict";t.exports='\n'},8808:t=>{"use strict";t.exports='\n'},8757:t=>{"use strict";t.exports=''},9040:t=>{"use strict";t.exports=''}},i={},e,s;function n(e){var s=i[e];if(void 0!==s)return s.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.n=t=>{var i=t&&t.R?()=>t.default:()=>t;return n.d(i,{a:i}),i},s=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,n.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.R)return t;if(16&i&&"function"==typeof t.then)return t}var r=Object.create(null);n.r(r);var h={};e=e||[null,s({}),s([]),s(s)];for(var o=2&i&&t;"object"==typeof o&&!~e.indexOf(o);o=s(o))Object.getOwnPropertyNames(o).forEach((i=>h[i]=()=>t[i]));return h.default=()=>t,n.d(r,h),r},n.d=(t,i)=>{for(var e in i)n.o(i,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"R",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n(8660);var t,i=n(7726),e=n(7272),s=(n(6450),n(289)),r=n(8804),h=n(5880),o=n(782),a=n(3030),c=n(2820);!function(t){t.Deprecation="deprecation",t.Intervention="intervention",t.Crash="crash"}(t||(t={}));class l{constructor(t,i,e){this.Ne=t,this.Nc=i,this.Hc=e,this.qc=!1,this.Wc=()=>{"hidden"===this.Ne.document.visibilityState&&this.Gc()},this.Gc=()=>{if(this.qc||!this.Jc)return;const t=this.Jc.takeRecords();this.Qc(t),this.qc=!0},this.Qc=t=>{t.filter((({body:t})=>"HeavyAdIntervention"===(null==t?void 0:t.id))).forEach((()=>{this.Nc.trackHeavyAdIntervention(this.Hc)}))},this.Xc()&&this.Yo()}destroy(){this.Ne.removeEventListener("pagehide",this.Gc),this.Ne.removeEventListener("visibilitychange",this.Wc)}Xc(){return!!this.Ne.ReportingObserver}Yo(){this.Jc=new this.Ne.ReportingObserver((t=>{this.Qc(t)}),{buffered:!0,types:[t.Intervention]}),this.Jc.observe(),this.Ne.addEventListener("pagehide",this.Gc),this.Ne.addEventListener("visibilitychange",this.Wc)}}var u=n(4280),d=n(497);class p extends h._{constructor(t,i,e,n,r){super(),this.mediator=t,this.playerModel=i,this.app=e,this.Yc=n,this._appSettings=r,this.macroElements={player:[]},this.Kc=!1,this.Zc={description:"{{description}}",title:"{{title}}",player:"{{player}}"},this.tl=null,this.il=500,this.createExperience(i,r),this.el=new l(i.global,this.app.services.TrackingService,{heavyAdBlockTypeEnum:s.ProtoHeavyAdBlockTypeEnum.Global}),this.sl=new l(window,this.app.services.TrackingService,{heavyAdBlockTypeEnum:s.ProtoHeavyAdBlockTypeEnum.Script})}subscribeToEvents(){this.subscribe(o.Uh.Destroy,this.experience,(()=>{this.destroy()})),this.subscribe(o.Uh.CanStart,this.experience,(()=>{this.experience.start()})),this.subscribe(o.Xh.SessionRendered,this.experience,(()=>{this.Yc.wasPlayerReloaded||this.app.services.TrackingService.trackSessionRendered(u._.isBannerBlocked),this.mediator.publish(this,o.Xh.SessionRendered)})),this.subscribe(o.Xh.SessionView,this.experience,(()=>{this.Yc.wasPlayerInView||(this.app.services.TrackingService.trackSessionViewability(),this.mediator.publish(this,o.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}))}de(){this.playerModel.css&&this.app.services.GlobalDomUtilsService.addCssString(this.playerModel.css,`cnx-custom-css-${this.app.config.appId}`)}nl(t){return`${t}`.replace(/{\{([^}]+)}}/g,"$&")}hl(){if(this.experienceContainer=this.ol(),this.playerModel.html){const t=this.app.services.GlobalDomUtilsService.createElementByString(this.nl(this.playerModel.html));this.al(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,a.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)}ol(){const t=this.app.config.isMobile?c.s6.Mobile:c.s6.Desktop;return this.app.services.GlobalDomUtilsService.createElementByString(``)}al(t){(0,a.Sz)(t.children).forEach((t=>{t.children.length>0&&this.al(t),Object.keys(this.Zc).forEach((i=>{const e=this.Zc[i];t.textContent.includes(e)&&this.ll(i,t)}))}))}ll(t,i){this.macroElements[t]||(this.macroElements[t]=[]),this.macroElements[t].push(i),i.textContent=""}ul(){null!==this.tl&&(clearInterval(this.tl),this.tl=null)}init(t){this.de(),this.hl();const e=this.app.config.device;return this.isSupportedBreakpoint(e)?(this.subscribeToEvents(),this.experience.dl(this.playerModel,this.app,this.experienceContainer,t),this.tl=setInterval((()=>{this.Kc?this.ul():this.app.services.GlobalDomUtilsService.isDetachedFromDOM(this.experienceContainer)&&(this.destroy(),(0,i.n)({message:"player_removed_from_DOM",level:i.D.INFO}))}),this.il),!0):(this.destroy(),!1)}getApiMethods(){return this.experienceApi.getApiMethods()}get playerContainer(){return this.experienceContainer}destroy(){try{d.S.playerDestroyed=!0,this.Kc=!0,this.ul(),this.app.services.TrackingService.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.el.destroy(),this.sl.destroy()}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,message:"Renderer_destroy",exception:t.message})}}}var f,v,g=n(9078),m=n(1561);!function(t){t[t.DirectionIn=0]="DirectionIn",t[t.DirectionOut=1]="DirectionOut",t[t.FadeIn=2]="FadeIn"}(f||(f={})),function(t){t.Float="float",t.Embed="embed"}(v||(v={}));const y=.5;class b{constructor(t,i,e,s,n,r=0){this.pl=t,this.Wt=i,this.fl=e,this.vl=s,this.Sr=n,this.gl=r,this.ml=void 0,this.yl=null,this.bl=!1,this.Sl=()=>{if(!this.ml||!this._l)return;const t=this.Al(),i=!!this._l;this.Pl(t,i)},this.kl=()=>{var t;if(this.Il()&&(this.Wt.width=null===(t=this._l)||void 0===t?void 0:t.clientWidth),this.Tl(),this.ml){const t=!1,i=this.Al();this.Pl(i,t)}},this.Tl=()=>{this.Cl()?!this.Ml||this.ml||this.bl?this.El():this.Ll():this.ml&&this.Ol()},this.Rl=t=>{if(this.Bl(t.propertyName))switch(this.transitionState){case f.DirectionIn:this.transitionState=void 0,this.Dl();break;case f.DirectionOut:this.transitionState=void 0,this.jl();break;case f.FadeIn:this.transitionState=void 0,this.Fl()}}}get transitionState(){return this.$l}set transitionState(t){this.$l===f.FadeIn&&this.Vl(c.jG.FadeInBase,c.jG.FadeIn),this.$l=t}Ul(...t){(0,m.cn)(this.fl,...t)}Vl(...t){(0,m.IV)(this.fl,...t)}El(){this.vl!==s.ProtoDeviceType.Smartphone&&(this.fl.style.width=`${this.Wt.width}px`);const t=this.fl.getBoundingClientRect().width;this.fl.style.height=this.Wt.getHeight(t)}Nl(){return(0,a.d3)(this.vl,this.Wt.floatingDeviceMode)}Hl(){this.Sr.addEventListenerOnGlobal("scroll",this.Sl)}zl(){this.Sr.removeEventListenerOnGlobal("scroll",this.Sl)}ql(){this._l=this.Sr.querySelector(this.Wt.pageElement),this._l&&(clearInterval(this.yl),this.Wt.width=this._l.clientWidth,this.Tl(),this.pl.on(this._l,this.kl))}Wl(){var t,i;const e=null===(t=this._l)||void 0===t?void 0:t.getBoundingClientRect().top;return this.Wt.appendLocation===s.ProtoFloatingAppendLocationEnum.Above?e-this.fl.offsetHeight-this.Wt.floatingYAxisPadding:this.Wt.appendLocation===s.ProtoFloatingAppendLocationEnum.Below?e+(null===(i=this._l)||void 0===i?void 0:i.offsetHeight)+this.Wt.floatingYAxisPadding:e}Gl(){this.yl=setInterval((()=>{this.ql()}),500),this.ql()}Il(){return this.Wt.floatingPosition===s.ProtoFloatingFixedPositionMode.Element}Bl(t){switch(this.transitionState){case f.DirectionIn:case f.DirectionOut:if("transform"===t)return!0;break;case f.FadeIn:if("opacity"===t)return!0}return!1}Jl(){this.fl.style.top="",this.fl.style.bottom="",this.fl.style.left="",this.fl.style.right="",this.fl.style.width="",this.fl.style.height="",this.fl.style.transform=""}jl(){this.ml=!1,this.Vl(c._7.MainClass,c._7.TransitionClass),this.Jl(),this.Ql()}Pl({x:t,y:i},e){this.Yl(e);const s=()=>this.fl.style.transform=`translate(${t}px, ${i}px)`;e?(this.Sr.cancelRequestAnimationFrame(this.Kl),this.Kl=null,this.Kl=this.Sr.requestAnimationFrameHelper((()=>{s()}))):s()}Yl(t){t?this.Ul(c._7.TransitionClass):this.Vl(c._7.TransitionClass)}Al(){let t,i;if(this.Il()&&this._l){this.Zl();const e=this.Wt.isPositionedLeft?this.Wt.floatingGutterX:-this.Wt.floatingGutterX;t=this.Sr.getElementCoordinates(this._l).clientX+e;const s=this.Wl();return i=s=this.gl}Ll(){if(!this.eu())return;this.Il()&&this.Hl(),this.ml=!0,this.transitionState=f.DirectionIn,this.Ul(c._7.MainClass),this.El();const t=this.Al(),i=this.tu();this.su(),this.Pl({x:i,y:t.y},!1),(0,m.Tp)(this.fl);this.Pl(t,!0)}eu(){return!!this.Cl()&&!(this.Il()&&(!this._l||this._l&&0===this._l.clientWidth))}Zl(){this._l&&(this.Sr.getElementCoordinates(this._l).clientX{const i=this.au.getIsTabInFocus();t&&this.isInFloating&&(this.Ml=!1,this.Ol()),this.cu&&this.Wt.floatingMode===s.ProtoPlayerFloatingMode.AfterInView&&t&&(this.cu=!1),!t&&!this.cu&&this.lu&&i&&(this.Ml=!0,super.Ll())},this.El=()=>{this.isInFloating&&super.El()}}get onFloatingEnterStart(){return this.du.asObservable()}get onFloatingEnterStop(){return this.pu.asObservable()}get onFloatingExitStart(){return this.fu.asObservable()}get onFloatingExitStop(){return this.vu.asObservable()}isFloatingModeEnabled(){return this.cu&&(this.enabled=!1),this.enabled}enableFloatingMode(){this.cu=!1,this.lu=!0,this.start()}disableFloatingMode(){this.lu=!1,this.destroy()}setFloatingSettings(t){this.ou(t),this.start()}Ol(){const t=!this.uu;super.Ol(t)}nu(){this.fu.next()}Ql(){this.mu()}su(){this.du.next()}mu(){this.transitionState=f.FadeIn,this.Vl(c.jG.FadeIn),this.Ul(c.jG.FadeInBase),(0,m.Tp)(this.fl),this.Ul(c.jG.FadeIn)}Dl(){this.pu.next()}Fl(){this.Vl(c.jG.FadeInBase,c.jG.FadeIn),this.vu.next(),this.bl&&super.hu()}yu(){this.au.on(this.fl.parentElement,this.gu,{threshold:y})}bu(){this.au.off(this.fl.parentElement,this.gu)}start(){this.Nl()&&(super.ru(),this.Wt.floatingMode===s.ProtoPlayerFloatingMode.OnPageLoad&&(this.cu=!1),this.yu(),this.gu(this.au.check({element:this.fl.parentElement,threshold:y})))}canFloat(){return this.Nl()&&this.Wt.floatingMode!==s.ProtoPlayerFloatingMode.Off}destroy(){this.isInFloating?(this.jl(),this.bl=!0):super.hu(),this.bu()}get enabled(){return this.lu}set enabled(t){this.lu=t}fullscreenStateChange(t){this.uu=t,t?this.bu():this.yu(),this.gu(t)}}!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.Seek=6]="Seek",t[t.DraggingStart=7]="DraggingStart",t[t.DraggingStopped=8]="DraggingStopped",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.CaptionOn=18]="CaptionOn",t[t.CaptionOff=19]="CaptionOff",t[t.CaptionUpdate=20]="CaptionUpdate",t[t.VolumeHoverStart=21]="VolumeHoverStart",t[t.VolumeHoverStopped=22]="VolumeHoverStopped",t[t.OverlayClick=23]="OverlayClick",t[t.UIHideStart=24]="UIHideStart",t[t.UIShowStart=25]="UIShowStart",t[t.UIEndShowHide=26]="UIEndShowHide",t[t.AboutClick=27]="AboutClick",t[t.ContextClick=28]="ContextClick",t[t.SettingsMenu=29]="SettingsMenu",t[t.HoverStart=30]="HoverStart",t[t.HoverEnd=31]="HoverEnd",t[t.StateChanged=32]="StateChanged",t[t.RebindComponent=33]="RebindComponent",t[t.SkipAd=34]="SkipAd",t[t.LogoClicked=35]="LogoClicked",t[t.ContextMenuOpen=36]="ContextMenuOpen",t[t.ContextMenuClose=37]="ContextMenuClose",t[t.CaptionMenu=38]="CaptionMenu",t[t.NonLinearClose=39]="NonLinearClose"}(w||(w={}));var _,A,P=n(7427),k=n(5055);class I extends b{constructor(t,i,e,s,n,r=0){super(t,e,i,s,n,r),this.Ml=!0,this.pu=new x.x}get onFloatingEnterStop(){return this.pu.asObservable()}su(){}Dl(){this.pu.next()}nu(){}Ql(){}Fl(){}start(){this.Nl()&&(this.Ul(c._7.AlwaysFloating),super.ru(),super.Ll())}setFloatingSettings(t){this.ou(t),this.start()}}!function(t){t.ShowLinearEvent="showLinearEvent",t.HideLinearEvent="hideLinearEvent",t.PauseLinearEvent="pauseLinearEvent",t.ResumeLinearEvent="resumeLinearEvent",t.SkipLinearEvent="skipLinearEvent"}(_||(_={})),function(t){t.ShowNonLinearEvent="showNonLinearEvent",t.HideNonLinearEvent="hideNonLinearEvent"}(A||(A={}));class T{constructor(t,i,e,s){this.fl=t,this.wu=s,this.xu=this.Su(e,i)}Su(t,i){return Object.assign({},t[i]||t[s.ProtoDeviceType.Smartphone])}updateWidth(t){const i=this._u(t);i!==this.currentBreakpointClass&&((0,m.IV)(this.fl,this.currentBreakpointClass),(0,m.cn)(this.fl,i),this.currentBreakpointClass=i)}_u(t){switch(!0){case t>=this.xu.xxl:return this.wu.Xxl;case t>=this.xu.xl:return this.wu.Xl;case t>=this.xu.lg:return this.wu.Lg;case t>=this.xu.md:return this.wu.Md;case t>=this.xu.sm:return this.wu.Sm;case t>=this.xu.xs:return this.wu.Xs;default:return this.wu.Xxs}}}const C="midRollCapped",M="totalAdBreakDurationExpired",E="enableLinearAds",L="disableLinearAds",O="ForceStopAdSlot",R="ForceStopAdPod",B="linearAdOpportunity",D="AdPodRemainingTime",j="disableNonLinearAds",F="enableNonLinearAds";var $;!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}($||($={}));const V=$;class U{constructor(t){this.urlSuffixerService=t,this.Au={},this.Pu=[]}getImage(t,i,e,s,n="",r=!1){return this.ku=t,this.Iu=(0,P.QM)(i)?i:"",this.Tu=e,this.Cu=s,this.Mu=n,this.Eu=r,this.Lu()}Lu(){const t=this.Ou();if(t)return t;const i=this.ku+this.Mu,e=new Image;return e.src=this.urlSuffixerService.appendParamsToUrl(i),e.alt=this.Iu,this.Au[this.ku]=this.Au[this.ku]||{},this.Au[this.ku][this.Tu]=this.Au[this.ku][this.Tu]||{},this.Au[this.ku][this.Tu][this.Cu]=this.Au[this.ku][this.Tu][this.Cu]||{},this.Au[this.ku][this.Tu][this.Cu][this.Mu]=e,e}Ou(){const t=this.Ru();if(t)return t;if(!this.Eu)return;this.Bu();const i=this.Du();if(i)return i;const e=this.Fu();return e||void 0}Bu(){const t=[];if(!this.Au[this.ku])return void(this.Pu=[]);const i=this.Au[this.ku],e=this.Tu>this.Cu?V.Landscape:V.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?V.Landscape:V.Portrait)!==e)return;const r={area:n*s,img:this.$u(this.ku,n,s)};t.push(r)}))})),this.Pu=[...t]}$u(t,i,e){if(this.Au[t]&&this.Au[t][i]&&this.Au[t][i][e])return this.Au[t][i][e][Object.keys(this.Au[t][i][e])[0]]}Ru(){return this.Au[this.ku]&&this.Au[this.ku][this.Tu]&&this.Au[this.ku][this.Tu][this.Cu]&&this.Au[this.ku][this.Tu][this.Cu][this.Mu]}Du(){if(0===this.Pu.length)return;const t=this.Tu*this.Cu,i=this.Pu.filter((({area:i})=>i>t)).sort(((t,i)=>t.area-i.area));return 0!==i.length?i[0].img:void 0}Fu(){if(0===this.Pu.length)return;const t=this.Tu*this.Cu,i=this.Pu.filter((({area:i})=>ii.area-t.area));return 0!==i.length?i[0].img:void 0}}var N,H,z,q,W=n(4959);!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"}(N||(N={})),function(t){t[t.Auto=0]="Auto",t[t.Strict=1]="Strict"}(H||(H={})),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"}(z||(z={})),function(t){t.H264="h264",t.Hevc="hevc"}(q||(q={}));const G="playError",J="newVideo",Q="buffering",X="buffered",Y="levelSwitching",K="endOfStream",Z="VideoQualityChanged",tt="CurrentQuality",it="QualityListLoaded";var et;!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"}(et||(et={}));function st(t,i){const e=t.length-1;return{currentIndex:i,nextIndex:i===e?0:i+1,prevIndex:0===i?e:i-1,firstIndex:0,lastIndex:e}}function nt(t,i){return!(i.skippability===s.ProtoPlayerSkippabilityType.AllowNonSkipAdsIfTheyAreShorterThan&&t{i.types.forEach((e=>{(function(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})(e,t)&&(this.Uu.currentPodNumber=i.numberOfAdSlots,this.Uu.maxAdSlotDuration=i.maxAdSlotDuration,this.Uu.maxAdPodDuration=i.maxAdPodDuration,this.Uu.totalNumberOfAdSlots=i.numberOfAdSlots)}))}))}adStarted(){this.Hu(),0===this.Uu.currentPodNumber&&(this.Uu.currentPodNumber=this.Uu.totalNumberOfAdSlots),this.Uu.currentPodNumber--}endPod(){this.Hu(),this.Uu.currentPodNumber=0}enterPodTimeout(t){this.Hu(),this.Nu=setTimeout((()=>{this.Hu(),t()}),5e3)}isInAdPod(){return this.Uu.currentPodNumber>0}isCurrentBreakInPod(){return this.Uu.totalNumberOfAdSlots>1}getMaxAdSlotDuration(){return this.Uu.maxAdSlotDuration}getMaxAdPodDuration(){return this.Uu.maxAdPodDuration}getMaxAdSlotPossibleDuration(){let t=0;for(let i=0;it?t+1:1}getTotalNumberOfSlots(){return this.Uu.totalNumberOfAdSlots}isInPodTimeout(){return!!this.Nu}getAdBreakState(t){if(!(0,P.$K)(t))return this.zu();const{adSlotDuration:i,adBreakType:e}=t;return{isAdPodBreak:this.isCurrentBreakInPod(),adPodSlotIndex:this.isCurrentBreakInPod()?this.getNextSlotIndex():0,maxAdDuration:Math.round(this.getMaxAdSlotDuration()/ht.s_||rt.DEFAULT_MAX_AD_DURATION),remainingAdDuration:Math.round(i/ht.s_),sessionMaxAdDuration:Math.round(this.getMaxAdSlotPossibleDuration()/ht.s_),adBreakType:e}}zu(){let t=s.ProtoAdBreakTypeEnum.MidRoll;this.adBreaks.forEach((i=>{i.types.some((t=>t===s.ProtoAdBreakTypeEnum.PreRoll))&&(t=s.ProtoAdBreakTypeEnum.PreRoll)}));const i=this.getMaxAdSlotDuration();return this.getAdBreakState({adSlotDuration:i,adBreakType:t})}Hu(){clearTimeout(this.Nu),this.Nu=null}}var at,ct,lt=n(2231),ut=n(8423),dt=n(308),pt=n(6243);!function(t){t[t.None=0]="None",t[t.Portrait=1]="Portrait",t[t.Landscape=2]="Landscape"}(at||(at={})),function(t){t.LINEAR="LINEAR",t.NONLINEAR="NONLINEAR"}(ct||(ct={}));var ft=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(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(h,o)}a((s=s.apply(t,i||[])).next())}))};const vt=["com.accuweather.android"],gt=.05*ht.s_;class mt extends h._{constructor(t,i,e){super(),this.mediator=t,this._appSettings=i,this.qu=e,this.Wu=.01,this.Gu=.5,this.Ju=2e3,this.Qu=0,this.Xu=!1,this.Yu=!1,this.Ku=!1,this.Zu=!1,this.td=!1,this.sd=!1,this.nd=!1,this.Ns=s.ProtoAdSlotsEnum.PreRoll,this.rd=!1,this.hd=!1,this.od=!1,this.ud=!1,this.dd=[],this.ki=[],this.pd=[],this.fd=0,this.vd=t=>{this.hd=t,t&&(this.app.services.ViewabilityService.off(this.$playerContainer,this.vd),this.gd())},this.yd=t=>{t&&this.adHandler&&!this.ud&&setTimeout((()=>{this.adHandler.resumeWithoutUserInteraction(this.Ns)}),gt)},this.bd=()=>{this.isBelowSmBreakpoint(this.$experienceContainer.clientWidth)||(0,m.IV)(this.$experienceContainer,c.Gj.NoHeight),!this.Yu&&this.wd()&&(this.mediator.publish(this,o.Uh.CanStart),this.app.services.ResizeObserver.off(this.$experienceContainer,this.bd))},this.xd=t=>{const{playback:i,isFullscreenClose:e}=t;this.floatingModule&&(0,P.$K)(i)&&!e&&(this.floatingModule.enabled=i)},this.Sd=()=>{this._d(1)},this.Pd=()=>{this._d(0)},this.Id=t=>{this.xd(t);const{playback:i}=t;(0,P.$K)(i)&&(i?(this.app.services.EventsStorageService.emitAdPlay(),this.ud=!1):(this.app.services.EventsStorageService.emitAdPause(),this.ud=!0))},this.Td=new U(e)}Cd(){}Ed(t,i,e){this.app.services.EventsStorageService.emitAdImpression(t,i,e)}Ld(t){this.app.services.EventsStorageService.emitAdComplete(t)}Od(){}Rd(){}Bd(){}Dd(){}jd(){}Fd(){}$d(){}Vd(t){const i={state:t};this.app.services.EventsStorageService.emitAdStateChange(i)}Ud(){const{clientWidth:t,clientHeight:i}=this.$playerContainer,e={width:t,height:i};this.app.services.EventsStorageService.emitPlayerResized(e)}Nd(){this.app.services.EventsStorageService.emitOnEnterFullscreen()}Hd(){this.app.services.EventsStorageService.emitOnExitFullscreen()}zd(){this.app.services.EventsStorageService.emitOnPlayerCollapsed()}qd(){this.app.services.EventsStorageService.emitOnPlayerExpanded()}Wd(t){this.Gd(t),this.Jd(t),this.Qd(t),this.Ns=t,this.Xd(t)}Jd(t){this.adHandler&&this.adHandler.adStateChange(t,this.Yd.getMaxAdSlotDuration())}Qd(t){this.Kd.onAdStateChange(t,{maxAdPodDuration:this.Yd.getMaxAdPodDuration(),maxAdSlotDuration:this.Yd.getMaxAdSlotDuration()})}Gd(t){this.Yd.setNewBreak(t)}Xd(t){this.Vd(W.V[t])}Zd(){var t;null===(t=this.adHandler)||void 0===t||t.contentChanged(),this.Kd.contentChanged()}ep(){var t;null===(t=this.adHandler)||void 0===t||t.contentEnded()}sp(){var t,i,e,s,n,r;this.adHandler=this.np(),this.rp(),null===(t=this.adHandler)||void 0===t||t.onLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionPrice,{payload:t})})),null===(i=this.adHandler)||void 0===i||i.onNonLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionPrice,{payload:t})})),null===(e=this.adHandler)||void 0===e||e.onLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionRevenue,{payload:t})})),null===(s=this.adHandler)||void 0===s||s.onNonLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionRevenue,{payload:t})})),null===(n=this.adHandler)||void 0===n||n.onLinearExperienceEvent.subscribe((t=>{o.Uh.UserInteraction===t.type&&this.Id(t.payload)}));const h=()=>{this.app.services.TrackingService.setAdStart(),this.od=!0,this.ud=!1,this.gd(),this.op.unsubscribe()};this.op=null===(r=this.adHandler)||void 0===r?void 0:r.onAdsEnable.subscribe((()=>{h()}))}rp(){this.ap(),this.cp(),this.lp()}ap(){this.pd.push(this.adHandler.onVpaidEvent.subscribe((t=>{switch(t.type){case g.fI.AdImpression:{this.mediator.publish(this,k.Km.AdImpression,t.payload);const{adSourceData:i,customAdData:e,adType:s}=t.payload.payload;this.Ed(i,e,s);break}case g.fI.AdStopped:{if(this.mediator.publish(this,k.Km.AdStopped,t.payload),this.nd&&this.Rd(),!t.payload)return;const{adType:i}=t.payload.payload;this.Ld(i),this.app.services.EventsStorageService.emitAdStopped(i);break}case g.fI.AdError:{const{adType:i}=t.payload;this.mediator.publish(this,k.Km.AdError,t),this.app.services.EventsStorageService.emitAdError(i);break}case g.fI.AdSkipped:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdSkipped,t.payload),this.app.services.EventsStorageService.emitAdSkipped(i),this.Ld(i),this.nd&&this.Rd();break}case g.fI.AdPaused:{const{adType:i}=t.payload.payload;this.app.services.TrackingService.setSessionPlayback(!1),this.app.services.EventsStorageService.emitAdPaused(i),this.mediator.publish(this,k.Km.AdPause,t.payload);break}case g.fI.AdPlaying:{const{adType:i}=t.payload.payload;this.app.services.TrackingService.setSessionPlayback(!0),this.app.services.EventsStorageService.emitAdPlaying(i),this.mediator.publish(this,k.Km.AdPlay,t.payload);break}case g.fI.AdVideoFirstQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted25,t.payload),this.app.services.EventsStorageService.emitAdVideoFirstQuartile(i);break}case g.fI.AdVideoMidpoint:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted50,t.payload),this.app.services.EventsStorageService.emitAdVideoMidpoint(i);break}case g.fI.AdVideoThirdQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted75,t.payload),this.app.services.EventsStorageService.emitAdVideoThirdQuartile(i);break}case g.fI.AdVideoComplete:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted100,t.payload),this.app.services.EventsStorageService.emitAdVideoComplete(i);break}case g.fI.AdClickThru:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdClick,t.payload),this.app.services.EventsStorageService.emitAdClickThru(i);break}case g.fI.AdInteraction:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserAcceptInvitation:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserClose:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserMinimize:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.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 g.fI.AdLoaded:{const{payload:i}=t.payload,{adType:e}=i,{adLoadedData:s}=i;(null==s?void 0:s.skipOffset)<0&&(s.skipOffset=void 0);const n=this.up(s);this.app.services.EventsStorageService.emitAdLoaded(n,e);break}case g.fI.AdVolumeChange:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdVolumeChange(i);break}case g.fI.AdLog:}})))}cp(){this.pd.push(this.adHandler.onLinearEvent.subscribe((t=>{switch(t.type){case _.ShowLinearEvent:this.Kd.onAdImpression(t.payload,ct.LINEAR),this.dp();break;case _.HideLinearEvent:this.pp();break;case _.PauseLinearEvent:this.Kd.onLinearAdPause();break;case _.ResumeLinearEvent:this.Kd.onLinearAdPlay();break;case _.SkipLinearEvent:const i=!0;this.floatingModule&&(this.floatingModule.enabled=!0),this.pp(i)}})))}lp(){this.pd.push(this.adHandler.onNonLinearEvent.subscribe((t=>{switch(t.type){case A.ShowNonLinearEvent:this.Kd.onAdImpression(t.payload,ct.NONLINEAR);break;case A.HideNonLinearEvent:const i=!1;this.Kd.onAdFinished(this.adHandler.nonLinearInImpression,ct.NONLINEAR,i)}})))}dp(){this.Yd.adStarted(),this.adHandler.showLinear()}fp(){this.adHandler.hideLinear()}pp(t=!1){let i=this.Yd.isInAdPod();t&&(i=!1,this.Yd.endPod()),this.Kd.onAdFinished(this.adHandler.linearInImpression,ct.LINEAR,i),this.fp(),this.vp.isCloseButton&&this.adHandler&&this.adHandler.firstLinearAdShown&&(this.vp.closeButtonMode!==s.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,m.pv)(this.$playerContainer,c.s6.CloseHover)||(0,m.cn)(this.$playerContainer,c.s6.CloseHover),this.vp.floatingSettings.floatingCloseButtonMode!==s.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,m.pv)(this.$playerContainer,c.s6.CloseFloatHover)||(0,m.cn)(this.$playerContainer,c.s6.CloseFloatHover))}gp(t){this.adHandler.enterAdPodLoadingState(),this.Yd.enterPodTimeout((()=>{this.Yd.endPod(),t()}))}mp(){(0,m.Tp)(this.$playerContainer),this.Kd=this.yp(),this.subscribe(F,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(ct.NONLINEAR)})),this.subscribe(j,this.Kd,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(ct.NONLINEAR,e)})),this.subscribe(E,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(ct.LINEAR)})),this.subscribe(L,this.Kd,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(ct.LINEAR,e)})),this.subscribe(O,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.stopAd("forceStopAdSlot")})),this.subscribe(R,this.Kd,(()=>{if(this.adHandler)if(this.adHandler.linearInImpression)this.Yd.endPod(),this.adHandler.stopAd("forceStopAdPod");else{const t=!0;this.pp(t)}})),this.subscribe(D,this.Kd,(t=>{var i;null===(i=this.adHandler)||void 0===i||i.updateLinearPodRemainingTime(t.payload.remainingTime)})),this.subscribe(B,this.Kd,(t=>{var i,e;const s=t.payload.adBreakType,n=null===(i=this.adHandler)||void 0===i?void 0:i.getLinearAdContainerWidth(),r={adBreak:s,playerWidth:(0,P.$K)(n)?n:this.$playerContainer.clientWidth};this.app.services.TrackingService.trackAdOpportunity(r),null===(e=this.adHandler)||void 0===e||e.newLinearAdOpportunity()}))}bp(){this.app.services.ViewabilityService.on(this.$playerContainer,this.vd,{threshold:this.Gu,callbackDelay:this.Ju}),this.app.services.ViewabilityService.on(this.$playerContainer,((t,i)=>this.gu(t,i)),{threshold:this.Wu}),this.app.services.ViewabilityService.subscribe(k.rl.OmidViewabilityThreshold,(t=>{this.mediator.publish(this,k.rl.OmidViewabilityThreshold,{payload:{threshold:t}})})),this.app.config.os.os===dt.M.Ios&&this.app.services.PageFocusService.on(this.yd)}gd(){this.hd&&this.od&&this.mediator.publish(this,o.Xh.SessionView)}gu(t,i=!1){this.Kd.setToggleAdsReason({isAppBackgrounded:i}),this.app.config.isInApp&&(i?(this.wp=this.getVolume(),this.setVolume(0)):this.wp&&(this.setVolume(this.wp),this.wp=null)),this.nd=t,this.mediator.publish(this,k.Km.IsViewable,{payload:t}),this.Kd.viewabilityStateChanged(this.checkFloatingViewability(t),this.Yd.isInAdPod(),this.Yd.isInPodTimeout()),this.app.services.TrackingService.setSessionViewability(t)}checkFloatingViewability(t){const i=this.app.services.ViewabilityService.getIsTabInFocus();return!(t||!this.floatingModule||!this.floatingModule.isInFloating||!i)||t}Cs(){var t,e,s;const n=this.$playerContainer.clientWidth,r=this.$playerContainer.clientHeight,h=this.rd?g.zc.Fullscreen:g.zc.Normal;null===(t=this.adHandler)||void 0===t||t.resizeAd(n,r,h,this.Ns);try{null===(e=this.Kd)||void 0===e||e.onResize(n,r)}catch(t){(0,i.n)({message:"BaseExperience_onResize_player",callStack:t.stack,exception:t.message,level:i.D.WARN})}null===(s=this.adHandler)||void 0===s||s.setPlayerOrientation(this.xp(n,r)),this.breakPointsHandler.updateWidth(n),this.app.services.TrackingService.updatePlayerDimensions(n,r),setTimeout((()=>{this.mediator.publish(this,k.Km.SizeChanged,{payload:{width:n,height:r}}),this.Sp()}))}isBelowSmBreakpoint(t){return ti?at.Landscape:at.None}Sp(){this.rd||this.Ud()}_p(){this.app.services.ResizeObserver.on(this.$playerContainer,(()=>{this.Cs()}))}Ap(){var t;this.rd=!0,this.app.services.InteractionService.disableScrollEvent(),this.Nd(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(g.zc.Fullscreen)}Pp(){var t;this.rd=!1,this.app.services.InteractionService.enableScrollEvent(),this.Hd(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(g.zc.Normal)}kp(){const t=``,i=this.app.services.GlobalDomUtilsService.createElementByString(t);return this.Cp(i),i}Cp(t){(0,m.T7)(t,{"padding-bottom":`${this.Mp()}%`})}Mp(){return this.vp.playerSize.ratioHeight/this.vp.playerSize.ratioWidth*100}Ep(){this.dd.push(this.floatingModule.onFloatingEnterStart.subscribe((()=>{this.mediator.publish(this,k.Zr.PlayerFloatChanged,{payload:v.Float}),this.mediator.publish(this,k.Zr.FloatingEnterStart,{payload:!0})})),this.floatingModule.onFloatingExitStart.subscribe((()=>{this.mediator.publish(this,k.Zr.FloatingExitStart,{payload:!0})})),this.floatingModule.onFloatingExitStop.subscribe((()=>{this.mediator.publish(this,k.Zr.PlayerFloatChanged,{payload:v.Embed}),this.mediator.publish(this,k.Zr.FloatingExitStop,{payload:!0})})),this.floatingModule.onFloatingEnterStop.subscribe((()=>{this.mediator.publish(this,k.Zr.FloatingEnterStop,{payload:!0}),this.gu(!0)})))}Lp(){this.floatingModule=new S(this.app.services.ViewabilityService,this.app.services.ResizeObserver,this.$playerContainer,this.vp.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService,this.Op),this.Ep(),this.floatingModule.start()}Rp(){this.alwaysFloatingModule=new I(this.app.services.ResizeObserver,this.$experienceContainer,this.vp.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService),this.dd.push(this.alwaysFloatingModule.onFloatingEnterStop.subscribe((()=>{this.app.services.ViewabilityService.triggerRecheck(this.$playerContainer)}))),this.alwaysFloatingModule.start()}setNewVolume(t){var i;null===(i=this.adHandler)||void 0===i||i.setLinearVolume(t)}Dp(){var t;this.jp(),null===(t=this.adHandler)||void 0===t||t.onLinearExperienceEvent.subscribe((t=>{var i;t.type===o.Uh.UserInteraction&&(null===(i=t.payload)||void 0===i?void 0:i.volume)&&this.Fp()}))}$p(t){this.subscribe(o.Uh.UserInteraction,t,(({payload:{volume:t}})=>{t&&this.Fp()}))}ws(t){this.mediator.publish(this,k.Km.VolumeChanged,{payload:t}),this.app.services.EventsStorageService.emitVolumeChange(t)}_d(t){this.getVolume()!==t&&this.setNewVolume(t)}jp(){this.Xu=!0,this.$playerContainer.addEventListener("mouseover",this.Sd),this.$playerContainer.addEventListener("mouseout",this.Pd)}Fp(){this.Xu&&(this.Xu=!1,this.$playerContainer.removeEventListener("mouseover",this.Sd),this.$playerContainer.removeEventListener("mouseout",this.Pd))}Vp(){this.breakPointsHandler=new T(this.$playerContainer,this.app.config.device,this.Np,this.zp),this.breakPointsHandler.updateWidth(this.$playerContainer.clientWidth)}qp(){var t;if(this.vp.isCloseButton){switch(this.ki.push(null===(t=this.adHandler)||void 0===t?void 0:t.onLinearUiComponentEvent.subscribe((t=>{t.type===w.Close&&this.handleClose()}))),this.vp.closeButtonMode){case s.ProtoPlayerCloseButtonMode.AlwaysOn:(0,m.cn)(this.$playerContainer,c.s6.CloseOn);break;case s.ProtoPlayerCloseButtonMode.Off:(0,m.cn)(this.$playerContainer,c.s6.CloseOff);break;case s.ProtoPlayerCloseButtonMode.OnHover:(0,m.cn)(this.$playerContainer,c.s6.CloseHover)}switch(this.vp.floatingSettings.floatingCloseButtonMode){case s.ProtoPlayerCloseButtonMode.AlwaysOn:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatOn);break;case s.ProtoPlayerCloseButtonMode.Off:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatOff);break;case s.ProtoPlayerCloseButtonMode.OnHover:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatHover)}}}up(t){const{skipOffset:i}=t;return{isAutoPlay:this.vp.playbackMode===s.ProtoPlayerPlaybackModeEnum.Autoplay,skipOffset:i,isSkippable:(0,P.kE)(i)}}Wp(){this.od=!0,this.app.services.TrackingService.setContentStart(),this.gd()}wd(){const{clientWidth:t,clientHeight:i}=this.$experienceContainer;return!(0,lt.ON)({width:t,height:i})&&!this.isBelowSmBreakpoint(t)||((0,m.cn)(this.$experienceContainer,c.Gj.NoHeight),this.Gp())}Gp(){return vt.includes(this.app.config.bundleID)}Jp(t){try{const{display:i,width:e,height:s,flex:n,maxWidth:r,minWidth:h}=this.app.services.GlobalDomUtilsService.getComputedStyle(t),{width:o,height:a}=t.getBoundingClientRect(),c={display:i,compWidth:e,boundWidth:o,compHeight:s,boundHeight:a,flex:n,maxWidth:r,minWidth:h};return{type:t.nodeName,styles:JSON.stringify(c)}}catch(t){return{err:"BaseExperience_getElementInfo_error"}}}Qp(){if(!(0,ut.Vm)([95,5]))return;const t={parent:this.Jp(this.$experienceContainer.parentElement),main:this.Jp(this.$experienceContainer)};(0,i.n)({message:"BaseExperience_invalid_dimensions",level:i.D.INFO,exception:JSON.stringify(t)})}Xp(){this.Yd=new ot(this.vp.adBreaks)}dl(t,i,e,s){this.vp=t,this.app=i,this.$experienceContainer=e,s&&s(),this.Cd(),this.app.services.ViewabilityService.setViewableThreshold(this.Qu),this.generateHTML(),this.Xp(),this.app.services.ResizeObserver.on(this.$experienceContainer,this.bd),this.wd()?this.mediator.publish(this,o.Uh.CanStart):this.Qp()}start(){return ft(this,void 0,void 0,(function*(){this.Yu=!0,this.app.services.TrackingService.updatePlayerDimensions(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight),(0,m.cn)(this.$experienceContainer,c.sN.MainContainerFlex),this.mediator.publish(this,o.Xh.SessionRendered),this.Vp(),this._p(),this.vp.floatingSettings.floatingMode===s.ProtoPlayerFloatingMode.Always?this.Rp():(this.Ud(),this.Lp()),this.vp.lineItemSettings.lineItems.length>0&&!this.vp.disableAdvertising&&!u._.isBannerBlocked&&(this.app.config.isOVPDomain?this.ki.push(u._.onAdBlockerDetected().subscribe((t=>{t||this.sp()}))):this.sp()),this.app.config.isMobile||this.vp.soundMode!==s.ProtoPlayerSoundMode.Hover||this.Dp(),this.vp.isCloseButton&&this.qp(),this.vp.displayAdCountdown&&(0,m.cn)(this.$playerContainer,c.s6.AdShowCountdown);try{this.mp()}catch(t){(0,i.n)({message:"BaseExperience_initAdsController",exception:t.message,callStack:t.stack,level:i.D.INFO})}u._.isBannerBlocked||u._.detectUsingScript().then((t=>{t&&(this.app.services.TrackingService.trackSessionAdBlocker(s.ProtoAdBlockDetectionTypeEnum.Network),this.Kd.disableAdvertising())}))}))}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.Fp()}getSize(){return{width:this.$experienceContainer.clientWidth,height:this.$experienceContainer.clientHeight}}setSize(t,i){(0,lt.ON)({width:t,height:i})||(0,m.T7)(this.$experienceContainer,{width:`${t}px`,height:`${i}px`})}setCustomMacros(t){this.app.services.MacrosService.addExtraMacros(t)}isViewable(){return this.app.services.ViewabilityService.check({element:this.$playerContainer,threshold:this.Wu})}setViewableThreshold(t){this.app?this.app.services.ViewabilityService.setViewableThreshold(t):this.Qu=t}setAmpUserConsent(t){this.app.services.UserManagerService.setAmpUserConsent(t)}triggerDestroy(){this.app.services.EventsStorageService.destroy(),this.mediator.publish(this,o.Uh.Destroy)}disableAdvertising(){this.Kd.disableAdvertising()}enableAdvertising(){this.Kd.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()}setFloatingSettings(t){this.floatingModule?this.floatingModule.setFloatingSettings(t):this.alwaysFloatingModule.setFloatingSettings(t)}destroy(){(0,pt.i)(this.ki),this.adHandler&&((0,pt.i)(this.pd),this.op.unsubscribe(),this.adHandler.destroy()),this.Kd&&this.Kd.destroy(),this.floatingModule&&(this.floatingModule.destroy(),this.floatingModule=null,(0,pt.i)(this.dd))}}var yt,bt,wt=n(7953);!function(t){t[t.Unknown=0]="Unknown",t[t.TimeoutBetweenAds=1]="TimeoutBetweenAds",t[t.InImpression=2]="InImpression",t[t.LinearDemandMissing=3]="LinearDemandMissing"}(yt||(yt={}));class xt extends h._{constructor(t,i,e,s,n,r,h,o){super(),this.mediator=t,this.Re=i,this.Yp=e,this.Zp=s,this.tf=n,this.if=r,this.qu=h,this.ef=o,this.sf=g.zc.Normal,this.nf=[],this.rf=new x.x,this.hf=new x.x,this.af=new x.x,this.cf=new x.x,this.lf=new x.x,this.uf=new x.x,this.df=new x.x,this.pf=new x.x,this.ff=new x.x,this.vf=new x.x,this.gf=new x.x,this.yf=this.bf(),this.wf(),this.xf=this.Sf(),this.Af(),this.Pf=this.kf(),this.Pf&&this.If()}Tf(t,i){const e=[{container:this.Cf,width:t,height:i,type:wt.ProtoAdType.Overlay},{container:this.Cf,width:t,height:i,type:wt.ProtoAdType.Video},{container:this.Mf,width:t,height:i,type:wt.ProtoAdType.Nonlinear}];return this.Mf||e.pop(),e}wf(){this.nf.push(this.yf.onAdsEnable.subscribe((t=>{this.rf.next(t)})))}If(){var t,i,e;this.nf.push(null===(t=this.Pf)||void 0===t?void 0:t.onVpaidEvent.subscribe((t=>{this.hf.next(t)})),null===(i=this.Pf)||void 0===i?void 0:i.onNonLinearEvent.subscribe((t=>{this.pf.next(t)})),null===(e=this.Pf)||void 0===e?void 0:e.onExperienceEvent.subscribe((t=>{this.ff.next({type:t.type,payload:t.payload})})),this.yf.onNonlinearImpressionPrice.subscribe((t=>{this.vf.next(t)})),this.yf.onNonlinearImpressionRevenue.subscribe((t=>{this.gf.next(t)})))}Af(){this.nf.push(this.xf.onVpaidEvent.subscribe((t=>{this.hf.next(t)})),this.xf.onUiComponentEvent.subscribe((t=>{this.cf.next(t)})),this.xf.onExperienceEvent.subscribe((t=>{this.lf.next({type:t.type,payload:t.payload})})),this.xf.onLinearEvent.subscribe((t=>{t.type===_.ShowLinearEvent&&this.nonLinearInImpression&&this.Pf.pause(this.linearInImpression),this.af.next(t)})),this.yf.onLinearImpressionPrice.subscribe((t=>{this.uf.next(t)})),this.yf.onLinearImpressionRevenue.subscribe((t=>{this.df.next(t)})))}Ef(t,i,e){this.yf.initAd(t,i,this.sf,1,e,this.Tf(t,i),this.if)}adStateChange(t,i){var e;this.xf.adStateChange(t,i),null===(e=this.Pf)||void 0===e||e.adStateChange(t,i)}contentPlaybackStateChanged(t){var i;null===(i=this.Pf)||void 0===i||i.contentPlaybackStateChanged(t)}disableAds(t,i){this.yf.disableAds(t,i)}enableAds(t){this.yf.enableAds(t)}start(t,i,e,s=!1,n=!1){n&&this.startNonLinear(),this.startLinear(e,s),this.Ef(t,i,e)}stopAd(t){var i;this.xf.stopAd(t),null===(i=this.Pf)||void 0===i||i.stopAd(t)}play(){this.xf.play()}pause(){var t;this.xf.pause(),this.linearInImpression||null===(t=this.Pf)||void 0===t||t.pause()}resumeWithoutUserInteraction(t){var i;this.xf.resumeWithoutUserInteraction(),null===(i=this.Pf)||void 0===i||i.resumeWithoutUserInteraction(t)}resizeAd(t,i,e,s){var n;this.setVastViewMode(e),this.xf.resizeAd(t,i),null===(n=this.Pf)||void 0===n||n.resizeAd(t,i,s)}setPlayerOrientation(t){this.yf.setPlayerOrientation(t)}setVastViewMode(t){this.sf=t,this.yf.setVastViewMode(t)}contentChanged(){this.yf.onContentChange()}newLinearAdOpportunity(){this.yf.newLinearAdOpportunity()}destroy(){var t,i,e;(0,pt.i)(this.nf),this.xf.destroy(),null===(t=this.Pf)||void 0===t||t.destroy(),null===(i=this.yf)||void 0===i||i.disableAds(ct.LINEAR,{disableReason:yt.Unknown}),null===(e=this.yf)||void 0===e||e.disableAds(ct.NONLINEAR,{disableReason:yt.Unknown}),this.yf.destroy()}get onAdsEnable(){return this.rf.asObservable()}get onVpaidEvent(){return this.hf.asObservable()}startNonLinear(){var t;null===(t=this.Pf)||void 0===t||t.start()}contentEnded(){var t;this.nonLinearInImpression&&(null===(t=this.Pf)||void 0===t||t.pause())}get onNonLinearEvent(){return this.pf.asObservable()}get onNonLinearExperienceEvent(){return this.ff.asObservable()}get onNonLinearImpressionPrice(){return this.vf.asObservable()}get onNonLinearImpressionRevenue(){return this.gf.asObservable()}get nonLinearInImpression(){return!!this.Pf&&this.Pf.inImpression}get Mf(){var t;return null===(t=this.Pf)||void 0===t?void 0:t.adContainer}startLinear(t,i=!1){this.xf.start(t,i)}setMediaRestrictions(t){this.yf.setMediaRestrictions(t)}getLinearVolume(){return this.xf.getVolume()}setLinearVolume(t){this.xf.setVolume(t)}hideLinear(){this.xf.hide()}showLinear(){this.xf.show()}updateContinueReadingCard(){this.xf.updateContinueReadingCard()}setContinueReadingCard(t){this.xf.setContinueReadingCard(t)}hideContinueReadingCard(){this.xf.hideContinueReadingCard()}setAdMarkerTitle(t){this.xf.setAdMarkerTitle(t)}hideAdMarkerTitle(){this.xf.hideAdMarkerTitle()}enterAdPodLoadingState(){this.xf.enterAdPodLoadingState()}setAdLoadingBackgroundUrl(t){this.xf.setAdLoadingBackgroundUrl(t)}updateLinearPodRemainingTime(t){this.yf.updateLinearPodRemainingTime(t)}get onLinearEvent(){return this.af.asObservable()}get onLinearUiComponentEvent(){return this.cf.asObservable()}get onLinearExperienceEvent(){return this.lf.asObservable()}get onLinearImpressionPrice(){return this.uf.asObservable()}get onLinearImpressionRevenue(){return this.df.asObservable()}get linearInImpression(){return this.xf.inImpression}get Cf(){return this.xf.adContainer}get Lf(){return this.xf.secondaryAdContainer}get linearAdUserInterface(){return this.xf.adUserInterface}get onFullcreenChange(){return this.xf.onFullcreenChange}get linearAdInWin(){return this.xf.adInWin}get firstLinearAdShown(){return this.xf.firstAdShown}get inAdPodLoadingState(){return this.xf.inAdPodLoadingState}getLinearAdContainerWidth(){return this.xf.getMainAdContainerWidth()}userInteraction(t){this.yf.userInteraction(t)}}class St{constructor(){this.Rf=(0,ut.qs)()}get id(){return this.Rf}}!function(t){t[t.NoPrefetch=0]="NoPrefetch",t[t.StartSessionPrefetch=1]="StartSessionPrefetch",t[t.MidSessionPrefetch=2]="MidSessionPrefetch"}(bt||(bt={}));function _t(t){return 2*(t+41)}function At(t){return t/2-41}class Pt{constructor(){this.Bf=Date.now(),this.Df={advertiser:{}}}addPrebid(t){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].prebidData.push({timestamp:Date.now()})}addBid(t,i){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].bidsFloorPriceList.push({timestamp:Date.now(),floorPrice:i})}addImpression(t,i){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].impressionRevenueList.push({timestamp:Date.now(),obfuscatedPrice:i})}shouldRequestLineItem(t){const i=Date.now();return!(this.Ff(i,3)&&this.$f(t,i,5)<-.5&&this.Vf(t,i,3)>=11.5&&this.Uf(t,i,10,.1)<.35)}Ff(t,i){return t-this.Bf>=i*ht.uD}$f(t,i,e){const s=this.Df.advertiser[t];if(!(0,P.$K)(s))return-1;const n=this.Nf(s.impressionRevenueList,i,e).map((t=>t.obfuscatedPrice));let r=0;return(0,a.BZ)(n)&&(r=n.reduce(((t,i)=>t+_t(i)))),this.Hf(r)}Vf(t,i,e){const s=this.Df.advertiser[t];if(!(0,P.$K)(s))return-1;const n=this.Nf(s.prebidData,i,e).length;return this.Hf(n)}Uf(t,i,e,s){const n=this.Df.advertiser[t];if(!(0,P.$K)(n))return-1;const r=this.Nf(n.impressionRevenueList,i,e).map((t=>t.floorPrice)),h=this.zf(r,s);return this.Hf(h)}Nf(t,i,e){const s=i-ht.s_,n=i-e*ht.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}Hf(t){return 0===t?-1:t}jf(t){this.Df.advertiser[t]={prebidData:[],bidsFloorPriceList:[],impressionRevenueList:[]}}zf(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}}class kt{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 It{constructor(t){this.clickTrackings=[],this.customClicks=[],this.errorUrls=[],this.impressions=[],this.trackingEvents=new kt,t.inLine?this.qf(t.inLine):this.Wf(t.wrapper)}qf(t){this.Gf(t.errors),this.Jf(t.impressions),this.Qf(t.creatives)}Wf(t){this.Gf(t.errors),this.Jf(t.impressions),this.Qf(t.creatives)}Yf(t){this.Kf(t.trackingEvents),this.Zf(t.videoClicks)}Zf(t){t&&(this.tv(t.clickTrackings),this.sv(t.customClicks))}tv(t){this.clickTrackings.push(...t)}sv(t){this.customClicks.push(...t)}Kf(t){t.forEach((t=>{try{this.trackingEvents[t.name].push(t.uri)}catch(e){(0,i.n)({message:"AdManager_VastResponse_tracker",exception:`${t.name}`,callStack:e.stack,level:i.D.INFO})}}))}Qf(t){t.forEach((t=>{t.linear?this.Yf(t.linear):t.nonLinear&&this.Kf(t.nonLinear.trackingEvents)}))}Gf(t){this.errorUrls.push(...t)}Jf(t){this.impressions.push(...t)}}const Tt={[s.ProtoTrackerTriggerType.Impression]:"adImpression",[s.ProtoTrackerTriggerType.Complete25Pc]:"adQuartileFirst",[s.ProtoTrackerTriggerType.Complete50Pc]:"adQuartileSecond",[s.ProtoTrackerTriggerType.Complete75Pc]:"adQuartileThird",[s.ProtoTrackerTriggerType.ViewCompletion]:"adQuartileFourth",[s.ProtoTrackerTriggerType.VideoClick]:"adClick",[s.ProtoTrackerTriggerType.Pause]:"adPause",[s.ProtoTrackerTriggerType.Resume]:"adResume",[s.ProtoTrackerTriggerType.Mute]:"adMute",[s.ProtoTrackerTriggerType.Unmute]:"adUnmute"};class Ct{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,e,n){if(!Array.isArray(t))return;const{width:r,height:h}=n.adContainerState.get(e.adType),{adBreakType:o}=n.adBreakState,{mediaDescription:a,mediaDuration:c,mediaId:l,mediaUrl:u,mediaTitle:d}=n.media;t.forEach((t=>{if(t.url)try{const n=i.replace(t.url,e.vendorId,{adMacros:{adWidth:r,adHeight:h,adPostion:o},mediaMacros:{mediaDescription:a,mediaDuration:c,mediaId:l,mediaUrl:u,mediaTitle:d}});switch(t.type){case s.ProtoTrackerType.Image:(0,ut.Hh)([n],window);break;case s.ProtoTrackerType.Javascript:(0,m.dZ)({src:n},window.document.head,window)}}catch(t){}}))}}function Mt(t,i){t.forEach((t=>function(t,i){(function(t,i){return i[Tt[t]]})(t.trigger,i).push({type:t.type,url:t.url})}(t,i)))}function Et(t){return{type:s.ProtoTrackerType.Image,url:t}}function Lt(t){return t.map((t=>Et(t)))}var Ot;!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"}(Ot||(Ot={}));const Rt={[Ot.HandlingSdkUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.NetworkRequestUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.XmlInvalidString]:s.ConnatixNoBidReasonEnum.CsEmptyResponse,[Ot.XmlParseGeneral]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlInvalidTree]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlInvalidAd]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlAdaptorWrapperLimit]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.HTMLUnknownMimeType]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.ImaAdsManagerInit]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.ImaVastEmptyResponse]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.ImaRequestException]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.ImaTimeout]:s.ConnatixNoBidReasonEnum.Timeout,[Ot.ImaInvalidResponse]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.InvalidCreativeUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.BidIsNotTargetingAllowedEver]:s.ConnatixNoBidReasonEnum.BidIsNotTargetingAllowedEver};var Bt,Dt;!function(t){t.VOLUME_DETECTED="volume_detected",t.MALWARE_DETECTED="malware_detected",t.BADURI_DETECTED="baduri_detected"}(Bt||(Bt={})),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"}(Dt||(Dt={}));class jt{constructor(){this.hf=new x.x}get onVpaidEvent(){return this.hf.asObservable()}handshakeVersion(t="2.0"){return"2.0"}}var Ft=n(2157);function $t(t){switch(t.creativeType){case s.ProtoCreativeTypeEnum.Tam:case s.ProtoCreativeTypeEnum.TamDeal:case s.ProtoCreativeTypeEnum.Rtb:return _t(t.obfuscatedPrice);case s.ProtoCreativeTypeEnum.HeaderBidder:return t.cpm;default:return t.floorPrice}}var Vt,Ut,Nt;n(7417);!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.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"}(Vt||(Vt={})),function(t){t[t.Win=0]="Win",t[t.AdLoaded=1]="AdLoaded",t[t.AdStarted=2]="AdStarted",t[t.AdImpression=3]="AdImpression"}(Ut||(Ut={}));class Ht{constructor(t){this.nv=t,this.rv=new Map,(0,P.$K)(this.nv.settings.bidLifecycle)||(this.nv.settings.bidLifecycle={})}onTrackingLifecycleEvent(t){switch(this.rv.set(t,Date.now()),t){case Ut.AdLoaded:this.hv();break;case Ut.AdImpression:this.ov()}}hv(){this.nv.settings.bidLifecycle.winToAdLoadedTime=this.av}ov(){this.nv.settings.bidLifecycle.startAdToImpressionTime=this.lv}get lv(){return this.rv.get(Ut.AdImpression)&&this.rv.get(Ut.AdStarted)?this.rv.get(Ut.AdImpression)-this.rv.get(Ut.AdStarted):0}get av(){return this.rv.get(Ut.AdLoaded)&&this.rv.get(Ut.Win)?this.rv.get(Ut.AdLoaded)-this.rv.get(Ut.Win):0}}!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"}(Nt||(Nt={}));const zt="cnx-ad-bid-slot-selected",qt="Connatix Ad";class Wt extends jt{constructor(t,i){super(),this.uv=t,this.settings=i,this.dv=null,this.fv=null,this.vv=null,this.gv=null,this.mv=void 0,this.yv=!1,this.bl=!1,this.bv=!1,this.wv=!1,this.xv=null,this.nf=[],this.Sv=new x.x,this._v=()=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.Timeout}}),this.kv()},this.Iv=()=>{this.Tv(),this.Cv(Nt.VIEWABLE_IMPRESSION_TIMEOUT).clearTimeout(),this.settings.viewabilityService.off(this.dv,this.Mv)},this.Mv=t=>{const i=this.Cv(Nt.VIEWABLE_IMPRESSION_TIMEOUT);t?i.timeoutHandle.timeoutId||i.setTimeout():i.clearTimeout()},this.Ev=()=>{this.Pv({type:g.fI.AdSkipped}),this.kv()},this.Ov=()=>{this.Pv({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}}),this.kv()},this.Rv=()=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.TimeoutLoaded}}),this.kv()},this.Cv=t=>{const i=this.Bv[t];return{timeoutHandle:i,setTimeout:()=>{i.timeoutId=this.uv.setTimeout((()=>{i.callback()}),i.timeout)},clearTimeout:()=>{null!==i.timeoutId&&(this.uv.clearTimeout(i.timeoutId),i.timeoutId=null)}}},this.Dv=Date.now(),this.creativeId=this.settings.externalCreativeId,this.jv=`cnx-ad-bid-slot-id-${this.settings.requestMetadata.data.cnxBidId}`,this.Fv=`cnx-ad-slot-${this.settings.id}`;const{adType:e}=this.settings.adManagerLineItem.protoLineItem;this.Bv={[Nt.IMPRESSION_TIMEOUT]:{callback:this._v,timeout:25e3,timeoutId:null},[Nt.VIEWABLE_IMPRESSION_TIMEOUT]:{callback:this.Iv,timeout:Ft.xs[e],timeoutId:null},[Nt.SKIP_AD_TIMEOUT]:{callback:this.Ev,timeout:500,timeoutId:null},[Nt.STOP_AD_TIMEOUT]:{callback:this.Ov,timeout:500,timeoutId:null},[Nt.AD_LOADED_TIMEOUT]:{callback:this.Rv,timeout:25e3,timeoutId:null}},this.qu=i.urlSuffixerService}get createdTimestamp(){return this.Dv}getPrice(){const{advertiserLineItemId:t,creativeType:i,floorPrice:e,lineItemPriority:s}=this.settings.adManagerLineItem.protoLineItem;return $t({lineItemId:t,bidId:this.settings.id,creativeType:i,floorPrice:e,obfuscatedPrice:this.settings.obfuscatedPrice,successRate:this.settings.successRate,priority:s,cpm:this.settings.cpm})}skipAd(){this.Cv(Nt.SKIP_AD_TIMEOUT).setTimeout()}stopAd(t){this.Cv(Nt.STOP_AD_TIMEOUT).setTimeout()}startAd(){this.wv&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"startAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.Fv}`,level:i.D.CRITICAL}),this.wv=!0,this.Cv(Nt.IMPRESSION_TIMEOUT).setTimeout()}initAd(t,e,s,n,r,h,o){this.bv&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"initAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.Fv}`,level:i.D.CRITICAL}),this.bv=!0,this.Cv(Nt.AD_LOADED_TIMEOUT).setTimeout(),this.$v(o),this.Vv=new Ht(this),this.Vv.onTrackingLifecycleEvent(Ut.Win)}setAdVolume(t){this.fv.volume=t,(0,m.Q1)(this.fv,t),t<=0?this.settings.adEnforcer.start(Dt.Mute):this.settings.adEnforcer.stop(Dt.Mute)}get impressionStarted(){return this.yv}get creativeId(){return this.mv}set creativeId(t){(0,P.QM)(this.creativeId)||(this.mv=t)}get onAdViewableImpression(){return this.Sv.asObservable()}Uv(t){let i;(0,P.kE)(t.payload.skipOffset)&&(i=t.payload.skipOffset);const e={type:g.fI.AdLoaded,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adLoadedData:{skipOffset:i},adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode}};return this.settings.adLoadedPayload=e,e}Nv(t){return{type:g.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:qt,skipOffset:this.settings.adLoadedPayload.payload.adLoadedData.skipOffset},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId}}}}Hv(t){return{type:g.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:qt},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId}}}}Pv(t){if(t.payload||(t.payload={}),t.payload.adType=this.settings.adManagerLineItem.protoLineItem.adType,this.zv(t))switch(t.type){case g.fI.AdLoaded:0,this.Vv.onTrackingLifecycleEvent(Ut.AdLoaded),this.Cv(Nt.AD_LOADED_TIMEOUT).clearTimeout(),this.hf.next(this.Uv(t));break;case g.fI.AdImpression:this.Vv.onTrackingLifecycleEvent(Ut.AdImpression),this.Cv(Nt.IMPRESSION_TIMEOUT).clearTimeout(),this.qv(),(0,m.cn)(this.vv,zt),this.hf.next(this.Nv(t)),this.yv=!0;break;case g.fI.AdVideoStart:this.Vv.onTrackingLifecycleEvent(Ut.AdStarted),this.hf.next(this.Hv(t));break;case g.fI.AdStopped:case g.fI.AdSkipped:case g.fI.AdError:this.bl&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_double_destroy",exception:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,level:i.D.WARN}),this.hu(),this.hf.next(t);break;default:this.hf.next(t)}else this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.InvalidVpaidEvent}})}$v(t){this.gv=this.Wv(),this.vv=this.gv.slotsContainer,(0,m.cn)(this.vv,this.jv),this.dv=this.gv.adSlot,this.dv.id=this.Fv,this.vv.id=this.settings.bidSlotId,this.fv=this.gv.videoSlot,this.fv.volume=t,(0,m.Q1)(this.fv,t),this.settings.adEnforcer.registerContainer(this.vv,this.Fv),this.nf.push(this.settings.adEnforcer.onEnforcerEvent.subscribe((t=>{this.Gv(t)}))),this.settings.adEnforcer.start(Dt.All)}Wv(){return this.settings.adSlotContainerRecycler.requestAdSlot(this.settings.adContainer)}hu(){this.bl=!0,(0,m.IV)(this.vv,zt),(0,m.IV)(this.vv,this.jv),this.dv.removeAttribute("id"),this.vv.removeAttribute("id"),(0,pt.i)(this.nf),this.kv(),this.settings.adEnforcer.deregisterContainer(this.vv),this.settings.viewabilityService.off(this.dv,this.Mv),null!==this.xv&&this.uv.clearTimeout(this.xv),this.Jv()}Jv(){this.xv=this.uv.setTimeout((()=>{this.settings.adSlotContainerRecycler.destroyAdSlot(this.gv)}),500)}Tv(){const{advertiserLineItemId:t,publisherLineItemId:i}=this.settings.adManagerLineItem.protoLineItem;this.Sv.next({advertiserLineItemId:t,publisherLineItemId:i,rtbSeatId:this.settings.requestMetadata.data.rtbSeatId,dspId:this.settings.requestMetadata.data.dspId})}qv(){const t=Ft.fJ,i=this.dv;this.settings.viewabilityService.on(i,this.Mv,{threshold:t}),this.Mv(this.settings.viewabilityService.check({threshold:t,element:i}))}kv(){Object.keys(this.Bv).forEach((t=>{this.Cv(t).clearTimeout()}))}zv(t){return!(!this.yv&&(t.type===g.fI.AdStopped||t.type===g.fI.AdSkipped))}Gv(t){if(t.detectedContainer!==this.vv)return;let e;switch(t.type){case Bt.BADURI_DETECTED:e="AdManager_enforcer_BadUri";break;case Bt.MALWARE_DETECTED:e="AdManager_enforcer_malware",this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.EnforcementMalware}});break;case Bt.VOLUME_DETECTED:e="AdManager_enforcer_soundBlock",this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.EnforcementVolume}})}(0,i.n)({message:e,exception:t.message,level:i.D.WARN})}Qv(t,e,s){const n=this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,r=this.creativeId;(0,i.n)({message:`AdManager_${t}_${e}`,exception:`advertiserLineItemId:${n}_creativeId:${r}_errorMessage:${null==s?void 0:s.message}`,callStack:null==s?void 0:s.stack,level:i.D.WARN},{throttle:5})}}var Gt;!function(t){t.BANNED_IMA_ADS_ID=["9026814","9053547"],t.KEYWORDS_FOR_BANNED_VAST=["nrb-v.ybp.yahoo.comvasterror","pr.ybp.yahoo.com/vasterror","//s.yimg.com/ff/vista.js"]}(Gt||(Gt={}));var Jt=n(3640);class Qt extends jt{constructor(t,i,e,s,n,r,h){super(),this.Xv=t,this.Zt=i,this.Yv=e,this.Kv=s,this.Zv=n,this.tg=r,this.ig=h,this.eg=new x.x,this.sg=t=>{if(!this.ng(t))return;let i="";try{i=t.getError().getMessage()+"_"+t.getError().getErrorCode()+"_"+t.getError().getVastErrorCode()}catch(t){}this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.ImaError+"_"+i}})},this.rg=t=>{const i=this.Xv.AdEvent.Type;switch(t.type){case i.CLICK:this.hf.next({type:g.fI.AdClickThru,payload:{}});break;case i.LOADED:this.Is(t);break;case i.IMPRESSION:const e={adsManager:this.Zv,adContainer:this.hg,viewMode:this.ag(this.cg),adTag:this.Kv};this.hf.next({type:g.fI.AdVideoStart}),this.hf.next({type:g.fI.AdImpression,payload:{imaMetadata:e}});break;case i.STARTED:this.hf.next({type:g.fI.AdStarted});break;case i.FIRST_QUARTILE:this.hf.next({type:g.fI.AdVideoFirstQuartile});break;case i.MIDPOINT:this.hf.next({type:g.fI.AdVideoMidpoint});break;case i.THIRD_QUARTILE:this.hf.next({type:g.fI.AdVideoThirdQuartile});break;case i.COMPLETE:this.hf.next({type:g.fI.AdVideoComplete}),this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}});break;case i.ALL_ADS_COMPLETED:break;case i.DURATION_CHANGE:this.hf.next({type:g.fI.AdDurationChange});break;case i.PAUSED:this.hf.next({type:g.fI.AdPaused});break;case i.RESUMED:this.hf.next({type:g.fI.AdPlaying});break;case i.LINEAR_CHANGED:this.hf.next({type:g.fI.AdLinearChange});break;case i.SKIPPABLE_STATE_CHANGED:this.hf.next({type:g.fI.AdSkippableStateChange});break;case i.SKIPPED:this.hf.next({type:g.fI.AdSkipped});break;case i.VOLUME_CHANGED:this.hf.next({type:g.fI.AdVolumeChange});break;case i.USER_CLOSE:this.hf.next({type:g.fI.AdUserClose});break;case i.LOG:this.hf.next({type:g.fI.AdLog})}},this.ug()}get onCreativeReceived(){return this.eg.asObservable()}initAd(t,i,e,s,n,r){this.hg=r.slot,this.dg=r.videoSlot,this.cg=e||g.zc.Normal;try{this.Zv.setVolume(0),this.Zv.init(t,i,this.ag(this.cg))}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.ImaManagerInit}})}}startAd(){try{this.Zv.start()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.Zv.stop(),this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){this.Zv.resize(t,i,this.ag(e))}pauseAd(){this.Zv.pause()}resumeAd(){this.Zv.resume(),this.Zt===dt.M.Ios&&(0,m.UR)(this.dg)}expandAd(){this.Zv.expand()}collapseAd(){this.Zv.collapse()}skipAd(){this.Zv.skip()}getAdRemainingTime(){return this.Zv.getRemainingTime()||0}getAdDuration(){return this.pg?this.pg.getDuration():0}getAdVolume(){return this.Zv.getVolume()}getAdMediaWidth(){return this.pg?this.pg.getVastMediaWidth():0}getAdMediaHeight(){return this.pg?this.pg.getVastMediaHeight():0}setAdVolume(t){this.Zv.setVolume(t)}getMediaFile(){return this.pg?this.pg.getMediaUrl():void 0}ug(){this.Yv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),this.Zv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),Object.keys(this.Xv.AdEvent.Type).forEach((t=>{this.Zv.addEventListener(this.Xv.AdEvent.Type[t],this.rg,!1)}))}fg(){this.Yv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),this.Zv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),Object.keys(this.Xv.AdEvent.Type).forEach((t=>{this.Zv.removeEventListener(this.Xv.AdEvent.Type[t],this.rg,!1)}))}ag(t){return t===g.zc.Fullscreen?this.Xv.ViewMode.FULLSCREEN:this.Xv.ViewMode.NORMAL}vg(t){return Gt.BANNED_IMA_ADS_ID.some((i=>i===t))}ng(t){const i=t.getUserRequestContext();return!i||i.id===this.tg.id}Is(t){if(this.pg=t.getAd(),this.vg(this.pg.getAdId()))return void this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VpaidInvalid}});this.eg.next(this.pg.getCreativeId());let i=-1,e="";try{i=this.pg.getSkipTimeOffset();const s=t.getAdData().clickThroughUrl;e=(0,P.QM)(s)?s:void 0}catch(t){}(0,Jt.A)(this.ig,e).then((t=>{t?this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.DomainBlocked}}):this.hf.next({type:g.fI.AdLoaded,payload:{skipOffset:i}})}))}destroy(){try{this.fg(),setTimeout((()=>{this.Zv.destroy()}))}catch(t){}}}const Xt={ImaObjectNotFound:Vt.ImaObjectNotFound,ImaScriptFailure:Vt.ImaScriptFailure},Yt="//imasdk.googleapis.com/js/sdkloader/ima3.js";class Kt{static preloadImaSdk(t){(0,m._w)(Yt,t)}static fetchImaSdk(t,e){return new Promise(((s,n)=>{const r=Kt.gg(t);if(r)return void s(r);const h=e&&1===(0,ut.Vm)([95,5]);(0,m.dZ)({src:Yt},t.document.head,t,(()=>{const e=Kt.gg(t);e?s(e):(h&&(0,i.n)({message:"AdManager_ImaIntegrator_no_image_object_found_after_loading_script",level:i.D.CRITICAL},{throttle:2,sendMaxLog:!1}),n(Xt.ImaObjectNotFound))}),(()=>{n(Xt.ImaScriptFailure)}),h,"AdManager_ImaIntegrator_unable_to_insert_ima_sdk_script")}))}static gg(t){return t.google&&t.google.ima}}class Zt extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.gv=null,this.adMediaType="ima",this.adSourceType=s.ProtoAdsourceTypeEnum.Ima,this.mg=[],this.gv=this.settings.imaAdSlotContainer,this.yg=new Qt(this.settings.imaSdk,this.settings.os,this.settings.imaAdsLoader,this.settings.url,this.settings.imaAdsManager,this.settings.requestAdsContext,this.settings.adManagerLineItem.protoLineItem.publisherLineItemId)}initAd(t,i,e,s,n,r,h){try{super.initAd(t,i,e,s,n,r,h),this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled&&this.bg(),this.mg.push(this.yg.onVpaidEvent.subscribe((t=>{this.Pv(t)})),this.yg.onCreativeReceived.subscribe((t=>{this.creativeId=t}))),this.yg.initAd(t,i,e,s,n,{slot:this.dv,videoSlot:this.fv})}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.yg.startAd()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.yg.stopAd(t)}catch(t){this.Qv("ImaBidAdaptor","stopAd",t)}}resizeAd(t,i,e){try{this.yg.resizeAd(t,i,e)}catch(t){this.Qv("ImaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.yg.pauseAd()}catch(t){this.Qv("ImaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.yg.resumeAd()}catch(t){this.Qv("ImaBidAdaptor","resumeAd",t)}}expandAd(){try{this.yg.expandAd()}catch(t){this.Qv("ImaBidAdaptor","expandAd",t)}}collapseAd(){try{this.yg.collapseAd()}catch(t){this.Qv("ImaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.yg.skipAd()}catch(t){this.Qv("ImaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.yg.getAdRemainingTime()}catch(t){return this.Qv("ImaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.yg&&this.yg.getAdDuration()||this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.Qv("ImaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.yg.getAdVolume()}catch(t){return this.Qv("ImaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.yg.getAdMediaWidth(),height:this.yg.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.yg.setAdVolume(t)}catch(t){this.Qv("ImaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.yg.getMediaFile()}get declaredDurationInSeconds(){return this.yg.getAdDuration()}Nv(t){const i=super.Nv(t);return i.payload.adSourceData.imaMetadata=t.payload.imaMetadata,i}Wv(){return this.gv}Jv(){this.settings.adSlotContainerRecycler.recycleAdSlot(this.gv)}bg(){Kt.fetchImaSdk(this.settings.globalDomUtilsService.getGlobalClosestTop().topFrame,!1)}hu(){try{super.hu(),(0,pt.i)(this.mg),this.yg.destroy()}catch(t){this.Qv("ImaBidAdaptor","_destroy",t)}}}class ti{constructor(t,i,e,s,n,r,h){this.Xv=t,this.Yv=i,this.Tu=e,this.Cu=s,this.Kv=n,this.dg=r,this.Ue=h,this.wg=new x.x,this.xg=new x.x,this.Sg={id:(0,ut.qs)()},this.Zv=null,this.sg=t=>{if(!this.ng(t))return;switch(t.getError().getErrorCode()){case this.Xv.AdError.ErrorCode.VAST_EMPTY_RESPONSE:this._g(Ot.ImaVastEmptyResponse);break;case this.Xv.AdError.ErrorCode.VAST_WRAPPER_ERROR:case this.Xv.AdError.ErrorCode.VAST_MALFORMED_RESPONSE:this._g(Ot.ImaInvalidResponse);break;default:this._g(Ot.ImaRequestException)}},this.Ag=t=>{this.ng(t)&&(this.Zv=t.getAdsManager(this.dg,{loadVideoTimeout:25*ht.s_}),this.Pg(),this.wg.next({imaAdsManager:this.Zv,requestAdsContext:this.Sg}))},this.Yv.addEventListener(this.Xv.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Ag),this.Yv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg)}get onSuccess(){return this.wg.asObservable()}get onError(){return this.xg.asObservable()}loadAd(){const t=new this.Xv.AdsRequest;t.adTagUrl=this.Kv,t.linearAdSlotWidth=t.nonLinearAdSlotWidth=this.Tu,t.linearAdSlotHeight=t.nonLinearAdSlotHeight=this.Cu,t.pageUrl=this.Ue,this.Yv.requestAds(t,this.Sg)}_g(t){this.xg.next(t)}Pg(){this.Yv.removeEventListener(this.Xv.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Ag),this.Yv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg)}ng(t){const i=t.getUserRequestContext();return!i||i.id===this.Sg.id}destroy(){var t;try{this.Pg(),null===(t=this.Zv)||void 0===t||t.destroy()}catch(t){}}}var ii;!function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(ii||(ii={}));const ei=ii;var si=function(t,i){return si=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])},si(t,i)};function ni(t,i){function e(){this.constructor=t}si(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}function ri(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 hi(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,n,r=e.call(t),h=[];try{for(;(void 0===i||i-- >0)&&!(s=r.next()).done;)h.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 h}function oi(){for(var t=[],i=0;i0},t.prototype.clear=function(){this.kg.clear()},t.prototype.ensure=function(t){this.kg.has(t)||this.kg.set(t,[])},t}();const gi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi);const mi=function(){this.scopedResolutions=new Map};function yi(t,i,e){var s,n,r=hi(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1],h=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 "+h+' of "'+t.name+'" constructor. Reason:',void 0===n&&(n=" "),oi([s],e.message.split("\n").map((function(t){return n+t}))).join("\n")}var bi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi),wi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi);const xi=function(){this.preResolution=new bi,this.postResolution=new wi};var Si=new Map,_i=function(){function t(t){this.parent=t,this.Tg=new gi,this.interceptors=new xi}return t.prototype.register=function(t,i,e){var s;if(void 0===e&&(e={lifecycle:ei.Transient}),s=function(t){return ai(t)||fi(t)||pi(t)||ci(t)}(i)?i:{useClass:i},pi(s))for(var n=[t],r=s;null!=r;){var h=r.useToken;if(n.includes(h))throw new Error("Token registration cycle detected! "+oi(n,[h]).join(" -> "));n.push(h);var o=this.Tg.get(h);r=o&&pi(o.provider)?o.provider:null}if((e.lifecycle===ei.Singleton||e.lifecycle==ei.ContainerScoped||e.lifecycle==ei.ResolutionScoped)&&(fi(s)||ci(s)))throw new Error('Cannot use lifecycle "'+ei[e.lifecycle]+'" with ValueProviders or FactoryProviders');return this.Tg.set(t,{provider:s,options:e}),this},t.prototype.registerType=function(t,i){return ui(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(ui(t)){if(ui(i))return this.register(t,{useToken:i},{lifecycle:ei.Singleton});if(i)return this.register(t,{useClass:i},{lifecycle:ei.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var e=t;return i&&!ui(i)&&(e=i),this.register(t,{useClass:e},{lifecycle:ei.Singleton})},t.prototype.resolve=function(t,i){void 0===i&&(i=new mi);var e=this.getRegistration(t);if(!e&&ui(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 li}(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=ri(this.interceptors.preResolution.getAll(t)),h=r.next();!h.done;h=r.next()){var o=h.value;"Once"!=o.options.frequency&&n.push(o),o.callback(t,i)}}catch(t){e={error:t}}finally{try{h&&!h.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 h=ri(this.interceptors.postResolution.getAll(t)),o=h.next();!o.done;o=h.next()){var a=o.value;"Once"!=a.options.frequency&&r.push(a),a.callback(t,i,e)}}catch(t){s={error:t}}finally{try{o&&!o.done&&(n=h.return)&&n.call(h)}finally{if(s)throw s.error}}this.interceptors.postResolution.setAll(t,r)}},t.prototype.resolveRegistration=function(t,i){if(t.options.lifecycle===ei.ResolutionScoped&&i.scopedResolutions.has(t))return i.scopedResolutions.get(t);var e,s=t.options.lifecycle===ei.Singleton,n=t.options.lifecycle===ei.ContainerScoped,r=s||n;return e=fi(t.provider)?t.provider.useValue:pi(t.provider)?r?t.instance||(t.instance=this.resolve(t.provider.useToken,i)):this.resolve(t.provider.useToken,i):ai(t.provider)?r?t.instance||(t.instance=this.construct(t.provider.useClass,i)):this.construct(t.provider.useClass,i):ci(t.provider)?t.provider.useFactory(this):this.construct(t.provider,i),t.options.lifecycle===ei.ResolutionScoped&&i.scopedResolutions.set(t,e),e},t.prototype.resolveAll=function(t,i){var e=this;void 0===i&&(i=new mi);var s=this.getAllRegistrations(t);if(!s&&ui(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.Tg.has(t)||i&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.Tg.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,i;try{for(var e=ri(this.Tg.entries()),s=e.next();!s.done;s=e.next()){var n=hi(s.value,2),r=n[0],h=n[1];this.Tg.setAll(r,h.filter((function(t){return!fi(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 n=ri(this.Tg.entries()),r=n.next();!r.done;r=n.next()){var h=hi(r.value,2),o=h[0],a=h[1];a.some((function(t){return t.options.lifecycle===ei.ContainerScoped}))&&s.Tg.setAll(o,a.map((function(t){return t.options.lifecycle===ei.ContainerScoped?{provider:t.provider,options:t.options}:t})))}}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}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.Tg.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this.Tg.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,i){var e=this;if(t instanceof li)return t.createProxy((function(t){return e.resolve(t,i)}));var s=Si.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,oi([void 0],n)))},t.prototype.resolveParams=function(t,i){var e=this;return function(s,n){var r,h,o,a;try{return"object"==typeof(a=s)&&"token"in a&&"multiple"in a?di(s)?s.multiple?(r=e.resolve(s.transform)).transform.apply(r,oi([e.resolveAll(s.token)],s.transformArgs)):(h=e.resolve(s.transform)).transform.apply(h,oi([e.resolve(s.token,t)],s.transformArgs)):s.multiple?e.resolveAll(s.token):e.resolve(s.token,t):di(s)?(o=e.resolve(s.transform,t)).transform.apply(o,oi([e.resolve(s.token,t)],s.transformArgs)):e.resolve(s,t)}catch(t){throw new Error(yi(i,n,t))}}},t}(),Ai=new _i;var Pi="injectionTokens";const ki=function(){return function(t){Si.set(t,function(t){var i=Reflect.getMetadata("design:paramtypes",t)||[],e=Reflect.getOwnMetadata(Pi,t)||{};return Object.keys(e).forEach((function(t){i[+t]=e[t]})),i}(t))}};const Ii=function(){return function(t){ki()(t),Ai.registerSingleton(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.");class Ti{constructor(t=Ai){this.Cg=t}static getInstance(){return this.Mg||(this.Mg=new Ti),this.Mg}static getGlobalContainer(){return this.getInstance().globalContainer}get globalContainer(){return this.Cg}}var Ci=n(655),Mi=n(5720),Ei=function(t){function i(i,e){return t.call(this)||this}return(0,Ci.ZT)(i,t),i.prototype.schedule=function(t,i){return void 0===i&&(i=0),this},i}(Mi.w0),Li={setInterval:function(){for(var t=[],i=0;i=0;o--)(n=t[o])&&(h=(r<3?n(h):r>3?n(i,e,h):n(i,e))||h);return r>3&&h&&Object.defineProperty(i,e,h),h},qi=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)};let Wi=Hi=class{constructor(){var t,i;this.Bg=new Map,this.Dg=0,this.jg=(void 0===(t=Hi.TIME_BETWEEN_TICKS)&&(t=0),void 0===i&&(i=ji),t<0&&(t=0),Ni(t,t,i)),this.jg.subscribe((()=>this.Fg()))}setTimeout(t,i=0){return this.$g(t,i,!0)}clearTimeout(t){this.Bg.delete(t)}setInterval(t,i=0){return this.$g(t,i,!1)}clearInterval(t){this.Bg.delete(t)}Vg(t){try{t.callback()}catch(t){(0,i.n)({message:"TimerService_error",callStack:t.stack,exception:t.message,level:i.D.INFO},{throttle:1})}}Fg(){const t=(new Date).getTime(),i=[];for(const[e,s]of this.Bg)t-s.startTime{setTimeout((()=>{i(Ot.ImaTimeout)}),25e3)})),i=this.qg(this.zg);return Promise.race([i,t]).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),this.Ug=!0,this.Wg&&(0,pt.i)(this.Hg),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),this.Ug=!0,this.Wg&&((0,pt.i)(this.Hg),this.Wg.destroy(),this.settings.adSlotContainerRecycler.recycleAdSlot(this.zg)),t}))}qg(t){return t.fetchImaDependencies().then((t=>(this.Jg=t,this.Qg(t)))).then((t=>this.Xg(t))).catch((t=>{throw(0,P.$K)(t)?t:Ot.ImaRequestException}))}Qg(t){return this.Ug?Promise.reject():new Promise(((i,e)=>{const s=this.Yg();this.Wg=new ti(t.imaSdk,t.imaAdsLoader,s.width,s.height,this.settings.url,this.zg.videoSlot,this.settings.pageUrl),this.Hg.push(this.Wg.onSuccess.subscribe((t=>{i(t)})),this.Wg.onError.subscribe((t=>{e(t)}))),this.Wg.loadAd()}))}Yg(){return this.settings.callingState.adContainerState.get(this.settings.adManagerLineItem.protoLineItem.adType)}Xg(t){const i=Ti.getGlobalContainer().resolve(Wi);return new Zt(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.Jg.imaSdk,imaAdsLoader:this.Jg.imaAdsLoader,imaAdsManager:t.imaAdsManager,requestAdsContext:t.requestAdsContext,imaAdSlotContainer:this.zg,bidSlotId:this.settings.bidSlotId,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService})}}var Ji,Qi,Xi,Yi=n(2324);!function(t){t[t.Javascript=0]="Javascript",t[t.Video=1]="Video"}(Ji||(Ji={})),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,h=0;h0:e.hasAttributes()){let t;for(;s").replace(/</g,"<").replace(/&/g,"&")}}(Qi||(Qi={}));class Ki{constructor(t){this.Kg=["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.Zg="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=Qi.getKeyValue(t)}isSupported(){return!("application/x-shockwave-flash"===this.type||"video/x-flv"===this.type)}getMediaFileType(){return this.apiFramework===this.Zg||(0,a.d3)(this.type,this.Kg)?Ji.Javascript:Ji.Video}}class Zi{constructor(t){this.clickThrough=void 0,this.clickTrackings=[],this.customClicks=[],this.clickThrough=Qi.getKeyValue(t.clickthrough),this.clickTrackings=this.tm((0,a.qo)(t.clicktracking)),this.customClicks=this.tm((0,a.qo)(t.customclick))}tm(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(Qi.getKeyValue(t))})),i}}class te{constructor(t){this.duration=void 0,this.mediaFiles=[],this.trackingEvents=[],this.skipoffset=void 0,this.videoClicks=void 0,this.duration=(0,Yi.pP)(Qi.getKeyValue(t.duration)),this.skipoffset=(0,Yi.QI)(t.keyAttributes.skipoffset,this.duration),t.mediafiles&&(this.mediaFiles=this.im((0,a.qo)(t.mediafiles.mediafile))),t.trackingevents&&(this.trackingEvents=Xi.parseTrackingEvents((0,a.qo)(t.trackingevents.tracking),this.duration)),t.videoclicks&&(this.videoClicks=new Zi(t.videoclicks)),t.adparameters&&(this.adParameters=Qi.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=Qi.decodeXMLText(this.adParameters)))}im(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{const e=new Ki(t);e.isSupported()&&i.push(e)})),i}isSupported(){return!0}}class ie{constructor(t){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,Yi.pP)(t.keyAttributes.minsuggestedduration),this.nonLinearClickThrough=t.nonlinearclickthrough.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,i.n)({message:"AdManager_NonLinearAd_VPAID_found",level:i.D.INFO}),!1):this.width&&this.height?!(!this.staticResource.creativeType||!this.staticResource.uri)||(this.htmlResource.uri&&(0,i.n)({message:"AdManager_NonLinearAd_htmlResource_found",level:i.D.INFO}),this.iframeResource.uri&&(0,i.n)({message:"AdManager_NonLinearAd_iframeResource_found",level:i.D.INFO}),!1):((0,i.n)({message:"AdManager_NonLinearAd_no_dimensions",level:i.D.INFO}),!1)}}class ee{constructor(t){this.nonLinearAdList=[],this.trackingEvents=[],t.nonlinear&&(this.nonLinearAdList=this.nm((0,a.qo)(t.nonlinear))),t.trackingevents&&(this.trackingEvents=Xi.parseTrackingEvents((0,a.qo)(t.trackingevents.tracking))),t.adparameters&&(this.adParameters=Qi.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=Qi.decodeXMLText(this.adParameters)))}isSupported(){return!0}nm(t){const i=[];return t.forEach((t=>{const e=new ie(t);e.isSupported()&&i.push(e)})),i}}class se{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 te(t.linear)}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,exception:t.message,message:"Creative_Linear"})}if(t.nonlinearads)try{this.nonLinear=new ee(t.nonlinearads)}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,exception:t.message,message:"Creative_NonLinear"})}}isSupported(){return!0}}class ne{constructor(t,i){this.name=t.keyAttributes.event,this.uri=Qi.getKeyValue(t),"progress"===this.name&&(this.offset=(0,Yi.QI)(t.keyAttributes.offset,i))}}!function(t){function i(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(Qi.getKeyValue(t))})),i}t.parseImpressions=function(t){return i(t)},t.parseCretives=function(t){const i=[];return t.forEach((t=>{i.push(new se(t))})),i},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 ne(t,i))})),e}}(Xi||(Xi={}));class re{constructor(t){var i;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.adTitle=Qi.getKeyValue(t.adtitle),this.adSystem=Qi.getKeyValue(t.adsystem),this.impressions=Xi.parseImpressions((0,a.qo)(t.impression)),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?Xi.parseCretives((0,a.qo)(t.creatives.creative)):[],this.description=Qi.getKeyValue(t.description),this.advertiser=Qi.getKeyValue(t.advertiser),this.surveys=Qi.getKeyValue(t.survey),this.errors=Xi.parseErrors((0,a.qo)(t.error)),this.pricing=Qi.getKeyValue(t.pricing),this.extensions=Qi.getKeyValue(t.extensions)}isSupported(){return!0}}class he{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=Qi.getKeyValue(t.adsystem),this.impressions=Xi.parseImpressions((0,a.qo)(t.impression)),this.VASTAdTagURI=Qi.getKeyValue(t.vastadtaguri),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?Xi.parseCretives((0,a.qo)(t.creatives.creative)):[],this.errors=Xi.parseErrors((0,a.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 oe{constructor(t){Array.isArray(t)?this.rm(t):this.hm(t)}isSupported(){return!0}hm(t){this.id=t.keyAttributes.id,this.sequence=t.keyAttributes.sequence,t.inline?this.inLine=new re(t.inline):t.wrapper&&(this.wrapper=new he(t.wrapper))}rm(t){const i=t.filter((t=>{const i=this.om(t).filter((t=>t.linear));return!!(0,a.BZ)(i)}));(0,a.BZ)(i)&&this.hm(i[0])}om(t){return t.inline?(0,a.qo)(t.inline.creatives.creative):t.wrapper?(0,a.qo)(t.wrapper.creatives.creative):[]}}class ae{constructor(t=2){this.am=t}parseVastXml(t){try{if(!this.lm(t))return{error:!0,errorReason:Ot.XmlInvalidString};if(this.um(t))return{error:!0,errorReason:Ot.XmlInvalidAd};const i=(new DOMParser).parseFromString(t,"application/xml"),e=new Qi.JXONTree(i.documentElement);if(!this.dm(e,this.am))return{error:!0,errorReason:Ot.XmlInvalidTree};const s=new oe(e.ad);return this.pm(s)?{error:!1,result:s}:{error:!0,errorReason:Ot.XmlInvalidAd}}catch(t){return{error:!0,errorReason:Ot.XmlParseGeneral}}}lm(t){return(0,P.QM)(t)}um(t){return Gt.KEYWORDS_FOR_BANNED_VAST.some((i=>t.includes(i)))}dm(t,i){if(!t.ad)return!1;const e=parseInt(t.keyAttributes.version,10);return!(e&&e{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,a.BZ)(t)&&!(0,a.BZ)(i))return!1}return!0}}class ce{constructor(t){this.mediaFiles=[],this.nonLinearFiles=[],this.adTitle=void 0,this.adParameters=void 0,this.linearClickThrough=void 0,this.creativeId=void 0,t.forEach((t=>{t.inLine?(this.adTitle=t.inLine.adTitle,this.Qf(t.inLine.creatives)):t.wrapper&&this.Qf(t.wrapper.creatives)}))}Yf(t){this.duration=t.duration,this.fm(t.mediaFiles),this.vm(t.skipoffset),this.gm(t.adParameters),t.videoClicks&&t.videoClicks.clickThrough&&this.bm(t.videoClicks.clickThrough)}wm(t){this.xm(t.nonLinearAdList),this.gm(t.adParameters)}xm(t){this.nonLinearFiles=[...this.nonLinearFiles,...t]}gm(t){this.adParameters=t}vm(t){this.skipoffset=t}fm(t){this.mediaFiles=[...this.mediaFiles,...t]}bm(t){this.linearClickThrough=t}Qf(t){t.forEach((t=>{this.creativeId=t.id,t.linear&&this.Yf(t.linear),t.nonLinear&&this.wm(t.nonLinear)}))}}var le,ue=n(2817);!function(t){t[t.FirstQuartile=0]="FirstQuartile",t[t.SecondQuartile=1]="SecondQuartile",t[t.ThirdQuartile=2]="ThirdQuartile",t[t.FourthQuartile=3]="FourthQuartile"}(le||(le={}));var de,pe,fe=n(5874);function ve(t,i,e,s){t.style.top=`${function(t,i,e,s,n){let r=i-s.clientY;const h=s.clientY+s.height-i;n.alignTop&&r>t.offsetHeight?r-=t.offsetHeight:!n.alignTop&&hs.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),h=i,o=h+t.offsetWidth;const a=e.clientX+e.width;if(s.alignMiddle){const i=t.offsetWidth/2;r-=Math.ceil(i),h-=i,o-=i}if(s.alignMiddle||s.forceRight)return e.clientX>h?r=0+n:aa&&(r-=t.offsetWidth);return r}(t,i.clientX,e,s)}px`}!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"}(de||(de={}));class ge extends h._{constructor(t,i,e,s,n){super(),this.mediator=t,this.Sr=i,this._m=e,this.Qt=n,this.Am=i.createElementByString(s)}getContainer(){return this.Am}getCoordinates(t){const i=this.Sr.getElementCoordinates(this.Am);return this.Qt&&t?((t&de.Top)===de.Top&&(i.clientY-=this.Am.clientHeight),(t&de.Right)===de.Right&&(i.clientX+=this.Am.clientWidth)):i.clientX+=i.width/2,i}showComponent(t=!1){if(!this.Am||!this.Am.parentElement)return;const i=(0,m.pv)(this.Am.parentElement,"cnx-ui-btn")?this.Am.parentElement:this.Am;t&&(0,m.GF)(i)?(0,m.Ji)(i):(0,m.Ho)(i)}hideComponent(t=!1){if(!this.Am||!this.Am.parentElement)return;const i=(0,m.pv)(this.Am.parentElement,"cnx-ui-btn")?this.Am.parentElement:this.Am;t&&!(0,m.GF)(i)?(0,m.U6)(i,(()=>(0,m.MV)(i))):(0,m.MV)(i)}destroy(){this.Am.innerHTML="",this.Am.style.display="none",this._m.unregisterAll(this)}}!function(t){t[t.SimpleMenuItem=0]="SimpleMenuItem",t[t.ToggleMenuItem=1]="ToggleMenuItem",t[t.SubmenuMenuItem=2]="SubmenuMenuItem"}(pe||(pe={}));class me extends ge{constructor(t,i,e,s,n,r,h,o){super(t,i,e,s,o),this.eventName=n,this.Pm=r,this.km=h,this.Im=[],this.eventList=[w[w.RebindComponent],fe.Z[fe.Z.HoldStart],fe.Z[fe.Z.HoldEnd],w[w.ContextMenuOpen],w[w.ContextMenuClose]],this.Tm=!1,this.Cm=10,this.Mm=t=>{this.Em.removeChild(t.target),this.Em.style.width=`${this.Am.clientWidth}px`},this.close=t=>{t&&(0,ut.Of)(t.target,c.s6.ContextController,this.Cm)||!1!==this.isOpen&&(this.Tm&&(this.mediator.publish(this,fe.Z[fe.Z.HoldEnd]),(0,m.IV)(this.km,c.Gj.OnHold),this.Tm=!1),this.isOpen=!1,this.mediator.publish(this,w[w.ContextMenuClose]),(0,m.cn)(this.Am,c.Gj.Invisible),this._m.removeGlobalActions(this.Am),this.closeAllSubmenuItems())},this.close(),this.cacheCoordinates(),this.eventList.push(this.eventName),this.Em=this.Am.getElementsByClassName(c.Ng.Container)[0],this.Lm=this.Sr.createElementByString(``),this.Em.appendChild(this.Lm),(0,m.cn)(this.Em,c.s6.ContextController)}addNewItemsEvent(t){const i=t.filter((t=>!(0,a.d3)(t,this.eventList)));i.length>0&&(this.eventList=[...this.eventList,...i],this.mediator.publish(this,w[w.RebindComponent],{payload:this.Pm}))}cacheCoordinates(){this.Om=this.Sr.getElementCoordinates(this.km)}positionContextMenu(t){this.cacheCoordinates(),ve(this.Am,t,this.Om,{alignMiddle:this.alignMiddle,alignTop:this.alignTop,forceRight:this.forceRight})}Rm(t){switch(t.type){case pe.SimpleMenuItem:this.close();break;case pe.SubmenuMenuItem:this.Bm(t)}}sendEvent(t,i){this.mediator.publish(this,t,i)}Bm(t){const i=this.Am.clientWidth;t.isOpen?(t.$menuContainer.addEventListener("transitionend",this.Mm),this.Lm.style.left="0px",t.$menuContainer.style.left="0px"):(t.$menuContainer.removeEventListener("transitionend",this.Mm),this.Em.style.width=2*i+"px",this.Em.appendChild(t.$menuContainer),(0,m.Tp)(this.Em),this.Lm.style.left=-i+"px",t.$menuContainer.style.left=-i+"px"),t.isOpen=!t.isOpen}closeAllSubmenuItems(){this.Im.forEach((t=>{t.type===pe.SubmenuMenuItem&&t.isOpen&&this.Bm(t)}))}buildContextMenu(t){let i=[];this.Lm.innerHTML="",this.Em.style.width=`${this.Am.clientWidth}px`,this.Im.forEach((t=>this.unsubscribeAll(t))),this.Im=t,this.Im.forEach((t=>{i=[...i,...t.eventList],t.eventList.forEach((i=>this.subscribe(i,t,(e=>{this.Rm(t),this.sendEvent(i,e)})))),t.initComponent(),this.Lm.appendChild(t.getContainer())})),this.addNewItemsEvent(i)}getAnchorCoordinatesTo(t){return null==t?void 0:t.getCoordinates()}open(t,i=!1){i&&(this.Tm=i,this.mediator.publish(this,fe.Z[fe.Z.HoldStart]),(0,m.cn)(this.km,c.Gj.OnHold)),this.isOpen=!0,this.mediator.publish(this,w[w.ContextMenuOpen]),this.positionContextMenu(t);const e={interactionend:this.close};this._m.addGlobalActions(this.Am,e),(0,m.IV)(this.Am,c.Gj.Invisible)}}class ye extends ge{constructor(t,i,e,s,n){super(t,i,e,s,n),this.eventList=[fe.Z[fe.Z.Scroll],fe.Z[fe.Z.Click]],this.Dm=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.Dm,click:this.onClick};this._m.register(this.Am,this,this._m,t),this.Qt&&(this.subscribe(fe.Z[fe.Z.Click],this._m,(()=>{this.onClickHandler()})),this.relay(fe.Z[fe.Z.Scroll],this._m,this,this.mediator))}destroy(){this.unsubscribeAll(this._m),super.destroy()}}class be extends ye{constructor(t,i,e,s,n){super(t,i,e,be.getTemplate(n),s),this.mediator=t,this.jm=!1,this.type=pe.SimpleMenuItem,this.eventList=[],this.event=n.activeEvent,this.name=n.name,n.eventList?this.eventList=n.eventList:this.eventList.push(this.event),this.Fm=this.Am.getElementsByClassName(c.Ng.ItemTitle)[0],this.$m=this.Am.getElementsByClassName(c.Ng.ItemIcon)[0]}static getTemplate(t){const i=`${t.icon}`,e=`${t.label}`;return`\n ${t.icon?i:""}\n ${t.name}\n ${t.label?e:""}\n `}onClickHandler(t){this.mediator.publish(this,this.event)}changeItemName(t){this.Fm.innerHTML=t}changeItemIcon(t){this.$m.innerHTML=t}get isActive(){return this.jm}set isActive(t){this.jm=t,this.jm?(0,m.cn)(this.Am,c.Gj.Active,c.iu.AccentColor):(0,m.IV)(this.Am,c.Gj.Active,c.iu.AccentColor)}}var we,xe;!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"}(we||(we={}));class Se{constructor(t,i={}){if(this.Um=t,this.Wt=i,this.Nm=0,this.Hm=t=>{t.preventDefault(),this.zm=t.pageY,this.qm=t.pageX,(0,m.cn)(this.Wm,we.PreventSelect),(0,m.cn)(this.Ne.document.body,we.PreventSelect),this.Ne.document.addEventListener("mousemove",this.Gm),this.Ne.document.addEventListener("mouseup",this.Jm)},this.Gm=t=>{const i=this.Wt.horizontal?t.pageX-this.qm:t.pageY-this.zm;this.zm=t.pageY,this.qm=t.pageX,(0,m.PM)(this.Ne,(()=>{this.Wt.horizontal?this.Qm.scrollLeft+=i/this.Xm:this.Qm.scrollTop+=i/this.Xm}))},this.Jm=t=>{(0,m.IV)(this.Wm,we.PreventSelect),(0,m.IV)(this.Ne.document.body,we.PreventSelect),this.Ne.document.removeEventListener("mousemove",this.Gm),this.Ne.document.removeEventListener("mouseup",this.Jm)},this.Ym=t=>{if(!this.Wt.horizontal)return;const i=t.deltaMode?100*(t.deltaY<0?-1:1):t.deltaY,e=Math.floor(i)/33*20,s=this.Nm+e;s>=-1*this.Wm.clientWidth&&s<=this.Qm.scrollWidth-this.Wm.clientWidth&&(this.Nm=s),(0,m.PM)(this.Ne,(()=>this.Qm.scrollLeft=this.Nm))},this.Zm=()=>{clearTimeout(this.ty),this.ty=setTimeout((()=>{this.iy()}),50)},this.iy=()=>{const t=this.Wt.horizontal?this.Qm.scrollWidth:this.Qm.scrollHeight,i=this.Wt.horizontal?this.Um.clientWidth:this.Um.clientHeight;this.Xm=i/t;const e=-1*(this.Um.clientWidth-(this.Wm.clientWidth||4)-4),s=this.Um.clientHeight-this.Wm.clientHeight-4;(0,m.PM)(this.Ne,(()=>{if(this.Xm>=1)(0,m.MV)(this.Wm);else{if((0,m.Ho)(this.Wm),this.Wt.horizontal)return void(0,m.T7)(this.Wm,{width:`${Math.max(100*this.Xm,10)}%`,height:"",top:`${s}px`,right:"",left:this.Qm.scrollLeft/t*100+"%"});(0,m.T7)(this.Wm,{width:"",height:`${Math.max(100*this.Xm,10)}%`,top:this.Qm.scrollTop/t*100+"%",right:`${e}px`,left:""})}}))},this.Ne=(0,m.LT)(t),!this.Ne)throw new Error("window was not found");this.ey(),this.Wm.addEventListener("mousedown",this.Hm),this.Wt.overrideNativeHorizontalScroll&&this.Qm.addEventListener("wheel",this.Ym,{passive:!0}),this.Ne.addEventListener("resize",this.Zm),this.Qm.addEventListener("scroll",this.iy),this.Qm.addEventListener("mouseenter",this.iy),(0,m.cn)(this.Um,we.MainContainer,this.Wt.horizontal?we.Horizontal:void 0,this.Wt.showOnHover?we.ShowOnHover:void 0),this.iy();const e=(0,m.Dx)(this.Um,this.Ne);"0px"===e.height&&"0px"!==e.maxHeight&&(0,m.T7)(this.Um,{height:e.maxHeight})}ey(){for(this.Wm=(0,m.G$)(``,this.Ne),this.sy=(0,m.G$)(``,this.Ne),this.Qm=(0,m.G$)(``,this.Ne),this.sy.appendChild(this.Qm);this.Um.firstChild;)this.Qm.appendChild(this.Um.firstChild);this.Um.appendChild(this.sy),this.Um.insertAdjacentElement("beforeend",this.Wm)}destroy(){for(this.removeListeners(),(0,m.bX)(this.Wm);this.Qm.firstChild;)this.Um.appendChild(this.Qm.firstChild);(0,m.bX)(this.sy),(0,m.IV)(this.Um,we.MainContainer,we.Horizontal,we.ShowOnHover)}removeListeners(){this.Ne.document.removeEventListener("mousemove",this.Gm),this.Ne.document.removeEventListener("mouseup",this.Jm),this.Wm.removeEventListener("mousedown",this.Hm),this.Qm.removeEventListener("wheel",this.Ym),this.Ne.removeEventListener("resize",this.Zm),this.Qm.removeEventListener("scroll",this.iy),this.Qm.removeEventListener("mouseenter",this.iy)}}class _e extends me{constructor(t,i,e,s,n,r,h,o,a){super(t,i,e,s,n,r,h,o),this.resizeObserver=a,this.alignMiddle=!0,this.alignTop=!0,this.forceRight=!1,this.ny=[],this.hy=new be(this,this.Sr,this._m,this.Qt,{name:"Off",activeEvent:null}),this.oy=[],this.ly=!1}sendEvent(t){this.updateCaptionSelection(t),this.mediator.publish(this,this.eventName,{payload:{event:t?w[w.CaptionOn]:w[w.CaptionOff],data:t}})}createCaptionsMenu(t){if(this.oy===t)return;0===this.ny.length?this.ny.push(this.hy):this.ny=this.ny.slice(0,1),t.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:t.title,activeEvent:t.file}))}));const i=this.oy.find((t=>{var i;return t.title===(null===(i=this.uy)||void 0===i?void 0:i.name)}));this.uy&&i&&this.updateCaptionSelection(i.file),(0,m.T7)(this.getContainer(),{height:"auto"}),this.oy=t,this.resizeObserver&&!this.ly&&(this.resizeObserver.on(this.getContainer(),(t=>this.py(t))),this.ly=!0),this.buildContextMenu(this.ny)}initComponent(){}onResize(t){this.cacheCoordinates(),this.isOpen&&this.positionContextMenu(t)}updateCaptionSelection(t){this.ny.forEach((t=>t.isActive=!1));const i=this.oy.find((i=>i.file===t));i?this.uy=this.ny.find((t=>t.name===i.title)):t||(this.uy=this.ny.find((t=>"Off"===t.name))),this.uy&&(this.uy.isActive=!0)}py(t){t.clientHeight>=188&&(0,m.T7)(t,{height:"188px"}),this.vy||(this.vy=new Se(t,{horizontal:!1}),(0,m.cn)(t,c.Gj.HasCustomScrollbar))}}!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.CastButton=9]="CastButton",t[t.ShareButton=10]="ShareButton",t[t.UpNextButton=11]="UpNextButton",t[t.UpNextBox=12]="UpNextBox",t[t.PreviousButton=13]="PreviousButton",t[t.LogoComponent=14]="LogoComponent",t[t.LogoOutstream=15]="LogoOutstream",t[t.MoreButton=16]="MoreButton",t[t.ElapsedTimeLabel=17]="ElapsedTimeLabel",t[t.TotalDurationLabel=18]="TotalDurationLabel",t[t.RemainingDurationLabel=19]="RemainingDurationLabel",t[t.ProgressBar=20]="ProgressBar",t[t.QualityMenu=21]="QualityMenu",t[t.QueStateOverlay=22]="QueStateOverlay",t[t.Loader=23]="Loader",t[t.ContextMenu=24]="ContextMenu",t[t.ElementsSettingsMenu=25]="ElementsSettingsMenu",t[t.CloseButton=26]="CloseButton",t[t.SkipAdButton=27]="SkipAdButton",t[t.AdLoadingScreen=28]="AdLoadingScreen",t[t.CtaButton=29]="CtaButton",t[t.PlayspaceProgressBar=30]="PlayspaceProgressBar",t[t.PlayspaceSettingsMenu=31]="PlayspaceSettingsMenu",t[t.ClickToPlayButton=32]="ClickToPlayButton",t[t.SlideTitle=33]="SlideTitle",t[t.SkipAd=34]="SkipAd",t[t.TopTitle=35]="TopTitle",t[t.TopLogo=36]="TopLogo",t[t.TopSlideTitle=37]="TopSlideTitle",t[t.TopStoryTitle=38]="TopStoryTitle",t[t.TextLabel=39]="TextLabel",t[t.LivePoster=40]="LivePoster",t[t.LiveIcon=41]="LiveIcon",t[t.ElementsCaptionMenu=42]="ElementsCaptionMenu",t[t.NonLinearComponent=43]="NonLinearComponent"}(xe||(xe={}));class Ae extends ye{constructor(){super(...arguments),this.onClick=t=>{this.onInteractionHandler(t),this.onClickHandler(),this.addBoomEffect()}}addBoomEffect(){(0,m.cn)(this.Am,"cnx-boom"),(0,m.Tp)(this.Am),(0,m.cn)(this.Am,"cnx-boom-anim");const t=i=>{"transform"===i.propertyName&&((0,m.IV)(this.Am,"cnx-boom"),(0,m.IV)(this.Am,"cnx-boom-anim"),this.Am.removeEventListener("transitionend",t))};this.Am.addEventListener("transitionend",t)}initComponent(){super.initComponent(),this.Am.appendChild(this.Sr.createElementByString(''))}}class Pe extends Ae{constructor(){super(...arguments),this.eventList=[w[w.HoverStart],w[w.HoverEnd],...this.eventList],this.onStartHover=()=>{(0,m.cn)(this.Am,c.Gj.HoverStart),(0,m.cn)(this.Am,c.Gj.HoverEnd),this.mediator.publish(this,w[w.HoverStart])},this.onEndHover=()=>{(0,m.IV)(this.Am,c.Gj.HoverEnd),this.mediator.publish(this,w[w.HoverEnd])}}initComponent(){super.initComponent(),this.Qt?(this.Am.addEventListener("touchstart",this.onStartHover,{passive:!0}),this.Am.addEventListener("touchend",this.onEndHover),this.Am.addEventListener("touchcancel",this.onEndHover)):(this.Am.addEventListener("mouseenter",this.onStartHover),this.Am.addEventListener("mouseleave",this.onEndHover))}destroy(){this.Qt?(this.Am.removeEventListener("touchstart",this.onStartHover),this.Am.removeEventListener("touchend",this.onEndHover),this.Am.removeEventListener("touchcancel",this.onEndHover)):(this.Am.removeEventListener("mouseenter",this.onStartHover),this.Am.removeEventListener("mouseleave",this.onEndHover)),super.destroy()}onInteractionHandler(t){this.onEndHoverClick()}onEndHoverClick(){(0,m.IV)(this.Am,c.Gj.HoverEnd),(0,m.IV)(this.Am,c.Gj.HoverStart)}}class ke extends Pe{constructor(){super(...arguments),this.eventList=[w[w.Settings],...this.eventList],this.gy="Settings"}onClickHandler(){this.mediator.publish(this,w[w.Settings])}toggleHDFlag(t){t?(0,m.cn)(this.Am,c.Gj.Active):(0,m.IV)(this.Am,c.Gj.Active)}get tooltip(){return this.gy}}const Ie='';class Te extends Pe{constructor(t,i,e,s,n,r=!1,h){super(t,i,e,s,h),this.my=n,this.isActive=r}onClickHandler(){this.isActive=!this.isActive,this.onStateChange()}get isActive(){return this.Wa}set isActive(t){this.Wa=t,this.Wa?(0,m.cn)(this.Am,this.my):(0,m.IV)(this.Am,this.my)}}class Ce extends Te{constructor(){super(...arguments),this.eventList=[w[w.CaptionMenu],w[w.CaptionOn],w[w.CaptionOff],w[w.StateChanged],...this.eventList],this.gy="Closed Captions"}onClickHandler(){this.mediator.publish(this,w[w.CaptionMenu])}onStateChange(){this.mediator.publish(this,this.isActive?w[w.CaptionOn]:w[w.CaptionOff]),this.mediator.publish(this,w[w.StateChanged])}get tooltip(){return this.gy}}const Me='';class Ee extends ye{constructor(){super(...arguments),this.nd=!1,this.eventList=[w[w.Next]]}onClickHandler(){this.mediator.publish(this,w[w.Next])}show(){this.nd=!0,this.Am.classList.add("cnx-fade-in-up-next")}hide(){this.nd=!1,this.Am.classList.remove("cnx-fade-in-up-next")}isInView(){return this.nd}updateCard(t,i){const e=this.Am.getElementsByTagName("img")[0];e.setAttribute("src",t),e.style.display="none",e.onload=()=>{e.style.display="block"};this.Am.getElementsByClassName("cnx-up-next-box-text")[0].innerHTML=(0,P.QM)(i)?i:""}}class Le extends ge{constructor(t,i,e,s,n){super(t,i,e,s),this.settings=n,this.eventList=[],this.yy=144,this.by=36}createLogo(){let t=this.Sr.createElement("img");t.onload=()=>{t=this.resizeLogo(t),this.Am.appendChild(t)},t.src=this.settings.logoUrl,t.alt=""}resizeLogo(t){const i=t.naturalWidth,e=t.naturalHeight;if(!i||!e)return t;if(this.settings.logoPosition===wt.ProtoLogoPositionMode.ControlBar)t.style.setProperty("height",`${this.by}px`,"important"),t.style.setProperty("width",`${this.by}px`,"important");else{const s=i/e;this.by*s>this.yy?(t.style.setProperty("width",`${this.yy}px`,"important"),t.style.setProperty("height","auto","important")):(t.style.setProperty("width","auto","important"),t.style.setProperty("height",`${this.by}px`,"important"))}return t}initComponent(){try{this.createLogo()}catch(t){(0,i.n)({message:"LogoComponent_createLogo",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}}class Oe extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.wy=this.Am.getElementsByTagName("cnx-span")[0]}setTime(t){isNaN(t)||"number"!=typeof t?(0,m.cn)(this.Am,c.Gj.Invisible):(this.wy.innerHTML=(0,Yi.to)(t),(0,m.IV)(this.Am,c.Gj.Invisible))}}const Re='';class Be extends ge{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.xy=0,this.Sy=null,this._y=0,this.Ay=0,this.Py=100,this.cacheDomElements()}cacheDomElements(){this.ky=this.Am.getElementsByClassName("cnx-progress-fill")[0],this.Iy=this.Am.getElementsByClassName("cnx-progress-rail")[0]}cacheWidths(){this.xy=this.fixedRailWidth?this.fixedRailWidth:this.Iy.getBoundingClientRect().width,this.Sy=this.Iy.getBoundingClientRect().left}updateUi(t){const i=this.getComputedTranslation(t);this._y=i,this.ky.style.transform=`translateX(${i}px)`}isValidTranslation(){return this._y>=0&&this._y<=this.xy}getComputedTranslation(t){return t<0?0:t>this.xy?this.xy:t}setProgress(t){this.cacheWidths();const i=this.getComputedTranslation((0,lt.dQ)(0,100,0,this.xy,t));this.updateUi(i)}disableTransition(){(0,m.cn)(this.Am,c.Gj.NoTransition)}enableTransition(){(0,m.IV)(this.Am,c.Gj.NoTransition)}Ty(t){this.disableTransition(),this.setProgress(t),(0,m.Tp)(this.ky),this.enableTransition()}forceStartState(){this.Ty(this.Ay)}forceEndState(){this.Ty(this.Py)}initComponent(){this.cacheWidths()}destroy(){super.destroy()}}class De extends Be{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.Cy=0,this._n=null,this.My=!1,this.eventList=[w[w.DraggingStart],w[w.DraggingStopped]],this.Ey=t=>{this.cacheWidths(),this.Ly(this.Oy(t)),this.Qt?this.Am.addEventListener(this.Ry,this.By):this.Sr.addEventListenerOnGlobal(this.Ry,this.By),this.onDragStart()},this.By=t=>{null===this._n&&(this.My||(this.My=!0,this.disableTransition()),this._n=this.Sr.requestAnimationFrameHelper((()=>{const i=this.Dy+(this.Oy(t)-this.jy);this.isValidTranslation()&&this.Fy(i),this._n=null})))},this.$y=t=>{t.stopPropagation(),this.Qt?this.Am.removeEventListener(this.Ry,this.By):this.Sr.removeEventListenerOnGlobal(this.Ry,this.By),this.My=!1,this.enableTransition(),this.onDragEnd()},this.Ry=n?"touchmove":"mousemove"}cacheDomElements(){super.cacheDomElements(),this.Vy=this.Am.getElementsByClassName("cnx-progress-handle")[0]}cacheWidths(){super.cacheWidths(),this.Cy=this.Vy.getBoundingClientRect().width/2}updateUi(t){super.updateUi(t);const i=this.getComputedTranslation(t);this.Vy.style.transform=`translateX(${i-this.Cy}px)`}onDragEnd(){this.mediator.publish(this,w[w.DraggingStopped])}onDragStart(){this.mediator.publish(this,w[w.DraggingStart])}Oy(t){return this.Qt?t.touches.item(0).clientX:t.clientX}Ly(t){this.Dy=t-this.Sy,this.jy=t,this.Fy(this.Dy)}Fy(t){if(this.isValidTranslation()){const i=this.getComputedTranslation(t),e=0,s=this.xy,n=0,r=100;this.updateUi(i),this.onProgressChange((0,lt.dQ)(e,s,n,r,i))}}setProgress(t){super.setProgress(t)}initComponent(){super.initComponent();const t={interactionstart:this.Ey,interactionend:this.$y};this._m.register(this.Am,this,this._m,t)}destroy(){super.destroy()}}class je extends De{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.Uy=!1,this.Ny=t=>{(0,m.cn)(this.Am,c.Gj.HoverEnd),this.Uy=!0},this.Hy=t=>{const i=this.getComputedTranslation(t.clientX-this.Sy);this.zy.style.transform=`translateX(${i}px)`},this.Wy=t=>{this.zy.style.transform="translateX(0)",this.Uy=!1,this.Gy()},this.eventList=this.eventList.concat([w[w.Seek],w[w.SeekingStart],w[w.SeekingStopped]])}onProgressChange(t){this.mediator.publish(this,w[w.Seek],{payload:t-.1})}onDragEnd(){super.onDragEnd(),this.mediator.publish(this,w[w.SeekingStopped]),this.Gy()}onDragStart(){super.onDragStart(),this.mediator.publish(this,w[w.SeekingStart])}Gy(){this.Uy||this.My||(0,m.IV)(this.Am,c.Gj.HoverEnd)}initComponent(){super.initComponent(),this.Am.addEventListener("mousemove",this.Hy),this.Am.addEventListener("mouseenter",this.Ny),this.Am.addEventListener("mouseleave",this.Wy),this.zy=this.Am.getElementsByClassName("cnx-progress-follow")[0]}hide(){(0,m.MV)(this.Am)}show(){(0,m.Ho)(this.Am)}destroy(){super.destroy(),this.Am.removeEventListener("mousemove",this.Hy),this.Am.removeEventListener("mouseenter",this.Ny),this.Am.removeEventListener("mouseleave",this.Wy)}}const Fe='';class $e extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,m.Ho)(this.Am)}hide(){(0,m.MV)(this.Am)}}const Ve='';var Ue=n(7089),Ne=n(45);class He extends me{constructor(){super(...arguments),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!0}Jy(){const t=Ne.g.version?`V${Ne.g.version}`:"dev",i=[new be(this,this.Sr,this._m,this.Qt,{activeEvent:w[w.AboutClick],name:"About Connatix",icon:Ue,label:t})];this.buildContextMenu(i)}initComponent(){this.Jy()}onResize(){this.cacheCoordinates(),this.close()}}const ze="About Connatix",qe="Closed Captions";var We=n(9335);class Ge extends ye{constructor(t,i,e,s,n){super(t,i,e,Ge.getTemplate(n),s),this.mediator=t,this.Im=[],this.jm=!1,this.type=pe.SubmenuMenuItem,this.eventList=[],this.isOpen=!1,this.event=n.event,this.eventList.push(this.event),this.Qy=new be(this,i,e,s,{activeEvent:n.event,name:n.name.toUpperCase(),icon:""}),this.$menuContainer=this.Sr.createElementByString(``),this.Xy=this.Am.getElementsByClassName(c.Ng.ItemExtra)[0]}static getTemplate(t){const i=`${t.icon}`;return`\n ${t.icon?i:""}\n ${t.name}\n ${t.label?t.label:""}${We}\n `}onClickHandler(t){this.mediator.publish(this,this.event)}handleItemsEvents(t){this.mediator.publish(this,this.event,{payload:t===this.event?void 0:t})}buildContextMenu(t){this.$menuContainer.innerHTML="",this.Im.forEach((t=>this.unsubscribeAll(t))),this.Im=[this.Qy,...t],this.Im.forEach((t=>{t.eventList.forEach((i=>this.subscribe(i,t,(()=>this.handleItemsEvents(i))))),t.initComponent(),this.$menuContainer.appendChild(t.getContainer())}))}changeLabel(t){this.Xy.innerHTML=`${t}${We}`}get isActive(){return this.jm}set isActive(t){this.jm=t,this.jm?(0,m.cn)(this.Am,c.Gj.Active):(0,m.IV)(this.Am,c.Gj.Active)}}class Je extends Ge{constructor(t,i,e,s,n,r,h){super(t,i,e,s,{event:w[w.CaptionMenu],name:n,icon:Me,options:[]}),this.mediator=t,this.resizeObserver=h,this.ny=[],this.hy=new be(this,this.Sr,this._m,this.Qt,{name:"Off",activeEvent:null}),this.oy=[],this.isActive=r}handleItemsEvents(t){t!==w[w.CaptionMenu]&&this.isOpen&&(this.updateSelection(t),(0,m.T7)(this.$menuContainer,{height:"0"}),this.mediator.publish(this,this.event,{payload:{event:t?w[w.CaptionOn]:w[w.CaptionOff],data:t}}))}createCaptionsMenu(t){0===this.ny.length?this.ny.push(this.hy):this.ny=this.ny.slice(0,1),t.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:t.title,activeEvent:t.file}))}));let i=!1;this.oy.length!==t.length&&(i=!0),this.updateMenu(),this.oy=t;const e=this.oy.find((t=>{var i;return t.title===(null===(i=this.uy)||void 0===i?void 0:i.name)}));this.uy&&e&&this.updateSelection(e.file),this.buildContextMenu(this.ny),this.resizeObserver&&i&&(this.resizeObserver.off(this.$menuContainer,(t=>this.py(t))),this.resizeObserver.on(this.$menuContainer,(t=>this.py(t))))}updateSelection(t){this.ny.forEach((t=>t.isActive=!1));const i=this.oy.find((i=>i.file===t));i?this.uy=this.ny.find((t=>t.name===i.title)):t||(this.uy=this.ny.find((t=>"Off"===t.name))),this.uy&&(this.uy.isActive=!0)}updateMenu(){(0,m.T7)(this.$menuContainer,{height:"auto"})}reset(){var t;this.resizeObserver.off(this.$menuContainer,(t=>this.py(t))),null===(t=this.vy)||void 0===t||t.removeListeners(),this.vy=null,this.oy=[]}py(t){t.clientHeight>=188&&(0,m.T7)(t,{height:"188px"}),this.vy||(this.vy=new Se(t,{horizontal:!1}),(0,m.cn)(t,c.Gj.HasCustomScrollbar))}}class Qe extends me{constructor(t,i,e,s,n,r,h,o,a,c=!0,l){super(t,i,e,s,n,r,h,a),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!1,this.Yy=[new be(this,this.Sr,this._m,this.Qt,{activeEvent:w[w.AboutClick],name:ze,icon:Ue,label:Ne.g.version?`V${Ne.g.version}`:"dev"})],this.Ky=new Je(this,this.Sr,this._m,this.Qt,qe,c,l),this.Zy=[this.Ky],this.tb=o}ib(){let t=this.Yy;this.tb===c.Rq.Lg&&(t=[...this.Zy,...this.Yy]),this.buildContextMenu(t)}initComponent(){this.ib()}onResize(t,i){this.isOpen&&this.positionContextMenu(t),this.tb!==i?(this.tb=i,this.closeAllSubmenuItems(),this.ib()):this.tb=i}toggleCaptionState(t){this.Ky.isActive!==t&&(this.Ky.isActive=t)}hideCaptionOption(){this.Ky.hideComponent()}showCaptionOption(){this.Ky.showComponent()}updateCaptionSelection(t){this.Ky.updateSelection(t)}updateMenu(){this.Ky.updateMenu()}getAnchorCoordinatesTo(t){let i=de.Right;return this.tb!==c.Rq.Xl&&this.tb!==c.Rq.Xxl&&(i|=de.Top),t.getCoordinates(i)}createCaptionsMenu(t){this.Ky.createCaptionsMenu(t)}reset(){var t;null===(t=this.Ky)||void 0===t||t.reset()}}var Xe=n(8852);class Ye extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.eb=this.Am.getElementsByClassName(c.Yk.CaptionContainer)[0]}updateCaptions(t){this.eb.innerHTML=t&&t.text?(0,Xe.f5)(t.text,"
"):""}}class Ke extends Le{constructor(){super(...arguments),this.sb="cnx-logo-height",this.rb="cnx-logo-width"}createLogo(){this.Am.onload=()=>{this.Am.style.visibility="visible",this.resizeLogo(this.Am)},this.Am.style.visibility="hidden",this.Am.src=this.settings.logoUrl}resizeLogo(t){const i=t.naturalWidth,e=t.naturalHeight;return i&&e?(i>e?(0,m.cn)(t,this.rb):(0,m.cn)(t,this.sb),t):t}}var Ze,ts=n(834),is=n(1639);!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(Ze||(Ze={}));class es extends Pe{constructor(t,i,e,s,n){super(t,i,e,s,n),this.hb=!1,this.eventList=[w[w.Play],w[w.Pause],w[w.Replay],w[w.StateChanged],...this.eventList],this.ob="Play",this.ab="Pause",this.setState(Ze.Pause)}onClickHandler(){this.Wa===Ze.Pause?this.mediator.publish(this,w[w.Pause]):this.hb?this.mediator.publish(this,w[w.Replay]):this.mediator.publish(this,w[w.Play])}cb(){}toggleReplay(t){this.hb=t}setState(t){this.Wa!==t&&(this.Wa=t,this.cb(),this.mediator.publish(this,w[w.StateChanged]))}get tooltip(){return this.Wa===Ze.Play?this.ob:this.ab}}class ss extends De{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.lb=80,this.fixedRailWidth=this.lb,this.eventList.push(w[w.Volume])}onProgressChange(t){this.mediator.publish(this,w[w.Volume],{payload:t})}}var ns;!function(t){t[t.expand=0]="expand",t[t.collapse=1]="collapse"}(ns||(ns={}));class rs extends Pe{constructor(){super(...arguments),this.eventList=[w[w.Expand],w[w.Collapse],...this.eventList],this.ub="Full Screen",this.pb="Exit Full Screen"}onClickHandler(){switch(this.Wa){case ns.collapse:this.mediator.publish(this,w[w.Expand]);break;case ns.expand:this.mediator.publish(this,w[w.Collapse]);break;default:this.mediator.publish(this,w[w.Expand])}}cb(){this.Am&&(this.Wa===ns.expand?this.Am.classList.add(c.Gj.Active):this.Am.classList.remove(c.Gj.Active))}setState(t){this.Wa!==t&&(this.Wa=t,this.cb())}get tooltip(){return this.Wa===ns.expand?this.pb:this.ub}}function hs(t,i,e){const s=e?H[H.Auto]:i.height.toString();t.forEach((t=>t.name.includes(s)?t.isActive=!0:t.isActive=!1));const n=t.find((t=>H[t.event]===H.Auto));if(e){const e=t.find((t=>t.event===i.height.toString()));if(e){const t=`${n.name} (${e.name})`;n.changeItemName(t)}}else n.changeItemName(n.name)}class os extends me{constructor(){super(...arguments),this.alignMiddle=!0,this.alignTop=!0,this.forceRight=!1,this.ny=[],this.fb={height:360,quality:H.Auto},this.vb=!0}sendEvent(t){this.vb=H[t]===H.Auto,this.mediator.publish(this,this.eventName,{payload:{height:this.vb?this.fb.height:parseInt(t,10),quality:this.vb?H.Auto:H.Strict}})}initComponent(){}createQualityMenu(t){this.ny=[],this.gb=t,this.gb.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:`${t.videoHeight}p`,activeEvent:t.videoHeight.toString(),label:t.isHD?"HD":void 0}))})),this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:H[H.Auto],activeEvent:H[H.Auto]})),hs(this.ny,this.fb,this.vb),this.buildContextMenu(this.ny)}onResize(t){this.cacheCoordinates(),this.isOpen&&this.positionContextMenu(t)}updateQuality(t){(0,a.BZ)(this.gb)&&(this.vb=t.quality===H.Auto,this.fb.quality=t.quality,this.fb.height=(0,lt.DE)(t.height,this.gb.map((t=>t.videoHeight))),hs(this.ny,this.fb,this.vb))}}class as extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,m.Ho)(this.Am),(0,m.Tp)(this.Am),(0,m.cn)(this.Am,c.Gj.Active)}hide(){(0,m.IV)(this.Am,c.Gj.Active),(0,m.MV)(this.Am)}}class cs extends Pe{constructor(t,i,e,s,n,r,h){super(t,i,e,s,n),this.tooltip=h,this.mb=xe[r],this.eventList.push(this.mb)}onClickHandler(){this.mediator.publish(this,this.mb)}}class ls extends ye{constructor(t,i,e,s,n,r,h){super(t,i,e,s,n),this.tooltip=h,this.eventList=[],this.mb=xe[r],this.eventList.push(this.mb)}onClickHandler(){this.mediator.publish(this,this.mb)}}class us{constructor(t,i,e,s){this.Sr=t,this._m=i,this.Qt=e,this.yb=new Map,Object.keys(s).forEach((t=>this.bb(xe[t],s[t])))}getButton(t,i){const{isHoverable:e,template:s,tooltip:n}=this.wb(t);return e?new cs(i,this.Sr,this._m,s,this.Qt,t,n):new ls(i,this.Sr,this._m,s,this.Qt,t,n)}isGeneralComponent(t){return this.yb.has(t)}wb(t){return this.yb.get(t)}bb(t,i){this.yb.set(t,i)}}var ds=n(1215);function ps(t,i,e=!0){return e?`\n \n \n ${i}\n \n \n `.trim():`${i}`}var fs=n(9040),vs=n(89);const gs={[xe[xe.MoreButton]]:{template:ps(xe.MoreButton,vs),tooltip:"More",isHoverable:!0},[xe[xe.CloseButton]]:{template:ps(xe.CloseButton,ds),tooltip:"Close Player",isHoverable:!0},[xe[xe.UpNextButton]]:{template:ps(xe.UpNextButton,fs),tooltip:"Next",isHoverable:!0},[xe[xe.PreviousButton]]:{template:ps(xe.PreviousButton,fs),tooltip:"Previous",isHoverable:!0}};class ms extends Pe{constructor(){super(...arguments),this.eventList=[w[w.SkipAd],...this.eventList],this.xb=-1,this.Sb=-1}initComponent(){super.initComponent(),this.hideComponent(),this._b=this.Am.getElementsByTagName("cnx-span")[0],this._b.innerHTML="Ad",this.Ab=this.Am.querySelectorAll(`.${c.Hs.Timer} svg`)[0]}setSecondsUntilSkip(t){this.xb=Math.ceil(t),this.Sb=-1,this.xb>0&&(0,m.T7)(this.Ab,{"animation-duration":this.xb+"s"})}tickDown(t){const i=this.xb-Math.floor(t);if(i<0||0===this.Sb)return;const e=(0,m.pv)(this.Am,c.Hs.InTimer);this.Sb=i,0===this.Sb?(e&&(0,m.IV)(this.Am,c.Hs.InTimer),this._b.innerHTML="Ad"):(e||(0,m.cn)(this.Am,c.Hs.InTimer),this._b.innerHTML=`in ${this.Sb}s`)}get tooltip(){}onClickHandler(){0===this.Sb&&this.mediator.publish(this,w[w.SkipAd])}}var ys=n(4670);class bs extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.Pb=this.Am.getElementsByClassName(c.mr.BackgroundImg)[0],this.kb=this.Am.getElementsByClassName(c.mr.Icon)[0],this.kb.innerHTML=ys,this.Ib=this.Am.getElementsByClassName(c.mr.ButtonContainer)[0];const t=this.Am.getElementsByClassName(c.mr.Button)[0];this.Tb=this.Sr.createElementByString(``),this.Tb.target=ue.bS.Blank,this.Tb.appendChild(t),this.Ib.innerHTML="",this.Ib.appendChild(this.Tb),this.Cb=this.Am.getElementsByClassName(c.mr.InfoContainer)[0],this.Mb=this.Am.getElementsByClassName(c.mr.FallbackContainer)[0],this.Eb=this.Am.getElementsByClassName(c.mr.SlotCountText)[0]}setBackgroundImg(t){(0,P.QM)(t)?((0,m.IV)(this.Pb,c.Gj.DisplayNone),this.Pb.src=t):(0,m.cn)(this.Pb,c.Gj.DisplayNone)}setClickUrl(t){if(!(0,P.QM)(t))return(0,m.Ho)(this.Mb),void(0,m.MV)(this.Cb);(0,m.Ho)(this.Cb),(0,m.MV)(this.Mb),this.Tb.href=t}setFallbackText(t,i){const e=t||1,s=i||1;this.Eb.innerHTML=`Loading ad ${e}/${s}`}}class ws{constructor(t,i,e,s={},n={}){this.Sr=t,this._m=i,this.Am=e,this.Wt=s,this.Lb={[xe.PlayButton]:t=>this.Ob(!1,t),[xe.BigPlayButton]:t=>this.Ob(!0,t),[xe.VolumeProgress]:t=>new ss(t,this.Sr,this._m,''),[xe.ExpandButton]:t=>new rs(t,this.Sr,this._m,'',this.Wt.isMobile),[xe.QualityMenu]:t=>new os(t,this.Sr,this._m,'',w[w.Quality],xe.QualityMenu,this.Am,this.Wt.isMobile),[xe.Loader]:t=>new as(t,this.Sr,this._m,Ve),[xe.SkipAdButton]:t=>new ms(t,this.Sr,this._m,'Skip ',this.Wt.isMobile),[xe.AdLoadingScreen]:t=>new bs(t,this.Sr,this._m,'Loading PodsVisit Advertiser websiteGO TO PAGE')},this.Ob=(t,i)=>new es(i,this.Sr,this._m,function(t=!1){return`\n \n \n ${ts}\n ${is}\n \n \n`.trim()}(t),this.Wt.isMobile),this.Rb=t=>i=>{const e=this.Lb[t];if(e)return e(i)},this.Bb=new us(this.Sr,this._m,this.Wt.isMobile,Object.assign(Object.assign({},gs),n))}createComponent(t,i){const e=this.Rb(t)(i);return e||(this.Bb.isGeneralComponent(t)?this.Bb.getButton(t,i):void 0)}}var xs;!function(t){t[t.Mute=0]="Mute",t[t.Unmute=1]="Unmute"}(xs||(xs={}));class Ss extends Pe{constructor(t,i,e,s,n,r){super(t,i,e,s,r),this.eventList=[w[w.Mute],w[w.Unmute],w[w.StateChanged],...this.eventList],this.Db="Mute",this.jb="Unmute",this.Wa=n}onClickHandler(){this.Wa===xs.Mute?(this.mediator.publish(this,w[w.Unmute]),this.setState(xs.Unmute)):(this.mediator.publish(this,w[w.Mute]),this.setState(xs.Mute))}cb(){this.Wa===xs.Mute?(0,m.L_)(this.Am,"cnx-sound-on","cnx-sound-off"):(0,m.L_)(this.Am,"cnx-sound-off","cnx-sound-on")}get tooltip(){return this.Wa===xs.Mute?this.jb:this.Db}initComponent(){super.initComponent(),this.cb()}setState(t){this.Wa!==t&&(this.Wa=t,this.cb(),this.mediator.publish(this,w[w.StateChanged]))}setVolume(t){t>0?this.setState(xs.Unmute):this.setState(xs.Mute)}}class _s{constructor(t,i){this.Fb=t,this.Sr=i,this.$b=/\[\[([0-9]+)]]/g,this.Vb=[],this.Ub=[],this.Hb=this.Sr.createElementByString(this.zb(this.Fb))}qb(t){return``}zb(t){return t.replace(this.$b,((t,i)=>(this.Vb.push(parseInt(i,10)),this.qb(i))))}Gb(t,i){return this.Ub.some((i=>i.slotName===t))||this.Ub.some((t=>t.component===i))?null:this.Hb.getElementsByClassName(`pl_${t}`)[0]}getComponentList(){return this.Vb}getRenderedDom(){return this.Hb}registerSlot(t,i){const e=this.Gb(t,i);if(null!==e){const s=i.getContainer();return e.parentNode.replaceChild(s,e),this.Ub.push({component:i,slotName:t}),!0}return!1}initComponents(){this.Ub.forEach((t=>t.component.initComponent()))}}class As extends h._{constructor(t,i,e){super(),this.globalDomUtilsService=t,this.templateString=i,this.componentFactory=e,this.Jb={},this.Qb=new _s(i,t),this.addComponents()}addComponents(){this.Qb.getComponentList().forEach((t=>{const i=this.componentFactory.createComponent(t,this);this.registerComponent(t,i)}))}registerComponent(t,i){this.Qb.registerSlot(t,i),this.Jb[t]=i,this.Xb(i)}Xb(t){t.eventList.forEach((i=>{this.subscribe(i,t,(e=>{i===w[w.RebindComponent]&&this.rebindComponentEvents(t),this.handleComponentEvent(i,e,t)}))}))}rebindComponentEvents(t){t&&(this.unsubscribeAll(t),this.Xb(t))}getComponent(t){return this.Jb[t]}destroy(){Object.keys(this.Jb).forEach((t=>{this.Jb[t].destroy()}))}}class Ps extends As{constructor(t,i,e,s){super(i,e,s),this.mediator=t,this.Am=this.Qb.getRenderedDom()}getContainer(){return this.Am}initComponent(){this.Qb.initComponents()}showComponent(){(0,m.Ho)(this.Am)}hideComponent(){(0,m.MV)(this.Am)}}class ks extends Ps{constructor(t,i,e,s){super(t,i,e,s),this.Yb=null,this.eventList=[w[w.Volume],w[w.VolumeHoverStart],w[w.VolumeHoverStopped],w[w.DraggingStopped],w[w.DraggingStart],w[w.HoverStart],w[w.HoverEnd],w[w.StateChanged]],this.Kb=.2,this.Zb=600,this.tw=!1,this.iw=t=>{clearTimeout(this.Yb),(0,m.cn)(this.Am,"cnx-mod-hover"),this.mediator.publish(this,w[w.VolumeHoverStart])},this.ew=()=>{this.tw||(null!==this.Yb&&clearTimeout(this.Yb),this.Yb=setTimeout((()=>{(0,m.IV)(this.Am,"cnx-mod-hover"),this.mediator.publish(this,w[w.VolumeHoverStopped])}),this.Zb))},this.rw=this.Kb,this.hw=this.getComponent(xe.VolumeButton),this.ow=this.getComponent(xe.VolumeProgress)}handleComponentEvent(t,i,e){let s;switch(t){case w[w.Volume]:s=i.payload/100,this.aw(s),this.cw(i.payload);break;case w[w.Mute]:s=0,this.setVolumeProgress(0);break;case w[w.Unmute]:s=this.rw,this.setVolumeProgress(100*this.rw);break;case w[w.DraggingStopped]:this.tw=!1,this.mediator.publish(this,w[w.DraggingStopped]),this.ew();break;case w[w.DraggingStart]:this.tw=!0,this.mediator.publish(this,w[w.DraggingStart]);break;case w[w.HoverStart]:this.mediator.publish(this,w[w.HoverStart],{payload:{targetComponent:e}});break;case w[w.HoverEnd]:this.mediator.publish(this,w[w.HoverEnd],{payload:{targetComponent:e}});break;case w[w.StateChanged]:this.mediator.publish(this,w[w.StateChanged],{payload:{targetComponent:e}})}void 0!==s&&this.lw(s)}aw(t){t\n \n [[${xe.VolumeButton}]]\n \n \n [[${xe.VolumeProgress}]]\n \n
\n`.trim();var Ts=n(2040),Cs=n(8808);const Ms={[xe[xe.ShareButton]]:{template:ps(xe.ShareButton,Cs),tooltip:"Share",isHoverable:!0},[xe[xe.CastButton]]:{template:ps(xe.CastButton,Ts),tooltip:"Cast",isHoverable:!0}};var Es=n(1505),Ls=n(3653);const Os=90*ht.Y0,Rs="This live stream will start shortly";class Bs extends ge{constructor(){super(...arguments),this.eventList=[],this.uw=null}initComponent(){this.dw=this.Sr.createElementByString(""),this.Am.appendChild(this.dw),this.pw=this.Am.getElementsByTagName("cnx-span")[0],this.fw=this.Am.getElementsByClassName("cnx-live-message")[0],this.gw=this.Am.getElementsByClassName("cnx-live-icon")[0]}setPosterSrc(t){(0,P.QM)(t)&&(this.dw.src=t)}setPosterAltText(t){this.dw.alt=t}setIconToStarting(){this.gw.innerHTML=`${Es}`}setIconToEnded(){this.gw.innerHTML=`${Ls}`}setMessageToStarting(){this.mw(Rs)}setMessageToEnded(){this.mw("This live stream is not currently available. Please check again shortly")}setMessageToNotSupported(){this.mw("Live stream not supported by browser")}handleDelayedStart(t){(0,P.r)(Date.parse(t))&&(this.yw=new Date(t),this.ww()>0&&(this.xw(),clearInterval(this.uw),this.uw=setInterval((()=>{this.xw()}),ht.s_*ht.Y0)))}showMessage(){(0,m.Ho)(this.gw),(0,m.Ho)(this.fw)}hideMessage(){(0,m.MV)(this.gw),(0,m.MV)(this.fw)}show(){(0,m.Ho)(this.Am),(0,m.cn)(this.Am,c.Gj.Active)}hide(){(0,m.IV)(this.Am,c.Gj.Active),(0,m.MV)(this.Am)}destroy(){super.destroy(),clearInterval(this.uw)}xw(){const t=this.ww();if(t>0){const i=this.Sw(t);this.mw(`Live in ${i}`)}else this.mw(Rs),clearInterval(this.uw),this.uw=null}ww(){return(Math.max(this.yw.getTime(),Date.now())-Date.now())/ht.s_}Sw(t){const i=t>=Os?Math.round(t/(ht.Y0*ht.oG)):Math.ceil(t/ht.Y0);return`${i} ${t>=Os?"hours":"minute"+(1===i?"":"s")}`}mw(t){this.pw.innerHTML=t}}class Ds extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hideComponent()}}class js extends Pe{constructor(){super(...arguments),this.eventList=[w[w.NonLinearClose],...this.eventList]}initComponent(){super.initComponent(),this.showComponent()}get tooltip(){}onClickHandler(){this.mediator.publish(this,w[w.NonLinearClose])}}class Fs extends ws{constructor(t,i,e,s,n,r){super(t,i,e,s,Ms),this.Sr=t,this.Am=e,this.Wt=s,this.Aw=n,this.Er=r,this.Pw={[xe.VolumeControls]:t=>new ks(t,this.Sr,Is,this),[xe.VolumeButton]:t=>new Ss(t,this.Sr,this._m,'',xs.Mute,this.Wt.isMobile),[xe.SettingsButton]:t=>new ke(t,this.Sr,this._m,Ie,this.Wt.isMobile),[xe.CaptionButton]:t=>new Ce(t,this.Sr,this._m,Me,c.Gj.Active,this.Wt.closedCaptionDefault,this.Wt.isMobile),[xe.UpNextBox]:t=>new Ee(t,this.Sr,this._m,'NEXT',this.Wt.isMobile),[xe.LogoComponent]:t=>{if(!(0,P.$K)(this.Wt.logoUrl)&&!(0,P.$K)(this.Wt.logoPosition))throw new Error("custom logo is undefined");return new Le(t,this.Sr,this._m,'',{logoUrl:this.Wt.logoUrl,logoPosition:this.Wt.logoPosition})},[xe.LogoOutstream]:t=>{if(!(0,P.$K)(this.Wt.logoUrl)&&!(0,P.$K)(this.Wt.logoPosition))throw new Error("outstream logo undefined");return new Ke(t,this.Sr,this._m,'',{logoUrl:this.Wt.logoUrl})},[xe.LivePoster]:t=>new Bs(t,this.Sr,this._m,' '),[xe.LiveIcon]:t=>new Ds(t,this.Sr,this._m,''),[xe.ElapsedTimeLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.TotalDurationLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.RemainingDurationLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.ProgressBar]:t=>new je(t,this.Sr,this._m,Fe,this.Wt.isMobile),[xe.QueStateOverlay]:t=>new $e(t,this.Sr,this._m,Ve),[xe.ContextMenu]:t=>new He(t,this.Sr,this._m,'',w[w.ContextClick],xe.ContextMenu,this.Am,this.Wt.isMobile),[xe.ElementsSettingsMenu]:t=>new Qe(t,this.Sr,this._m,'',w[w.SettingsMenu],xe.ElementsSettingsMenu,this.Am,this.Aw,this.Wt.isMobile,this.Wt.closedCaptionDefault,this.Er),[xe.ElementsCaptionMenu]:t=>new _e(t,this.Sr,this._m,'',w[w.CaptionMenu],xe.ElementsCaptionMenu,this.Am,this.Wt.isMobile,this.Er),[xe.CaptionComponent]:t=>new Ye(t,this.Sr,this._m,''),[xe.NonLinearComponent]:t=>new js(t,this.Sr,this._m,'',this.Wt.isMobile)},this.kw=t=>i=>{const e=this.Pw[t];if(e)return e(i)}}createComponent(t,i){return this.kw(t)(i)||super.createComponent(t,i)}}var $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.AdUiNonLinearAdSlot="cnx-non-linear-ad-slot"}($s||($s={}));class Vs extends As{constructor(t,i,e,s,n){super(e,s,n),this.mediator=t,this.$container=i,this.componentFactory=n,this.$uiContainer=this.Qb.getRenderedDom(),i.appendChild(this.$uiContainer),this.Qb.initComponents()}changeState(t){const i=this.Iw[t];i!==this.currentState&&this.currentState.canTransitionToState(i)&&(this.currentState.exitState(i),i.enterState())}hide(){(0,m.cn)(this.$uiContainer,c.Gj.DisplayNone)}show(){(0,m.IV)(this.$uiContainer,c.Gj.DisplayNone)}destroy(){super.destroy(),this.$uiContainer.parentNode.removeChild(this.$uiContainer)}}class Us extends Vs{constructor(t,i,e,s,n,r={}){super(t,s,i,n,new Fs(i,e,s,r)),this.mediator=t,this.globalDomUtilsService=i,this.$container=s,this.settings=r,this.Iw={},this.Tw=this.$container.querySelector(`.${$s.AdUiNonLinearAdSlot}`)}handleComponentEvent(t,i){this.mediator.publish(this,t,i)}show(){super.show()}hide(){super.hide()}get adUiNonLinearAdSlot(){return this.Tw}}class Ns{constructor(){}get template(){return`\n \n \n [[${xe.NonLinearComponent}]]\n \n \n `.trim()}}class Hs extends h._{constructor(t,i,e){super(),this.imageUrl=t,this.Cw=i,this._m=e,this.Mw=new x.x,this.xg=new x.x,this.Ew=new x.x,this.Lw=new x.x}get onDisplayAd(){return this.Mw.asObservable()}get onError(){return this.xg.asObservable()}get onClick(){return this.Ew.asObservable()}get onClickClose(){return this.Lw.asObservable()}destroy(){this.Ow.hide(),this.Ow.adUiNonLinearAdSlot.removeChild(this.Rw),this.Ow.destroy()}initializeAd(t,i,e,s){this.Bw=t,this.Dw(),this.jw(s,i,e),this.Ow.adUiNonLinearAdSlot.appendChild(this.Rw)}getAdMediaWidth(){return this.Rw.clientWidth}getAdMediaHeight(){return this.Rw.clientHeight}jw(t,i,e){this.Rw=this.Cw.createElement("img"),this.Rw.onload=()=>{this.Mw.next()},this.Rw.onerror=()=>{this.xg.next(Vt.VastNonLinearImageLoadFailure)},this.Rw.onclick=()=>{this.Ew.next()},t?this.Fw(i,e):(0,m.T7)(this.Rw,{height:`${i.height}px`,width:`${i.width}px`,display:"block","pointer-events":"all"}),this.Rw.src=this.imageUrl}Dw(){this.Ow=new Us(this,this.Cw,this._m,this.Bw,(new Ns).template),this.subscribe(w[w.NonLinearClose],this.Ow,(()=>{this.Lw.next()}))}Fw(t,i){const e=(0,lt.Tc)(i.height,rt.NON_LINEAR_MAX_HEIGHT_PERCENT),s=i.width,n=t.height/e;t.width/s>n?(0,m.T7)(this.Rw,{width:"100%",display:"block","pointer-events":"all"}):(0,m.T7)(this.Rw,{height:"100%",display:"block","pointer-events":"all"})}}class zs{constructor(t,i=0,e=1e3){this.uv=t,this.timerDuration=i,this.$w=e,this.Vw=0,this.Uw=null,this.Nw=!1,this.Hw=!1,this.zw=new x.x,this.qw=new x.x,this.Ww=new x.x,this.Gw=[{event:le.FirstQuartile,quartile:1},{event:le.SecondQuartile,quartile:2},{event:le.ThirdQuartile,quartile:3},{event:le.FourthQuartile,quartile:4}],this.Qw=null,this.Xw=()=>{this.Yw(),this.zw.next(),this.Kw(this.Vw,this.timerDuration),this.Zw(),this.tx=(new Date).getTime()},i||this.disable()}start(){this.Hw=!0,null===this.Uw&&this.sx()}stop(){this.Hw=!1,null!==this.Uw&&(this.Yw(),this.nx())}reset(t){t&&(this.timerDuration=t),this.Vw=0,this.Nw=!1,this.Qw=null,(null!==this.Uw||this.Hw)&&(this.nx(),this.sx())}get timeElapsed(){return this.Vw}get timeRemaining(){return this.timerDuration-this.Vw}disable(){this.Nw=!0,this.nx()}get onTimeUpdate(){return this.zw.asObservable()}get onTimeElapsed(){return this.qw.asObservable()}get onQuartile(){return this.Ww.asObservable()}Yw(){this.Vw+=(new Date).getTime()-this.tx}sx(){this.Nw||(this.Zw(),this.tx=(new Date).getTime(),this.Uw=this.uv.setInterval(this.Xw,this.$w))}nx(){this.uv.clearInterval(this.Uw),this.Uw=null}hx(){this.disable(),this.qw.next(),this.Vw=0}Zw(){this.Vw/ht.s_>=this.timerDuration/ht.s_&&this.hx()}Kw(t,i){const e=Math.floor((0,lt.dQ)(0,i,1,4,t));this.Qw<=e&&this.Gw.forEach((({event:t,quartile:i})=>{i===e&&i!==this.Qw&&(this.Ww.next(t),this.Qw=i)}))}}const qs={[le.FirstQuartile]:g.fI.AdVideoFirstQuartile,[le.SecondQuartile]:g.fI.AdVideoMidpoint,[le.ThirdQuartile]:g.fI.AdVideoThirdQuartile,[le.FourthQuartile]:g.fI.AdVideoComplete};class Ws extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.adMediaType="nonLinearVast",this.adSourceType=s.ProtoAdsourceTypeEnum.VastMedia,this.ox=[],this.$w=500,this.lx=0,this.nonLinearOnClick=()=>{this.ux.nonLinearClickTracking.uri&&this.settings.globalDomUtilsService.trackWithImages([this.ux.nonLinearClickTracking.uri]),this.ux.nonLinearClickThrough&&this.settings.globalDomUtilsService.open(this.ux.nonLinearClickThrough,ue.bS.Blank),this.Pv({type:g.fI.AdClickThru,payload:{}})}}initAd(t,i,e,s,n,r,h){try{if(super.initAd(t,i,e,s,n,r,h),this.ux=this.vx(),!this.ux)return void this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.VastUnsupportedMedia}});this.gx(),this.mx(),this.Pv({type:g.fI.AdLoaded,payload:{}})}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){super.startAd(),this.yx.start(),this.ox.push(this.wx.onDisplayAd.subscribe((()=>{this.Pv({type:g.fI.AdStarted}),this.Pv({type:g.fI.AdVideoStart}),this.Pv({type:g.fI.AdImpression,payload:{}})})),this.wx.onError.subscribe((t=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:t}})})),this.wx.onClick.subscribe((()=>this.nonLinearOnClick())),this.wx.onClickClose.subscribe((()=>{this.Pv({type:g.fI.AdUserClose,payload:{}}),this.stopAd(g.r5)})));const t={height:this.ux.height,width:this.ux.width},i={height:this.fv.clientHeight,width:this.fv.clientWidth};this.wx.initializeAd(this.dv,t,i,this.ux.scalable)}get adVideoUrl(){return this.xx}get declaredDurationInSeconds(){return this.lx/ht.s_}getAdMediaSize(){return{height:this.wx.getAdMediaHeight(),width:this.wx.getAdMediaWidth()}}resizeAd(t,i,e){}pauseAd(){this.yx.stop()}resumeAd(){this.yx.start()}expandAd(){}collapseAd(){}getAdRemainingTime(){return this.yx.timeRemaining}getAdDuration(){return this.lx/ht.s_}getAdVolume(){return 0}gx(){this.ux.staticResource&&(this.wx=new Hs(this.ux.staticResource.uri,this.settings.globalDomUtilsService,this.settings.interactionService),this.xx=this.ux.staticResource.creativeType,this.Sx())}Sx(){this.fv.style.visibility="hidden"}mx(){var t;this.lx=(null===(t=this.settings.adManagerLineItem.protoLineItem.nonlinearLineItemSettings)||void 0===t?void 0:t.nonLinearAdTimeSeconds)*ht.s_,this.yx=new zs(this.uv,this.lx,this.$w),this.ox.push(this.yx.onTimeUpdate.subscribe((()=>{this.Pv({type:g.fI.AdRemainingTimeChange})})),this.yx.onTimeElapsed.subscribe((()=>{this.stopAd("nonLinearTimerElapsed")})),this.yx.onQuartile.subscribe((t=>{this.Pv({type:qs[t],payload:{}})})))}hu(){var t,i;try{super.hu(),null===(t=this.yx)||void 0===t||t.stop(),(0,pt.i)(this.ox),null===(i=this.wx)||void 0===i||i.destroy()}catch(t){this.Qv("NonLinearBidAdaptor","_destroy",t)}}vx(){let t;if(t=this.settings.vastResponse.nonLinearFiles.find((t=>!0===t.scalable)),!t){const i=(0,lt.Tc)(this.fv.clientHeight,rt.NON_LINEAR_MAX_HEIGHT_PERCENT);t=this.settings.vastResponse.nonLinearFiles.find((t=>t.height<=i&&t.width<=this.fv.clientWidth))}return t}}function Gs(t,i){t.sort(((t,i)=>t.width===i.width?t.bitrate-i.bitrate:t.width-i.width));for(let e=0;e=i)return t[e-1]||t[e];return t[t.length-1]}const Js=()=>`cnx_bid_slot_${(0,ut.qs)()}`,Qs={enableWorker:!1,capLevelToPlayerSize:!0,cnxRenderWindow:window,maxBufferSize:5e6,maxBufferLength:5,maxMaxBufferLength:10,liveBackBufferLength:0};class Xs{constructor(t,i,e,s,n){this._x=t,this.Ax=i,this.Px=e,this.Cw=s,this.kx=n,this.Ix=[],this.Tx=(t,i)=>{if(i.fatal)switch(i.type){case this._x.ErrorTypes.NETWORK_ERROR:if(i.details===this._x.ErrorDetails.MANIFEST_PARSING_ERROR||i.details===this._x.ErrorDetails.MANIFEST_LOAD_ERROR)return void this.Cx();this.Mx.startLoad();break;case this._x.ErrorTypes.MEDIA_ERROR:this.Mx.recoverMediaError();break;default:this.Cx()}},this.Ex=()=>{this.Mx.off(this._x.Events.MEDIA_ATTACHED,this.Ex),this.Mx.loadSource(this.Ax),this.Mx.once(this._x.Events.MANIFEST_PARSED,this.Lx)},this.Lx=()=>{this.Mx.off(this._x.Events.MANIFEST_PARSED,this.Lx),this.Ox(),this.kx.forceMaxLevel&&this.Rx(),this.kx.forceResolutionHeight&&this.Bx(this.kx.forceResolutionHeight),this.jx()},(this.kx.forceMaxLevel||this.kx.forceResolutionHeight)&&(Qs.capLevelToPlayerSize=!1)}start(t,i){this.jx=t,this.Cx=i,this._x&&this._x.isSupported()?(this.Mx=new this._x(Object.assign(Object.assign({},Qs),{cnxRenderWindow:this.Cw.global})),this.Fx()):this.Cx()}destroy(){this.Mx&&(this.Mx.destroy(),this.Mx=null)}Fx(){this.Mx.on(this._x.Events.ERROR,this.Tx),this.Mx.attachMedia(this.Px),this.Mx.once(this._x.Events.MEDIA_ATTACHED,this.Ex)}Rx(){const t=this.Mx.levels.length-1;this.$x(t)}Bx(t){const i=this.Ix.find((i=>i.height===t));i&&this.$x(i.level)}$x(t){this.Mx.currentLevel=t,this.Mx.startLevel=t,this.Mx.nextLevel=t}Ox(){this.Mx.levels.forEach(((t,i)=>{this.Ix.find((({height:i})=>i===t.height))||this.Ix.push({level:i,height:t.height})}))}}var Ys=n(2356);const Ks="huffpost",Zs=540;class tn extends jt{constructor(t,e,s,n,r,h,o,a,c,l=!1,u){super(),this.Sr=t,this.Vx=e,this.dg=s,this.Zt=n,this.Ux=r,this.Nx=h,this.Hx=o,this.zx=a,this._x=c,this.qx=l,this.si=u,this.Wx=!1,this.pageFocus=new Ys.v(this.Sr),this.Gx=Object.values(N),this.Jx=!1,this.Qx=!0,this.Xx=!1,this.Yx=[{event:g.fI.AdVideoStart,position:0},{event:g.fI.AdVideoFirstQuartile,position:25},{event:g.fI.AdVideoMidpoint,position:50},{event:g.fI.AdVideoThirdQuartile,position:75},{event:g.fI.AdVideoComplete,position:100}],this.Kx=this.Yx[0],this.Zx=t=>{try{switch(t.type){case N.Pause:if(this.Nx&&!this.Qx)return this.Qx=!0,void this.tS("pause_event_loopAd");this.Jx=!1;break;case N.Play:if(!this.Jx&&this.qx)return void this.dg.pause();break;case N.Canplay:case N.Durationchange:this.iS();break;case N.Timeupdate:this.eS();break;case N.Error:this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VastVideoTagEventError}});break;case"click":this.hf.next({type:g.fI.AdClickThru,payload:{}})}}catch(t){(0,i.n)({level:i.D.CRITICAL,callStack:t.stack,message:"AdManager_VastIntegrator_onVideoEvent",exception:t.message},{throttle:10,sendMaxLog:!1})}}}initAd(t,i,e,s,n,r){try{this.dg=r.videoSlot,this.width=t,this.height=i,this.bm(this.Ux,this.dg.parentElement),this.resizeAd(t,i,e),this.addVideoEvents(this.dg),this.zx&&this._x&&this._x.isSupported()?this.sS(this._x):(this.dg.setAttribute("src",this.Vx),this.dg.setAttribute("preload","metadata"),this.dg.load()),this.pageFocus.isDocumentVisible()||this.iS()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperInitAdError+`_${t.message}`}})}}startAd(){try{(0,m.cn)(this.dg,"cnx-ad-video-slot"),this.Jx=!0,this.pageFocus.isDocumentVisible()?this.dg.play().then((()=>{this.hf.next({type:g.fI.AdStarted}),this.hf.next({type:g.fI.AdImpression,payload:{}})})).catch((t=>{this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VastPlayPromiseReject}})})):(this.hf.next({type:g.fI.AdStarted}),this.hf.next({type:g.fI.AdImpression,payload:{}}),this.dg.play())}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.qx&&this.dg.pause(),"videoComplete"===t&&this.Nx?this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!1}}):this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){(0,m.T7)(this.dg,{width:`${t}px`,height:`${i}px`}),this.hf.next({type:g.fI.AdSizeChange})}pauseAd(){this.Jx=!1,this.Hx&&void 0===this.Kx&&(this.Kx=this.Yx[0]),this.dg.pause(),this.hf.next({type:g.fI.AdPaused})}resumeAd(){this.Nx&&void 0===this.Kx&&(this.Kx=this.Yx[0]),this.Jx=!0,this.tS("resumeAd"),this.Zt===dt.M.Ios&&(0,m.UR)(this.dg),this.hf.next({type:g.fI.AdPlaying})}expandAd(){}collapseAd(){}skipAd(){this.hf.next({type:g.fI.AdSkipped})}getAdRemainingTime(){return this.dg.duration-this.dg.currentTime}getAdDuration(){return this.dg.duration?this.dg.duration:0}getAdVolume(){return this.dg.volume}setAdVolume(t){this.dg.volume=t}getAdMediaWidth(){return this.dg.videoWidth}getAdMediaHeight(){return this.dg.videoHeight}destroy(){if(!this.Hx&&!this.Nx)try{(0,m.IV)(this.dg,"cnx-ad-video-slot"),this.nS(this.dg),this.dg.removeAttribute("src"),this.rS&&(this.rS.destroy(),this.rS=null)}catch(t){(0,i.n)({level:i.D.WARN,message:"AdManager_VastIntegrator_destroyAd",exception:t.message,callStack:t.stack})}}sS(t){let i={forceMaxLevel:!0};this.si&&this.si.includes(Ks)&&(i={forceMaxLevel:!1,forceResolutionHeight:Zs}),this.rS=new Xs(t,this.Vx,this.dg,this.Sr,i),this.rS.start((()=>{this.iS()}),(()=>{this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.CnxMediaSrcNotSupported}})}))}bm(t,i){this.hS=this.Sr.createElement("a"),t&&(this.hS.href=t,this.hS.target="_blank"),(0,m.cn)(this.hS,"cnx-ad-slot"),i.appendChild(this.hS),this.hS.addEventListener("click",this.Zx)}addVideoEvents(t){this.Gx.forEach((i=>{t.addEventListener(i,this.Zx)})),this.hS&&this.hS.addEventListener("click",this.Zx)}nS(t){this.Gx.forEach((i=>{t.removeEventListener(i,this.Zx)})),this.hS&&this.hS.removeEventListener("click",this.Zx)}iS(){this.Wx||(this.Wx=!0,this.hf.next({type:g.fI.AdLoaded,payload:{}}))}eS(){this.hf.next({type:g.fI.AdRemainingTimeChange});const t=(0,lt.dQ)(0,this.dg.duration,0,100,this.dg.currentTime);if(this.Kx&&t>=this.Kx.position){this.Xx||this.hf.next({type:this.Kx.event});const t=this.Kx;this.Kx=this.Yx[this.Yx.indexOf(this.Kx)+1],t.event===g.fI.AdVideoComplete&&(this.Nx&&(this.dg.currentTime=.01),this.Qx=!1,this.stopAd("videoComplete"),this.Xx=!0)}}tS(t){try{this.dg.play().catch((e=>(0,i.n)({level:i.D.WARN,message:`AdManager_VastIntegrator_play_${t}`,exception:`playError: ${e.message}`,callStack:e.stack})))}catch(e){(0,i.n)({level:i.D.WARN,message:`AdManager_VastIntegrator__play_${t}`,exception:`promiseError: ${e.message}`,callStack:e.stack})}}}var en,sn;!function(t){t.errorIframe="Error creating iframe"}(en||(en={}));class nn{constructor(t,i,e){this.Sr=t,this.Nc=i,this.en=e}oS(t,i,e){let s=!1;return n=>{n.contentWindow&&!s&&(s=!0,this.aS(n,this.cS(t,i),e))}}lS(t,i,e,s,n,r,h=!0){return this.uS(t,this.oS(i,e,s),n,r,h)}uS(t,i,e,s,n=!0){const r=this.Sr.createElement("iframe",s);return r.allow="autoplay",r.src="javascript:false",r.srcdoc="",r.width="100%",r.height="100%",r.style.position="absolute",r.style.left="0",r.style.top="0",r.style.margin="0px",r.style.padding="0px",r.style.border="0px",r.style.width="100%",r.style.height="100%",n||(r.style.display="none"),r.setAttribute("SCROLLING","NO"),null==e||e.forEach((t=>{r.setAttribute(t.key,t.value)})),r.onload=()=>{i(r)},t.appendChild(r),i(r),r}aS(t,i,e){const s=(0,m.LT)(t);(class{static executeAsync(t,i){this.dS(t)(i)}static pS(t){return!!t.cnxProxyTask}static dS(t){return this.pS(t)||this.fS(t),t.cnxProxyTask}static fS(t){const i=t.document.head;(0,m.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.vS(t,i),t=null}e(t)}))}cS(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=''+(t.customHead?t.customHead:"")+''+(t.customHtml?t.customHtml:"")+'