/*! For license information please see smartplayer.js.LICENSE.txt */ (()=>{var t={18:(t,e,i)=>{"use strict";var r=i(3113),s=i(4590),n=i(7174),o=i(5330),a=i(6933),l=i(6877),c=i(2692),d=i(4103),h=i(5773),u=i(7898),f=i(3301),p=i(6758),g=i(5630)("toStringTag"),m=Error,v=[].push,y=function(t,e){var i,r=s(b,this);o?i=o(new m,r?n(this):b):(i=r?this:l(b),c(i,g,"Error")),void 0!==e&&c(i,"message",p(e)),u(i,y,i.stack,1),arguments.length>2&&h(i,arguments[2]);var a=[];return f(t,v,{that:a}),c(i,"errors",a),i};o?o(y,m):a(y,m,{name:!0});var b=y.prototype=l(m.prototype,{constructor:d(1,y),message:d(1,""),name:d(1,"AggregateError")});r({global:!0,constructor:!0,arity:2},{AggregateError:y})},30:(t,e,i)=>{"use strict";var r=i(5630);e.f=r},32:t=>{"use strict";t.exports={}},38:(t,e,i)=>{"use strict";var r=i(1480),s=i(9311),n=i(8753),o=function(t){return function(e,i,o){var a=r(e),l=n(a);if(0===l)return!t&&-1;var c,d=s(o,l);if(t&&i!=i){for(;l>d;)if((c=a[d++])!=c)return!0}else for(;l>d;d++)if((t||d in a)&&a[d]===i)return t||d||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},65:t=>{"use strict";var e=TypeError;t.exports=function(t,i){if(t{"use strict";var r=i(8909),s=i(4268),n=i(8615),o=n.Set,a=n.proto,l=r(a.forEach),c=r(a.keys),d=c(new o).next;t.exports=function(t,e,i){return i?s({iterator:c(t),next:d},e):l(t,e)}},181:(t,e,i)=>{"use strict";var r=i(8968);t.exports=/web0s(?!.*chrome)/i.test(r)},213:(t,e,i)=>{"use strict";var r=i(8909);t.exports=r([].slice)},223:(t,e,i)=>{"use strict";var r=i(2681),s=i(8744),n=i(5374).f,o=i(2188).f,a=r.Symbol;if(s("asyncDispose"),a){var l=o(a,"asyncDispose");l.enumerable&&l.configurable&&l.writable&&n(a,"asyncDispose",{value:l.value,enumerable:!1,configurable:!1,writable:!1})}},240:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},328:(t,e,i)=>{"use strict";var r=i(8797),s=TypeError,n=function(t){var e,i;this.promise=new t((function(t,r){if(void 0!==e||void 0!==i)throw new s("Bad Promise constructor");e=t,i=r})),this.resolve=r(e),this.reject=r(i)};t.exports.f=function(t){return new n(t)}},388:(t,e,i)=>{"use strict";var r=i(7473),s=i(8909),n=i(2972),o=i(4296),a=i(8753),l=i(4970),c=s([].push),d=function(t){var e=1===t,i=2===t,s=3===t,d=4===t,h=6===t,u=7===t,f=5===t||h;return function(p,g,m,v){for(var y,b,E=o(p),T=n(E),S=a(T),_=r(g,m),A=0,w=v||l,L=e?w(p,S):i||u?w(p,0):void 0;S>A;A++)if((f||A in T)&&(b=_(y=T[A],A,E),t))if(e)L[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:c(L,y)}else switch(t){case 4:return!1;case 7:c(L,y)}return h?-1:s||d?d:L}};t.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(7)}},396:(t,e,i)=>{"use strict";var r=i(473);t.exports=function(t,e,i){for(var s in e)r(t,s,e[s],i);return t}},451:(t,e,i)=>{"use strict";var r=i(3113),s=i(8109);r({target:"Set",proto:!0,real:!0,forced:!i(5731)("isSubsetOf",(function(t){return t}))},{isSubsetOf:s})},473:(t,e,i)=>{"use strict";var r=i(3984),s=i(5374),n=i(4638),o=i(4290);t.exports=function(t,e,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(r(i)&&n(i,c,a),a.global)l?t[e]=i:o(e,i);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=i:s.f(t,e,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},540:(t,e,i)=>{"use strict";var r=i(4672),s=i(8909),n=i(4753),o=i(240),a=i(1182),l=s([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=n.f(a(t)),i=o.f;return i?l(e,i(t)):e}},549:(t,e,i)=>{"use strict";var r=i(2884);t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},574:(t,e,i)=>{"use strict";var r=i(3113),s=i(2681),n=i(8458),o=i(213),a=i(328),l=i(8797),c=i(8486),d=s.Promise,h=!1;r({target:"Promise",stat:!0,forced:!d||!d.try||c((function(){d.try((function(t){h=8===t}),8)})).error||!h},{try:function(t){var e=arguments.length>1?o(arguments,1):[],i=a.f(this),r=c((function(){return n(l(t),void 0,e)}));return(r.error?i.reject:i.resolve)(r.value),i.promise}})},633:(t,e,i)=>{"use strict";var r=i(9358);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},814:(t,e,i)=>{"use strict";i(1531)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i(3467))},863:t=>{t.exports={name:"memoryStorage",read:function(t){return e[t]},write:function(t,i){e[t]=i},each:function(t){for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},remove:function(t){delete e[t]},clearAll:function(t){e={}}};var e={}},903:(t,e,i)=>{"use strict";var r=i(3758),s=i(2604);t.exports=function(t){var e=r(t,"string");return s(e)?e:e+""}},1060:(t,e,i)=>{"use strict";var r=i(6683);t.exports=function(t){return r(t)||null===t}},1086:(t,e,i)=>{"use strict";var r=i(6362);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},1089:(t,e,i)=>{"use strict";var r=i(2681);t.exports=r.Promise},1098:(t,e,i)=>{"use strict";var r=i(3113),s=i(8909),n=i(32),o=i(6683),a=i(9158),l=i(5374).f,c=i(4753),d=i(2657),h=i(2675),u=i(3837),f=i(2331),p=!1,g=u("meta"),m=0,v=function(t){l(t,g,{value:{objectID:"O"+m++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},p=!0;var t=c.f,e=s([].splice),i={};i[g]=1,t(i).length&&(c.f=function(i){for(var r=t(i),s=0,n=r.length;s{"use strict";i(7044),i(5287),i(6249),i(1315),i(2686)},1125:(t,e,i)=>{"use strict";var r=i(6863),s=i(7694);t.exports=Object.keys||function(t){return r(t,s)}},1182:(t,e,i)=>{"use strict";var r=i(6683),s=String,n=TypeError;t.exports=function(t){if(r(t))return t;throw new n(s(t)+" is not an object")}},1224:(t,e,i)=>{"use strict";i(8744)("replace")},1315:(t,e,i)=>{"use strict";var r=i(3113),s=i(4672),n=i(8458),o=i(8140),a=i(8909),l=i(9358),c=i(3984),d=i(2604),h=i(213),u=i(1754),f=i(2884),p=String,g=s("JSON","stringify"),m=a(/./.exec),v=a("".charAt),y=a("".charCodeAt),b=a("".replace),E=a(1.1.toString),T=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,A=!f||l((function(){var t=s("Symbol")("stringify detection");return"[null]"!==g([t])||"{}"!==g({a:t})||"{}"!==g(Object(t))})),w=l((function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")})),L=function(t,e){var i=h(arguments),r=u(e);if(c(r)||void 0!==t&&!d(t))return i[1]=function(t,e){if(c(r)&&(e=o(r,this,p(t),e)),!d(e))return e},n(g,null,i)},k=function(t,e,i){var r=v(i,e-1),s=v(i,e+1);return m(S,t)&&!m(_,s)||m(_,t)&&!m(S,r)?"\\u"+E(y(t,0),16):t};g&&r({target:"JSON",stat:!0,arity:3,forced:A||w},{stringify:function(t,e,i){var r=h(arguments),s=n(A?L:g,null,r);return w&&"string"==typeof s?b(s,T,k):s}})},1357:(t,e,i)=>{"use strict";var r=i(9358),s=i(3984),n=/#|\.prototype\./,o=function(t,e){var i=l[a(t)];return i===d||i!==c&&(s(e)?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(n,".").toLowerCase()},l=o.data={},c=o.NATIVE="N",d=o.POLYFILL="P";t.exports=o},1368:(t,e,i)=>{"use strict";var r=i(6058);t.exports="NODE"===r},1386:(t,e,i)=>{"use strict";var r=i(8797),s=i(1182),n=i(8140),o=i(4132),a=i(8078),l="Invalid size",c=RangeError,d=TypeError,h=Math.max,u=function(t,e){this.set=t,this.size=h(e,0),this.has=r(t.has),this.keys=r(t.keys)};u.prototype={getIterator:function(){return a(s(n(this.keys,this.set)))},includes:function(t){return n(this.has,this.set,t)}},t.exports=function(t){s(t);var e=+t.size;if(e!=e)throw new d(l);var i=o(e);if(i<0)throw new c(l);return new u(t,i)}},1445:(t,e,i)=>{"use strict";var r=i(8222),s=i(5778),n=TypeError;t.exports=function(t){if(r(t))return t;throw new n(s(t)+" is not a constructor")}},1480:(t,e,i)=>{"use strict";var r=i(2972),s=i(4857);t.exports=function(t){return r(s(t))}},1516:(t,e,i)=>{"use strict";i(18)},1526:(t,e,i)=>{"use strict";var r=i(6738),s=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return s(t)}},1531:(t,e,i)=>{"use strict";var r=i(3113),s=i(2681),n=i(8909),o=i(1357),a=i(473),l=i(1098),c=i(3301),d=i(6586),h=i(3984),u=i(2850),f=i(6683),p=i(9358),g=i(3831),m=i(3606),v=i(9666);t.exports=function(t,e,i){var y=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),E=y?"set":"add",T=s[t],S=T&&T.prototype,_=T,A={},w=function(t){var e=n(S[t]);a(S,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!f(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!f(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!f(t))&&e(this,0===t?0:t)}:function(t,i){return e(this,0===t?0:t,i),this})};if(o(t,!h(T)||!(b||S.forEach&&!p((function(){(new T).entries().next()})))))_=i.getConstructor(e,t,y,E),l.enable();else if(o(t,!0)){var L=new _,k=L[E](b?{}:-0,1)!==L,R=p((function(){L.has(1)})),C=g((function(t){new T(t)})),I=!b&&p((function(){for(var t=new T,e=5;e--;)t[E](e,e);return!t.has(-0)}));C||((_=e((function(t,e){d(t,S);var i=v(new T,t,_);return u(e)||c(e,i[E],{that:i,AS_ENTRIES:y}),i}))).prototype=S,S.constructor=_),(R||I)&&(w("delete"),w("has"),y&&w("get")),(I||k)&&w(E),b&&S.clear&&delete S.clear}return A[t]=_,r({global:!0,constructor:!0,forced:_!==T},A),m(_,t),b||i.setStrong(_,t,y),_}},1658:(t,e,i)=>{"use strict";var r=i(9358),s=i(4103);t.exports=!r((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",s(1,7)),7!==t.stack)}))},1744:(t,e,i)=>{"use strict";var r=i(8909),s=Error,n=r("".replace),o=String(new s("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(o);t.exports=function(t,e){if(l&&"string"==typeof t&&!s.prepareStackTrace)for(;e--;)t=n(t,a,"");return t}},1754:(t,e,i)=>{"use strict";var r=i(8909),s=i(5499),n=i(3984),o=i(7221),a=i(1526),l=r([].push);t.exports=function(t){if(n(t))return t;if(s(t)){for(var e=t.length,i=[],r=0;r{"use strict";var r=i(2681),s=i(1089),n=i(3984),o=i(1357),a=i(6417),l=i(5630),c=i(6058),d=i(4634),h=i(3284),u=s&&s.prototype,f=l("species"),p=!1,g=n(r.PromiseRejectionEvent),m=o("Promise",(function(){var t=a(s),e=t!==String(s);if(!e&&66===h)return!0;if(d&&(!u.catch||!u.finally))return!0;if(!h||h<51||!/native code/.test(t)){var i=new s((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((i.constructor={})[f]=r,!(p=i.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==c&&"DENO"!==c||g)}));t.exports={CONSTRUCTOR:m,REJECTION_EVENT:g,SUBCLASSING:p}},1914:(t,e,i)=>{"use strict";i(8744)("species")},1916:(t,e,i)=>{"use strict";i(4671),i(9034),i(1106),i(223),i(6099),i(4562),i(2097),i(9310),i(9527),i(3116),i(2121),i(6839),i(1224),i(6266),i(1914),i(9712),i(9391),i(3180),i(7735),i(4014),i(5794),i(8003);var r=i(3260);t.exports=r.Symbol},1934:(t,e,i)=>{"use strict";var r=i(3113),s=i(38).includes,n=i(9358),o=i(6718);r({target:"Array",proto:!0,forced:n((function(){return!Array(1).includes()}))},{includes:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},1970:(t,e,i)=>{"use strict";var r=i(3113),s=i(8140),n=i(8797),o=i(328),a=i(8486),l=i(3301);r({target:"Promise",stat:!0,forced:i(9208)},{race:function(t){var e=this,i=o.f(e),r=i.reject,c=a((function(){var o=n(e.resolve);l(t,(function(t){s(o,e,t).then(i.resolve,r)}))}));return c.error&&r(c.value),i.promise}})},2044:(t,e,i)=>{"use strict";i(1934);var r=i(6824);t.exports=r("Array","includes")},2097:(t,e,i)=>{"use strict";var r=i(2681),s=i(8744),n=i(5374).f,o=i(2188).f,a=r.Symbol;if(s("dispose"),a){var l=o(a,"dispose");l.enumerable&&l.configurable&&l.writable&&n(a,"dispose",{value:l.value,enumerable:!1,configurable:!1,writable:!1})}},2121:(t,e,i)=>{"use strict";i(8744)("match")},2188:(t,e,i)=>{"use strict";var r=i(3513),s=i(8140),n=i(7084),o=i(4103),a=i(1480),l=i(903),c=i(9158),d=i(8242),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=a(t),e=l(e),d)try{return h(t,e)}catch(t){}if(c(t,e))return o(!s(n.f,t,e),t[e])}},2331:(t,e,i)=>{"use strict";var r=i(9358);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2380:(t,e,i)=>{"use strict";var r=i(3513),s=i(8909),n=i(8140),o=i(9358),a=i(1125),l=i(240),c=i(7084),d=i(4296),h=i(2972),u=Object.assign,f=Object.defineProperty,p=s([].concat);t.exports=!u||o((function(){if(r&&1!==u({b:1},u(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol("assign detection"),s="abcdefghijklmnopqrst";return t[i]=7,s.split("").forEach((function(t){e[t]=t})),7!==u({},t)[i]||a(u({},e)).join("")!==s}))?function(t,e){for(var i=d(t),s=arguments.length,o=1,u=l.f,f=c.f;s>o;)for(var g,m=h(arguments[o++]),v=u?p(a(m),u(m)):a(m),y=v.length,b=0;y>b;)g=v[b++],r&&!n(f,m,g)||(i[g]=m[g]);return i}:u},2385:t=>{t.exports=function(){var t={};return{defaults:function(e,i){t=i},get:function(e,i){var r=e();return void 0!==r?r:t[i]}}}},2391:(t,e,i)=>{"use strict";var r=i(3113),s=i(2815);r({target:"Array",stat:!0,forced:!i(3831)((function(t){Array.from(t)}))},{from:s})},2597:(t,e,i)=>{"use strict";i(7391),i(2391);var r=i(3260);t.exports=r.Array.from},2604:(t,e,i)=>{"use strict";var r=i(4672),s=i(3984),n=i(4590),o=i(3181),a=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return s(e)&&n(e.prototype,a(t))}},2640:(t,e,i)=>{"use strict";var r=i(4672),s=i(5673),n=i(5630),o=i(3513),a=n("species");t.exports=function(t){var e=r(t);o&&e&&!e[a]&&s(e,a,{configurable:!0,get:function(){return this}})}},2657:(t,e,i)=>{"use strict";var r=i(7221),s=i(1480),n=i(4753).f,o=i(213),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"===r(t)?function(t){try{return n(t)}catch(t){return o(a)}}(t):n(s(t))}},2675:(t,e,i)=>{"use strict";var r=i(9358),s=i(6683),n=i(7221),o=i(633),a=Object.isExtensible,l=r((function(){a(1)}));t.exports=l||o?function(t){return!!s(t)&&(!o||"ArrayBuffer"!==n(t))&&(!a||a(t))}:a},2676:(t,e,i)=>{"use strict";var r=i(3113),s=i(4964);r({target:"Set",proto:!0,real:!0,forced:!i(5731)("isSupersetOf",(function(t){return!t}))},{isSupersetOf:s})},2681:function(t,e,i){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof i.g&&i.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},2686:(t,e,i)=>{"use strict";var r=i(3113),s=i(2884),n=i(9358),o=i(240),a=i(4296);r({target:"Object",stat:!0,forced:!s||n((function(){o.f(1)}))},{getOwnPropertySymbols:function(t){var e=o.f;return e?e(a(t)):[]}})},2692:(t,e,i)=>{"use strict";var r=i(3513),s=i(5374),n=i(4103);t.exports=r?function(t,e,i){return s.f(t,e,n(1,i))}:function(t,e,i){return t[e]=i,t}},2815:(t,e,i)=>{"use strict";var r=i(7473),s=i(8140),n=i(4296),o=i(9e3),a=i(9046),l=i(8222),c=i(8753),d=i(6389),h=i(6850),u=i(9678),f=Array;t.exports=function(t){var e=n(t),i=l(this),p=arguments.length,g=p>1?arguments[1]:void 0,m=void 0!==g;m&&(g=r(g,p>2?arguments[2]:void 0));var v,y,b,E,T,S,_=u(e),A=0;if(!_||this===f&&a(_))for(v=c(e),y=i?new this(v):f(v);v>A;A++)S=m?g(e[A],A):e[A],d(y,A,S);else for(y=i?new this:[],T=(E=h(e,_)).next;!(b=s(T,E)).done;A++)S=m?o(E,g,[b.value,A],!0):b.value,d(y,A,S);return y.length=A,y}},2850:t=>{"use strict";t.exports=function(t){return null==t}},2884:(t,e,i)=>{"use strict";var r=i(3284),s=i(9358),n=i(2681).String;t.exports=!!Object.getOwnPropertySymbols&&!s((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},2895:(t,e,i)=>{"use strict";var r=i(8968);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},2965:(t,e,i)=>{"use strict";var r=i(3113),s=i(6887),n=i(9358);r({target:"Set",proto:!0,real:!0,forced:!i(5731)("difference",(function(t){return 0===t.size}))||n((function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var i=t++>1;return e.has(1)&&e.clear(),{done:i,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size}))},{difference:s})},2972:(t,e,i)=>{"use strict";var r=i(8909),s=i(9358),n=i(7221),o=Object,a=r("".split);t.exports=s((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===n(t)?a(t,""):o(t)}:o},3034:(t,e,i)=>{"use strict";i(4840);var r=i(6824);t.exports=r("Array","find")},3113:(t,e,i)=>{"use strict";var r=i(2681),s=i(2188).f,n=i(2692),o=i(473),a=i(4290),l=i(6933),c=i(1357);t.exports=function(t,e){var i,d,h,u,f,p=t.target,g=t.global,m=t.stat;if(i=g?r:m?r[p]||a(p,{}):r[p]&&r[p].prototype)for(d in e){if(u=e[d],h=t.dontCallGetSet?(f=s(i,d))&&f.value:i[d],!c(g?d:p+(m?".":"#")+d,t.forced)&&void 0!==h){if(typeof u==typeof h)continue;l(u,h)}(t.sham||h&&h.sham)&&n(u,"sham",!0),o(i,d,u,t)}}},3116:(t,e,i)=>{"use strict";i(8744)("iterator")},3120:(t,e,i)=>{"use strict";i(814)},3133:(t,e,i)=>{"use strict";var r=i(3113),s=i(8140),n=i(4634),o=i(6955),a=i(3984),l=i(9211),c=i(7174),d=i(5330),h=i(3606),u=i(2692),f=i(473),p=i(5630),g=i(7096),m=i(4910),v=o.PROPER,y=o.CONFIGURABLE,b=m.IteratorPrototype,E=m.BUGGY_SAFARI_ITERATORS,T=p("iterator"),S="keys",_="values",A="entries",w=function(){return this};t.exports=function(t,e,i,o,p,m,L){l(i,e,o);var k,R,C,I=function(t){if(t===p&&M)return M;if(!E&&t&&t in D)return D[t];switch(t){case S:case _:case A:return function(){return new i(this,t)}}return function(){return new i(this)}},P=e+" Iterator",x=!1,D=t.prototype,O=D[T]||D["@@iterator"]||p&&D[p],M=!E&&O||I(p),$="Array"===e&&D.entries||O;if($&&(k=c($.call(new t)))!==Object.prototype&&k.next&&(n||c(k)===b||(d?d(k,b):a(k[T])||f(k,T,w)),h(k,P,!0,!0),n&&(g[P]=w)),v&&p===_&&O&&O.name!==_&&(!n&&y?u(D,"name",_):(x=!0,M=function(){return s(O,this)})),p)if(R={values:I(_),keys:m?M:I(S),entries:I(A)},L)for(C in R)(E||x||!(C in D))&&f(D,C,R[C]);else r({target:e,proto:!0,forced:E||x},R);return n&&!L||D[T]===M||f(D,T,M,{name:p}),g[e]=M,R}},3180:(t,e,i)=>{"use strict";var r=i(4672),s=i(8744),n=i(3606);s("toStringTag"),n(r("Symbol"),"Symbol")},3181:(t,e,i)=>{"use strict";var r=i(2884);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3260:(t,e,i)=>{"use strict";var r=i(2681);t.exports=r},3284:(t,e,i)=>{"use strict";var r,s,n=i(2681),o=i(8968),a=n.process,l=n.Deno,c=a&&a.versions||l&&l.version,d=c&&c.v8;d&&(s=(r=d.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!s&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(s=+r[1]),t.exports=s},3301:(t,e,i)=>{"use strict";var r=i(7473),s=i(8140),n=i(1182),o=i(5778),a=i(9046),l=i(8753),c=i(4590),d=i(6850),h=i(9678),u=i(5656),f=TypeError,p=function(t,e){this.stopped=t,this.result=e},g=p.prototype;t.exports=function(t,e,i){var m,v,y,b,E,T,S,_=i&&i.that,A=!(!i||!i.AS_ENTRIES),w=!(!i||!i.IS_RECORD),L=!(!i||!i.IS_ITERATOR),k=!(!i||!i.INTERRUPTED),R=r(e,_),C=function(t){return m&&u(m,"normal"),new p(!0,t)},I=function(t){return A?(n(t),k?R(t[0],t[1],C):R(t[0],t[1])):k?R(t,C):R(t)};if(w)m=t.iterator;else if(L)m=t;else{if(!(v=h(t)))throw new f(o(t)+" is not iterable");if(a(v)){for(y=0,b=l(t);b>y;y++)if((E=I(t[y]))&&c(g,E))return E;return new p(!1)}m=d(t,v)}for(T=w?t.next:m.next;!(S=s(T,m)).done;){try{E=I(S.value)}catch(t){u(m,"throw",t)}if("object"==typeof E&&E&&c(g,E))return E}return new p(!1)}},3357:(t,e,i)=>{"use strict";var r=i(3901),s=i(8615),n=i(9065),o=i(1386),a=i(140),l=i(4268),c=s.Set,d=s.add,h=s.has;t.exports=function(t){var e=r(this),i=o(t),s=new c;return n(e)>i.size?l(i.getIterator(),(function(t){h(e,t)&&d(s,t)})):a(e,(function(t){i.includes(t)&&d(s,t)})),s}},3456:(t,e,i)=>{"use strict";var r=i(2681),s=i(3513),n=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!s)return r[t];var e=n(r,t);return e&&e.value}},3459:(t,e,i)=>{"use strict";var r=i(3113),s=i(9358),n=i(3357);r({target:"Set",proto:!0,real:!0,forced:!i(5731)("intersection",(function(t){return 2===t.size&&t.has(1)&&t.has(2)}))||s((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:n})},3467:(t,e,i)=>{"use strict";var r=i(6877),s=i(5673),n=i(396),o=i(7473),a=i(6586),l=i(2850),c=i(3301),d=i(3133),h=i(8772),u=i(2640),f=i(3513),p=i(1098).fastKey,g=i(5098),m=g.set,v=g.getterFor;t.exports={getConstructor:function(t,e,i,d){var h=t((function(t,s){a(t,u),m(t,{type:e,index:r(null),first:null,last:null,size:0}),f||(t.size=0),l(s)||c(s,t[d],{that:t,AS_ENTRIES:i})})),u=h.prototype,g=v(e),y=function(t,e,i){var r,s,n=g(t),o=b(t,e);return o?o.value=i:(n.last=o={index:s=p(e,!0),key:e,value:i,previous:r=n.last,next:null,removed:!1},n.first||(n.first=o),r&&(r.next=o),f?n.size++:t.size++,"F"!==s&&(n.index[s]=o)),t},b=function(t,e){var i,r=g(t),s=p(e);if("F"!==s)return r.index[s];for(i=r.first;i;i=i.next)if(i.key===e)return i};return n(u,{clear:function(){for(var t=g(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=r(null),f?t.size=0:this.size=0},delete:function(t){var e=this,i=g(e),r=b(e,t);if(r){var s=r.next,n=r.previous;delete i.index[r.index],r.removed=!0,n&&(n.next=s),s&&(s.previous=n),i.first===r&&(i.first=s),i.last===r&&(i.last=n),f?i.size--:e.size--}return!!r},forEach:function(t){for(var e,i=g(this),r=o(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:i.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),n(u,i?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),f&&s(u,"size",{configurable:!0,get:function(){return g(this).size}}),h},setStrong:function(t,e,i){var r=e+" Iterator",s=v(e),n=v(r);d(t,e,(function(t,e){m(this,{type:r,target:t,state:s(t),kind:e,last:null})}),(function(){for(var t=n(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?h("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=null,h(void 0,!0))}),i?"entries":"values",!i,!0),u(e)}}},3495:(t,e,i)=>{var r=i(6681).Global;function s(){return r.localStorage}function n(t){return s().getItem(t)}t.exports={name:"localStorage",read:n,write:function(t,e){return s().setItem(t,e)},each:function(t){for(var e=s().length-1;e>=0;e--){var i=s().key(e);t(n(i),i)}},remove:function(t){return s().removeItem(t)},clearAll:function(){return s().clear()}}},3513:(t,e,i)=>{"use strict";var r=i(9358);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3606:(t,e,i)=>{"use strict";var r=i(5374).f,s=i(9158),n=i(5630)("toStringTag");t.exports=function(t,e,i){t&&!i&&(t=t.prototype),t&&!s(t,n)&&r(t,n,{configurable:!0,value:e})}},3627:t=>{function e(t){if(t)return function(t){return Object.assign(t,e.prototype),t._callbacks=new Map,t}(t);this._callbacks=new Map}e.prototype.on=function(t,e){const i=this._callbacks.get(t)??[];return i.push(e),this._callbacks.set(t,i),this},e.prototype.once=function(t,e){const i=(...r)=>{this.off(t,i),e.apply(this,r)};return i.fn=e,this.on(t,i),this},e.prototype.off=function(t,e){if(void 0===t&&void 0===e)return this._callbacks.clear(),this;if(void 0===e)return this._callbacks.delete(t),this;const i=this._callbacks.get(t);if(i){for(const[t,r]of i.entries())if(r===e||r.fn===e){i.splice(t,1);break}0===i.length?this._callbacks.delete(t):this._callbacks.set(t,i)}return this},e.prototype.emit=function(t,...e){const i=this._callbacks.get(t);if(i){const t=[...i];for(const i of t)i.apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks.get(t)??[]},e.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let e=0;for(const t of this._callbacks.values())e+=t.length;return e},e.prototype.hasListeners=function(t){return this.listenerCount(t)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,t.exports=e},3679:(t,e,i)=>{"use strict";var r=i(7221),s=i(8909);t.exports=function(t){if("Function"===r(t))return s(t)}},3758:(t,e,i)=>{"use strict";var r=i(8140),s=i(6683),n=i(2604),o=i(4717),a=i(7107),l=i(5630),c=TypeError,d=l("toPrimitive");t.exports=function(t,e){if(!s(t)||n(t))return t;var i,l=o(t,d);if(l){if(void 0===e&&(e="default"),i=r(l,t,e),!s(i)||n(i))return i;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},3831:(t,e,i)=>{"use strict";var r=i(5630)("iterator"),s=!1;try{var n=0,o={next:function(){return{done:!!n++}},return:function(){s=!0}};o[r]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!s)return!1}catch(t){return!1}var i=!1;try{var n={};n[r]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(t){}return i}},3837:(t,e,i)=>{"use strict";var r=i(8909),s=0,n=Math.random(),o=r(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++s+n,36)}},3901:(t,e,i)=>{"use strict";var r=i(8615).has;t.exports=function(t){return r(t),t}},3906:(t,e,i)=>{"use strict";var r,s,n,o,a,l=i(2681),c=i(3456),d=i(7473),h=i(7518).set,u=i(8180),f=i(2895),p=i(4708),g=i(181),m=i(1368),v=l.MutationObserver||l.WebKitMutationObserver,y=l.document,b=l.process,E=l.Promise,T=c("queueMicrotask");if(!T){var S=new u,_=function(){var t,e;for(m&&(t=b.domain)&&t.exit();e=S.get();)try{e()}catch(t){throw S.head&&r(),t}t&&t.enter()};f||m||g||!v||!y?!p&&E&&E.resolve?((o=E.resolve(void 0)).constructor=E,a=d(o.then,o),r=function(){a(_)}):m?r=function(){b.nextTick(_)}:(h=d(h,l),r=function(){h(_)}):(s=!0,n=y.createTextNode(""),new v(_).observe(n,{characterData:!0}),r=function(){n.data=s=!s}),T=function(t){S.head||r(),S.add(t)}}t.exports=T},3917:(t,e,i)=>{"use strict";var r=i(1060),s=String,n=TypeError;t.exports=function(t){if(r(t))return t;throw new n("Can't set "+s(t)+" as a prototype")}},3978:(t,e,i)=>{"use strict";i(7021),i(5274),i(8977),i(9034),i(7391);var r=i(3260);t.exports=r.Map},3984:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3990:(t,e,i)=>{"use strict";var r=i(3113),s=i(2380);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==s},{assign:s})},4011:(t,e,i)=>{"use strict";var r=i(3113),s=i(8517),n=i(7960);r({target:"Set",proto:!0,real:!0,forced:!i(5731)("symmetricDifference")||!n("symmetricDifference")},{symmetricDifference:s})},4014:(t,e,i)=>{"use strict";var r=i(2681);i(3606)(r.JSON,"JSON",!0)},4026:(t,e,i)=>{"use strict";var r=i(2681),s=i(6683),n=r.document,o=s(n)&&s(n.createElement);t.exports=function(t){return o?n.createElement(t):{}}},4103:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4132:(t,e,i)=>{"use strict";var r=i(5890);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4253:(t,e,i)=>{"use strict";var r=i(8909),s=i(8797);t.exports=function(t,e,i){try{return r(s(Object.getOwnPropertyDescriptor(t,e)[i]))}catch(t){}}},4268:(t,e,i)=>{"use strict";var r=i(8140);t.exports=function(t,e,i){for(var s,n,o=i?t:t.iterator,a=t.next;!(s=r(a,o)).done;)if(void 0!==(n=e(s.value)))return n}},4290:(t,e,i)=>{"use strict";var r=i(2681),s=Object.defineProperty;t.exports=function(t,e){try{s(r,t,{value:e,configurable:!0,writable:!0})}catch(i){r[t]=e}return e}},4296:(t,e,i)=>{"use strict";var r=i(4857),s=Object;t.exports=function(t){return s(r(t))}},4526:(t,e,i)=>{"use strict";var r=i(3901),s=i(8615).has,n=i(9065),o=i(1386),a=i(140),l=i(4268),c=i(5656);t.exports=function(t){var e=r(this),i=o(t);if(n(e)<=i.size)return!1!==a(e,(function(t){if(i.includes(t))return!1}),!0);var d=i.getIterator();return!1!==l(d,(function(t){if(s(e,t))return c(d,"normal",!1)}))}},4562:(t,e,i)=>{"use strict";var r=i(3113),s=i(3513),n=i(2681),o=i(8909),a=i(9158),l=i(3984),c=i(4590),d=i(1526),h=i(5673),u=i(6933),f=n.Symbol,p=f&&f.prototype;if(s&&l(f)&&(!("description"in p)||void 0!==f().description)){var g={},m=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:d(arguments[0]),e=c(p,this)?new f(t):void 0===t?f():f(t);return""===t&&(g[e]=!0),e};u(m,f),m.prototype=p,p.constructor=m;var v="Symbol(description detection)"===String(f("description detection")),y=o(p.valueOf),b=o(p.toString),E=/^Symbol\((.*)\)[^)]+$/,T=o("".replace),S=o("".slice);h(p,"description",{configurable:!0,get:function(){var t=y(this);if(a(g,t))return"";var e=b(t),i=v?S(e,7,-1):T(e,E,"$1");return""===i?void 0:i}}),r({global:!0,constructor:!0,forced:!0},{Symbol:m})}},4568:(t,e,i)=>{"use strict";var r=i(8909),s=i(4132),n=i(1526),o=i(4857),a=r("".charAt),l=r("".charCodeAt),c=r("".slice),d=function(t){return function(e,i){var r,d,h=n(o(e)),u=s(i),f=h.length;return u<0||u>=f?t?"":void 0:(r=l(h,u))<55296||r>56319||u+1===f||(d=l(h,u+1))<56320||d>57343?t?a(h,u):r:t?c(h,u,u+2):d-56320+(r-55296<<10)+65536}};t.exports={codeAt:d(!1),charAt:d(!0)}},4590:(t,e,i)=>{"use strict";var r=i(8909);t.exports=r({}.isPrototypeOf)},4602:(t,e,i)=>{"use strict";i(3990);var r=i(3260);t.exports=r.Object.assign},4634:t=>{"use strict";t.exports=!1},4638:(t,e,i)=>{"use strict";var r=i(8909),s=i(9358),n=i(3984),o=i(9158),a=i(3513),l=i(6955).CONFIGURABLE,c=i(6417),d=i(5098),h=d.enforce,u=d.get,f=String,p=Object.defineProperty,g=r("".slice),m=r("".replace),v=r([].join),y=a&&!s((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),E=t.exports=function(t,e,i){"Symbol("===g(f(e),0,7)&&(e="["+m(f(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(e="get "+e),i&&i.setter&&(e="set "+e),(!o(t,"name")||l&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&i&&o(i,"arity")&&t.length!==i.arity&&p(t,"length",{value:i.arity});try{i&&o(i,"constructor")&&i.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=h(t);return o(r,"source")||(r.source=v(b,"string"==typeof e?e:"")),t};Function.prototype.toString=E((function(){return n(this)&&u(this).source||c(this)}),"toString")},4648:(t,e,i)=>{"use strict";var r=i(5499),s=i(8222),n=i(6683),o=i(5630)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(s(e)&&(e===a||r(e.prototype))||n(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?a:e}},4653:(t,e,i)=>{"use strict";var r=i(3113),s=i(328);r({target:"Promise",stat:!0},{withResolvers:function(){var t=s.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},4671:(t,e,i)=>{"use strict";var r=i(3113),s=i(9358),n=i(5499),o=i(6683),a=i(4296),l=i(8753),c=i(7838),d=i(6389),h=i(4970),u=i(6446),f=i(5630),p=i(3284),g=f("isConcatSpreadable"),m=p>=51||!s((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),v=function(t){if(!o(t))return!1;var e=t[g];return void 0!==e?!!e:n(t)};r({target:"Array",proto:!0,arity:1,forced:!m||!u("concat")},{concat:function(t){var e,i,r,s,n,o=a(this),u=h(o,0),f=0;for(e=-1,r=arguments.length;e{"use strict";var r=i(2681),s=i(3984);t.exports=function(t,e){return arguments.length<2?(i=r[t],s(i)?i:void 0):r[t]&&r[t][e];var i}},4689:(t,e,i)=>{"use strict";i(1516),i(7021),i(9034),i(6197),i(8516),i(8121),i(574),i(4653),i(5784),i(7391);var r=i(3260);t.exports=r.Promise},4708:(t,e,i)=>{"use strict";var r=i(8968);t.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},4717:(t,e,i)=>{"use strict";var r=i(8797),s=i(2850);t.exports=function(t,e){var i=t[e];return s(i)?void 0:r(i)}},4753:(t,e,i)=>{"use strict";var r=i(6863),s=i(7694).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,s)}},4839:(t,e,i)=>{var r=i(6681),s=r.slice,n=r.pluck,o=r.each,a=r.bind,l=r.create,c=r.isList,d=r.isFunction,h=r.isObject;t.exports={createStore:f};var u={version:"2.0.12",enabled:!1,get:function(t,e){var i=this.storage.read(this._namespacePrefix+t);return this._deserialize(i,e)},set:function(t,e){return void 0===e?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each((function(i,r){t.call(e,e._deserialize(i),(r||"").replace(e._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return f(this.storage,this.plugins,t)}};function f(t,e,i){i||(i=""),t&&!c(t)&&(t=[t]),e&&!c(e)&&(e=[e]);var r=i?"__storejs_"+i+"_":"",f=i?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(i))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p={_namespacePrefix:r,_namespaceRegexp:f,_testStorage:function(t){try{var e="__storejs__test__";t.write(e,e);var i=t.read(e)===e;return t.remove(e),i}catch(t){return!1}},_assignPluginFnProp:function(t,e){var i=this[e];this[e]=function(){var e=s(arguments,0),r=this,n=[function(){if(i)return o(arguments,(function(t,i){e[i]=t})),i.apply(r,e)}].concat(e);return t.apply(r,n)}},_serialize:function(t){return JSON.stringify(t)},_deserialize:function(t,e){if(!t)return e;var i="";try{i=JSON.parse(t)}catch(e){i=t}return void 0!==i?i:e},_addStorage:function(t){this.enabled||this._testStorage(t)&&(this.storage=t,this.enabled=!0)},_addPlugin:function(t){var e=this;if(c(t))o(t,(function(t){e._addPlugin(t)}));else if(!n(this.plugins,(function(e){return t===e}))){if(this.plugins.push(t),!d(t))throw new Error("Plugins must be function values that return objects");var i=t.call(this);if(!h(i))throw new Error("Plugins must return an object of function properties");o(i,(function(i,r){if(!d(i))throw new Error("Bad plugin property: "+r+" from plugin "+t.name+". Plugins should only return functions.");e._assignPluginFnProp(i,r)}))}},addStorage:function(t){!function(){var t="undefined"==typeof console?null:console;t&&(t.warn?t.warn:t.log).apply(t,arguments)}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(t)}},g=l(p,u,{plugins:[]});return g.raw={},o(g,(function(t,e){d(t)&&(g.raw[e]=a(g,t))})),o(t,(function(t){g._addStorage(t)})),o(e,(function(t){g._addPlugin(t)})),g}},4840:(t,e,i)=>{"use strict";var r=i(3113),s=i(388).find,n=i(6718),o="find",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),n(o)},4857:(t,e,i)=>{"use strict";var r=i(2850),s=TypeError;t.exports=function(t){if(r(t))throw new s("Can't call method on "+t);return t}},4910:(t,e,i)=>{"use strict";var r,s,n,o=i(9358),a=i(3984),l=i(6683),c=i(6877),d=i(7174),h=i(473),u=i(5630),f=i(4634),p=u("iterator"),g=!1;[].keys&&("next"in(n=[].keys())?(s=d(d(n)))!==Object.prototype&&(r=s):g=!0),!l(r)||o((function(){var t={};return r[p].call(t)!==t}))?r={}:f&&(r=c(r)),a(r[p])||h(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},4964:(t,e,i)=>{"use strict";var r=i(3901),s=i(8615).has,n=i(9065),o=i(1386),a=i(4268),l=i(5656);t.exports=function(t){var e=r(this),i=o(t);if(n(e){"use strict";var r=i(4648);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},5098:(t,e,i)=>{"use strict";var r,s,n,o=i(7717),a=i(2681),l=i(6683),c=i(2692),d=i(9158),h=i(6362),u=i(6812),f=i(32),p="Object already initialized",g=a.TypeError,m=a.WeakMap;if(o||h.state){var v=h.state||(h.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,r=function(t,e){if(v.has(t))throw new g(p);return e.facade=t,v.set(t,e),e},s=function(t){return v.get(t)||{}},n=function(t){return v.has(t)}}else{var y=u("state");f[y]=!0,r=function(t,e){if(d(t,y))throw new g(p);return e.facade=t,c(t,y,e),e},s=function(t){return d(t,y)?t[y]:{}},n=function(t){return d(t,y)}}t.exports={set:r,get:s,has:n,enforce:function(t){return n(t)?s(t):r(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=s(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return i}}}},5274:(t,e,i)=>{"use strict";i(6556)},5287:(t,e,i)=>{"use strict";var r=i(3113),s=i(4672),n=i(9158),o=i(1526),a=i(1086),l=i(549),c=a("string-to-symbol-registry"),d=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=o(t);if(n(c,e))return c[e];var i=s("Symbol")(e);return c[e]=i,d[i]=e,i}})},5330:(t,e,i)=>{"use strict";var r=i(4253),s=i(6683),n=i(4857),o=i(3917);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=r(Object.prototype,"__proto__","set"))(i,[]),e=i instanceof Array}catch(t){}return function(i,r){return n(i),o(r),s(i)?(e?t(i,r):i.__proto__=r,i):i}}():void 0)},5374:(t,e,i)=>{"use strict";var r=i(3513),s=i(8242),n=i(6687),o=i(1182),a=i(903),l=TypeError,c=Object.defineProperty,d=Object.getOwnPropertyDescriptor,h="enumerable",u="configurable",f="writable";e.f=r?n?function(t,e,i){if(o(t),e=a(e),o(i),"function"==typeof t&&"prototype"===e&&"value"in i&&f in i&&!i[f]){var r=d(t,e);r&&r[f]&&(t[e]=i.value,i={configurable:u in i?i[u]:r[u],enumerable:h in i?i[h]:r[h],writable:!1})}return c(t,e,i)}:c:function(t,e,i){if(o(t),e=a(e),o(i),s)try{return c(t,e,i)}catch(t){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},5499:(t,e,i)=>{"use strict";var r=i(7221);t.exports=Array.isArray||function(t){return"Array"===r(t)}},5614:(t,e,i)=>{"use strict";var r=i(4672);t.exports=r("document","documentElement")},5630:(t,e,i)=>{"use strict";var r=i(2681),s=i(1086),n=i(9158),o=i(3837),a=i(2884),l=i(3181),c=r.Symbol,d=s("wks"),h=l?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return n(d,t)||(d[t]=a&&n(c,t)?c[t]:h("Symbol."+t)),d[t]}},5656:(t,e,i)=>{"use strict";var r=i(8140),s=i(1182),n=i(4717);t.exports=function(t,e,i){var o,a;s(t);try{if(!(o=n(t,"return"))){if("throw"===e)throw i;return i}o=r(o,t)}catch(t){a=!0,o=t}if("throw"===e)throw i;if(a)throw o;return s(o),i}},5673:(t,e,i)=>{"use strict";var r=i(4638),s=i(5374);t.exports=function(t,e,i){return i.get&&r(i.get,e,{getter:!0}),i.set&&r(i.set,e,{setter:!0}),s.f(t,e,i)}},5702:t=>{"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},5712:(t,e,i)=>{var r=i(6681),s=r.Global,n=r.trim;t.exports={name:"cookieStorage",read:function(t){if(!t||!c(t))return null;var e="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(o.cookie.replace(new RegExp(e),"$1"))},write:function(t,e){t&&(o.cookie=escape(t)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:a,remove:l,clearAll:function(){a((function(t,e){l(e)}))}};var o=s.document;function a(t){for(var e=o.cookie.split(/; ?/g),i=e.length-1;i>=0;i--)if(n(e[i])){var r=e[i].split("="),s=unescape(r[0]);t(unescape(r[1]),s)}}function l(t){t&&c(t)&&(o.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function c(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(o.cookie)}},5731:(t,e,i)=>{"use strict";var r=i(4672),s=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},n=function(t){return{size:t,has:function(){return!0},keys:function(){throw new Error("e")}}};t.exports=function(t,e){var i=r("Set");try{(new i)[t](s(0));try{return(new i)[t](s(-1)),!1}catch(r){if(!e)return!0;try{return(new i)[t](n(-1/0)),!1}catch(r){var o=new i;return o.add(1),o.add(2),e(o[t](n(1/0)))}}}catch(t){return!1}}},5773:(t,e,i)=>{"use strict";var r=i(6683),s=i(2692);t.exports=function(t,e){r(e)&&"cause"in e&&s(t,"cause",e.cause)}},5778:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},5784:(t,e,i)=>{"use strict";var r=i(3113),s=i(4634),n=i(1089),o=i(9358),a=i(4672),l=i(3984),c=i(8848),d=i(7367),h=i(473),u=n&&n.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!n&&o((function(){u.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,a("Promise")),i=l(t);return this.then(i?function(i){return d(e,t()).then((function(){return i}))}:t,i?function(i){return d(e,t()).then((function(){throw i}))}:t)}}),!s&&l(n)){var f=a("Promise").prototype.finally;u.finally!==f&&h(u,"finally",f,{unsafe:!0})}},5794:(t,e,i)=>{"use strict";i(3606)(Math,"Math",!0)},5828:(t,e,i)=>{"use strict";var r=i(9358);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},5890:t=>{"use strict";var e=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?i:e)(r)}},5942:(t,e,i)=>{"use strict";var r=i(3113),s=i(4526);r({target:"Set",proto:!0,real:!0,forced:!i(5731)("isDisjointFrom",(function(t){return!t}))},{isDisjointFrom:s})},5978:t=>{function e(t,e,i,r,s,n){return o(function(t,e){return t<>>32-e}(o(o(e,t),o(r,n)),s),i)}function i(t,i,r,s,n,o,a){return e(i&r|~i&s,t,i,n,o,a)}function r(t,i,r,s,n,o,a){return e(i&s|r&~s,t,i,n,o,a)}function s(t,i,r,s,n,o,a){return e(i^r^s,t,i,n,o,a)}function n(t,i,r,s,n,o,a){return e(r^(i|~s),t,i,n,o,a)}function o(t,e){var i=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(i>>16)<<16|65535&i}t.exports=function(t){const e=function(t){for(var e,i="0123456789ABCDEF",r="",s=0;s>>4&15)+i.charAt(15&e);return r}(function(t){for(var e="",i=0;i<32*t.length;i+=8)e+=String.fromCharCode(t[i>>5]>>>i%32&255);return e}(function(t,e){t[e>>5]|=128<>>9<<4)]=e;for(var a=1732584193,l=-271733879,c=-1732584194,d=271733878,h=0;h>2),i=0;i>5]|=(255&t.charCodeAt(i/8))<{"use strict";var r=i(8909),s=Map.prototype;t.exports={Map,set:r(s.set),get:r(s.get),has:r(s.has),remove:r(s.delete),proto:s}},6058:(t,e,i)=>{"use strict";var r=i(2681),s=i(8968),n=i(7221),o=function(t){return s.slice(0,t.length)===t};t.exports=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},6099:(t,e,i)=>{"use strict";i(8744)("asyncIterator")},6127:(t,e,i)=>{"use strict";var r=i(3113),s=i(4672),n=i(4634),o=i(1089),a=i(1905).CONSTRUCTOR,l=i(7367),c=s("Promise"),d=n&&!a;r({target:"Promise",stat:!0,forced:n||a},{resolve:function(t){return l(d&&this===c?o:this,t)}})},6197:(t,e,i)=>{"use strict";i(7495),i(6612),i(7280),i(1970),i(8196),i(6127)},6226:(t,e,i)=>{"use strict";var r=i(3513),s=i(6687),n=i(5374),o=i(1182),a=i(1480),l=i(1125);e.f=r&&!s?Object.defineProperties:function(t,e){o(t);for(var i,r=a(e),s=l(e),c=s.length,d=0;c>d;)n.f(t,i=s[d++],r[i]);return t}},6249:(t,e,i)=>{"use strict";var r=i(3113),s=i(9158),n=i(2604),o=i(5778),a=i(1086),l=i(549),c=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(t){if(!n(t))throw new TypeError(o(t)+" is not a symbol");if(s(c,t))return c[t]}})},6266:(t,e,i)=>{"use strict";i(8744)("search")},6362:(t,e,i)=>{"use strict";var r=i(4634),s=i(2681),n=i(4290),o="__core-js_shared__",a=t.exports=s[o]||n(o,{});(a.versions||(a.versions=[])).push({version:"3.45.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6389:(t,e,i)=>{"use strict";var r=i(3513),s=i(5374),n=i(4103);t.exports=function(t,e,i){r?s.f(t,e,n(0,i)):t[e]=i}},6405:(t,e,i)=>{"use strict";var r={};r[i(5630)("toStringTag")]="z",t.exports="[object z]"===String(r)},6417:(t,e,i)=>{"use strict";var r=i(8909),s=i(3984),n=i(6362),o=r(Function.toString);s(n.inspectSource)||(n.inspectSource=function(t){return o(t)}),t.exports=n.inspectSource},6446:(t,e,i)=>{"use strict";var r=i(9358),s=i(5630),n=i(3284),o=s("species");t.exports=function(t){return n>=51||!r((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},6556:(t,e,i)=>{"use strict";i(1531)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i(3467))},6586:(t,e,i)=>{"use strict";var r=i(4590),s=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new s("Incorrect invocation")}},6612:(t,e,i)=>{"use strict";var r=i(3113),s=i(8140),n=i(8797),o=i(328),a=i(8486),l=i(3301);r({target:"Promise",stat:!0,forced:i(9208)},{all:function(t){var e=this,i=o.f(e),r=i.resolve,c=i.reject,d=a((function(){var i=n(e.resolve),o=[],a=0,d=1;l(t,(function(t){var n=a++,l=!1;d++,s(i,e,t).then((function(t){l||(l=!0,o[n]=t,--d||r(o))}),c)})),--d||r(o)}));return d.error&&c(d.value),i.promise}})},6681:(t,e,i)=>{var r=Object.assign?Object.assign:function(t,e,i,r){for(var s=1;s{"use strict";var r=i(3984);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},6687:(t,e,i)=>{"use strict";var r=i(3513),s=i(9358);t.exports=r&&s((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6718:(t,e,i)=>{"use strict";var r=i(5630),s=i(6877),n=i(5374).f,o=r("unscopables"),a=Array.prototype;void 0===a[o]&&n(a,o,{configurable:!0,value:s(null)}),t.exports=function(t){a[o][t]=!0}},6738:(t,e,i)=>{"use strict";var r=i(6405),s=i(3984),n=i(7221),o=i(5630)("toStringTag"),a=Object,l="Arguments"===n(function(){return arguments}());t.exports=r?n:function(t){var e,i,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=a(t),o))?i:l?n(e):"Object"===(r=n(e))&&s(e.callee)?"Arguments":r}},6745:(t,e,i)=>{"use strict";var r=i(3901),s=i(8615).add,n=i(6891),o=i(1386),a=i(4268);t.exports=function(t){var e=r(this),i=o(t).getIterator(),l=n(e);return a(i,(function(t){s(l,t)})),l}},6758:(t,e,i)=>{"use strict";var r=i(1526);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},6812:(t,e,i)=>{"use strict";var r=i(1086),s=i(3837),n=r("keys");t.exports=function(t){return n[t]||(n[t]=s(t))}},6824:(t,e,i)=>{"use strict";var r=i(2681),s=i(8909);t.exports=function(t,e){return s(r[t].prototype[e])}},6839:(t,e,i)=>{"use strict";i(8744)("matchAll")},6849:()=>{"use strict";var t,e;t=window,e=performance,t._plt=t._plt||(e&&e.timeOrigin?e.timeOrigin+e.now():Date.now())},6850:(t,e,i)=>{"use strict";var r=i(8140),s=i(8797),n=i(1182),o=i(5778),a=i(9678),l=TypeError;t.exports=function(t,e){var i=arguments.length<2?a(t):e;if(s(i))return n(r(i,t));throw new l(o(t)+" is not iterable")}},6863:(t,e,i)=>{"use strict";var r=i(8909),s=i(9158),n=i(1480),o=i(38).indexOf,a=i(32),l=r([].push);t.exports=function(t,e){var i,r=n(t),c=0,d=[];for(i in r)!s(a,i)&&s(r,i)&&l(d,i);for(;e.length>c;)s(r,i=e[c++])&&(~o(d,i)||l(d,i));return d}},6877:(t,e,i)=>{"use strict";var r,s=i(1182),n=i(6226),o=i(7694),a=i(32),l=i(5614),c=i(4026),d=i(6812),h="prototype",u="script",f=d("IE_PROTO"),p=function(){},g=function(t){return"<"+u+">"+t+""},m=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,i;v="undefined"!=typeof document?document.domain&&r?m(r):(e=c("iframe"),i="java"+u+":",e.style.display="none",l.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):m(r);for(var s=o.length;s--;)delete v[h][o[s]];return v()};a[f]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(p[h]=s(t),i=new p,p[h]=null,i[f]=t):i=v(),void 0===e?i:n.f(i,e)}},6887:(t,e,i)=>{"use strict";var r=i(3901),s=i(8615),n=i(6891),o=i(9065),a=i(1386),l=i(140),c=i(4268),d=s.has,h=s.remove;t.exports=function(t){var e=r(this),i=a(t),s=n(e);return o(e)<=i.size?l(e,(function(t){i.includes(t)&&h(s,t)})):c(i.getIterator(),(function(t){d(s,t)&&h(s,t)})),s}},6891:(t,e,i)=>{"use strict";var r=i(8615),s=i(140),n=r.Set,o=r.add;t.exports=function(t){var e=new n;return s(t,(function(t){o(e,t)})),e}},6933:(t,e,i)=>{"use strict";var r=i(9158),s=i(540),n=i(2188),o=i(5374);t.exports=function(t,e,i){for(var a=s(e),l=o.f,c=n.f,d=0;d{"use strict";var r=i(3513),s=i(9158),n=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,a=s(n,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&o(n,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},7021:(t,e,i)=>{"use strict";var r=i(1480),s=i(6718),n=i(7096),o=i(5098),a=i(5374).f,l=i(3133),c=i(8772),d=i(4634),h=i(3513),u="Array Iterator",f=o.set,p=o.getterFor(u);t.exports=l(Array,"Array",(function(t,e){f(this,{type:u,target:r(t),index:0,kind:e})}),(function(){var t=p(this),e=t.target,i=t.index++;if(!e||i>=e.length)return t.target=null,c(void 0,!0);switch(t.kind){case"keys":return c(i,!1);case"values":return c(e[i],!1)}return c([i,e[i]],!1)}),"values");var g=n.Arguments=n.Array;if(s("keys"),s("values"),s("entries"),!d&&h&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(t){}},7044:(t,e,i)=>{"use strict";var r=i(3113),s=i(2681),n=i(8140),o=i(8909),a=i(4634),l=i(3513),c=i(2884),d=i(9358),h=i(9158),u=i(4590),f=i(1182),p=i(1480),g=i(903),m=i(1526),v=i(4103),y=i(6877),b=i(1125),E=i(4753),T=i(2657),S=i(240),_=i(2188),A=i(5374),w=i(6226),L=i(7084),k=i(473),R=i(5673),C=i(1086),I=i(6812),P=i(32),x=i(3837),D=i(5630),O=i(30),M=i(8744),$=i(7345),F=i(3606),N=i(5098),U=i(388).forEach,B=I("hidden"),V="Symbol",G="prototype",H=N.set,j=N.getterFor(V),z=Object[G],K=s.Symbol,Y=K&&K[G],W=s.RangeError,q=s.TypeError,X=s.QObject,Q=_.f,Z=A.f,J=T.f,tt=L.f,et=o([].push),it=C("symbols"),rt=C("op-symbols"),st=C("wks"),nt=!X||!X[G]||!X[G].findChild,ot=function(t,e,i){var r=Q(z,e);r&&delete z[e],Z(t,e,i),r&&t!==z&&Z(z,e,r)},at=l&&d((function(){return 7!==y(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?ot:Z,lt=function(t,e){var i=it[t]=y(Y);return H(i,{type:V,tag:t,description:e}),l||(i.description=e),i},ct=function(t,e,i){t===z&&ct(rt,e,i),f(t);var r=g(e);return f(i),h(it,r)?(i.enumerable?(h(t,B)&&t[B][r]&&(t[B][r]=!1),i=y(i,{enumerable:v(0,!1)})):(h(t,B)||Z(t,B,v(1,y(null))),t[B][r]=!0),at(t,r,i)):Z(t,r,i)},dt=function(t,e){f(t);var i=p(e),r=b(i).concat(pt(i));return U(r,(function(e){l&&!n(ht,i,e)||ct(t,e,i[e])})),t},ht=function(t){var e=g(t),i=n(tt,this,e);return!(this===z&&h(it,e)&&!h(rt,e))&&(!(i||!h(this,e)||!h(it,e)||h(this,B)&&this[B][e])||i)},ut=function(t,e){var i=p(t),r=g(e);if(i!==z||!h(it,r)||h(rt,r)){var s=Q(i,r);return!s||!h(it,r)||h(i,B)&&i[B][r]||(s.enumerable=!0),s}},ft=function(t){var e=J(p(t)),i=[];return U(e,(function(t){h(it,t)||h(P,t)||et(i,t)})),i},pt=function(t){var e=t===z,i=J(e?rt:p(t)),r=[];return U(i,(function(t){!h(it,t)||e&&!h(z,t)||et(r,it[t])})),r};c||(k(Y=(K=function(){if(u(Y,this))throw new q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,e=x(t),i=function(t){var r=void 0===this?s:this;r===z&&n(i,rt,t),h(r,B)&&h(r[B],e)&&(r[B][e]=!1);var o=v(1,t);try{at(r,e,o)}catch(t){if(!(t instanceof W))throw t;ot(r,e,o)}};return l&&nt&&at(z,e,{configurable:!0,set:i}),lt(e,t)})[G],"toString",(function(){return j(this).tag})),k(K,"withoutSetter",(function(t){return lt(x(t),t)})),L.f=ht,A.f=ct,w.f=dt,_.f=ut,E.f=T.f=ft,S.f=pt,O.f=function(t){return lt(D(t),t)},l&&(R(Y,"description",{configurable:!0,get:function(){return j(this).description}}),a||k(z,"propertyIsEnumerable",ht,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:K}),U(b(st),(function(t){M(t)})),r({target:V,stat:!0,forced:!c},{useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(t,e){return void 0===e?y(t):dt(y(t),e)},defineProperty:ct,defineProperties:dt,getOwnPropertyDescriptor:ut}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ft}),$(),F(K,V),P[B]=!0},7084:(t,e)=>{"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!i.call({1:2},1);e.f=s?function(t){var e=r(this,t);return!!e&&e.enumerable}:i},7095:(t,e,i)=>{"use strict";var r=i(3113),s=i(6745),n=i(7960);r({target:"Set",proto:!0,real:!0,forced:!i(5731)("union")||!n("union")},{union:s})},7096:t=>{"use strict";t.exports={}},7107:(t,e,i)=>{"use strict";var r=i(8140),s=i(3984),n=i(6683),o=TypeError;t.exports=function(t,e){var i,a;if("string"===e&&s(i=t.toString)&&!n(a=r(i,t)))return a;if(s(i=t.valueOf)&&!n(a=r(i,t)))return a;if("string"!==e&&s(i=t.toString)&&!n(a=r(i,t)))return a;throw new o("Can't convert object to primitive value")}},7174:(t,e,i)=>{"use strict";var r=i(9158),s=i(3984),n=i(4296),o=i(6812),a=i(5828),l=o("IE_PROTO"),c=Object,d=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=n(t);if(r(e,l))return e[l];var i=e.constructor;return s(i)&&e instanceof i?i.prototype:e instanceof c?d:null}},7221:(t,e,i)=>{"use strict";var r=i(8909),s=r({}.toString),n=r("".slice);t.exports=function(t){return n(s(t),8,-1)}},7280:(t,e,i)=>{"use strict";var r=i(3113),s=i(4634),n=i(1905).CONSTRUCTOR,o=i(1089),a=i(4672),l=i(3984),c=i(473),d=o&&o.prototype;if(r({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(t){return this.then(void 0,t)}}),!s&&l(o)){var h=a("Promise").prototype.catch;d.catch!==h&&c(d,"catch",h,{unsafe:!0})}},7314:t=>{"use strict";var e=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===i}(t)}(t)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a((i=t,Array.isArray(i)?[]:{}),t,e):t;var i}function s(t,e,i){return t.concat(e).map((function(t){return r(t,i)}))}function n(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,i,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=r;var c=Array.isArray(i);return c===Array.isArray(t)?c?l.arrayMerge(t,i,l):function(t,e,i){var s={};return i.isMergeableObject(t)&&n(t).forEach((function(e){s[e]=r(t[e],i)})),n(e).forEach((function(n){(function(t,e){return o(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,n)||(o(t,n)&&i.isMergeableObject(e[n])?s[n]=function(t,e){if(!e.customMerge)return a;var i=e.customMerge(t);return"function"==typeof i?i:a}(n,i)(t[n],e[n],i):s[n]=r(e[n],i))})),s}(t,i,l):r(i,l)}a.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,i){return a(t,i,e)}),{})};var l=a;t.exports=l},7345:(t,e,i)=>{"use strict";var r=i(8140),s=i(4672),n=i(5630),o=i(473);t.exports=function(){var t=s("Symbol"),e=t&&t.prototype,i=e&&e.valueOf,a=n("toPrimitive");e&&!e[a]&&o(e,a,(function(t){return r(i,this)}),{arity:1})}},7367:(t,e,i)=>{"use strict";var r=i(1182),s=i(6683),n=i(328);t.exports=function(t,e){if(r(t),s(e)&&e.constructor===t)return e;var i=n.f(t);return(0,i.resolve)(e),i.promise}},7391:(t,e,i)=>{"use strict";var r=i(4568).charAt,s=i(1526),n=i(5098),o=i(3133),a=i(8772),l="String Iterator",c=n.set,d=n.getterFor(l);o(String,"String",(function(t){c(this,{type:l,string:s(t),index:0})}),(function(){var t,e=d(this),i=e.string,s=e.index;return s>=i.length?a(void 0,!0):(t=r(i,s),e.index+=t.length,a(t,!1))}))},7473:(t,e,i)=>{"use strict";var r=i(3679),s=i(8797),n=i(7603),o=r(r.bind);t.exports=function(t,e){return s(t),void 0===e?t:n?o(t,e):function(){return t.apply(e,arguments)}}},7495:(t,e,i)=>{"use strict";var r,s,n,o,a=i(3113),l=i(4634),c=i(1368),d=i(2681),h=i(3260),u=i(8140),f=i(473),p=i(5330),g=i(3606),m=i(2640),v=i(8797),y=i(3984),b=i(6683),E=i(6586),T=i(8848),S=i(7518).set,_=i(3906),A=i(5702),w=i(8486),L=i(8180),k=i(5098),R=i(1089),C=i(1905),I=i(328),P="Promise",x=C.CONSTRUCTOR,D=C.REJECTION_EVENT,O=C.SUBCLASSING,M=k.getterFor(P),$=k.set,F=R&&R.prototype,N=R,U=F,B=d.TypeError,V=d.document,G=d.process,H=I.f,j=H,z=!!(V&&V.createEvent&&d.dispatchEvent),K="unhandledrejection",Y=function(t){var e;return!(!b(t)||!y(e=t.then))&&e},W=function(t,e){var i,r,s,n=e.value,o=1===e.state,a=o?t.ok:t.fail,l=t.resolve,c=t.reject,d=t.domain;try{a?(o||(2===e.rejection&&J(e),e.rejection=1),!0===a?i=n:(d&&d.enter(),i=a(n),d&&(d.exit(),s=!0)),i===t.promise?c(new B("Promise-chain cycle")):(r=Y(i))?u(r,i,l,c):l(i)):c(n)}catch(t){d&&!s&&d.exit(),c(t)}},q=function(t,e){t.notified||(t.notified=!0,_((function(){for(var i,r=t.reactions;i=r.get();)W(i,t);t.notified=!1,e&&!t.rejection&&Q(t)})))},X=function(t,e,i){var r,s;z?((r=V.createEvent("Event")).promise=e,r.reason=i,r.initEvent(t,!1,!0),d.dispatchEvent(r)):r={promise:e,reason:i},!D&&(s=d["on"+t])?s(r):t===K&&A("Unhandled promise rejection",i)},Q=function(t){u(S,d,(function(){var e,i=t.facade,r=t.value;if(Z(t)&&(e=w((function(){c?G.emit("unhandledRejection",r,i):X(K,i,r)})),t.rejection=c||Z(t)?2:1,e.error))throw e.value}))},Z=function(t){return 1!==t.rejection&&!t.parent},J=function(t){u(S,d,(function(){var e=t.facade;c?G.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)}))},tt=function(t,e,i){return function(r){t(e,r,i)}},et=function(t,e,i){t.done||(t.done=!0,i&&(t=i),t.value=e,t.state=2,q(t,!0))},it=function(t,e,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===e)throw new B("Promise can't be resolved itself");var r=Y(e);r?_((function(){var i={done:!1};try{u(r,e,tt(it,i,t),tt(et,i,t))}catch(e){et(i,e,t)}})):(t.value=e,t.state=1,q(t,!1))}catch(e){et({done:!1},e,t)}}};if(x&&(U=(N=function(t){E(this,U),v(t),u(r,this);var e=M(this);try{t(tt(it,e),tt(et,e))}catch(t){et(e,t)}}).prototype,(r=function(t){$(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new L,rejection:!1,state:0,value:null})}).prototype=f(U,"then",(function(t,e){var i=M(this),r=H(T(this,N));return i.parent=!0,r.ok=!y(t)||t,r.fail=y(e)&&e,r.domain=c?G.domain:void 0,0===i.state?i.reactions.add(r):_((function(){W(r,i)})),r.promise})),s=function(){var t=new r,e=M(t);this.promise=t,this.resolve=tt(it,e),this.reject=tt(et,e)},I.f=H=function(t){return t===N||t===n?new s(t):j(t)},!l&&y(R)&&F!==Object.prototype)){o=F.then,O||f(F,"then",(function(t,e){var i=this;return new N((function(t,e){u(o,i,t,e)})).then(t,e)}),{unsafe:!0});try{delete F.constructor}catch(t){}p&&p(F,U)}a({global:!0,constructor:!0,wrap:!0,forced:x},{Promise:N}),n=h.Promise,g(N,P,!1,!0),m(P)},7518:(t,e,i)=>{"use strict";var r,s,n,o,a=i(2681),l=i(8458),c=i(7473),d=i(3984),h=i(9158),u=i(9358),f=i(5614),p=i(213),g=i(4026),m=i(65),v=i(2895),y=i(1368),b=a.setImmediate,E=a.clearImmediate,T=a.process,S=a.Dispatch,_=a.Function,A=a.MessageChannel,w=a.String,L=0,k={},R="onreadystatechange";u((function(){r=a.location}));var C=function(t){if(h(k,t)){var e=k[t];delete k[t],e()}},I=function(t){return function(){C(t)}},P=function(t){C(t.data)},x=function(t){a.postMessage(w(t),r.protocol+"//"+r.host)};b&&E||(b=function(t){m(arguments.length,1);var e=d(t)?t:_(t),i=p(arguments,1);return k[++L]=function(){l(e,void 0,i)},s(L),L},E=function(t){delete k[t]},y?s=function(t){T.nextTick(I(t))}:S&&S.now?s=function(t){S.now(I(t))}:A&&!v?(o=(n=new A).port2,n.port1.onmessage=P,s=c(o.postMessage,o)):a.addEventListener&&d(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!u(x)?(s=x,a.addEventListener("message",P,!1)):s=R in g("script")?function(t){f.appendChild(g("script"))[R]=function(){f.removeChild(this),C(t)}}:function(t){setTimeout(I(t),0)}),t.exports={set:b,clear:E}},7603:(t,e,i)=>{"use strict";var r=i(9358);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},7694:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7717:(t,e,i)=>{"use strict";var r=i(2681),s=i(3984),n=r.WeakMap;t.exports=s(n)&&/native code/.test(String(n))},7735:(t,e,i)=>{"use strict";i(8744)("unscopables")},7744:t=>{var e="expire_mixin";t.exports=function(){var t=this.createStore(this.storage,null,this._namespacePrefix+e);return{set:function(i,r,s,n){return this.hasNamespace(e)||t.set(r,n),i()},get:function(t,r){return this.hasNamespace(e)||i.call(this,r),t()},remove:function(i,r){return this.hasNamespace(e)||t.remove(r),i()},getExpiration:function(e,i){return t.get(i)},removeExpiredKeys:function(t){var e=[];this.each((function(t,i){e.push(i)}));for(var r=0;r{"use strict";var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},7898:(t,e,i)=>{"use strict";var r=i(2692),s=i(1744),n=i(1658),o=Error.captureStackTrace;t.exports=function(t,e,i,a){n&&(o?o(t,e):r(t,"stack",s(i,a)))}},7920:(t,e,i)=>{"use strict";i(7021),i(9034),i(3120),i(2965),i(3459),i(5942),i(451),i(2676),i(4011),i(7095),i(7391);var r=i(3260);t.exports=r.Set},7960:t=>{"use strict";t.exports=function(t){try{var e=new Set,i={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},r=e[t](i);return 1===r.size&&4===r.values().next().value}catch(t){return!1}}},8003:(t,e,i)=>{"use strict";var r=i(3113),s=i(2681),n=i(3606);r({global:!0},{Reflect:{}}),n(s.Reflect,"Reflect",!0)},8078:t=>{"use strict";t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},8109:(t,e,i)=>{"use strict";var r=i(3901),s=i(9065),n=i(140),o=i(1386);t.exports=function(t){var e=r(this),i=o(t);return!(s(e)>i.size)&&!1!==n(e,(function(t){if(!i.includes(t))return!1}),!0)}},8121:(t,e,i)=>{"use strict";var r=i(3113),s=i(8140),n=i(8797),o=i(4672),a=i(328),l=i(8486),c=i(3301),d=i(9208),h="No one promise resolved";r({target:"Promise",stat:!0,forced:d},{any:function(t){var e=this,i=o("AggregateError"),r=a.f(e),d=r.resolve,u=r.reject,f=l((function(){var r=n(e.resolve),o=[],a=0,l=1,f=!1;c(t,(function(t){var n=a++,c=!1;l++,s(r,e,t).then((function(t){c||f||(f=!0,d(t))}),(function(t){c||f||(c=!0,o[n]=t,--l||u(new i(o,h)))}))})),--l||u(new i(o,h))}));return f.error&&u(f.value),r.promise}})},8140:(t,e,i)=>{"use strict";var r=i(7603),s=Function.prototype.call;t.exports=r?s.bind(s):function(){return s.apply(s,arguments)}},8180:t=>{"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},i=this.tail;i?i.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},8196:(t,e,i)=>{"use strict";var r=i(3113),s=i(328);r({target:"Promise",stat:!0,forced:i(1905).CONSTRUCTOR},{reject:function(t){var e=s.f(this);return(0,e.reject)(t),e.promise}})},8222:(t,e,i)=>{"use strict";var r=i(8909),s=i(9358),n=i(3984),o=i(6738),a=i(4672),l=i(6417),c=function(){},d=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,u=r(h.exec),f=!h.test(c),p=function(t){if(!n(t))return!1;try{return d(c,[],t),!0}catch(t){return!1}},g=function(t){if(!n(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!u(h,l(t))}catch(t){return!0}};g.sham=!0,t.exports=!d||s((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?g:p},8242:(t,e,i)=>{"use strict";var r=i(3513),s=i(9358),n=i(4026);t.exports=!r&&!s((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))},8458:(t,e,i)=>{"use strict";var r=i(7603),s=Function.prototype,n=s.apply,o=s.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(n):function(){return o.apply(n,arguments)})},8486:t=>{"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},8516:(t,e,i)=>{"use strict";var r=i(3113),s=i(8140),n=i(8797),o=i(328),a=i(8486),l=i(3301);r({target:"Promise",stat:!0,forced:i(9208)},{allSettled:function(t){var e=this,i=o.f(e),r=i.resolve,c=i.reject,d=a((function(){var i=n(e.resolve),o=[],a=0,c=1;l(t,(function(t){var n=a++,l=!1;c++,s(i,e,t).then((function(t){l||(l=!0,o[n]={status:"fulfilled",value:t},--c||r(o))}),(function(t){l||(l=!0,o[n]={status:"rejected",reason:t},--c||r(o))}))})),--c||r(o)}));return d.error&&c(d.value),i.promise}})},8517:(t,e,i)=>{"use strict";var r=i(3901),s=i(8615),n=i(6891),o=i(1386),a=i(4268),l=s.add,c=s.has,d=s.remove;t.exports=function(t){var e=r(this),i=o(t).getIterator(),s=n(e);return a(i,(function(t){c(e,t)?d(s,t):l(s,t)})),s}},8584:(t,e,i)=>{"use strict";var r=i(6405),s=i(6738);t.exports=r?{}.toString:function(){return"[object "+s(this)+"]"}},8615:(t,e,i)=>{"use strict";var r=i(8909),s=Set.prototype;t.exports={Set,add:r(s.add),has:r(s.has),remove:r(s.delete),proto:s}},8744:(t,e,i)=>{"use strict";var r=i(3260),s=i(9158),n=i(30),o=i(5374).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});s(e,t)||o(e,t,{value:n.f(t)})}},8753:(t,e,i)=>{"use strict";var r=i(9079);t.exports=function(t){return r(t.length)}},8772:t=>{"use strict";t.exports=function(t,e){return{value:t,done:e}}},8797:(t,e,i)=>{"use strict";var r=i(3984),s=i(5778),n=TypeError;t.exports=function(t){if(r(t))return t;throw new n(s(t)+" is not a function")}},8848:(t,e,i)=>{"use strict";var r=i(1182),s=i(1445),n=i(2850),o=i(5630)("species");t.exports=function(t,e){var i,a=r(t).constructor;return void 0===a||n(i=r(a)[o])?e:s(i)}},8909:(t,e,i)=>{"use strict";var r=i(7603),s=Function.prototype,n=s.call,o=r&&s.bind.bind(n,n);t.exports=r?o:function(t){return function(){return n.apply(t,arguments)}}},8968:(t,e,i)=>{"use strict";var r=i(2681).navigator,s=r&&r.userAgent;t.exports=s?String(s):""},8977:(t,e,i)=>{"use strict";var r=i(3113),s=i(8909),n=i(8797),o=i(4857),a=i(3301),l=i(6033),c=i(4634),d=i(9358),h=l.Map,u=l.has,f=l.get,p=l.set,g=s([].push),m=c||d((function(){return 1!==h.groupBy("ab",(function(t){return t})).get("a").length}));r({target:"Map",stat:!0,forced:c||m},{groupBy:function(t,e){o(t),n(e);var i=new h,r=0;return a(t,(function(t){var s=e(t,r++);u(i,s)?g(f(i,s),t):p(i,s,[t])})),i}})},9e3:(t,e,i)=>{"use strict";var r=i(1182),s=i(5656);t.exports=function(t,e,i,n){try{return n?e(r(i)[0],i[1]):e(i)}catch(e){s(t,"throw",e)}}},9034:(t,e,i)=>{"use strict";var r=i(6405),s=i(473),n=i(8584);r||s(Object.prototype,"toString",n,{unsafe:!0})},9046:(t,e,i)=>{"use strict";var r=i(5630),s=i(7096),n=r("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(s.Array===t||o[n]===t)}},9065:(t,e,i)=>{"use strict";var r=i(4253),s=i(8615);t.exports=r(s.proto,"size","get")||function(t){return t.size}},9079:(t,e,i)=>{"use strict";var r=i(4132),s=Math.min;t.exports=function(t){var e=r(t);return e>0?s(e,9007199254740991):0}},9158:(t,e,i)=>{"use strict";var r=i(8909),s=i(4296),n=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return n(s(t),e)}},9208:(t,e,i)=>{"use strict";var r=i(1089),s=i(3831),n=i(1905).CONSTRUCTOR;t.exports=n||!s((function(t){r.all(t).then(void 0,(function(){}))}))},9211:(t,e,i)=>{"use strict";var r=i(4910).IteratorPrototype,s=i(6877),n=i(4103),o=i(3606),a=i(7096),l=function(){return this};t.exports=function(t,e,i,c){var d=e+" Iterator";return t.prototype=s(r,{next:n(+!c,i)}),o(t,d,!1,!0),a[d]=l,t}},9310:(t,e,i)=>{"use strict";i(8744)("hasInstance")},9311:(t,e,i)=>{"use strict";var r=i(4132),s=Math.max,n=Math.min;t.exports=function(t,e){var i=r(t);return i<0?s(i+e,0):n(i,e)}},9358:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},9391:(t,e,i)=>{"use strict";var r=i(8744),s=i(7345);r("toPrimitive"),s()},9527:(t,e,i)=>{"use strict";i(8744)("isConcatSpreadable")},9666:(t,e,i)=>{"use strict";var r=i(3984),s=i(6683),n=i(5330);t.exports=function(t,e,i){var o,a;return n&&r(o=e.constructor)&&o!==i&&s(a=o.prototype)&&a!==i.prototype&&n(t,a),t}},9678:(t,e,i)=>{"use strict";var r=i(6738),s=i(4717),n=i(2850),o=i(7096),a=i(5630)("iterator");t.exports=function(t){if(!n(t))return s(t,a)||s(t,"@@iterator")||o[r(t)]}},9712:(t,e,i)=>{"use strict";i(8744)("split")}},e={};function i(r){var s=e[r];if(void 0!==s)return s.exports;var n=e[r]={exports:{}};return t[r].call(n.exports,n,n.exports,i),n.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};i.r(t),i.d(t,{createStorage:()=>yt}),i(2597),i(3034),i(2044),i(4602),i(4689),i(3978),i(7920),i(1916),i(6849);class e{get smartAutoPlay(){return this.instance.inSmartAutoPlay}constructor(t){this.instance=t,this.video={currentTime:0},this.analytics={player:{options:{id:this.instance.config.id}}},this.instance.addEventListener("video:timeupdate",(t=>{this.video.currentTime=t.detail.time}))}on(t,e){"timeupdate"===t&&this.instance.addEventListener("video:timeupdate",(t=>{e(t.detail.time)}))}}class r{constructor(){this.doc=document,this.instances=[],this.win=window,this.obeserveInstances()}obeserveInstances(){const t=new Set;this.doc.addEventListener("player:ready",(i=>{if(t.has(i.detail.player))return;t.add(i.detail.player);const r=new e(i.detail.player);this.instances.push(r)}))}}r.smartplayer=new r;const s=()=>{window.smartplayer||(console.log("ApiCompat: loaded"),window.smartplayer=r.smartplayer)};var n;function o({prefix:t,suffix:e}={}){if(void 0!==window.crypto&&"function"==typeof window.crypto.randomUUID)return`${null!=t?t:""}${window.crypto.randomUUID()}${null!=e?e:""}`;const i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}));return`${null!=t?t:""}${i}${null!=e?e:""}`}document.addEventListener("DOMContentLoaded",s),window.addEventListener("load",s),"complete"===document.readyState&&s(),function(t){t.ANALYTICS_SEND_EVENT="analytics:send-event",t.ANALYTICS_STARTED="analytics:started",t.CALLACTION_ACTIVE="callaction:active",t.CALLACTION_ELEMENTS_CHANGED="callaction:elements-changed",t.CALLACTION_CONNECTED="callaction:connected",t.CONTROL_BAR_CLOSER="control-bar:closer",t.CONTROLS_ACTIVE="controls:active",t.CONTROLS_INACTIVE="controls:inactive",t.CONTROLS_ITEMS="controls:items",t.CONVERSION_TRACKING_DISABLED="conversion-tracking:disabled",t.CONVERSION_TRACKING_ENABLED="conversion-tracking:enabled",t.CONVERSION_TRACKING_UPDATE="conversion-tracking:update",t.FAKEBAR_ACTIVE="fakebar:active",t.FAKEBAR_INACTIVE="fakebar:inactive",t.FAKEBAR_PROGRESS="fakebar:progress",t.FAKEBAR_WIDTH="fakebar:width",t.FULLSCREEN_ENTER="fullscreen:enter",t.FULLSCREEN_EXIT="fullscreen:exit",t.HEADLINE_ACTIVE="headline:active",t.HEADLINE_CHANGED="headline:changed",t.HEADLINE_INACTIVE="headline:inactive",t.HEADLINE_RENDERED="headline:rendered",t.HLS_FIRST_SEGMENT_LOADED="first-segment-loaded",t.HLS_LEVEL_SWITCHED="level-switched",t.HLS_LEVELS_LOADED="levels-loaded",t.HLS_MOUNT="mount",t.IFRAME_CONNECTED="iframe:connected",t.IFRAME_OPEN_LINK="iframe:open-link",t.LICENSE_ALLOWED="license:allowed",t.LICENSE_DENIED="license:denied",t.LICENSE_ERROR="license:error",t.MINIHOOK_ACTIVE="minihook:active",t.MINIHOOK_INACTIVE="minihook:inactive",t.MINIHOOK_ITEMS="minihook:items",t.PITCH_TIME="pitch:time",t.PLAYER_BLOCKED="player:blocked",t.PLAYER_CONFIG_UPDATED="player:config-updated",t.PLAYER_EXIT_CLICK="player:exit-click",t.PLAYER_OFFLINE="player:offline",t.PLAYER_ONLINE="player:online",t.PLAYER_READY="player:ready",t.PLAYER_RESIZE="player:resize",t.PLAYER_UNBLOCKED="player:unblocked",t.PRELOAD_EXPIRED="preload:expired",t.PRELOAD_REMOVED="preload:removed",t.RESUME_ACTIVE="resume:active",t.RESUME_CONTINUE="resume:continue",t.RESUME_INACTIVE="resume:inactive",t.RESUME_RESTART="resume:restart",t.SMARTAUTOPLAY_ACTIVE="smartautoplay:active",t.SMARTAUTOPLAY_INACTIVE="smartautoplay:inactive",t.SMARTAUTOPLAY_PLAY="smartautoplay:play",t.SMARTAUTOPLAY_PROBE_SUCCESS="smartautoplay:probe-success",t.SMARTAUTOPLAY_SELECTED="smartautoplay:selected",t.SMARTAUTOPLAY_VIDEO_READY="smartautoplay:video-ready",t.SUBTITLE_ACTIVE="subtitle:active",t.SUBTITLE_CONFIG_CHANGE="subtitle:config-change",t.SUBTITLE_INACTIVE="subtitle:inactive",t.SUBTITLE_TRACK_CHANGE="subtitle:track-change",t.TURBO_ACTIVE="turbo:active",t.TURBO_INACTIVE="turbo:inactive",t.TURBO_SPEED_CHANGED="turbo:speed-changed",t.TURBO_TYPE="turbo:type",t.URL_INJECTION="url-injection",t.VIDEO_CANPLAY="video:canplay",t.VIDEO_CANPLAYTHROUGH="video:canplaythrough",t.VIDEO_ENDED="video:ended",t.VIDEO_FORWARD="video:forward",t.VIDEO_LOADEDDATA="video:loadeddata",t.VIDEO_LOADEDMETADATA="video:loadedmetadata",t.VIDEO_PAUSE="video:pause",t.VIDEO_PLAY="video:play",t.VIDEO_PLAYING="video:playing",t.VIDEO_PROGRESS="video:progress",t.VIDEO_READY="video:ready",t.VIDEO_REWIND="video:rewind",t.VIDEO_SPEEDCHANGE="video:speedchange",t.VIDEO_TIMEUPDATE="video:timeupdate",t.VIDEO_TIMEUPDATE_MS="video:timeupdate-ms",t.VIDEO_VOLUMECHANGE="video:volumechange",t.VIDEO_WAITING="video:waiting"}(n||(n={}));class a extends Error{constructor(t,e,i,r,s="4.2.0.1",n){super(t),this.module=e,this.traceId=i,this.spanId=r,this.playerVersion=s,this.metadata=n}}const l=new class{constructor(){this.traceId=null,this.contexts={},this.sentryKey="c66faa8e28e47bb7a9baa128334e4b48",this.sentryUrl="https://sentry.io/api/4509130195468288/envelope/"}send(t){this.request(t)}stackToFrame(t){const e=/at (.*) \((.*):(\d+):(\d+)\)/;return t.split("\n").map((t=>{const i=t.match(e);if(!i)return null;const[,r,s,n,o]=i;return{colno:parseInt(o),filename:s,function:r,in_app:!0,lineno:parseInt(n)}})).filter((t=>null!==t))}buildEnvelope(t){var e;const i=new Date,r=i.getTime()/1e3,s=o();return`${JSON.stringify({event_id:s,sdk:{name:"smartplayer",version:t.playerVersion},sent_at:i.toISOString(),trace:{environment:"production",public_key:this.sentryKey,trace_id:this.traceId}})}\n${JSON.stringify({type:"event"})}\n${JSON.stringify({contexts:Object.assign(Object.assign(Object.assign({},this.deviceContext()),this.gpuContext()),{state:{type:"smartplayer",value:t.metadata}}),environment:"production",event_id:s,exception:[{module:t.module,stacktrace:{frames:this.stackToFrame(t.stack||""),rawstacktrace:t.stack},value:t.message}],level:"error",logger:"smartplayer",platform:"javascript",release:`smartplayer@${t.playerVersion}`,request:{headers:{"User-Agent":navigator.userAgent},url:window.location.href},sdk:{integrations:["Logger"],name:"smartplayer",version:t.playerVersion},timestamp:r,transaction:t.module||"unknown",user:{id:null===(e=t.metadata)||void 0===e?void 0:e.oid,ip_address:"{{auto}}"}})}`}deviceContext(){var t,e;return this.contexts.device||(this.contexts.device={device:{arch:navigator.platform,device_type:/Mobi|Android|iPhone|iPad|Windows Phone/i.test(navigator.userAgent)?"Handheld":"Desktop",family:navigator.platform,language:navigator.language,manufacturer:navigator.vendor||void 0,memory_size:navigator.deviceMemory?1024*navigator.deviceMemory*1024*1024:void 0,model:navigator.userAgent.split(/[()]/)[1],name:navigator.userAgent,online:navigator.onLine,orientation:(null===(e=null===(t=window.screen.orientation)||void 0===t?void 0:t.type)||void 0===e?void 0:e.includes("portrait"))?"portrait":"landscape",processor_count:navigator.hardwareConcurrency,screen_density:window.devicePixelRatio,screen_height_pixels:window.screen.height,screen_resolution:`${window.screen.width}x${window.screen.height}`,screen_width_pixels:window.screen.width,supports_accelerometer:"DeviceMotionEvent"in window,supports_audio:"AudioContext"in window,supports_gyroscope:"DeviceOrientationEvent"in window,supports_location_service:"geolocation"in navigator,supports_vibration:"vibrate"in navigator,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}}),this.contexts.device}gpuContext(){return this.contexts.gpu||(this.contexts.gpu={gpu:{api_type:window.WebGLRenderingContext?"WebGL":"Unknown",memory_size:null,multi_threaded_rendering:!1,name:(()=>{const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)return"Unknown";const i=e.getExtension("WEBGL_debug_renderer_info");return i?e.getParameter(i.UNMASKED_RENDERER_WEBGL):"Unknown"})(),npot_support:document.createElement("canvas").getContext("webgl")?"Full":"Unknown",vendor_name:(()=>{const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)return"Unknown";const i=e.getExtension("WEBGL_debug_renderer_info");return i?e.getParameter(i.UNMASKED_VENDOR_WEBGL):"Unknown"})(),version:(()=>{const t=document.createElement("canvas").getContext("webgl");return t?t.getParameter(t.VERSION):"Unknown"})()}}),this.contexts.gpu}request(t){const e=new XMLHttpRequest;e.open("POST",this.sentryUrl,!0),e.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),e.setRequestHeader("X-Sentry-Auth",`Sentry sentry_version=7, sentry_key=${this.sentryKey}, sentry_client=smartplayer/4.1.0`),e.withCredentials=!1,e.send(this.buildEnvelope(t))}};let c;class d{constructor(t,e,i,r,s){this.spanId=o(),this.traceId=t,this.level=e,this.message=i,this.attributes=r,this.reference=s}render(){"error"===this.level&&l.send(this.renderError()),"debug"===this.level&&f("debug",this.message)?this.debug():"info"===this.level&&f("info",this.message)?this.info():"warn"===this.level&&f("warn",this.message)?this.warn():"error"===this.level&&f("error",this.message)?this.error():"trace"===this.level&&f("trace",this.message)&&this.trace()}renderMessage(){const t=[`${this.prettyLevel()} ${this.message}`];return this.attributes&&t.push(this.attributes),t}debug(){console.debug(...this.renderMessage())}error(){console.error(...this.renderMessage())}extractMetadataFromReference(t){var e,i;if(!t)return{};let r=t;return(null==r?void 0:r.player)&&(r=r.player),(null==r?void 0:r.config)?{config:r.config,device_id:null===(e=r.analytics)||void 0===e?void 0:e.deviceId,oid:r.config.oid,player_id:r.config.id,session_id:null===(i=r.analytics)||void 0===i?void 0:i.sessionId}:{}}info(){console.info(...this.renderMessage())}prettyLevel(){const t=this.level.toUpperCase();return`${{debug:{color:"",description:"Detailed debug information"},error:{color:"",description:"Critical errors"},info:{color:"",description:"General information"},trace:{color:"",description:"Detailed tracing"},warn:{color:"",description:"Important warnings"}}[this.level].color}[${t}]: `}renderError(){const t=this.traceId,e="4.2.0.1";let i;try{i=this.extractMetadataFromReference(this.reference)}catch(t){i={}}try{const r=this.message,s=/^\[(.*)\]|^(\w+):\s/g.exec(r);return new a(r,(null==s?void 0:s[1])||(null==s?void 0:s[2])||"",t,this.spanId,e,i)}catch(r){return new a(this.message,"Undefined",t,this.spanId,e,i)}}trace(){console.debug(...this.renderMessage())}warn(){console.warn(...this.renderMessage())}}class h{constructor(t,e){this.named=t,this.traceId=o(),this.reference=e;const i=new URL(window.location.href).searchParams.get("logLevel");i&&(h.level=i)}debug(t,e){new d(this.traceId,"debug",this.prefixedMessage(t),e,this.reference).render()}error(t,e){new d(this.traceId,"error",this.prefixedMessage(t),e,this.reference).render()}group(t,e){return new u(this.traceId,t,this.prefixedMessage(e),this.reference)}groupDebug(t){return this.group("debug",this.prefixedMessage(t))}groupError(t){return this.group("error",this.prefixedMessage(t))}groupInfo(t){return this.group("info",this.prefixedMessage(t))}groupTrace(t){return this.group("trace",this.prefixedMessage(t))}groupWarn(t){return this.group("warn",this.prefixedMessage(t))}info(t,e){new d(this.traceId,"info",this.prefixedMessage(t),e,this.reference).render()}trace(t,e){new d(this.traceId,"trace",this.prefixedMessage(t),e,this.reference).render()}warn(t,e){new d(this.traceId,"warn",this.prefixedMessage(t),e,this.reference).render()}prefixedMessage(t){return this.named?`${this.named}: ${t}`:t}}h.level="warn";class u{constructor(t,e,i,r){this.traceId=t,this.reference=r,this.logMessage=new d(t,e,i,r),this.children=[]}addMessage(t,e,i){return this.children.push(new d(this.traceId,t,e,i,this.reference)),this}debug(t,e){return this.addMessage("debug",t,e)}end(){this.children.length>0?this.render():this.logMessage.render()}error(t,e){return this.addMessage("error",t,e)}info(t,e){return this.addMessage("info",t,e)}render(){f(this.logMessage.level,this.logMessage.message)&&(console.groupCollapsed(...this.logMessage.renderMessage()),this.children.forEach((t=>t.render())),console.groupEnd())}trace(t,e){return this.addMessage("trace",t,e)}warn(t,e){return this.addMessage("warn",t,e)}}function f(t,e){var i;const r=["trace","debug","info","warn","error"],s=r.indexOf(t),n=r.indexOf(h.level);if(void 0===c&&(null===(i=null===location||void 0===location?void 0:location.search)||void 0===i?void 0:i.includes("logMatch"))){const t=location.search.match(/logMatch=([^&]*)/);c=t?new RegExp(decodeURIComponent(t[1]),"i"):null}else void 0===c&&(c=null);return s>=n&&(!c||!e||c.test(e))}class p{get config(){return this.player.config}constructor(t){this.player=t,this.mounted=!1,this.logger=new h(this.constructor.controllerName),this.player.addController(this)}hostConnected(){this.checkRequirements()&&(this.init(),this.mount())}hostUpdated(){!this.mounted&&this.checkRequirements()&&(this.init(),this.mount())}init(){this.logger.error("method not implemented")}checkRequirements(){return this.logger.trace("checking requirements"),this.constructor.requirements.every((t=>t(this.player)))}mount(){this.mounted=!0}}p.controllerName="PlayerController",p.requirements=[];var g=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))};class m extends p{constructor(){super(...arguments),this.hasSmartAutoplayActive=!1,this.isDestroyed=!1,this.isProbing=!1,this.probeAttempts=0,this.probeConfig={enabled:!0,maxAttempts:10,probeInterval:2e3,probeTimeout:1e3,triggerEvents:["scroll","click","keydown","touchstart"]},this.probeIntervalId=null,this.probeVideo=null,this.userInteractionDetected=!1,this.onSmartAutoplayActive=()=>{this.hasSmartAutoplayActive=!0,this.logger.trace("SmartAutoPlay activated, probe controller ready"),this.userInteractionDetected&&this.startProbing()},this.onSmartAutoplayInactive=()=>{this.hasSmartAutoplayActive=!1,this.logger.trace("SmartAutoPlay deactivated, stopping probes"),this.stopProbing()},this.onUserInteraction=()=>{this.userInteractionDetected||(this.userInteractionDetected=!0,this.logger.trace("User interaction detected, starting probes"),this.startProbing())}}destroy(){var t;this.isDestroyed=!0,this.logger.debug("Destroying BackgroundAutoplayProbeController"),this.stopProbing(),this.player.removeEventListener(n.SMARTAUTOPLAY_ACTIVE,this.onSmartAutoplayActive),this.player.removeEventListener(n.SMARTAUTOPLAY_INACTIVE,this.onSmartAutoplayInactive),null===(t=this.probeConfig.triggerEvents)||void 0===t||t.forEach((t=>{document.removeEventListener(t,this.onUserInteraction)})),this.probeVideo&&this.probeVideo.parentNode&&(this.probeVideo.pause(),this.probeVideo.src="",this.probeVideo.parentNode.removeChild(this.probeVideo),this.probeVideo=null)}getStats(){return{hasSmartAutoplayActive:this.hasSmartAutoplayActive,isDestroyed:this.isDestroyed,isProbing:this.isProbing,maxAttempts:this.probeConfig.maxAttempts,probeAttempts:this.probeAttempts,userInteractionDetected:this.userInteractionDetected}}init(){var t,e;this.probeConfig.enabled?(this.logger.debug("Initializing BackgroundAutoplayProbeController"),this.probeVideo=this.createProbeVideo(),document.body.appendChild(this.probeVideo),this.logger.debug("Probe video element created",{target:this.player}),this.player.addEventListener(n.SMARTAUTOPLAY_ACTIVE,this.onSmartAutoplayActive),this.player.addEventListener(n.SMARTAUTOPLAY_INACTIVE,this.onSmartAutoplayInactive),this.logger.debug("Listening for user interaction events",{events:this.probeConfig.triggerEvents}),null===(t=this.probeConfig.triggerEvents)||void 0===t||t.forEach((t=>{document.addEventListener(t,this.onUserInteraction,{once:!1,passive:!0})})),null===(e=this.player.controllers.analytics)||void 0===e||e.metric("background_autoplay_probe.initialized",1)):this.logger.debug("Background autoplay probe disabled")}updateConfig(t){this.probeConfig=Object.assign(Object.assign({},this.probeConfig),t),this.logger.debug("Background autoplay probe config updated",this.probeConfig)}attemptProbe(){return g(this,void 0,void 0,(function*(){var t,e;if(!this.probeVideo||this.isDestroyed)return!1;try{this.logger.trace("Attempting autoplay probe"),this.probeVideo.currentTime=0;const e=this.probeVideo.play(),i=new Promise(((t,e)=>{setTimeout((()=>e(new Error("Probe timeout"))),this.probeConfig.probeTimeout)}));return yield Promise.race([e,i]),this.logger.info("Background autoplay probe succeeded - audio autoplay is now possible"),null===(t=this.player.controllers.analytics)||void 0===t||t.metric("background_autoplay_probe.success",1),!0}catch(t){const i=t.message;return i.includes("no supported sources")||i.includes("NotSupportedError")?(this.logger.trace("No supported sources, but autoplay not blocked - treating as success"),null===(e=this.player.controllers.analytics)||void 0===e||e.metric("background_autoplay_probe.success",1),!0):(this.logger.trace("Background autoplay probe failed",{error:i}),!1)}}))}createProbeVideo(){const t=document.createElement("video");return t.style.position="fixed",t.style.top="-1px",t.style.left="-1px",t.style.width="1px",t.style.height="1px",t.style.opacity="0",t.style.pointerEvents="none",t.style.zIndex="9",t.style.backgroundColor="transparent",t.style.display="block",t.style.objectFit="fill",t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1"),t.src="https://cdn.converteai.net/1.mp4",t.loop=!1,t.muted=!1,t.playsInline=!0,t}performProbe(){return g(this,void 0,void 0,(function*(){var t,e;if(this.isProbing&&!this.isDestroyed)return this.probeAttempts++,this.probeAttempts>(null!==(t=this.probeConfig.maxAttempts)&&void 0!==t?t:10)?(this.logger.trace("Max probe attempts reached, stopping"),null===(e=this.player.controllers.analytics)||void 0===e||e.metric("background_autoplay_probe.max_attempts_reached",1),void this.stopProbing()):void((yield this.attemptProbe())&&this.hasSmartAutoplayActive&&(this.logger.info("Probe succeeded, triggering SmartAutoPlay audio play"),this.player.dispatchEvent(new CustomEvent(n.SMARTAUTOPLAY_PROBE_SUCCESS))))}))}startProbing(){var t;this.probeConfig.enabled&&!this.isProbing&&this.hasSmartAutoplayActive&&!this.isDestroyed&&(this.isProbing=!0,this.probeAttempts=0,this.logger.trace("Starting background autoplay probing"),null===(t=this.player.controllers.analytics)||void 0===t||t.metric("background_autoplay_probe.started",1),this.performProbe(),this.probeIntervalId=window.setInterval((()=>{this.performProbe()}),this.probeConfig.probeInterval))}stopProbing(){this.probeIntervalId&&(clearInterval(this.probeIntervalId),this.probeIntervalId=null),this.isProbing=!1,this.logger.trace("Stopped background autoplay probing")}}m.controllerName="BackgroundAutoplayProbeController";var v,y=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))},b=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)};class E extends p{constructor(){super(...arguments),v.set(this,{finished:!1,played:!1,resume:!1,smartAutoPlay:!1})}anyBlocker(...t){return t.some((t=>b(this,v,"f")[t]))}anyBlockerAsync(t){return y(this,arguments,void 0,(function*(t,e=100){return new Promise((i=>{const r=setTimeout((()=>{clearInterval(s),clearTimeout(r),i(!1)}),e),s=setInterval((()=>{this.anyBlocker(...t)&&(clearInterval(s),clearTimeout(r),i(!0))}),10)}))}))}block(t){b(this,v,"f")[t]||(this.logger.info(`block ${t}`),b(this,v,"f")[t]=!0,this.player.dispatchEvent(new CustomEvent(n.PLAYER_BLOCKED,{detail:{blocker:t}})),this.player.deepUpdate(),this.logger.debug(`Blocking ${t}`))}init(){this.logger.debug("init");const t=()=>{this.block("played")};this.player.addEventListener(n.SMARTAUTOPLAY_PLAY,t),this.player.addEventListener(n.RESUME_CONTINUE,t),this.player.addEventListener(n.RESUME_RESTART,t)}noneBlocker(...t){return t.every((t=>!b(this,v,"f")[t]))}noneBlockerAsync(t){return y(this,arguments,void 0,(function*(t,e=100){return!(yield this.anyBlockerAsync(t,e))}))}unblock(t){b(this,v,"f")[t]&&(this.logger.info(`unblock ${t}`),b(this,v,"f")[t]=!1,this.player.dispatchEvent(new CustomEvent(n.PLAYER_UNBLOCKED,{detail:{blocker:t}})),this.player.deepUpdate(),this.logger.debug(`Unblocking ${t}`))}}v=new WeakMap,E.controllerName="BlockerController";class T extends p{init(){this.config.canary&&this.config.canary.active&&this.player.controllers.analytics.event("player_canary_view",{player_canary_test_id:this.config.canary.canary_id,player_id:this.config.canary.player_id})}}T.controllerName="CanaryController";var S,_,A=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))},w=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)};class L extends p{constructor(){super(...arguments),S.set(this,1),_.set(this,!1)}awaitPlay(){return A(this,arguments,void 0,(function*(t=5e3){try{const e=Date.now();if(!(yield new Promise((i=>{const r=()=>{this.player.video.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA?i(!0):Date.now()-e>t?i(!1):setTimeout(r,50)};r()}))))throw new Error("Video is not ready to play");return this.play()}catch(t){this.logger.error("Failed to await play",{error:t})}}))}init(){}mute(){try{if(!this.player.ready||!this.player.video)return void this.logger.warn("mute: host not ready");(function(t,e,i,r,s){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?s.call(t,i):s?s.value=i:e.set(t,i)})(this,S,this.player.video.volume,"f"),this.player.video.volume=0,this.player.muted=!0}catch(t){this.logger.error("Failed to mute video",{error:t})}}pause(){try{if(!this.player.ready)return void this.logger.warn("pause: host not ready");this.player.video.pause()}catch(t){this.logger.error("Failed to pause video",{error:t})}}play(){return A(this,void 0,void 0,(function*(){try{if(this.player.controllers.blockers.noneBlocker("played","smartAutoPlay","resume")&&this.player.controllers.blockers.block("played"),!this.player.ready)return void this.logger.warn("play: host not ready");this.logger.info("play"),yield this.player.video.play(),this.logger.debug("play: video played")}catch(t){this.logger.error("Failed to play video",{error:t})}}))}seek(t){try{if(!this.player.ready||!this.player.video)return void this.logger.warn("seek: host not ready");this.player.controllers.blockers.noneBlocker("smartAutoPlay","resume")&&this.player.controllers.blockers.anyBlocker("played")&&this.logger.info("seek",t),this.player.video.currentTime=t,this.player.dispatchEvent(new CustomEvent(n.VIDEO_TIMEUPDATE,{detail:{time:t}})),this.player.dispatchEvent(new CustomEvent(n.VIDEO_TIMEUPDATE_MS,{detail:{time:t}}))}catch(t){this.logger.error("Failed to seek video",{error:t})}}speed(t){try{if(!this.player.ready)return void this.logger.warn("speed: host not ready");this.player.video.playbackRate=t}catch(t){this.logger.error("Failed to set video speed",{error:t})}}toggle(){var t,e,i;try{this.logger.groupDebug("toggle").debug(`#played: ${w(this,_,"f")}`).debug(`video played: ${!!(null===(t=this.player.video)||void 0===t?void 0:t.played)}`).debug(`video paused: ${null===(e=this.player.video)||void 0===e?void 0:e.paused}`).end(),(null===(i=this.player.video)||void 0===i?void 0:i.paused)?this.play():this.pause()}catch(t){this.logger.error("Failed to toggle play/pause",{error:t})}}unmute(){try{if(!this.player.ready||!this.player.video)return void this.logger.warn("unmute: host not ready");w(this,S,"f")<=.05?this.player.video.volume=1:this.player.video.volume=w(this,S,"f"),this.player.muted=!1}catch(t){this.logger.error("Failed to unmute video",{error:t})}}volume(t){try{if(!this.player.ready)return void this.logger.warn("volume: host not ready");t>0&&t>1&&(t/=100),t>0&&this.player.muted&&this.unmute(),this.player.video.volume=t}catch(t){this.logger.error("Failed to set video volume",{error:t})}}}S=new WeakMap,_=new WeakMap,L.controllerName="ControlsController",L.requirements=[({ready:t,video:e})=>t&&!!e];var k=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))};const R={canplay:n.VIDEO_CANPLAY,canplaythrough:n.VIDEO_CANPLAYTHROUGH,loadeddata:n.VIDEO_LOADEDDATA,loadedmetadata:n.VIDEO_LOADEDMETADATA,playing:n.VIDEO_PLAYING,progress:n.VIDEO_PROGRESS,ratechange:n.VIDEO_SPEEDCHANGE,volumechange:n.VIDEO_VOLUMECHANGE,waiting:n.VIDEO_WAITING};class C extends p{constructor(){super(...arguments),this.lastTime=0}init(){return k(this,void 0,void 0,(function*(){this.logger.trace("init",[this.player.video,this.player]),this.videoObserver();try{this.player.video.addEventListener("play",(()=>k(this,void 0,void 0,(function*(){this.logger.groupTrace("Video play").debug(`CustomEvent: ${n.VIDEO_PLAY}`).debug("Video Event: play").debug("Expected Blockers: played").debug(`Blocked: ${yield this.player.controllers.blockers.anyBlockerAsync(["played"])}`).end(),(yield this.player.controllers.blockers.anyBlockerAsync(["played"]))&&(this.logger.info("Video play: dispatching event"),this.player.dispatchEvent(new CustomEvent(n.VIDEO_PLAY)))})))),this.logger.trace("Registered video play event listener"),this.player.video.addEventListener("ended",(()=>k(this,void 0,void 0,(function*(){this.logger.groupTrace("Video ended").debug(`CustomEvent: ${n.VIDEO_ENDED}`).debug("Video Event: ended").debug("Expected Blockers: played").debug(`Blocked: ${yield this.player.controllers.blockers.anyBlockerAsync(["played"])}`).end(),(yield this.player.controllers.blockers.anyBlockerAsync(["played"]))&&(this.logger.info("Video ended: dispatching event"),this.player.dispatchEvent(new CustomEvent(n.VIDEO_ENDED,{detail:{time:this.player.video.currentTime}})))})))),this.logger.trace("Registered video ended event listener");let t=0;this.player.video.addEventListener("timeupdate",(e=>k(this,void 0,void 0,(function*(){var e;if(yield this.player.controllers.blockers.noneBlockerAsync(["played"]))return;const i=this.player.video;this.player.dispatchEvent(new CustomEvent(n.VIDEO_TIMEUPDATE_MS,{detail:{time:i.currentTime}}));const r=Math.floor(null!==(e=i.currentTime)&&void 0!==e?e:0);r!==t&&(t=r,this.player.dispatchEvent(new CustomEvent(n.VIDEO_TIMEUPDATE,{detail:{time:i.currentTime}})))})))),this.logger.trace("Registered video timeupdate event listener"),this.player.video.addEventListener("pause",(()=>k(this,void 0,void 0,(function*(){this.logger.groupTrace("Video paused").debug(`CustomEvent: ${n.VIDEO_PAUSE}`).debug("Video Event: pause").debug("Expected Blockers: played").debug(`Blocked: ${yield this.player.controllers.blockers.anyBlockerAsync(["played"])}`).end(),(yield this.player.controllers.blockers.anyBlockerAsync(["played"]))&&(this.logger.info("Video paused: dispatching event"),this.player.dispatchEvent(new CustomEvent(n.VIDEO_PAUSE,{detail:{time:this.player.video.currentTime}})),this.player.deepUpdate())})))),this.logger.trace("Registered video paused event listener")}catch(t){this.logger.error("Failed to add video event listener",{error:t})}}))}videoObserver(){const t=this.player.video;Object.entries(R).forEach((([e,i])=>{t.addEventListener(e,(()=>{this.logger.info("Video event",e),this.player.dispatchEvent(new CustomEvent(i,{detail:{video:t}}))}))}))}}C.controllerName="EventsController",C.requirements=[({ready:t,video:e})=>t&&!!e];var I=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))};class P extends p{get showing(){return this.player.player.classList.contains("show-controls")}constructor(t){super(t),this.blockClose=!1,this.doc=document,this.hide=()=>{if(this.blockClose||this.player.paused)return;clearTimeout(this.showControlsTimeout);const t=this.player.player;this.logger.debug("hide controls"),t.classList.remove("show-controls"),this.player.dispatchEvent(new CustomEvent(n.CONTROLS_INACTIVE))},this.onFirstPlay=()=>{this.show(),this.player.removeEventListener(n.VIDEO_PLAY,this.onFirstPlay)},this.onKeyBindingBlocker=()=>{this.blockClose=!this.blockClose},this.show=()=>I(this,void 0,void 0,(function*(){try{if(this.player.controllers.blockers.anyBlocker("resume","smartAutoPlay"))return;if(!this.player.controllers.blockers.anyBlocker("played"))return;clearTimeout(this.showControlsTimeout);const t=this.player.player;this.showControlsTimeout=setTimeout((()=>{this.blockClose?this.show():this.hide()}),P.hideTime),t.classList.add("show-controls"),this.player.dispatchEvent(new CustomEvent(n.CONTROLS_ACTIVE))}catch(t){this.logger.error("Error showing controls",t)}})),this.touch=(t,e)=>I(this,void 0,void 0,(function*(){try{this.player.controllers.blockers.anyBlocker("played")&&(t.preventDefault(),t.stopPropagation(),this.player.pauseOneTouch?(e(),this.show()):this.showing?e():this.show())}catch(t){this.logger.error("Error handling touch event",t)}})),this.keyBindingBlocker=function(t,e){let i=0;return r=>{r.key===t[i]?(i++,i===t.length&&(e(),i=0)):i=0}}(["v","c","b"],this.onKeyBindingBlocker)}dispatchCloser(){this.player.dispatchEvent(new CustomEvent(n.CONTROL_BAR_CLOSER))}init(){return I(this,void 0,void 0,(function*(){this.doc.addEventListener("keydown",this.keyBindingBlocker),this.player.addEventListener(n.VIDEO_PLAY,this.onFirstPlay,{once:!0})}))}}P.controllerName="BarController",P.hideTime=3500;class x extends p{constructor(){super(...arguments),this.state={action_buttons:[],analytics_sent_events:[],controls_hide_time:P.hideTime,controls_items:{},current_time:0,default_config:this.player.config,fakebar_active:!1,fakebar_progress:0,fakebar_width:0,headline_active:!1,headline_changed:null,minihook_active:!1,minihook_items:[],resume_action:"",resume_initialized:!1,resume_running:!1,smartautoplay_initialized:!1,smartautoplay_running:!1,smartautoplay_selected:null,subtitle_active:!1,subtitle_config:null,subtitle_multiplier:1,turbo_active:!1,turbo_speed:1,turbo_type:"single",video_duration:0,video_muted:!1,video_playing:!1}}get info(){var t,e,i,r,s,n,o,a,l;return Object.assign(Object.assign({},this.state),{controls_hide_time:P.hideTime,current_time:null===(t=this.player.video)||void 0===t?void 0:t.currentTime,default_config:this.player.config,video_duration:null===(e=this.player.video)||void 0===e?void 0:e.duration,video_height:null===(i=this.player.video)||void 0===i?void 0:i.videoHeight,video_muted:null===(r=this.player.video)||void 0===r?void 0:r.muted,video_playing:!(null===(s=this.player.video)||void 0===s?void 0:s.paused),video_poster:null===(n=this.player.video)||void 0===n?void 0:n.poster,video_src:null===(o=this.player.video)||void 0===o?void 0:o.src,video_volume:null===(a=this.player.video)||void 0===a?void 0:a.volume,video_width:null===(l=this.player.video)||void 0===l?void 0:l.videoWidth})}init(){return function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){}))}}function D(t){return""!==t.canPlayType("application/vnd.apple.mpegURL")}function O(){return/mobile/i.test(window.navigator.userAgent)}function M(){return navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS")||/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||"undefined"!=typeof safari&&safari.pushNotification).toString()}function $(t){return"string"==typeof t&&t.trim().length>0}x.controllerName="FeaturesController";class F extends p{constructor(){super(...arguments),this.doc=document,this.handleFullscreenChange=()=>{this.logger.debug("fullscreen change",{currentFullscreenElement:this.currentFullscreenElement,isFullscreen:this.isFullscreen}),!this.currentFullscreenElement&&this.isFullscreen&&this.cancel()},this.handleOnKeyDown=t=>{"Escape"===t.key&&this.isFullscreen&&this.cancel()}}get currentFullscreenElement(){return this.doc.fullscreenElement||this.doc.mozFullScreenElement||this.doc.msFullscreenElement}get isFullscreen(){var t,e;return null!==(e=null===(t=this.player.player)||void 0===t?void 0:t.classList.contains("in-fullscreen"))&&void 0!==e&&e}active(){var t;this.logger.debug("active fullscreen"),null===(t=this.player.player)||void 0===t||t.classList.add("in-fullscreen"),this.requestFullscreenBrowser(),this.player.dispatchEvent(new CustomEvent(n.FULLSCREEN_ENTER))}cancel(){var t;this.logger.debug("cancel fullscreen"),null===(t=this.player.player)||void 0===t||t.classList.remove("in-fullscreen"),this.cancelFullscreenBrowser(),this.player.dispatchEvent(new CustomEvent(n.FULLSCREEN_EXIT))}cancelAll(){this.cancel()}hostConnected(){super.hostConnected(),this.doc.addEventListener("keydown",this.handleOnKeyDown),this.doc.addEventListener("fullscreenchange",this.handleFullscreenChange),this.doc.addEventListener("mozfullscreenchange",this.handleFullscreenChange),this.doc.addEventListener("msfullscreenchange",this.handleFullscreenChange),this.doc.addEventListener("MSFullscreenChange",this.handleFullscreenChange),this.doc.addEventListener("webkitfullscreenchange",this.handleFullscreenChange)}hostDisconnected(){this.doc.removeEventListener("keydown",this.handleOnKeyDown),this.doc.removeEventListener("fullscreenchange",this.handleFullscreenChange),this.doc.removeEventListener("mozfullscreenchange",this.handleFullscreenChange),this.doc.removeEventListener("msfullscreenchange",this.handleFullscreenChange),this.doc.removeEventListener("MSFullscreenChange",this.handleFullscreenChange),this.doc.removeEventListener("webkitfullscreenchange",this.handleFullscreenChange)}init(){}toggle(){this.isFullscreen?this.cancel():this.active()}cancelFullscreenBrowser(){this.doc.fullscreenElement&&(this.doc.exitFullscreen?this.doc.exitFullscreen():this.doc.mozCancelFullScreen?this.doc.mozCancelFullScreen():this.doc.webkitCancelFullScreen?this.doc.webkitCancelFullScreen():this.doc.msCancelFullScreen?this.doc.msCancelFullScreen():this.doc.msExitFullscreen&&this.doc.msExitFullscreen())}requestFullscreenBrowser(){if(O()||!this.player.player)return;const t=this.player.player;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitEnterFullscreen&&t.webkitEnterFullscreen()}}F.controllerName="FullscreenController",F.requirements=[({player:t,ready:e})=>e&&!!t];class N extends p{constructor(){super(...arguments),this.doc=document,this.lastTime=0,this.visibilityChange=()=>{var t;this.player.ready&&this.player.video&&this.player.controllers.blockers.anyBlocker("played")&&(this.player.controllers.blockers.anyBlocker("smartAutoPlay","resume")||this.player.config.playback.smartPause&&(this.doc.hidden?(this.player.video.pause(),this.lastTime=null!==(t=this.player.video.currentTime)&&void 0!==t?t:0):(this.player.video.currentTime=this.lastTime,this.player.video.play())))}}init(){return function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){this.logger.groupTrace("init").debug("detail",{player:this.player,video:this.player.video}).end(),this.doc.addEventListener("visibilitychange",this.visibilityChange)}))}}function U(t,e){if(!t)return null;if("closest"in t)return t.closest(e);const i=t;if("function"==typeof i.matches&&i.matches(e))return i;let r=i.parentElement;for(;r;){if("function"==typeof r.matches&&r.matches(e))return r;r=r.parentElement}return null}N.controllerName="HiddenPlayerController",N.requirements=[({ready:t,video:e})=>t&&!!e];const B=["vturb-smartplayer",".callaction__html",".callaction__button"];class V extends p{constructor(){super(...arguments),this.updaters=[],this.win=window,this.urlInjection=t=>{this.logger.groupTrace("urlInjection").debug("detail",t.detail).end(),this.updaters.push(t.detail.updater)}}init(){return function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){this.baseSearchParams=new URLSearchParams(this.win.location.search),this.baseSearchParams.delete("vl"),this.updaters.push(((t,e)=>{try{if(!e||!B.some((t=>U(e,t))))return t;const i=new URL(t,this.win.location.href);return this.baseSearchParams.forEach(((t,e)=>{i.searchParams.set(e,t)})),i.toString()}catch(e){return this.logger.error("Failed to update URL",{error:e}),t}})),this.player.addEventListener(n.URL_INJECTION,this.urlInjection),this.logger.debug("init",{player:this.player,video:this.player.video})}))}}V.controllerName="LinksController";class G extends p{constructor(){super(...arguments),this.currentPitchTime=null,this.playerConfigUpdated=t=>{try{this.logger.groupTrace("playerConfigUpdated").debug("pitchTime",t.detail.player.config.pitchTime).end();const e=t.detail.player.config.pitchTime;if(this.currentPitchTime===e||!e||0===e)return;this.currentPitchTime=e,this.player.removeEventListener(n.VIDEO_TIMEUPDATE_MS,this.currentCallback),this.currentCallback=t=>{t.detail.time>=e&&this.player.played&&(this.player.dispatchEvent(new CustomEvent(n.PITCH_TIME,{detail:{player:this.player}})),this.player.removeEventListener(n.VIDEO_TIMEUPDATE_MS,this.currentCallback))},this.player.addEventListener(n.VIDEO_TIMEUPDATE_MS,this.currentCallback)}catch(t){this.logger.error("Failed to update pitch time",{error:t})}},this.currentCallback=()=>{}}init(){return function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){this.player.addEventListener(n.PLAYER_CONFIG_UPDATED,this.playerConfigUpdated)}))}}G.controllerName="PitchTimeController";class H extends p{constructor(){super(...arguments),this.callActionSelector=".smartplayer-scroll-event, .smartplayer-call-action, .callaction__button",this.delay=700,this.doc=document}init(){this.logger.debug("init"),this.player.config.playback.active&&(this.player.config.playback.actionAfterFinish&&"loop"===this.player.config.playback.actionAfterFinish.type&&this.setActionAfterFinishLoop(this.player.config.playback.actionAfterFinish),this.player.config.playback.scrollToActionIn&&this.setScrollToActionIn(this.player.config.playback.scrollToActionIn))}setActionAfterFinishLoop(t){this.logger.debug("setActionAfterFinishLoop"),this.player.addEventListener(n.VIDEO_ENDED,(()=>function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){var e,i;this.logger.info("video ended",{action:t}),this.player.controls.seek(null!==(i=null===(e=t.properties)||void 0===e?void 0:e.start)&&void 0!==i?i:0),yield this.player.controls.awaitPlay()}))))}setScrollToActionIn(t){this.logger.info("setScrollToActionIn",{scrollToActionIn:t});const e=i=>{i.detail.time>=t&&(this.player.controllers.fullscreen.cancelAll(),setTimeout((()=>{const t=[...Array.from(this.doc.querySelectorAll(this.callActionSelector)),...Array.from(this.player.querySelectorAll(this.callActionSelector))];if(t.length>0){const e=t[0].getBoundingClientRect();this.logger.info("scrollToActionIn",{position:e,element_scrolled:t[0],elements:t}),window.scrollTo({behavior:"smooth",left:e.left+window.scrollX,top:e.top+window.scrollY-window.innerHeight/2})}else this.logger.warn("no call action button found",{queryResult:t})}),this.delay),this.player.removeEventListener(n.VIDEO_TIMEUPDATE,e))};this.player.addEventListener(n.VIDEO_TIMEUPDATE,e)}}function j(t,e,i){var r,s=i||{},n=s.noTrailing,o=void 0!==n&&n,a=s.noLeading,l=void 0!==a&&a,c=s.debounceMode,d=void 0===c?void 0:c,h=!1,u=0;function f(){r&&clearTimeout(r)}function p(){for(var i=arguments.length,s=new Array(i),n=0;nt?l?(u=Date.now(),o||(r=setTimeout(d?g:p,t))):p():!0!==o&&(r=setTimeout(d?g:p,void 0===d?t-c:t)))}return p.cancel=function(t){var e=(t||{}).upcomingOnly,i=void 0!==e&&e;f(),h=!i},p}H.controllerName="PlaybackController",H.requirements=[({ready:t,video:e})=>t&&!!e];class z extends p{hostDisconnected(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}init(){return function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){this.logger.debug("init");const t=j(100,(()=>{var t,e,i,r;this.logger.debug("resize"),this.player.requestUpdate(),this.player.dispatchEvent(new CustomEvent(n.PLAYER_RESIZE)),this.player.height=null!==(e=null===(t=this.player.player)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,this.player.width=null!==(r=null===(i=this.player.player)||void 0===i?void 0:i.clientWidth)&&void 0!==r?r:0}));this.resizeObserver=new ResizeObserver(t),this.resizeObserver.observe(this.player.player),t()}))}}function K(t,e){if(!t)return null;const i=Math.round(255*e).toString(16).padStart(2,"0");if(t.startsWith("#")){const e=t.replace("#","").replace(/[^0-9A-Fa-f]/g,"");return`#${(e.length<=4?e.slice(0,3).split("").map((t=>t+t)).join(""):e.slice(0,6)).padEnd(6,"0")}${i}`}if(t.startsWith("hsl")){const i=t.match(/hsl\(([^)]+)\)/);if(i)return`hsla(${i[1]} / ${e})`}if(t.startsWith("rgb")){const i=t.match(/\d+/g);if(i&&i.length>=3){const[t,r,s]=i;return`rgba(${t}, ${r}, ${s}, ${e})`}}return t}z.controllerName="ResizerController",z.requirements=[({player:t,ready:e})=>e&&!!t];class Y extends p{init(){}styles(){var t,e,i,r,s,n,o,a,l,c,d,h,u,f,p,g,m,v,y,b,E,T,S,_,A,w,L,k,R,C,I,P,x,D,O,M,$,F;this.player.style.setProperty("--fakebar-background-color",null===(e=null===(t=this.player.config)||void 0===t?void 0:t.fakeBar)||void 0===e?void 0:e.color),this.player.style.setProperty("--fakebar-height",`${(null===(r=null===(i=this.player.config)||void 0===i?void 0:i.fakeBar)||void 0===r?void 0:r.active)?null===(n=null===(s=this.player.config)||void 0===s?void 0:s.fakeBar)||void 0===n?void 0:n.height:0}px`),this.player.style.setProperty("--resume-background-color",null===(a=null===(o=this.player.config)||void 0===o?void 0:o.resume)||void 0===a?void 0:a.backgroundColor),this.player.style.setProperty("--resume-foreground-color",null===(c=null===(l=this.player.config)||void 0===l?void 0:l.resume)||void 0===c?void 0:c.foregroundColor),this.player.style.setProperty("--style-background",null===(h=null===(d=this.player.config)||void 0===d?void 0:d.style)||void 0===h?void 0:h.background),this.player.style.setProperty("--style-background-100",K(null===(f=null===(u=this.player.config)||void 0===u?void 0:u.style)||void 0===f?void 0:f.background,1)),this.player.style.setProperty("--style-background-90",K(null===(g=null===(p=this.player.config)||void 0===p?void 0:p.style)||void 0===g?void 0:g.background,.9)),this.player.style.setProperty("--style-background-80",K(null===(v=null===(m=this.player.config)||void 0===m?void 0:m.style)||void 0===v?void 0:v.background,.8)),this.player.style.setProperty("--style-background-70",K(null===(b=null===(y=this.player.config)||void 0===y?void 0:y.style)||void 0===b?void 0:b.background,.7)),this.player.style.setProperty("--style-background-60",K(null===(T=null===(E=this.player.config)||void 0===E?void 0:E.style)||void 0===T?void 0:T.background,.6)),this.player.style.setProperty("--style-background-50",K(null===(_=null===(S=this.player.config)||void 0===S?void 0:S.style)||void 0===_?void 0:_.background,.5)),this.player.style.setProperty("--style-background-opacity","var(--style-background-80)"),this.player.style.setProperty("--style-foreground",null===(w=null===(A=this.player.config)||void 0===A?void 0:A.style)||void 0===w?void 0:w.foreground),this.player.style.setProperty("--style-foreground-100",K(null===(k=null===(L=this.player.config)||void 0===L?void 0:L.style)||void 0===k?void 0:k.foreground,1)),this.player.style.setProperty("--style-foreground-90",K(null===(C=null===(R=this.player.config)||void 0===R?void 0:R.style)||void 0===C?void 0:C.foreground,.9)),this.player.style.setProperty("--style-foreground-80",K(null===(P=null===(I=this.player.config)||void 0===I?void 0:I.style)||void 0===P?void 0:P.foreground,.8)),this.player.style.setProperty("--style-foreground-70",K(null===(D=null===(x=this.player.config)||void 0===x?void 0:x.style)||void 0===D?void 0:D.foreground,.7)),this.player.style.setProperty("--style-foreground-60",K(null===(M=null===(O=this.player.config)||void 0===O?void 0:O.style)||void 0===M?void 0:M.foreground,.6)),this.player.style.setProperty("--style-foreground-50",K(null===(F=null===($=this.player.config)||void 0===$?void 0:$.style)||void 0===F?void 0:F.foreground,.5)),this.player.style.setProperty("--style-foreground-opacity","var(--style-foreground-80)")}}Y.controllerName="StyleController";const W=(t,e)=>Math.floor(e-t);class q extends p{constructor(){super(...arguments),this.win=window,this.buffering_start_time=null,this.lost_connection_time=null,this.video_segments_loaded=[],this.onBufferingStart=()=>{this.buffering_start_time||(this.buffering_start_time=Date.now(),this.trackBufferingStart())},this.onBufferingEnd=()=>{this.buffering_start_time&&(this.trackBufferingEnd(W(this.buffering_start_time,Date.now())),this.buffering_start_time=null)},this.onLostConnection=()=>{this.lost_connection_time||(this.lost_connection_time=Date.now())},this.onRecoveredConnection=()=>{this.lost_connection_time&&(this.trackLostConnection(W(this.lost_connection_time,Date.now())),this.lost_connection_time=null)}}get pageLoadTime(){return this.win._plt}get timeSincePageLoad(){return W(this.pageLoadTime,Date.now())}init(){this.trackTTPI(),this.player.addEventListener(n.VIDEO_PLAY,(()=>{setTimeout((()=>{this.player.addEventListener(n.VIDEO_WAITING,this.onBufferingStart),this.player.addEventListener(n.VIDEO_CANPLAY,this.onBufferingEnd)}),500)}),{once:!0}),this.player.addEventListener(n.PLAYER_OFFLINE,this.onLostConnection),this.player.addEventListener(n.PLAYER_ONLINE,this.onRecoveredConnection),this.player.addEventListener(n.PLAYER_READY,(()=>this.trackTTMP()),{once:!0})}destroy(){this.player.removeEventListener(n.VIDEO_WAITING,this.onBufferingStart),this.player.removeEventListener(n.VIDEO_CANPLAY,this.onBufferingEnd),this.player.removeEventListener(n.PLAYER_OFFLINE,this.onLostConnection),this.player.removeEventListener(n.PLAYER_ONLINE,this.onRecoveredConnection)}trackTTFF(){try{this.player.controllers.analytics.metric("player.ttff",this.timeSincePageLoad)}catch(t){this.logger.error("Error tracking ttff",t)}}trackTTPI(){try{this.player.controllers.analytics.metric("player.ttpi",this.timeSincePageLoad)}catch(t){this.logger.error("Error tracking ttpi",t)}}trackTTMP(){try{this.player.controllers.analytics.metric("player.ttmp",this.timeSincePageLoad)}catch(t){this.logger.error("Error tracking ttmp",t)}}trackBufferingStart(){try{this.player.controllers.analytics.metric("player.buffering",1)}catch(t){this.logger.error("Error tracking buffering rate",t)}}trackBufferingEnd(t){try{this.player.controllers.analytics.metric("player.buffering_duration",t)}catch(t){this.logger.error("Error tracking buffering end",t)}}trackLostConnection(t){try{this.player.controllers.analytics.metric("player.lost_connection",1),this.player.controllers.analytics.metric("player.lost_connection_duration",t)}catch(t){this.logger.error("Error tracking lost connection",t)}}trackAverageVideoDownload(t){try{this.logger.debug("Tracking video download speed",{segments:[...t]});const e=(t=>{const{size:e,duration:i}=t.reduce(((t,e)=>(t.size+=e.bytes/1e3,t.duration+=e.request.end-e.request.start,t)),{size:0,duration:0});return{size:e/t.length,duration:i/t.length}})(t);this.player.controllers.analytics.metric("player.segment_download_avg_duration_ms",e.duration),this.player.controllers.analytics.metric("player.segment_download_avg_size_kb",e.size)}catch(t){this.logger.error("Error tracking download speed",t)}}trackVideoSegmentLoaded(t){try{this.logger.debug("Tracking video segment",{segment:t}),this.video_segments_loaded.push(t),5===this.video_segments_loaded.length&&this.trackAverageVideoDownload(this.video_segments_loaded)}catch(t){this.logger.error("Error tracking video segment loaded",t)}}}q.controllerName="KPIsController";const X={accountId:"",cache:{hashingMethod:"md5",maxAge:36e5,namespace:"cacheHermes",storage:void 0},debug:!1,dryRun:!1,fetch:{base:"https://a.vturb.net/",beacon:"y",fetch:"x",gif:"g"},queue:{capacity:5e3,interval:5},retry:{fallbackToBeacon:!0,initialDelay:100,limit:3,retryOnResponseStatuses:[400,404,408,500,502,503,504]},unique:!0},Q=function(){var t,e,i;if("undefined"==typeof window||!window.screen)return{};const r=["height","width","colorDepth","pixelDepth","availHeight","availWidth"],s={};for(let e=0;ewindow.innerHeight?"landscape":"portrait"},s};function Z(t,e){var i,r,s,n,o;if(void 0===e)return{};const a=e.body||{},l=e.documentElement||{},c={height:null!==(i=t.innerHeight)&&void 0!==i?i:null===(r=e.documentElement)||void 0===r?void 0:r.offsetHeight,scrollHeight:null!==(s=Math.max(a.scrollHeight,a.offsetHeight,l.clientHeight,l.scrollHeight,l.offsetHeight))&&void 0!==s?s:void 0,width:null!==(n=t.innerWidth)&&void 0!==n?n:null===(o=e.documentElement)||void 0===o?void 0:o.offsetWidth};return t.screen&&(c.ratio={height:t.screen.availHeight?parseFloat((t.innerHeight/t.screen.availHeight).toFixed(2)):void 0,width:t.screen.availWidth?parseFloat((t.innerWidth/t.screen.availWidth).toFixed(2)):void 0}),c}function J(){var t;let e;return document&&"function"==typeof document.querySelector&&(e=document.querySelector('meta[name="description"]')),null!==(t=null==e?void 0:e.getAttribute("content"))&&void 0!==t?t:""}const tt=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","src","sck"],et=function(){return{codeName:navigator.appCodeName,cookies:void 0!==navigator.cookieEnabled&&navigator.cookieEnabled,description:J(),doNotTrack:navigator.doNotTrack,language:navigator.language,name:navigator.appName,online:navigator.onLine,platform:navigator.platform,screen:Q(),useragent:navigator.userAgent,version:navigator.appVersion,window:Z(window,document)}},it=t=>{try{const e=new URLSearchParams(new URL(t).search);return Object.fromEntries(tt.filter((t=>e.has(t))).map((t=>[t,e.get(t)])))}catch(t){return{}}};class rt{constructor(t){this.level=t}debug(t){15&~this.level||console.debug(t)}error(t){1&~this.level||console.error(t)}info(t){7&~this.level||console.log(t)}warn(t){3&~this.level||console.warn(t)}}var st=i(2385),nt=i.n(st),ot=i(7744),at=i.n(ot),lt=i(4839),ct=i.n(lt),dt=i(5712),ht=i.n(dt),ut=i(3495),ft=i.n(ut),pt=i(863),gt=i.n(pt);const mt=[ft(),ht(),gt()],vt=[nt(),at()],yt=(t,e)=>{const i=ct().createStore(mt,vt,t);return{get(t,e){i.removeExpiredKeys();const r=i.get(t,e);return null==r?null:r},instance:i,set:(t,r)=>(i.set(t,r,Date.now()+e),r)}};var bt=i(5978),Et=i.n(bt),Tt=i(3627),St=i.n(Tt);class _t extends(St()){constructor(t={}){var e;super(),this.delayedFlush=j(50,(()=>this.flush()),{debounceMode:!1!==(void 0!==(e={}.atBegin)&&e)}),this.length=0,this.config=Object.assign(Object.assign({},X.queue),t),this.events={},this.interval=0,this.timer=null}add(t){return this.length++,this.events[t.id]=t,this.emit("add",t),this.check(),this}check(){return this.shouldFlushQueue()?this.delayedFlush():this.checkOverQueueCapacity()&&this.flush(),this}checkOverQueueCapacity(){return this.length>=this.config.capacity}flush(){let t=Object.values(this.events);return t=this.filterTimedEvents(t),0===t.length||(this.length=0,this.interval=0,this.events={},this.emit("flush",t)),this}pause(){return"number"==typeof this.timer&&(clearInterval(this.timer),this.timer=null),this}start(){return this.pause(),this.timer=setInterval((()=>{this.interval+=100,this.check()}),100),this}filterTimedEvents(t){let e=null;const i=[];try{return t.forEach((t=>{"timed"===t.event?(!e||t.data.time>e.data.time)&&(e=t):i.push(t)})),e&&i.push(e),i}catch(e){return console.error(e),t}}shouldFlushQueue(){return this.length>0&&this.interval>=this.config.interval}}const At=_t,wt=/^(?:submit|button|image|reset|file)$/i,Lt=/^(?:input|select|textarea|keygen)/i,kt=/(\[[^[\]]*])/g;function Rt(t,e,i){if(0===e.length)return i;const r=e.shift(),s=null==r?void 0:r.match(/^\[(.+?)]$/);if("[]"===r)return t=t||[],Array.isArray(t)?t.push(Rt(null,e,i)):(t._values=t._values||[],t._values.push(Rt(null,e,i))),t;if(!s&&r)t[r]=Rt(t[r],e,i);else if(s&&s[1]){const r=s[1],n=+r;isNaN(n)?(t=t||{})[r]=Rt(t[r],e,i):(t=t||[])[n]=Rt(t[n],e,i)}return t}function Ct(t,e,i){if(e.match(kt))Rt(t,function(t){const e=[],i=new RegExp(kt);let r=/^([^[\]]*)/.exec(t);for(r&&r[1]&&e.push(r[1]);null!==(r=i.exec(t));)e.push(r[1]);return e}(e),i);else{const r=t[e];r?(Array.isArray(r)||(t[e]=[r]),t[e].push(i)):t[e]=i}return t}function It(t,e,i){return i=i.replace(/(\r)?\n/g,"\r\n"),i=(i=encodeURIComponent(i)).replace(/%20/g,"+"),t+(t?"&":"")+encodeURIComponent(e)+"="+i}i(86);let Pt=[];const xt=(t,e)=>{const{cache:i}=t,{hashingMethod:r}=i,s=JSON.stringify(e);return r&&"md5"===r.toLowerCase()?Et()(s):s},Dt={BrowserStorage:t,ListenerCore:(t={domListeners:{}})=>{t.domListeners=t.domListeners||{};class e{constructor(t){this.doc=document,this.win=window,this.selector=t}off(e,i){if(2===arguments.length&&e){const r=[];t.domListeners[e][this.selector].forEach((t=>{t!==i&&t.fn!==i&&r.push(t)})),t.domListeners[e][this.selector]=r}else if(1===arguments.length&&e)try{delete t.domListeners[e][this.selector]}catch(i){t.domListeners[e][this.selector]=[]}else Object.keys(t.domListeners).forEach((e=>{try{delete t.domListeners[e][this.selector]}catch(i){t.domListeners[e][this.selector]=[]}}));return this}on(e,i){return 2!==arguments.length||"string"!=typeof e||"function"!=typeof i||(void 0===t.domListeners[e]&&(function(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):(t.attachEvent||(()=>{console.error("Keen: Unable to attach event listener.")})).call(t,`on${e}`,i)}(this.doc,e,function(e,i,r){return s=>{const n=s||i.event,o=n.target||n.srcElement;void 0!==t.domListeners[r]&&Object.entries(t.domListeners[r]).forEach((([t,s])=>{!function(t,e,i){const r=(e.parentNode||t).querySelectorAll(i);let s=r.length;for(;s--;)if(r[s]===e)return!0;return!1}(e,o,t)?"window"===t&&s.forEach((t=>{t(n)})):s.forEach((t=>{"click"===r&&"A"===o.nodeName?function(t,e,i,r){const s=i.getAttribute("target"),n=r(e);if("boolean"==typeof n&&!1===n||e.defaultPrevented)return e.preventDefault(),e.returnValue=!1,!1;if("_blank"!==s&&"blank"!==s&&!e.metaKey&&!i.hasAttribute("download")&&(e.preventDefault(),e.returnValue=!1,i.href&&"#"!==i.href&&i.href!==t.location+"#"))if(void 0!==n){if("sendBeacon"in navigator)return t.location.href=i.href,!1;n instanceof Promise&&n.then((()=>{t.location.href=i.href})).catch((()=>{t.location.href=i.href}))}else setTimeout((()=>{t.location.href=i.href}),500)}(i,n,o,t):"submit"===r&&"FORM"===o.nodeName?function(t,e,i){const r=i(t);if("boolean"==typeof r&&!1===r||t.defaultPrevented||!1===t.returnValue)return t.preventDefault(),t.returnValue=!1,!1;if(t.preventDefault(),t.returnValue=!1,void 0!==r){if("sendBeacon"in navigator)return e.submit(),!1;r instanceof Promise&&r.then((()=>{e.submit()})).catch((()=>{e.submit()}))}else setTimeout((()=>{e.submit()}),500)}(n,o,t):t(n)}))}))}}(this.doc,this.win,e)),t.domListeners[e]={}),t.domListeners[e][this.selector]=t.domListeners[e][this.selector]||[],t.domListeners[e][this.selector].push(i)),this}once(t,e){const i=(...r)=>(this.off(t,i),e.apply(this,r));return i.fn=e,this.on(t,i),this}}return t=>{if(!t)throw new Error("Selector is required");return new e(t)}},MD5:Et(),Queue:At,SerializeForm:function(t,e){"object"!=typeof e?e={hash:!!e}:void 0===e.hash&&(e.hash=!0);let i=e.hash?{}:"";const r=e.serializer||(e.hash?Ct:It),s=t&&t.elements?t.elements:[],n=Object.create(null);for(let t=0;t-1)continue;if(!e.disabled&&"disabled"in o&&o.disabled||!("name"in o))continue;if(!Lt.test(o.nodeName)||wt.test(o.type))continue;const a=o.name;let l=o.value;if("checkbox"!==o.type&&"radio"!==o.type||o.checked||(l=void 0),e.empty){if("checkbox"!==o.type||o.checked||(l=""),"radio"===o.type&&(n[o.name]||o.checked?o.checked&&(n[o.name]=!0):n[o.name]=!1),null==l&&"radio"==o.type)continue}else if(!l)continue;if("select-multiple"!==o.type&&!o.multiple||!("options"in o))i=r(i,a,l);else{l=[];const t=o.options;let s=!1;for(let n=0;n{this.count++}),1e3),this}value(){return this.count}},Unique:(t,e)=>{const i=Object.assign(Object.assign({},X),t);if(!1===i.unique)return!0;const{cache:r}=i,s=JSON.stringify(e),n=xt(i,s),o={expiryTime:r.maxAge?Date.now()+r.maxAge:void 0,hash:n};return r.storage?((t,e)=>{if(e){const i=e.get(t.hash,!1);if(i&&i.expiryTime&&i.expiryTime>Date.now())return Promise.resolve(!1);e.set(t.hash,t)}return Promise.resolve(!0)})(o,r.storage):(t=>{if(t.expiryTime){const t=Date.now();Pt=Pt.filter((e=>{var i;return null!==(i=e.expiryTime)&&void 0!==i?i:0>t}))}const e=Pt.find((e=>t.hash===e.hash));if(e){if(!(e.expiryTime&&e.expiryTimet.hash!==e.hash))}return Pt.push(t),Promise.resolve(!0)})(o)}};var Ot="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i.g&&i.g||{},Mt="URLSearchParams"in Ot,$t="Symbol"in Ot&&"iterator"in Symbol,Ft="FileReader"in Ot&&"Blob"in Ot&&function(){try{return new Blob,!0}catch(t){return!1}}(),Nt="FormData"in Ot,Ut="ArrayBuffer"in Ot;if(Ut)var Bt=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Vt=ArrayBuffer.isView||function(t){return t&&Bt.indexOf(Object.prototype.toString.call(t))>-1};function Gt(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function Ht(t){return"string"!=typeof t&&(t=String(t)),t}function jt(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return $t&&(e[Symbol.iterator]=function(){return e}),e}function zt(t){this.map={},t instanceof zt?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function Kt(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function Yt(t){return new Promise((function(e,i){t.onload=function(){e(t.result)},t.onerror=function(){i(t.error)}}))}function Wt(t){var e=new FileReader,i=Yt(e);return e.readAsArrayBuffer(t),i}function qt(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function Xt(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:Ft&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Nt&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:Mt&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():Ut&&Ft&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=qt(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Ut&&(ArrayBuffer.prototype.isPrototypeOf(t)||Vt(t))?this._bodyArrayBuffer=qt(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Mt&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Ft&&(this.blob=function(){var t=Kt(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return Kt(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(Ft)return this.blob().then(Wt);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,i,r,s,n=Kt(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,i=Yt(e),r=/charset=([A-Za-z0-9_-]+)/.exec(t.type),s=r?r[1]:"utf-8",e.readAsText(t,s),i;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),i=new Array(e.length),r=0;r-1?r:i),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in Ot)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(s),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var n=/([?&])_=[^&]*/;n.test(this.url)?this.url=this.url.replace(n,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function Jt(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var i=t.split("="),r=i.shift().replace(/\+/g," "),s=i.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(s))}})),e}function te(t,e){if(!(this instanceof te))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new zt(e.headers),this.url=e.url||"",this._initBody(t)}Zt.prototype.clone=function(){return new Zt(this,{body:this._bodyInit})},Xt.call(Zt.prototype),Xt.call(te.prototype),te.prototype.clone=function(){return new te(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new zt(this.headers),url:this.url})},te.error=function(){var t=new te(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var ee=[301,302,303,307,308];te.redirect=function(t,e){if(-1===ee.indexOf(e))throw new RangeError("Invalid status code");return new te(null,{status:e,headers:{location:t}})};var ie=Ot.DOMException;try{new ie}catch(t){(ie=function(t,e){this.message=t,this.name=e;var i=Error(t);this.stack=i.stack}).prototype=Object.create(Error.prototype),ie.prototype.constructor=ie}function re(t,e){return new Promise((function(i,r){var s=new Zt(t,e);if(s.signal&&s.signal.aborted)return r(new ie("Aborted","AbortError"));var n=new XMLHttpRequest;function o(){n.abort()}if(n.onload=function(){var t,e,r={statusText:n.statusText,headers:(t=n.getAllResponseHeaders()||"",e=new zt,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var i=t.split(":"),r=i.shift().trim();if(r){var s=i.join(":").trim();try{e.append(r,s)}catch(t){console.warn("Response "+t.message)}}})),e)};0===s.url.indexOf("file://")&&(n.status<200||n.status>599)?r.status=200:r.status=n.status,r.url="responseURL"in n?n.responseURL:r.headers.get("X-Request-URL");var o="response"in n?n.response:n.responseText;setTimeout((function(){i(new te(o,r))}),0)},n.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},n.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request timed out"))}),0)},n.onabort=function(){setTimeout((function(){r(new ie("Aborted","AbortError"))}),0)},n.open(s.method,function(t){try{return""===t&&Ot.location.href?Ot.location.href:t}catch(e){return t}}(s.url),!0),"include"===s.credentials?n.withCredentials=!0:"omit"===s.credentials&&(n.withCredentials=!1),"responseType"in n&&(Ft?n.responseType="blob":Ut&&(n.responseType="arraybuffer")),e&&"object"==typeof e.headers&&!(e.headers instanceof zt||Ot.Headers&&e.headers instanceof Ot.Headers)){var a=[];Object.getOwnPropertyNames(e.headers).forEach((function(t){a.push(Gt(t)),n.setRequestHeader(t,Ht(e.headers[t]))})),s.headers.forEach((function(t,e){-1===a.indexOf(e)&&n.setRequestHeader(e,t)}))}else s.headers.forEach((function(t,e){n.setRequestHeader(e,t)}));s.signal&&(s.signal.addEventListener("abort",o),n.onreadystatechange=function(){4===n.readyState&&s.signal.removeEventListener("abort",o)}),n.send(void 0===s._bodyInit?null:s._bodyInit)}))}re.polyfill=!0,Ot.fetch||(Ot.fetch=re,Ot.Headers=zt,Ot.Request=Zt,Ot.Response=te);const se="REQUEST_FALLBACK";var ne=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))};const oe=class{constructor(t){this.isReady=!1,this.version="3.0.1",this.config=Object.assign(Object.assign({},X),t),this.browserProfile=et(),this.queue=new At(this.config.queue),this.listeners=Dt.ListenerCore,this.sessionStore=yt("hermes-session",108e5),this.sessionId=this.loadSessionId(),this.deviceStore=yt("hermes-device",31536e6),this.deviceId=this.loadDeviceId(),this.logger=new rt(this.config.debug?15:3),this.browserStore=yt("browser-info",6048e5),this.queue_started=!1}event(t,e,i){return ne(this,void 0,void 0,(function*(){const r={accountId:this.config.accountId,createdAt:null,data:e||{},device:this.deviceId,event:t,id:null,metadata:Object.assign(Object.assign({},this.metadata),this.customMetadata),sessionId:this.sessionId};r.id=xt(this.config,r);const s=yield Dt.Unique(this.config,r);return r.createdAt=Date.now(),s&&(this.config.dryRun?this.logger.debug(`[dryRun] ${JSON.stringify(r)}`):this.queue.add(r)),i&&this.queue.flush(),this}))}getUriWithTrafficParams(t){return this.browserStore.get("uri_with_traffic_params",t)||void 0}saveUriWithTrafficParams(t){t&&(t=>{try{const e=new URLSearchParams(new URL(t).search);let i=!1;return tt.forEach((t=>{e.has(t)&&(i=!0)})),i}catch(t){return!1}})(t)&&this.browserStore.set("uri_with_traffic_params",t)}setup(t){this.uri=t.uri||window.location.href,this.saveUriWithTrafficParams(this.uri),t.uri=this.getUriWithTrafficParams(this.uri),this.customMetadata=t,this.isReady=!0}start(){return this.logger.debug("Starting Hermes v"+this.version),this.setupSystemMetadata(),this.configureEvents(),this.queue.start(),this}useStore(t){return this.config.cache.storage=yt(t,this.config.cache.maxAge),this}flush(t){return ne(this,void 0,void 0,(function*(){try{if("object"==typeof t&&"length"in t&&0===t.length)return;this.logger.info(`Flushing ${t.length} events`),yield function(t,e,i){const r=Object.assign(Object.assign({},X.retry),i||{}),s=r.limit,n=r.initialDelay,o=r.retryOnResponseStatuses,a=r.fallbackToBeacon,l=r.__mockError||null;let c=0;const d={Accept:"application/json","Content-Type":"application/json",Origin:window.location.origin},h=JSON.stringify(e);if(o&&!(o instanceof Array))throw{message:"retryOn property expects an array",name:"ArgumentError"};let u;"undefined"!=typeof AbortController&&(u=new AbortController);const f=new Promise((function(e,r){const f=l?t=>{l(t),e(t)}:e,p=l?t=>{l(t),e(t)}:r,g=function(e){a?navigator.sendBeacon(`${t.base}${t.beacon}`,h)?f(se):p(se):p(e)},m=function(e){const r=Object.assign(Object.assign({},i),{body:h,credentials:"same-origin",headers:d,method:"POST",mode:"cors",signal:null==u?void 0:u.signal});fetch(`${t.base}${t.fetch}`,r).then((function(t){-1===o.indexOf(t.status)?f(t):e>0?v():g(t)})).catch((function(t){if(t.code===DOMException.ABORT_ERR)return p("REQUEST_ABORTED");e>0?v():g(t)}))};function v(){c+=1,setTimeout((function(){m(s-c)}),Math.pow(2,c)*n)}m(s-c)}));return f.abort=()=>{null==u||u.abort()},f}(this.config.fetch,t,this.config.retry)}catch(e){this.logger.error(e),t.forEach((t=>{this.queue.add(t)}))}}))}loadDeviceId(){try{const t=this.deviceStore.get("hermes_device_id",o());return this.deviceStore.set("hermes_device_id",t),t}catch(t){return this.logger.error(t),o()}}loadSessionId(){try{const t=this.sessionStore.get("hermes_session_id",o());return this.sessionStore.set("hermes_session_id",t),t}catch(t){return this.logger.error(t),o()}}setupSystemMetadata(){const t=this.getUriWithTrafficParams(this.uri);this.metadata={event_version:this.version,traffic_origin_params:it(t),uri:t}}configureEvents(){this.queue_started||(this.queue.on("flush",this.flush.bind(this)),this.queue_started=!0),window.addEventListener("beforeunload",(()=>{this.logger.debug("beforeunload"),this.queue.flush()}))}},ae=({search:t,logger:e})=>{try{if(!t.match(/[?&]vl=/))return null;e.debug("Parsing location vl param");const r=new URLSearchParams(t).get("vl");return r&&(i=decodeURIComponent(r),/^(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,}\.[a-z]{2,}\b(.*)$/gi.test(i.trim())||(t=>/^(http:\/\/)?(www\.)?localhost:[0-9]{2,}(.*)$/gi.test(t.trim()))(i.trim())||(t=>/^(https?:\/\/)?(www\.)?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9]+)?(.*)$/gi.test(t.trim()))(i.trim()))?new URL(decodeURIComponent(r)):null}catch(t){return e.error("Error parsing location vl param",t),null}var i};class le{constructor(t,e,i){this.analytics=t,this.window=e,this.logger=i,this.elements=[],this.clickHandler=this.clickHandler.bind(this),this.window.addEventListener("click",this.clickHandler)}clickHandler(t){try{let e=t.target;e=this.findClickableParent(e),this.shouldHandleClickEvent(e)&&this.handleClickEvent(e,this.clickHandler)}catch(t){this.logger.error("Click: Error handling click event",t)}}findClickableParent(t){try{for(;t;){if(["A","BUTTON","INPUT"].includes(t.tagName))return t;t=t.parentElement}return null}catch(t){return this.logger.error("Click: Error finding clickable parent",t),null}}getElements(){return[...this.elements]}handleClickEvent(t,e){if("A"===t.tagName){const i=t.getAttribute("href"),r=this.window.location.href.split("#")[0],s=null==i?void 0:i.split("#")[0];!i||s===r||i.startsWith("#")||i.startsWith("javascript:")||this.handleRegisterClickEvent(e)}else if("BUTTON"===t.tagName)this.handleRegisterClickEvent(e);else if("INPUT"===t.tagName&&"submit"===t.type){const i=t.form;i&&i.action&&this.handleRegisterClickEvent(e)}}handleRegisterClickEvent(t){this.analytics.onPlayerExitClick(),this.window.removeEventListener("click",t)}matches(t,e){const i=Element.prototype,r=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(t){const e=(this.document||this.ownerDocument).querySelectorAll(t);let i=e.length;for(;--i>=0&&e.item(i)!==this;);return i>-1};return r.call(t,e)}shouldHandleClickEvent(t){if(!t)return!1;const e=U(t,".smartplayer-click-event")||this.matches(t,".smartplayer-click-event")||U(t,'[id^="smartplayer-click-event"]')||t.id.startsWith("smartplayer-click-event"),i=t.classList.contains("ignore-click-event");return Boolean(e&&!i)}}var ce=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))};class de extends p{constructor(){super(...arguments),this.alreadySetup=!1,this.lastTimeSent=-1/0,this.timeControlDelay=5,this.win=window,this.eventQueue=[],this.handlePlayerReady=()=>{var t,e,i;if(!this.alreadySetup){this.alreadySetup=!0,this.logger.trace("Setting up Hermes");try{this.player.analytics=new oe({accountId:this.config.oid,debug:"debug"===h.level||"trace"===h.level||this.config.preview,dryRun:this.config.preview,fetch:{base:"https://vt-h-1.b-cdn.net",beacon:"/y",fetch:"/x",gif:"/gif"},queue:{capacity:1e3,interval:10},retry:{fallbackToBeacon:!1,initialDelay:200,limit:5,retryOnResponseStatuses:[400,404,408,500,502,503,504]},unique:!1});const r=ae({logger:this.logger,search:window.location.search})||new URL(window.location.href);null===(t=this.player.analytics)||void 0===t||t.setup({domain:r.hostname,media_id:this.config.video.id,media_type:"video",path:r.pathname,player_id:this.config.id,player_version:"4.2.0.1",uri:r.toString()}),this.logger.trace("Starting Hermes"),null===(e=this.player.analytics)||void 0===e||e.start();try{(null===(i=this.player.logger)||void 0===i?void 0:i.traceId)&&this.event("trace_id",{trace_id:this.player.logger.traceId},!1)}catch(t){this.logger.error("Error sending trace_id",t)}this.event("pageview",null,!0),this.player.dispatchEvent(new CustomEvent(n.ANALYTICS_STARTED))}catch(t){this.logger.error("Error setting up Hermes",t)}}},this.onBeforeUnload=()=>{this.logger.trace("Before unload"),this.eventQueue.length>0&&this.logger.error("Event queue not empty on before unload",{queue:this.eventQueue}),this.player.controllers.blockers.anyBlocker("played")&&this.timed(!0)},this.onPlayerExitClick=()=>{var t,e,i;if(null===(t=this.player.analytics)||void 0===t?void 0:t.isReady){const t=Math.ceil(null!==(i=null===(e=this.player.video)||void 0===e?void 0:e.currentTime)&&void 0!==i?i:0);this.player.analytics.event("clicked",{time:t},!0)}else this.logger.error("Player exit click event sent before analytics is ready")},this.onPreloadExpired=()=>{this.logger.trace("Preload expired"),this.customEvent("preload_expired",null)},this.onVideoEnded=t=>ce(this,void 0,void 0,(function*(){this.logger.trace("Video ended"),this.timed(!1),this.event("finished",null,!0),this.player.removeEventListener(n.VIDEO_ENDED,this.onVideoEnded)})),this.onVideoPause=t=>ce(this,void 0,void 0,(function*(){var t,e,i,r;this.logger.trace("Video pause");const s=Math.round(null!==(e=null===(t=this.player.video)||void 0===t?void 0:t.currentTime)&&void 0!==e?e:0);s<=(null!==(r=null===(i=this.player.video)||void 0===i?void 0:i.duration)&&void 0!==r?r:0)-1&&this.event("paused",{time:s},!0)})),this.onVideoPlay=()=>ce(this,void 0,void 0,(function*(){this.logger.trace("Video play"),this.event("played",null,!1),this.timed(!0),this.player.removeEventListener(n.VIDEO_PLAY,this.onVideoPlay)})),this.onVideoTimeUpdate=t=>{t.detail.time>4&&this.timed(!1)}}customEvent(t,e){this.event(`custom-${t}`,e,!0)}event(t,e){return ce(this,arguments,void 0,(function*(t,e,i=!1){var r,s;if(!(null===(r=this.player.analytics)||void 0===r?void 0:r.isReady))return this.logger.trace("Event queued: ",t),void this.eventQueue.push({type:t,detail:e,force:i});null===(s=this.player.analytics)||void 0===s||s.event(t,e,i),this.player.dispatchEvent(new CustomEvent(n.ANALYTICS_SEND_EVENT,{detail:{detail:e,force:i,type:t}}))}))}init(){var t;try{this.logger.trace("initAnalytics"),this.clickHandler=new le(this,this.win,this.logger),this.player.addEventListener(n.ANALYTICS_STARTED,(()=>{const t=this.eventQueue.length-1;this.eventQueue.forEach(((e,i)=>this.event(e.type,e.detail,i===t))),this.eventQueue=[]}),{once:!0}),this.player.addEventListener(n.VIDEO_ENDED,this.onVideoEnded,{once:!0}),this.player.addEventListener(n.VIDEO_PAUSE,this.onVideoPause),this.player.addEventListener(n.VIDEO_PLAY,this.onVideoPlay,{once:!0}),this.player.addEventListener(n.VIDEO_TIMEUPDATE,this.onVideoTimeUpdate),this.player.addEventListener(n.PLAYER_READY,this.handlePlayerReady,{once:!0}),this.player.addEventListener(n.PLAYER_EXIT_CLICK,this.onPlayerExitClick,{once:!0}),null===(t=this.player.interface)||void 0===t||t.addEventListener(n.PRELOAD_EXPIRED,this.onPreloadExpired,{once:!0}),window.addEventListener("beforeunload",this.onBeforeUnload)}catch(t){this.logger.error("Error initializing analytics",t)}}metric(t,e){this.logger.debug(`${t} Tracking`,e),this.event("metric",{name:t,value:e},!1)}timed(){return ce(this,arguments,void 0,(function*(t=!1){var e,i;try{if(this.player.controllers.blockers.anyBlocker("played")){let r=Math.round(null!==(i=null===(e=this.player.video)||void 0===e?void 0:e.currentTime)&&void 0!==i?i:0);if(r-=r%this.timeControlDelay,r{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new ge(i,t,fe)},ve=ue?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new ge("string"==typeof t?t:t+"",void 0,fe))(e)})(t):t;var ye;const be=window,Ee=be.trustedTypes,Te=Ee?Ee.emptyScript:"",Se=be.reactiveElementPolyfillSupport,_e={toAttribute(t,e){switch(e){case Boolean:t=t?Te:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},Ae=(t,e)=>e!==t&&(e==e||t==t),we={attribute:!0,type:String,converter:_e,reflect:!1,hasChanged:Ae},Le="finalized";class ke extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const r=this._$Ep(i,e);void 0!==r&&(this._$Ev.set(r,i),t.push(r))})),t}static createProperty(t,e=we){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,i,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(r){const s=this[t];this[e]=r,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||we}static finalize(){if(this.hasOwnProperty(Le))return!1;this[Le]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(ve(t))}else void 0!==t&&e.push(ve(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{ue?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),r=he.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=we){var r;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const n=(void 0!==(null===(r=i.converter)||void 0===r?void 0:r.toAttribute)?i.converter:_e).toAttribute(e,i.type);this._$El=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$El=null}}_$AK(t,e){var i;const r=this.constructor,s=r._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=r.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:_e;this._$El=s,this[s]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let r=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||Ae)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var Re;ke[Le]=!0,ke.elementProperties=new Map,ke.elementStyles=[],ke.shadowRootOptions={mode:"open"},null==Se||Se({ReactiveElement:ke}),(null!==(ye=be.reactiveElementVersions)&&void 0!==ye?ye:be.reactiveElementVersions=[]).push("1.6.3");const Ce=window,Ie=Ce.trustedTypes,Pe=Ie?Ie.createPolicy("lit-html",{createHTML:t=>t}):void 0,xe="$lit$",De=`lit$${(Math.random()+"").slice(9)}$`,Oe="?"+De,Me=`<${Oe}>`,$e=document,Fe=()=>$e.createComment(""),Ne=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Ue=Array.isArray,Be=t=>Ue(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),Ve="[ \t\n\f\r]",Ge=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,He=/-->/g,je=/>/g,ze=RegExp(`>|${Ve}(?:([^\\s"'>=/]+)(${Ve}*=${Ve}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ke=/'/g,Ye=/"/g,We=/^(?:script|style|textarea|title)$/i,qe=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),Xe=qe(1),Qe=(qe(2),Symbol.for("lit-noChange")),Ze=Symbol.for("lit-nothing"),Je=new WeakMap,ti=$e.createTreeWalker($e,129,null,!1);function ei(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Pe?Pe.createHTML(e):e}const ii=(t,e)=>{const i=t.length-1,r=[];let s,n=2===e?"":"",o=Ge;for(let e=0;e"===l[0]?(o=null!=s?s:Ge,c=-1):void 0===l[1]?c=-2:(c=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?ze:'"'===l[3]?Ye:Ke):o===Ye||o===Ke?o=ze:o===He||o===je?o=Ge:(o=ze,s=void 0);const h=o===ze&&t[e+1].startsWith("/>")?" ":"";n+=o===Ge?i+Me:c>=0?(r.push(a),i.slice(0,c)+xe+i.slice(c)+De+h):i+De+(-2===c?(r.push(void 0),e):h)}return[ei(t,n+(t[i]||"")+(2===e?"":"")),r]};class ri{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let s=0,n=0;const o=t.length-1,a=this.parts,[l,c]=ii(t,e);if(this.el=ri.createElement(l,i),ti.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=ti.nextNode())&&a.length0){r.textContent=Ie?Ie.emptyScript:"";for(let i=0;i2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Ze}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const s=this.strings;let n=!1;if(void 0===s)t=si(this,t,e,0),n=!Ne(t)||t!==this._$AH&&t!==Qe,n&&(this._$AH=t);else{const r=t;let o,a;for(t=s[0],o=0;o{var r,s;const n=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let o=n._$litPart$;if(void 0===o){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;n._$litPart$=o=new oi(e.insertBefore(Fe(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o};var mi,vi;class yi extends ke{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=gi(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Qe}}yi.finalized=!0,yi._$litElement$=!0,null===(mi=globalThis.litElementHydrateSupport)||void 0===mi||mi.call(globalThis,{LitElement:yi});const bi=globalThis.litElementPolyfillSupport;null==bi||bi({LitElement:yi}),(null!==(vi=globalThis.litElementVersions)&&void 0!==vi?vi:globalThis.litElementVersions=[]).push("3.3.3"),Xe` `,Xe` `;const Ei=Xe` `,Ti=Xe``,Si=Xe``,_i=Xe` `,Ai=Xe` `,wi=Xe` `,Li=Xe` `,ki=Xe` `,Ri=(Xe` `,Xe` `,Xe` `),Ci=Xe` `,Ii=Xe` `,Pi=Xe` `,xi=Xe` `,Di=Xe``,Oi=Xe``,Mi=Xe` `,$i=Xe` `,Fi=Xe` `;function Ni(t){if(t)return t;const e=new URLSearchParams(window.location.search);return null!==e.get("vturbMode")?e.get("vturbMode"):"closed"}const Ui=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:r}=e;return{kind:i,elements:r,finisher(e){customElements.define(t,e)}}})(t,e),Bi=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function Vi(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):Bi(t,e)}function Gi(t){return Vi({...t,state:!0})}const Hi=({finisher:t,descriptor:e})=>(i,r)=>{var s;if(void 0===r){const r=null!==(s=i.originalKey)&&void 0!==s?s:i.key,n=null!=e?{kind:"method",placement:"prototype",key:r,descriptor:e(i.key)}:{...i,key:r};return null!=t&&(n.finisher=function(e){t(e,r)}),n}{const s=i.constructor;void 0!==e&&Object.defineProperty(i,r,e(r)),null==t||t(s,r)}};function ji(t,e){return Hi({descriptor:i=>{const r={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;r.get=function(){var i,r;return void 0===this[e]&&(this[e]=null!==(r=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==r?r:null),this[e]}}return r}})}function zi(t){return Hi({descriptor:e=>({async get(){var e;return await this.updateComplete,null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0})})}var Ki;null===(Ki=window.HTMLSlotElement)||void 0===Ki||Ki.prototype.assignedElements;class Yi extends yi{constructor(){super(),this._reRenderOn=[],this.logger=new h(this.constructor.componentName),this.logger.reference=this}connectedCallback(){var t;super.connectedCallback(),this.logger.traceId=null===(t=this.player.logger)||void 0===t?void 0:t.traceId,this.logger.debug("connectedCallback",{player:this.player}),this.player.registerModule(this),this.constructor.reRenderOn.forEach((t=>{const e=()=>{this.requestUpdate()};this.player.addEventListener(t,e),this._reRenderOn.push({event:t,fn:e})}))}disconnectedCallback(){super.disconnectedCallback(),this.logger.debug("disconnectedCallback",{player:this.player}),this._reRenderOn.forEach((({event:t,fn:e})=>{this.player.removeEventListener(t,e)}))}}Yi.componentName="Base",Yi.reRenderOn=[],Yi.styles=[],function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);n>3&&o&&Object.defineProperty(e,i,o)}([Vi({type:Object})],Yi.prototype,"player",void 0);class Wi extends Yi{createRenderRoot(){return this}}Wi.componentName="Playerable";class qi extends Yi{}qi.componentName="PlayerableShadow",qi.shadowRootOptions={mode:Ni()};const Xi=t=>(...e)=>({_$litDirective$:t,values:e});class Qi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Zi=Xi(class extends Qi{constructor(t){var e;if(super(t),1!==t.type||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,r;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const s=t.element.classList;this.it.forEach((t=>{t in e||(s.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(r=this.nt)||void 0===r?void 0:r.has(t))||(i?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return Qe}}),Ji=me`.bezel{position:absolute;left:0;right:0;top:0;bottom:0;color:var(--bezel-color);pointer-events:none;display:var(--bezel-display);transform:translateY(0);transition:transform var(--base-transition)}.show-controls .bezel{transform:translateY(calc(-50% - (var(--control-padding) * 2 + 1.5rem)/ 2))}.bezel__icon{position:absolute;top:50%;left:50%;margin:calc(var(--bezel-icon-size)/-2) 0 0 calc(var(--bezel-icon-size)/-2);height:var(--bezel-icon-size);width:var(--bezel-icon-size);padding:var(--bezel-icon-padding);box-sizing:border-box;background:var(--bezel-background-color);border-radius:var(--bezel-border-radius);opacity:0;pointer-events:none;fill:var(--bezel-icon-fill)}.bezel__icon svg{width:100%;height:100%}.bezel__icon.bezel-transition{animation:bezel-hide var(--bezel-animation-duration) var(--bezel-animation-timing)}@keyframes bezel-hide{from{opacity:var(--bezel-opacity-start);transform:scale(var(--bezel-scale-start))}to{opacity:var(--bezel-opacity-end);transform:scale(var(--bezel-scale-end))}}.bezel__loading{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);min-width:var(--bezel-loading-min-width);width:var(--bezel-loading-width);max-width:var(--bezel-loading-max-width)}.bezel__loading--hidden{display:none}.bezel__loading svg{width:100%;height:100%}`;var tr=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},er=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))};let ir=class extends Wi{constructor(){super(...arguments),this.icon="",this.loading=!1,this.waitingTimeoutMS=250,this.animateBezel=()=>er(this,void 0,void 0,(function*(){this.logger.debug("animateBezel"),(yield this.iconElement).classList.add("bezel-transition")})),this.onAnimationEnd=()=>er(this,void 0,void 0,(function*(){this.logger.debug("onAnimationEnd"),(yield this.iconElement).classList.remove("bezel-transition")})),this.onForward=()=>{this.logger.debug("onForward"),this.switch("forward"),this.animateBezel()},this.onPause=()=>{this.logger.debug("onPause"),this.switch("pause"),this.animateBezel()},this.onPlay=()=>{this.logger.debug("onPlay"),this.switch("play"),this.animateBezel()},this.onCanPlay=()=>{this.logger.debug("onCanPlay"),this.loading=!1},this.onRewind=()=>{this.logger.debug("onRewind"),this.switch("rewind"),this.animateBezel()},this.onWaiting=()=>{var t;this.logger.debug("onWaiting"),this.loading=!0;const e=(null===(t=this.player.video)||void 0===t?void 0:t.currentTime)||0,i=()=>{var t;this.loading&&((null===(t=this.player.video)||void 0===t?void 0:t.currentTime)&&this.player.video.currentTime>e?(this.logger.debug("onWaiting: loading false"),this.loading=!1):setTimeout(i,this.waitingTimeoutMS))};setTimeout(i,this.waitingTimeoutMS)}}connectedCallback(){super.connectedCallback(),this.player.addEventListener(n.VIDEO_CANPLAY,this.onCanPlay),this.player.addEventListener(n.VIDEO_WAITING,this.onWaiting),this.player.addEventListener(n.VIDEO_PLAY,this.onPlay),this.player.addEventListener(n.VIDEO_PAUSE,this.onPause),this.player.addEventListener(n.VIDEO_FORWARD,this.onForward),this.player.addEventListener(n.VIDEO_REWIND,this.onRewind)}disconnectedCallback(){super.disconnectedCallback(),this.player.removeEventListener(n.VIDEO_CANPLAY,this.onCanPlay),this.player.removeEventListener(n.VIDEO_WAITING,this.onWaiting),this.player.removeEventListener(n.VIDEO_PLAY,this.onPlay),this.player.removeEventListener(n.VIDEO_PAUSE,this.onPause),this.player.removeEventListener(n.VIDEO_FORWARD,this.onForward),this.player.removeEventListener(n.VIDEO_REWIND,this.onRewind)}render(){const t=Zi({"bezel__loading--hidden":!this.loading});return Xe`
${this.icon} ${_i}
`}switch(t){switch(t){case"forward":this.icon=Ri;break;case"pause":this.icon=wi;break;case"play":this.icon=Li;break;case"rewind":this.icon=Ci;break;default:return}}};ir.componentName="Bezel",ir.styles=[Ji],tr([Vi({type:Boolean})],ir.prototype,"_testing",void 0),tr([Gi()],ir.prototype,"icon",void 0),tr([zi(".bezel__icon")],ir.prototype,"iconElement",void 0),tr([Gi()],ir.prototype,"loading",void 0),ir=tr([Ui("vturb-bezel")],ir);const rr="important",sr=" !"+rr,nr=Xi(class extends Qi{constructor(t){var e;if(super(t),1!==t.type||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const r=t[i];return null==r?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ht){this.ht=new Set;for(const t in e)this.ht.add(t);return this.render(e)}this.ht.forEach((t=>{null==e[t]&&(this.ht.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const r=e[t];if(null!=r){this.ht.add(t);const e="string"==typeof r&&r.endsWith(sr);t.includes("-")||e?i.setProperty(t,e?r.slice(0,-11):r,e?rr:""):i[t]=r}}return Qe}}),or=me`.player .bigplay{width:var(--bigplay-base-size);height:var(--bigplay-base-size);border-radius:var(--bigplay-border-radius);padding:var(--bigplay-padding-y) var(--bigplay-padding-x);border:none;background-color:var(--bigplay-background);outline:0;cursor:pointer;box-sizing:border-box;bottom:0;opacity:var(--bigplay-opacity);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:10;transition:transform var(--base-transition)}.player .bigplay.hidden{display:none}.player .bigplay svg{cursor:pointer;width:100%;height:100%}.player.m-w-360 .bigplay{width:var(--bigplay-size-360);height:var(--bigplay-size-360)}.player.m-w-480 .bigplay{width:var(--bigplay-size-480);height:var(--bigplay-size-480)}.player.m-w-550 .bigplay{width:var(--bigplay-size-550);height:var(--bigplay-size-550)}.player.in-resume .bigplay,.player.smartplay .bigplay{display:none!important}.player.show-controls .bigplay{transform:translate(-50%,calc(-50% - (var(--control-padding) * 2 + 1.5rem)/ 2))}`;let ar=class extends Wi{constructor(){super(...arguments),this.sendControlsEvent=t=>{this.player.dispatchEvent(new CustomEvent(n.CONTROLS_ITEMS,{detail:{items:{bigplay:t}}}))},this.togglePlay=t=>{try{t.preventDefault(),t.stopPropagation(),this.player.controls.toggle(),this.player.controllers.bar.show(),this.player.dispatchEvent(new CustomEvent(n.CONTROL_BAR_CLOSER)),this.logger.debug("Toggle play clicked",{ev:t})}catch(t){this.logger.error("Error toggling play",t)}}}render(){const t=this.player.played,e=this.player.controllers.blockers.anyBlocker("resume","smartAutoPlay");if(t||e)return this.sendControlsEvent(!1),null;this.sendControlsEvent(!0);const i=nr({backgroundColor:this.player.config.style.background,fill:this.player.config.style.foreground});return Xe`
${Li}
`}};function lr(t,e){let i=t;try{(function(t){const e=(new DOMParser).parseFromString(t,"text/html").body;return!!(e&&e.textContent&&e.textContent.trim())&&!(e.children.length<=0)})(t)||(i=atob(t),i=(new TextDecoder).decode(Uint8Array.from(i,(t=>t.charCodeAt(0)))))}catch(t){e.warn("Error decoding headline HTML:",t)}return i}ar.componentName="BigPlay",ar.reRenderOn=[n.VIDEO_PAUSE,n.VIDEO_PLAY],ar.styles=or,ar=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o}([Ui("vturb-bigplay")],ar);var cr=Object.prototype.hasOwnProperty;function dr(t,e,i){for(i of t.keys())if(hr(i,e))return i}function hr(t,e){var i,r,s;if(t===e)return!0;if(t&&e&&(i=t.constructor)===e.constructor){if(i===Date)return t.getTime()===e.getTime();if(i===RegExp)return t.toString()===e.toString();if(i===Array){if((r=t.length)===e.length)for(;r--&&hr(t[r],e[r]););return-1===r}if(i===Set){if(t.size!==e.size)return!1;for(r of t){if((s=r)&&"object"==typeof s&&!(s=dr(e,s)))return!1;if(!e.has(s))return!1}return!0}if(i===Map){if(t.size!==e.size)return!1;for(r of t){if((s=r[0])&&"object"==typeof s&&!(s=dr(e,s)))return!1;if(!hr(r[1],e.get(s)))return!1}return!0}if(i===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(i===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return-1===r}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return-1===r}if(!i||"object"==typeof t){for(i in r=0,t){if(cr.call(t,i)&&++r&&!cr.call(e,i))return!1;if(!(i in e)||!hr(t[i],e[i]))return!1}return Object.keys(e).length===r}}return t!=t&&e!=e}const{I:ur}=fi,fr=()=>document.createComment(""),pr=(t,e,i)=>{var r;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(fr(),n),r=s.insertBefore(fr(),n);i=new ur(e,r,t,t.options)}else{const e=i._$AB.nextSibling,o=i._$AM,a=o!==t;if(a){let e;null===(r=i._$AQ)||void 0===r||r.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==o._$AU&&i._$AP(e)}if(e!==n||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},gr=(t,e,i=t)=>(t._$AI(e,i),t),mr={},vr=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const r=t._$AB.nextSibling;for(;i!==r;){const t=i.nextSibling;i.remove(),i=t}},yr=(t,e,i)=>{const r=new Map;for(let s=e;s<=i;s++)r.set(t[s],s);return r},br=Xi(class extends Qi{constructor(t){if(super(t),2!==t.type)throw Error("repeat() can only be used in text expressions")}ct(t,e,i){let r;void 0===i?i=e:void 0!==e&&(r=e);const s=[],n=[];let o=0;for(const e of t)s[o]=r?r(e,o):o,n[o]=i(e,o),o++;return{values:n,keys:s}}render(t,e,i){return this.ct(t,e,i).values}update(t,[e,i,r]){var s;const n=t._$AH,{values:o,keys:a}=this.ct(e,i,r);if(!Array.isArray(n))return this.ut=a,o;const l=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],c=[];let d,h,u=0,f=n.length-1,p=0,g=o.length-1;for(;u<=f&&p<=g;)if(null===n[u])u++;else if(null===n[f])f--;else if(l[u]===a[p])c[p]=gr(n[u],o[p]),u++,p++;else if(l[f]===a[g])c[g]=gr(n[f],o[g]),f--,g--;else if(l[u]===a[g])c[g]=gr(n[u],o[g]),pr(t,c[g+1],n[u]),u++,g--;else if(l[f]===a[p])c[p]=gr(n[f],o[p]),pr(t,n[u],n[f]),f--,p++;else if(void 0===d&&(d=yr(a,p,g),h=yr(l,u,f)),d.has(l[u]))if(d.has(l[f])){const e=h.get(a[p]),i=void 0!==e?n[e]:null;if(null===i){const e=pr(t,n[u]);gr(e,o[p]),c[p]=e}else c[p]=gr(i,o[p]),pr(t,n[u],i),n[e]=null;p++}else vr(n[f]),f--;else vr(n[u]),u++;for(;p<=g;){const e=pr(t,c[g+1]);gr(e,o[p]),c[p++]=e}for(;u<=f;){const t=n[u++];null!==t&&vr(t)}return this.ut=a,((t,e=mr)=>{t._$AH=e})(t,c),Qe}}),Er=me`div[id^=vturb-callaction-container-] .callaction__slot:root,vturb-smartplayer:root{--callaction-button-margin:1.25em;--callaction-button-size-lg:1.5em;--callaction-button-size-md:1.25em;--callaction-button-size-sm:1em}div[id^=vturb-callaction-container-] .callaction__slot .callaction,vturb-smartplayer .callaction{font-size:18px;box-sizing:border-box;width:100%}div[id^=vturb-callaction-container-] .callaction__slot .callaction--outside,vturb-smartplayer .callaction--outside{display:flex;justify-content:center;align-items:center;flex-direction:column}div[id^=vturb-callaction-container-] .callaction__slot .callaction--inside,vturb-smartplayer .callaction--inside{position:absolute;top:0;left:0;height:100%;z-index:var(--callaction-index);pointer-events:none}div[id^=vturb-callaction-container-] .callaction__slot .callaction__button,vturb-smartplayer .callaction__button{display:var(--callaction-button-display,inline-block);pointer-events:all;padding:.5em .7em;border:0 solid transparent;background-color:var(--callaction-background);color:var(--callaction-color);font-size:var(--callaction-button-font-size);font-weight:var(--callaction-button-font-weight);line-height:var(--callaction-button-line-height);text-align:center;border-radius:var(--callaction-button-border-radius);text-decoration:none;transition:all .2s ease-in-out}div[id^=vturb-callaction-container-] .callaction__slot .callaction__button:hover,vturb-smartplayer .callaction__button:hover{background-color:var(--callaction-background-hover,var(--callaction-background));color:var(--callaction-color-hover,var(--callaction-color))}.callaction--inside div[id^=vturb-callaction-container-] .callaction__slot .callaction__button,.callaction--inside vturb-smartplayer .callaction__button{position:absolute}.callaction--outside div[id^=vturb-callaction-container-] .callaction__slot .callaction__button,.callaction--outside vturb-smartplayer .callaction__button{margin:var(--callaction-outside-margin) 0}div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--lg,vturb-smartplayer .callaction__button--lg{font-size:1em;padding:.75em 1em}.m-w-550 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--lg,.m-w-550 vturb-smartplayer .callaction__button--lg,.m-w-768 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--lg,.m-w-768 vturb-smartplayer .callaction__button--lg{font-size:1em;padding:.5em .75em}.m-w-360 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--lg,.m-w-360 vturb-smartplayer .callaction__button--lg,.m-w-480 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--lg,.m-w-480 vturb-smartplayer .callaction__button--lg{font-size:1em;padding:.250000005em .5em}div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--md,vturb-smartplayer .callaction__button--md{font-size:1em;padding:.5em .75em}.m-w-550 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--md,.m-w-550 vturb-smartplayer .callaction__button--md,.m-w-768 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--md,.m-w-768 vturb-smartplayer .callaction__button--md{font-size:1em;padding:.375em .5em}.m-w-360 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--md,.m-w-360 vturb-smartplayer .callaction__button--md,.m-w-480 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--md,.m-w-480 vturb-smartplayer .callaction__button--md{font-size:1em;padding:.25em .375em}div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--sm,vturb-smartplayer .callaction__button--sm{font-size:1em;padding:.25em .5em}.m-w-550 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--sm,.m-w-550 vturb-smartplayer .callaction__button--sm,.m-w-768 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--sm,.m-w-768 vturb-smartplayer .callaction__button--sm{font-size:1em;padding:.25em .375em}.m-w-360 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--sm,.m-w-360 vturb-smartplayer .callaction__button--sm,.m-w-480 div[id^=vturb-callaction-container-] .callaction__slot .callaction__button--sm,.m-w-480 vturb-smartplayer .callaction__button--sm{font-size:1em;padding:.125em .25em}`,Tr=me`.callaction{font-size:18px;width:100%}.callaction--outside{display:flex;justify-content:center;align-items:center;flex-direction:column}.callaction--inside{position:absolute;top:0;left:0;height:100%;z-index:var(--callaction-index);pointer-events:none}.callaction__button{display:var(--callaction-button-display,inline-block);pointer-events:all;padding:0;border:0 solid transparent;background-color:var(--callaction-background);color:var(--callaction-color);font-size:var(--callaction-button-font-size);font-weight:var(--callaction-button-font-weight);line-height:var(--callaction-button-line-height);text-align:center;border-radius:var(--callaction-button-border-radius);text-decoration:none;transition:all .2s ease-in-out}.callaction__button:hover{background-color:var(--callaction-background-hover,var(--callaction-background));color:var(--callaction-color-hover,var(--callaction-color))}.callaction--inside .callaction__button{position:absolute}.callaction--outside .callaction__button{margin:var(--callaction-outside-margin) 0}.callaction__button--lg{font-size:calc(var(--callaction-button-size-lg)*1)}.m-w-550 .callaction__button--lg,.m-w-768 .callaction__button--lg{font-size:calc(var(--callaction-button-size-lg)*.8333333333)}.m-w-360 .callaction__button--lg,.m-w-480 .callaction__button--lg{font-size:calc(var(--callaction-button-size-lg)*.6666666667)}.callaction__button--md{font-size:calc(var(--callaction-button-size-md)*1)}.m-w-550 .callaction__button--md,.m-w-768 .callaction__button--md{font-size:calc(var(--callaction-button-size-md)*.8)}.m-w-360 .callaction__button--md,.m-w-480 .callaction__button--md{font-size:calc(var(--callaction-button-size-md)*.7)}.callaction__button--sm{font-size:calc(var(--callaction-button-size-sm)*1)}.m-w-550 .callaction__button--sm,.m-w-768 .callaction__button--sm{font-size:calc(var(--callaction-button-size-sm)*.875)}.m-w-360 .callaction__button--sm,.m-w-480 .callaction__button--sm{font-size:calc(var(--callaction-button-size-sm)*.75)}.callaction__button--tl{top:var(--callaction-button-margin);left:var(--callaction-button-margin)}.callaction__button--tc{top:var(--callaction-button-margin);left:50%;transform:translateX(-50%)}.callaction__button--tr{top:var(--callaction-button-margin);right:var(--callaction-button-margin)}.callaction__button--cl{top:50%;left:var(--callaction-button-margin);transform:translateY(-50%)}.callaction__button--cc{top:50%;left:50%;transform:translate(-50%,-50%)}.callaction__button--cr{top:50%;right:var(--callaction-button-margin);transform:translateY(-50%)}.callaction__button--bl{bottom:var(--callaction-button-margin);left:var(--callaction-button-margin)}.callaction__button--bc{bottom:var(--callaction-button-margin);left:50%;transform:translateX(-50%)}.callaction__button--br{bottom:var(--callaction-button-margin);right:var(--callaction-button-margin)}`;var Sr,_r=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Ar=Sr=class extends Wi{constructor(){super(),this.activeItems=new Map,this.doc=document,this.types=[],this.onPlayerConfigUpdated=()=>{this.cleanupStaleCallActionElements(this.callActions.map((t=>t.id))),this.player.alreadyPlayed&&this.player.video&&this.changeActiveItemsByTime(this.player.video.currentTime)},this.onTimeUpdate=t=>{const{time:e}=t.detail;this.changeActiveItemsByTime(e)},this.fragment=this.doc.createDocumentFragment(),this.injectGlobalCss()}static shouldLoad(t,e){return t.callActions.active&&t.callActions.items.length>0&&t.callActions.items.some((t=>e.includes(t.type)))}get callActions(){var t,e,i;return(null===(i=null===(e=null===(t=this.player)||void 0===t?void 0:t.config)||void 0===e?void 0:e.callActions)||void 0===i?void 0:i.items)||[]}get callActionsByType(){return this.callActions.filter((t=>this.types.includes(t.type)))}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.player.addEventListener(n.VIDEO_TIMEUPDATE_MS,this.onTimeUpdate),this.player.addEventListener(n.PLAYER_CONFIG_UPDATED,this.onPlayerConfigUpdated),this.player.dispatchEvent(new CustomEvent(n.CALLACTION_CONNECTED,{detail:{items:this.player.config.callActions.items}}))}),Sr.DELAY_AFTER_PLAY)}disconnectedCallback(){super.disconnectedCallback(),this.player.removeEventListener(n.VIDEO_TIMEUPDATE_MS,this.onTimeUpdate),this.player.removeEventListener(n.PLAYER_CONFIG_UPDATED,this.onPlayerConfigUpdated),this.cleanupCallActionElements(this.callActionsByType.map((t=>t.id)))}getItems(t){return this.player.controllers.blockers.anyBlocker("smartAutoPlay","resume")?[]:this.callActionsByType.filter((e=>t>=e.range.start&&t<=e.range.finish))}getOrCreateAdjacentElement(t){var e;try{let i=null===(e=this.player.interface.parentElement)||void 0===e?void 0:e.querySelector(`#callaction-${t.id}`);return i||(i=this.doc.createElement("div"),i.id=`callaction-${t.id}`,i.classList.add("callaction__html"),i.style.display="none",i.setAttribute("data-callaction-id",t.id),this.player.interface.insertAdjacentElement("afterend",i),i)}catch(t){return this.logger.error("Error getting or creating adjacent element",t),null}}injectGlobalCss(){if(!this.doc.getElementById("callaction-slot-css")){const t=this.doc.createElement("style");t.id="callaction-slot-css",t.textContent=Er.toString(),this.doc.head.appendChild(t)}}onLinkClick(t,e){try{if(t.stopPropagation(),this.player.isIframe&&t.preventDefault(),t.target&&t.target instanceof HTMLAnchorElement){t.target.href=this.player.urlUpdater(t.target.href,t.target);const i=e.openInNewTab||t.ctrlKey||t.metaKey||t.shiftKey;this.player.dispatchEvent(new CustomEvent(n.IFRAME_OPEN_LINK,{detail:{url:t.target.href,target:i?"_blank":t.target.target}})),this.player.controllers.analytics.onPlayerExitClick()}}catch(t){this.logger.error("Error handling link click",t)}}onLinkMouseover(t,e){t.stopPropagation(),t.target&&t.target instanceof HTMLAnchorElement&&(t.target.href=this.player.urlUpdater(t.target.href,t.target))}onLinkTouchstart(t,e){t.stopPropagation(),t.target&&t.target instanceof HTMLAnchorElement&&(t.target.href=this.player.urlUpdater(t.target.href,t.target))}changeActiveItemsByTime(t){try{let e=[...this.activeItems.values()];const i=this.getItems(t);if(!hr(e,i)){this.activeItems=new Map(i.map((t=>[t.id,t])));const t={items:this.activeItems,types:this.types};this.logger.debug("Call actions elements changed",t),this.player.dispatchEvent(new CustomEvent(n.CALLACTION_ELEMENTS_CHANGED,{detail:t}))}}catch(t){this.logger.error("Error updating active items by time",t)}}findCallActionElements(){var t,e,i,r,s;const n=[...Array.from((null===(e=null===(t=this.player.interface)||void 0===t?void 0:t.querySelectorAll)||void 0===e?void 0:e.call(t,".callaction__button"))||[]),...Array.from((null===(s=null===(r=null===(i=this.player.interface)||void 0===i?void 0:i.parentElement)||void 0===r?void 0:r.querySelectorAll)||void 0===s?void 0:s.call(r,".callaction__html"))||[])];return new Map(n.map((t=>[t.getAttribute("data-callaction-id")||"",t])))}cleanupStaleCallActionElements(t){const e=new Set(t);this.findCallActionElements().forEach(((t,i)=>{i&&!e.has(i)&&t.remove()}))}cleanupCallActionElements(t){const e=new Set(t);this.findCallActionElements().forEach(((t,i)=>{i&&e.has(i)&&t.remove()}))}render(){const t=this.types.includes("inner_button")?"inside":"outside";return Xe`
${this.renderRichElement()}
`}renderBelowButton(t){const e=nr({"--callaction-background":t.colors.background,"--callaction-background-hover":t.colors.backgroundHover,"--callaction-color":t.colors.text,"--callaction-color-hover":t.colors.textHover,display:this.activeItems.has(t.id)?"block":"none"}),i=`callaction-button-${t.id}`;return{button:Xe`this.onLinkClick(e,t)} @mouseover=${e=>this.onLinkMouseover(e,t)} @touchstart=${e=>this.onLinkTouchstart(e,t)} style=${e} data-callaction-id=${t.id} > ${t.content} `,id:i,slot:Xe``}}renderCustomHtml(t){const e=lr(t.html,this.logger),i=this.getOrCreateAdjacentElement(t);return i?(i.innerHTML=e,this.activeItems.has(t.id)?i.style.display="block":i.style.display="none",null):null}renderFragment(){if(!this.fragment||this.player.interface.contains(this.fragment))return;const t=Xe` ${br(this.callActionsByType,(t=>t.id),(t=>"below_button"!==t.type||this.player.isIframe?"custom_html"!==t.type||this.player.isIframe?"inner_button"===t.type?this.renderInsideButton(t).button:Xe``:this.renderCustomHtml(t):this.renderBelowButton(t).button))} `;return gi(t,this.fragment),this.player.interface.appendChild(this.fragment),t}renderInsideButton(t){const e=nr({"--callaction-background":t.colors.background,"--callaction-background-hover":t.colors.backgroundHover,"--callaction-color":t.colors.text,"--callaction-color-hover":t.colors.textHover,display:this.activeItems.has(t.id)?"block":"none"}),i=`callaction-button-${t.id}`;return{button:Xe`this.onLinkClick(e,t)} @mouseover=${e=>this.onLinkMouseover(e,t)} @touchstart=${e=>this.onLinkTouchstart(e,t)} style=${e} data-callaction-id=${t.id} > ${t.content} `,id:i,slot:Xe``}}renderRichElement(){const t=Xe` ${br(this.activeItems.values(),(t=>t.id),((t,e)=>"below_button"!==t.type||this.player.isIframe?"custom_html"!==t.type||this.player.isIframe?"inner_button"===t.type?this.renderInsideButton(t).slot:Xe``:null:this.renderBelowButton(t).slot))} `;return this.renderFragment(),t}};Ar.componentName="CallAction",Ar.DELAY_AFTER_PLAY=200,Ar.styles=[Tr],_r([Gi()],Ar.prototype,"activeItems",void 0),_r([ji(".callaction")],Ar.prototype,"callaction",void 0),_r([Vi({type:Array})],Ar.prototype,"types",void 0),Ar=Sr=_r([Ui("vturb-callaction")],Ar);const wr={en:{backward:"Backward",blocked:"Blocked",forward:"Forward",fullscreen:"Fullscreen","license.blocked.by_rule":"Unable to display the video!","license.blocked.default_message":"BLOCKED","license.blocked.domain_not_allowed":"This domain is not in the list of allowed domains! Update the domain settings in the panel.","license.blocked.indefinite_block":"This domain has been blocked indefinitely. Contact support to learn more.","license.blocked.payment_open":"Your invoice is pending. Update your payment method in the panel.",loop:"Loop",pause:"Pause",play:"Play",poweredBy:"Powered by VTurb",poweredByLink:"https://www.vturb.com/en/?via=player&utm_source=player","contextmenu.optimizeYourVslNow":"Optimize Your VSL Now!","contextmenu.optimizeYourVslNowLink":"https://vturb.com/en?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=optimize_your_vsl_now_en","contextmenu.wantToOptimizeYourVsl":"Want to Optimize Your VSL?","contextmenu.wantToOptimizeYourVslLink":"https://vturb.com/en?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=want_to_optimize_your_vsl_en","contextmenu.clickToOptimizeYourVslCheckEmoji":"Click to Optimize Your VSL ✅","contextmenu.clickToOptimizeYourVslCheckEmojiLink":"https://vturb.com/en?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=click_to_optimize_your_vsl_check_emoji_en",replay:"Replay",resume:"Resume","resume.play":"Continue watching","resume.replay":"Watch from beginning","resume.title":"You have already started watching this","smallplay.pause":"Pause","smallplay.play":"Play",speed:"Speed","speed.normal":"Normal","volume.control":"Volume control"},pt:{backward:"Backward",blocked:"Bloqueado",forward:"Forward",fullscreen:"Fullscreen","license.blocked.by_rule":"Não foi possível exibir o vídeo!","license.blocked.default_message":"BLOQUEADO","license.blocked.domain_not_allowed":"Este domínio não está na lista de domínios permitidos! Atualize as configurações de domínios no painel.","license.blocked.indefinite_block":"Esse domínio foi bloqueado por tempo indeterminado. Contate o suporte para saber mais.","license.blocked.payment_open":"Sua fatura está em aberto. Atualize o método de pagamento no painel.",loop:"Repetir",pause:"Pause",play:"Play",poweredBy:"Conheça o VTurb",poweredByLink:"https://www.vturb.com/pt-BR/?via=player&utm_source=player","contextmenu.optimizeYourVslNow":"Otimize Seu VSL Agora!","contextmenu.optimizeYourVslNowLink":"https://vturb.com/pt-BR?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=optimize_your_vsl_now_pt-br","contextmenu.wantToOptimizeYourVsl":"Quer Otimizar Seu VSL?","contextmenu.wantToOptimizeYourVslLink":"https://vturb.com/pt-BR?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=want_to_optimize_your_vsl_pt-br","contextmenu.clickToOptimizeYourVslCheckEmoji":"Clique Para Otimizar Seu VSL ✅","contextmenu.clickToOptimizeYourVslCheckEmojiLink":"https://vturb.com/pt-BR?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=click_to_optimize_your_vsl_check_emoji_pt-br",replay:"Reativar",resume:"Resumir","resume.play":"Continuar assistindo","resume.replay":"Assistir do início","resume.title":"Você já começou a assistir isso","smallplay.pause":"Pausar","smallplay.play":"Reproduzir",speed:"Velocidade","speed.normal":"Normal","volume.control":"Controle de volume"},es:{backward:"Retroceder",blocked:"Bloqueado",forward:"Avanzar",fullscreen:"Pantalla completa","license.blocked.by_rule":"¡No se puede mostrar el video!","license.blocked.default_message":"BLOQUEADO","license.blocked.domain_not_allowed":"¡Este dominio no está en la lista de dominios permitidos! Actualiza la configuración de dominio en el panel.","license.blocked.indefinite_block":"Este dominio ha sido bloqueado indefinidamente. Contacta al soporte para obtener más información.","license.blocked.payment_open":"Tu factura está pendiente. Actualiza tu método de pago en el panel.",loop:"Repetir",pause:"Pausar",play:"Reproducir",poweredBy:"Desarrollado por VTurb",poweredByLink:"https://www.vturb.com/en/?via=player&utm_source=player","contextmenu.optimizeYourVslNow":"¡Optimiza Tu VSL Ahora!","contextmenu.optimizeYourVslNowLink":"https://vturb.com/es?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=optimize_your_vsl_now_es","contextmenu.wantToOptimizeYourVsl":"¿Quieres Optimizar Tu VSL?","contextmenu.wantToOptimizeYourVslLink":"https://vturb.com/es?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=want_to_optimize_your_vsl_es","contextmenu.clickToOptimizeYourVslCheckEmoji":"Haz Clic para Optimizar Tu VSL ✅","contextmenu.clickToOptimizeYourVslCheckEmojiLink":"https://vturb.com/es?via=player&utm_medium=powered_by_VTurb&utm_campaign=viral_player&utm_source=player&utm_content=click_to_optimize_your_vsl_check_emoji_es",replay:"Repetir",resume:"Reanudar","resume.play":"Continuar viendo","resume.replay":"Ver desde el principio","resume.title":"Ya has comenzado a ver esto","smallplay.pause":"Pausar","smallplay.play":"Reproducir",speed:"Velocidad","speed.normal":"Normal","volume.control":"Control de volumen"}};let Lr="en";const kr=t=>wr[Lr]?wr[Lr][t]:(console.warn(`Language ${Lr} not found`),wr.en[t]);function Rr(){try{return localStorage.setItem("feature_test","yes"),localStorage.removeItem("feature_test"),!0}catch(t){return!1}}function Cr(t,e,i={}){const r={saveStorageSuccessful:!1,storageType:"none",storedIdentifier:void 0,wasStoraged:!1};if(!t||0===t.length)return[e,r];const{identifierKey:s,storageKey:n,store:o}=i;if(n&&s){if(o)r.storageType="store",r.storedIdentifier=o.get(n,void 0);else if(Rr()){r.storageType="localStorage";const t=localStorage.getItem(n);if(t)try{r.storedIdentifier=JSON.parse(t)}catch(e){r.storedIdentifier=t}}if(void 0!==r.storedIdentifier){const e=t.find((t=>t[s]===r.storedIdentifier));if(e)return r.wasStoraged=!0,r.saveStorageSuccessful=!0,[e,r]}}const a=t[Math.floor(Math.random()*t.length)];if(n&&s){const t=a[s];try{o?(o.set(n,t),r.saveStorageSuccessful=!0):Rr()&&(localStorage.setItem(n,JSON.stringify(t)),r.saveStorageSuccessful=!0)}catch(t){r.saveStorageSuccessful=!1}}return[a,r]}const Ir=[{translationLinkKey:"contextmenu.optimizeYourVslNowLink",translationKey:"contextmenu.optimizeYourVslNow"},{translationLinkKey:"contextmenu.wantToOptimizeYourVslLink",translationKey:"contextmenu.wantToOptimizeYourVsl"},{translationLinkKey:"contextmenu.clickToOptimizeYourVslCheckEmojiLink",translationKey:"contextmenu.clickToOptimizeYourVslCheckEmoji"}],Pr=me`.contextmenu{position:fixed;background:rgba(0,0,0,.9);z-index:1002;align-items:center;display:flex;font-size:18px;border-radius:.3em}.contextmenu a{display:inline-block;padding:.7em 1em;cursor:pointer;text-decoration:none;color:#fff;min-width:10.625em;text-align:left;font-size:.8em;pointer-events:auto;white-space:nowrap}.contextmenu a:hover{background-color:hsla(0,0%,100%,.1)}.contextmenu__backdrop{display:flex;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1001;pointer-events:auto}`;var xr=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Dr=class extends Wi{constructor(){super(...arguments),this.link="",this.option=function(){const[t]=Cr(Ir,Ir[0]);return t||Ir[0]}(),this.text="",this.visible=!1,this.x=0,this.y=0,this.hide=t=>{t.stopPropagation(),this.visible=!1},this.show=t=>{t.preventDefault(),this.visible=!0,this.x=t.clientX,this.y=t.clientY,this.link=kr(this.option.translationLinkKey),this.text=kr(this.option.translationKey);const e=t.clientX;this.updateComplete.then((()=>{const t=this.querySelector(".contextmenu");if(!t)return;const{width:i}=t.getBoundingClientRect();this.x+i>window.innerWidth&&(this.x=Math.max(0,e-i))}))}}connectedCallback(){var t;super.connectedCallback(),null===(t=this.player.player)||void 0===t||t.addEventListener("contextmenu",this.show)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.player.player)||void 0===t||t.removeEventListener("contextmenu",this.show)}render(){if(this.visible)return Xe`
`}};Dr.styles=[Pr],xr([Gi()],Dr.prototype,"link",void 0),xr([Gi()],Dr.prototype,"option",void 0),xr([Gi()],Dr.prototype,"text",void 0),xr([Gi()],Dr.prototype,"visible",void 0),xr([Gi()],Dr.prototype,"x",void 0),xr([Gi()],Dr.prototype,"y",void 0),Dr=xr([Ui("vturb-context-menu")],Dr);const Or=t=>e=>{if(O()&&"click"===e.type)try{"function"==typeof e.preventDefault&&e.preventDefault(),"function"==typeof e.stopPropagation&&e.stopPropagation()}catch(t){}else t(e,O())},Mr=me`.player.forward{pointer-events:auto}.player.forward svg{fill:inherit}`;let $r=class extends Wi{constructor(){super(...arguments),this.handleClick=Or((t=>{this.player.video&&(t.stopPropagation(),this.player.dispatchEvent(new CustomEvent(n.VIDEO_FORWARD)),this.player.controllers.bar.show(),this.player.controls.seek(this.player.video.currentTime+10))})),this.noop=Or((t=>{t.stopPropagation(),t.preventDefault()}))}render(){const t=nr({color:this.player.config.style.foreground,fill:this.player.config.style.foreground});return Xe` `}};function Fr(t,e,i){return t?e():null==i?void 0:i()}$r.styles=Mr,$r=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o}([Ui("vturb-forward")],$r);const Nr=me`.player.fullscreen{pointer-events:auto}.player.fullscreen svg{fill:inherit}`;let Ur=class extends Wi{constructor(){super(...arguments),this.handleClick=t=>{this.player.controllers.fullscreen.toggle()}}render(){const t=nr({color:this.player.config.style.foreground,fill:this.player.config.style.foreground});return Xe` `}};Ur.reRenderOn=[n.FULLSCREEN_ENTER,n.FULLSCREEN_EXIT],Ur.styles=Nr,Ur=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o}([Ui("vturb-fullscreen")],Ur);const Br=me`.progress-bar{position:relative;width:100%;cursor:pointer;align-items:center!important;justify-content:center!important}.progress-bar__background{position:relative;width:100%;height:var(--progressbar-height);background-color:var(--progressbar-background-color)}.progress-bar__buffer{position:absolute;top:0;left:0;height:100%;background-color:var(--progressbar-buffer-color,rgba(255,255,255,.4));visibility:hidden}.progress-bar__fill{position:absolute;top:0;left:0;height:100%;background-color:var(--progressbar-fill-color,var(--style-foreground))}.progress-bar__handle{position:absolute;top:50%;left:0;width:var(--progressbar-handle-size);height:var(--progressbar-handle-size);background-color:var(--progressbar-handle-color);border-radius:50%;transform:translate(-50%,-50%) scale(0);opacity:0}.progress-bar__backdrop{position:absolute;top:-100vh;left:-100vw;width:300vw;height:300vh;background-color:rgba(0,0,0,0);display:none;z-index:1}.progress-bar__time-tooltip{position:absolute;bottom:50%;left:0;padding:4px 8px;background-color:rgba(0,0,0,.8);color:#fff;font-size:.75em;border-radius:4px;transform:translateX(-50%) translateY(-10px);display:none}.progress-bar:hover .progress-bar__handle{transform:translate(-50%,-50%) scale(1);opacity:1}`;var Vr=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Gr=class extends Wi{constructor(){super(...arguments),this.dragging=!1,this.intervalId=null,this.tooltipHideDelay=3e3,this.tooltipHideTimeout=null,this.tooltipProgress=0,this.eventOnProgress=t=>{const e=t.detail.video,i=e.buffered.length?e.buffered.end(e.buffered.length-1)/e.duration:0;this.elProgressBarBuffer.style.width=100*i+"%"},this.intervalObserver=()=>{!this.dragging&&this.player.video&&this.onTimeUpdate(this.player.video.currentTime)}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){t.connectedCallback.call(this),this.logger.debug("ProgressBar connected"),this.player.addEventListener(n.VIDEO_PROGRESS,this.eventOnProgress),this.intervalId=setInterval(this.intervalObserver,50)}))}disconnectedCallback(){var t;super.disconnectedCallback(),this.logger.debug("ProgressBar disconnected"),null===(t=this.player)||void 0===t||t.removeEventListener(n.VIDEO_PROGRESS,this.eventOnProgress),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}onClick(t){var e,i,r;const s=this.getProgress(t,this.elProgressBar);this.player.controls.seek(s*(null!==(i=null===(e=this.player.video)||void 0===e?void 0:e.duration)&&void 0!==i?i:1)),window.TouchEvent&&t instanceof TouchEvent&&(null===(r=null==t?void 0:t.touches)||void 0===r?void 0:r.length)>0&&(this.showTooltip(this.elProgressBarTimeTooltip,s),this.scheduleTooltipHide()),this.dragging=!1,this.elProgressBarBackdrop.style.display="none"}onMouseDown(t){this.dragging=!0,this.elProgressBarBackdrop.style.display="block",this.onMouseMove(t)}onMouseEnter(t){this.onMouseMove(t)}onMouseLeave(t){window.TouchEvent&&t instanceof TouchEvent&&this.onClick(t),this.elProgressBarTimeTooltip.style.display="none"}onMouseMove(t){var e,i;if(this.elProgressBarTimeTooltip&&this.elProgressBar){const r=this.getProgress(t,this.elProgressBar),s=r*(null!==(i=null===(e=this.player.video)||void 0===e?void 0:e.duration)&&void 0!==i?i:1);this.tooltipProgress=r,this.elProgressBarTimeTooltip.textContent=this.timeToDisplay(s),this.elProgressBarTimeTooltip.style.left=100*r+"%",this.elProgressBarTimeTooltip.style.display="block",this.player.controllers.bar.show(),this.dragging&&this.onTimeUpdate(s)}}onMouseUp(t){this.dragging&&setTimeout((()=>{this.onClick(t)}),50)}onTimeUpdate(t){var e,i;const r=t/(null!==(i=null===(e=this.player.video)||void 0===e?void 0:e.duration)&&void 0!==i?i:1);this.elProgressBarFill.style.width=100*r+"%",this.elProgressBarHandle.style.left=100*r+"%"}onVideoEnded(){this.elProgressBarFill.style.width="100%",this.elProgressBarHandle.style.left="100%"}render(){return Xe`
00:00
`}getProgress(t,e,i){var r;const{left:s,width:n}=e.getBoundingClientRect();let o=this.tooltipProgress;if("clientX"in t)o=(t.clientX-s)/n;else if("touches"in t&&t.touches.length>0){const e=t.touches[0]||(null===(r=t.touches)||void 0===r?void 0:r.item(0));e&&(o=(e.clientX-s)/n)}return Math.max(0,Math.min(1,o))}scheduleTooltipHide(){this.tooltipHideTimeout&&clearTimeout(this.tooltipHideTimeout),this.tooltipHideTimeout=window.setTimeout((()=>{this.elProgressBarTimeTooltip.style.display="none",this.tooltipHideTimeout=null}),this.tooltipHideDelay)}showTooltip(t,e){var i,r;if(t){const s=e*(null!==(r=null===(i=this.player.video)||void 0===i?void 0:i.duration)&&void 0!==r?r:1);t.textContent=this.timeToDisplay(s),t.style.left=100*e+"%",t.style.display="block"}}timeToDisplay(t){const e=Math.floor(t/3600),i=Math.floor(t%3600/60),r=Math.floor(t%60);return e>0?`${e}:${i.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`:`${i}:${r.toString().padStart(2,"0")}`}};Gr.styles=Br,Vr([ji(".progress-bar")],Gr.prototype,"elProgressBar",void 0),Vr([ji(".progress-bar__backdrop")],Gr.prototype,"elProgressBarBackdrop",void 0),Vr([ji(".progress-bar__background")],Gr.prototype,"elProgressBarBackground",void 0),Vr([ji(".progress-bar__buffer")],Gr.prototype,"elProgressBarBuffer",void 0),Vr([ji(".progress-bar__fill")],Gr.prototype,"elProgressBarFill",void 0),Vr([ji(".progress-bar__handle")],Gr.prototype,"elProgressBarHandle",void 0),Vr([ji(".progress-bar__time-tooltip")],Gr.prototype,"elProgressBarTimeTooltip",void 0),Gr=Vr([Ui("vturb-progress-bar")],Gr);const Hr=me`.player .rewind{pointer-events:auto}.player .rewind svg{fill:inherit}`;let jr=class extends Wi{constructor(){super(...arguments),this.handleClick=Or((t=>{var e;t.stopPropagation(),this.player.dispatchEvent(new CustomEvent(n.CONTROL_BAR_CLOSER)),this.player.video&&(this.player.dispatchEvent(new CustomEvent(n.VIDEO_REWIND)),this.player.controllers.bar.show(),this.player.controls.seek(Math.max(0,(null===(e=this.player.video)||void 0===e?void 0:e.currentTime)-10)))})),this.noop=Or((t=>{t.stopPropagation(),t.preventDefault()}))}render(){const t=nr({color:this.player.config.style.foreground,fill:this.player.config.style.foreground}),e=Zi({rewind:!0});return Xe` `}};jr.styles=Hr,jr=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o}([Ui("vturb-rewind")],jr);let zr=class extends Wi{constructor(){super(...arguments),this.togglePlay=t=>{this.player.controls.toggle(),this.player.controllers.bar.show()}}connectedCallback(){super.connectedCallback(),this.player.addEventListener(n.VIDEO_PLAY,(()=>this.requestUpdate())),this.player.addEventListener(n.VIDEO_PAUSE,(()=>this.requestUpdate()))}render(){return Xe` `}};zr.styles=me``,zr=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o}([Ui("vturb-smallplay")],zr);const Kr=me`:host{display:block}.menu-item{display:flex;align-items:center;height:var(--menu-item-height);padding:calc(var(--menu-padding)/2) var(--menu-padding);cursor:pointer;transition:background-color var(--menu-transition);user-select:none}.menu-item:hover{background-color:var(--menu-hover-color)}.menu-item__icon{display:flex;align-items:center;justify-content:center;width:var(--menu-icon-size);height:var(--menu-icon-size);margin-right:var(--menu-padding);color:var(--menu-icon-color);fill:var(--menu-icon-color)}.menu-item__icon svg{width:1em;height:1em}.menu-item__label{flex:1;font-size:var(--menu-font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu-item__check{margin-left:var(--menu-padding);color:var(--menu-icon-color);fill:var(--menu-icon-color)}.menu-item__check svg{width:1em;height:1em}`;var Yr=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Wr=class extends yi{constructor(){super(...arguments),this.value="",this._handleClick=Or((t=>{this.dispatchEvent(new CustomEvent("item-selected",{bubbles:!0,composed:!0,detail:{value:this.value}}))})),this.icon="",this.label="",this.selected=!1}render(){return Xe` `}};Wr.styles=[Kr],Yr([Vi({type:String})],Wr.prototype,"value",void 0),Yr([Vi({type:String})],Wr.prototype,"icon",void 0),Yr([Vi({type:String})],Wr.prototype,"label",void 0),Yr([Vi({reflect:!0,type:Boolean})],Wr.prototype,"selected",void 0),Wr=Yr([Ui("smart-menu-item")],Wr);const qr=me`:host{--menu-bg-color:#203EA6;--menu-text-color:#FAFAFA;--menu-hover-color:#2B4BB3;--menu-selected-color:#2B4BB3;--menu-icon-color:#FFFFFF;--menu-divider-color:rgba(255, 255, 255, 0.1);--menu-shadow:0 4px 6px rgba(0, 0, 0, 0.1);--menu-item-height:1.6em;--menu-padding:0.6em;--menu-border-radius:0.4em;--menu-icon-size:0.75em;--menu-font-size:0.75em;--menu-transition:0.2s ease;display:block}.menu{background-color:var(--menu-bg-color);border-radius:var(--menu-border-radius);box-shadow:var(--menu-shadow);color:var(--menu-text-color);min-width:10em;overflow:hidden;display:none}.menu[opened]{display:flex;flex-direction:column}.menu.top-left{left:0;top:0}.menu.top-right{right:0;top:0}.menu.bottom-left{left:0;bottom:0}.menu.bottom-right{right:0;bottom:0}.menu__header{font-size:var(--menu-font-size);padding:var(--menu-padding);border-bottom:1px solid var(--menu-divider-color);display:flex;align-items:center;height:var(--menu-item-height)}.menu__content{display:flex;flex-direction:column;overflow-y:auto}`;var Xr=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Qr=class extends yi{constructor(){super(...arguments),this.opened=!1,this.position="top-left",this.title="",this._reposition=()=>{const t=document.querySelector(this.target);if(t){const e=t.getBoundingClientRect();this.style.left=`${e.left}px`,this.style.top=`${e.top}px`}}}connectedCallback(){super.connectedCallback(),this.target&&(window.addEventListener("resize",this._reposition),window.addEventListener("scroll",this._reposition))}disconnectedCallback(){super.disconnectedCallback(),this.target&&(window.removeEventListener("resize",this._reposition),window.removeEventListener("scroll",this._reposition))}render(){return Xe` `}};Qr.styles=[qr],Xr([Vi({reflect:!0,type:Boolean})],Qr.prototype,"opened",void 0),Xr([Vi({type:String})],Qr.prototype,"position",void 0),Xr([Vi({type:String})],Qr.prototype,"target",void 0),Xr([Vi({type:String})],Qr.prototype,"title",void 0),Qr=Xr([Ui("smart-menu")],Qr);const Zr=me`:host{display:block}.submenu__header{display:flex;align-items:center;height:var(--menu-item-height);padding:0 var(--menu-padding);cursor:pointer;transition:background-color var(--menu-transition);user-select:none}.submenu__header:hover{background-color:var(--menu-hover-color)}.submenu__header ::slotted([slot=icon]){width:var(--menu-icon-size);height:var(--menu-icon-size);margin-right:var(--menu-padding);color:var(--menu-icon-color)}.submenu__label{flex:1;font-size:var(--menu-font-size)}.submenu__value{margin-right:var(--menu-padding);opacity:.8}.submenu__arrow{display:flex;align-items:center;transition:transform var(--menu-transition);color:var(--menu-icon-color)}.submenu__arrow.opened{transform:rotate(90deg)}.submenu__content{display:none;background-color:var(--menu-hover-color)}.submenu__content[opened]{display:block}.submenu__switch{display:flex;align-items:center}`;var Jr=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let ts=class extends yi{constructor(){super(...arguments),this.hasSwitch=!1,this.label="",this.opened=!1,this.value=""}render(){return Xe` `}_handleClick(){this.opened=!this.opened,this.dispatchEvent(new CustomEvent("submenu-toggle",{bubbles:!0,composed:!0,detail:{opened:this.opened}}))}};ts.styles=[Zr],Jr([Vi({type:Boolean})],ts.prototype,"hasSwitch",void 0),Jr([Vi({type:String})],ts.prototype,"label",void 0),Jr([Vi({reflect:!0,type:Boolean})],ts.prototype,"opened",void 0),Jr([Vi({type:String})],ts.prototype,"value",void 0),ts=Jr([Ui("smart-submenu")],ts);const es=me`:host{display:inline-block}.switch{--switch-width:40px;--switch-height:24px;--switch-padding:2px;--switch-thumb-size:calc(var(--switch-height) - (var(--switch-padding) * 2));display:inline-flex;align-items:center;cursor:pointer}.switch__track{width:var(--switch-width);height:var(--switch-height);border-radius:calc(var(--switch-height)/2);background-color:hsla(0,0%,100%,.3);padding:var(--switch-padding);transition:background-color var(--menu-transition)}.switch__thumb{width:var(--switch-thumb-size);height:var(--switch-thumb-size);border-radius:50%;background-color:var(--menu-text-color);transform:translateX(0);transition:transform var(--menu-transition)}.switch[aria-checked=true] .switch__track{background-color:var(--menu-selected-color)}.switch[aria-checked=true] .switch__thumb{transform:translateX(calc(var(--switch-width) - var(--switch-height)))}`;var is=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let rs=class extends yi{constructor(){super(...arguments),this.checked=!1}render(){return Xe`
`}_handleClick(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("switch-change",{bubbles:!0,composed:!0,detail:{checked:this.checked}}))}};rs.styles=[es],is([Vi({reflect:!0,type:Boolean})],rs.prototype,"checked",void 0),rs=is([Ui("smart-switch")],rs);const ss=me`vturb-speed-control{position:relative}.m-w-360 vturb-speed-control .speed-control__option{font-size:.7em}.m-w-480 vturb-speed-control .speed-control__option{font-size:.8em}.m-w-550 vturb-speed-control .speed-control__option{font-size:.9em}#speed-control-menu{--menu-bg-color:var(--style-background-opacity);--menu-text-color:var(--style-foreground);--menu-hover-color:var(--style-background);--menu-selected-color:var(--style-background);--menu-icon-color:var(--style-foreground);--menu-divider-color:rgba(255, 255, 255, 0.1);--menu-shadow:0 4px 6px rgba(0, 0, 0, 0.1)}.speed-control__current{display:inline-flex;align-items:center;text-align:center;color:var(--style-foreground);font-size:1em}.speed-control__options{position:absolute!important;display:flex;flex-direction:column;bottom:100%;right:0;white-space:nowrap;justify-content:flex-end}.speed-control__options button.speed-control__option{padding:.3em 1.5em;background-color:var(--style-background-opacity);opacity:1;color:#fff;cursor:pointer;text-align:left;width:100%;display:block;font-size:1em;padding:.5em 1.5em}.m-w-360 .speed-control__options button.speed-control__option{padding:.3em 1em;font-size:.7em}.m-w-480 .speed-control__options button.speed-control__option{padding:.4em 1.2em;font-size:.8em}.m-w-550 .speed-control__options button.speed-control__option{padding:.4em 1.5em;font-size:.9em}.speed-control__options button.speed-control__option:hover{background-color:var(--style-background-90)}`;var ns,os=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let as=ns=class extends Wi{constructor(){super(...arguments),this.mountedMenu=null,this.speedOptionsVisible=!1,this.tries=0,this._onMountMenu=t=>{!this.mountedMenu&&t?(this.mountedMenu=t,this._updatePosition()):this._updatePosition()},this._updatePosition=()=>{if(!this.mountedMenu)return;if(!this.speedControl)return;if(this.tries>10)return void(this.tries=0);this.tries++,this.mountedMenu.style.position="fixed",this.mountedMenu.style.zIndex="10000",this.mountedMenu.style.visibility="hidden";const{left:t,top:e,width:i}=this.speedControl.getBoundingClientRect(),{height:r,width:s}=this.mountedMenu.getBoundingClientRect();if(0===r||0===s)return setTimeout((()=>this._updatePosition()),10);this.tries=0,this.mountedMenu.style.visibility="visible";let n=e-r-10;const o=t+i-s;n<0&&(n=0),this.mountedMenu.style.top=`${n}px`,this.mountedMenu.style.left=`${o}px`},this.close=t=>{var e;this.player.controlBar.removeEventListener("click",this.close),null===(e=this.player.player)||void 0===e||e.removeEventListener("click",this.close),this.player.removeEventListener(n.CONTROL_BAR_CLOSER,this.close),this.speedOptionsVisible=!1,this.player.controllers.bar.blockClose=!1,this.requestUpdate()},this.onSpeedChange=()=>{this.requestUpdate()},this.onSpeedControlClick=t=>{t.stopPropagation(),"click"===t.type&&O()?t.preventDefault():this.toggleSpeedOptions()},this.open=()=>{var t;this.player.controlBar.addEventListener("click",this.close),null===(t=this.player.player)||void 0===t||t.addEventListener("click",this.close),this.player.addEventListener(n.CONTROL_BAR_CLOSER,this.close),this.speedOptionsVisible=!0,this.player.controllers.bar.blockClose=!0,this.requestUpdate()}}get currentSpeed(){var t,e;return null!==(e=null===(t=this.player.video)||void 0===t?void 0:t.playbackRate)&&void 0!==e?e:1}connectedCallback(){var t;super.connectedCallback(),null===(t=this.player)||void 0===t||t.addEventListener(n.VIDEO_SPEEDCHANGE,this.onSpeedChange),window.addEventListener("resize",this._updatePosition),window.addEventListener("scroll",this._updatePosition)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.player)||void 0===t||t.removeEventListener(n.VIDEO_SPEEDCHANGE,this.onSpeedChange),window.removeEventListener("resize",this._updatePosition),window.removeEventListener("scroll",this._updatePosition)}render(){const t=Zi({active:this.speedOptionsVisible,"speed-control":!0});return Xe`
{t.stopPropagation(),t.preventDefault()}} > ${Fr(this.speedOptionsVisible,(()=>Xe` {this.setSpeed(Number(t.detail.value)),setTimeout((()=>{this.player.dispatchEvent(new CustomEvent(n.CONTROL_BAR_CLOSER))}),ns.CLOSE_DELAY)}} @click=${t=>{t.stopPropagation(),t.preventDefault()}} @touchend=${t=>{t.stopPropagation(),t.preventDefault()}} > `))}
`}renderSpeedOptions(){return Xe``}setSpeed(t,e){e&&(e.stopPropagation(),e.preventDefault()),this.player.controls.speed(t)}toggleSpeedOptions(){this.speedOptionsVisible?this.close():this.open()}};as.CLOSE_DELAY=250,as.ComponentName="SpeedControl",as.reRenderOn=[n.PLAYER_RESIZE],as.speedOptions=[.5,.75,1,1.25,1.5,2],as.styles=ss,os([ji(".speed-control")],as.prototype,"speedControl",void 0),as=ns=os([Ui("vturb-speed-control")],as);const ls=me`.subtitles{position:absolute;bottom:calc(var(--fakebar-height,0) + .5em);left:50%;text-align:center;color:var(--style-foreground);transform:translateX(-50%);text-shadow:var(--subtitle-text-shadow);max-width:var(--subtitle-max-width);width:100%;z-index:9}.m-w-360 .subtitles,.m-w-480 .subtitles,.m-w-550 .subtitles{max-width:var(--subtitle-max-width-small)}.subtitles span{margin:0;text-align:inherit;padding:var(--subtitle-padding);-webkit-box-decoration-break:clone;box-decoration-break:clone;font-weight:var(--subtitle-font-weight);line-height:var(--subtitle-line-height);font-size:1em;font-family:var(--style-font-family);white-space:pre-wrap;text-shadow:var(--subtitle-text-shadow);letter-spacing:var(--subtitle-letter-spacing)}.subtitles span span{position:relative}`;var cs,ds=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let hs=cs=class extends Wi{constructor(){super(...arguments),this.show=!0,this.currentCue=null,this.fontSize=18,this.calculateFontSize=()=>{var t;const e=this.player.config.video.width;let i=this.player.config.subtitles.fontSize;"string"==typeof i&&(i=Number(i.replace("px","").replace("%","").replace("em","").replace("rem","")));let r=Number(null===(t=this.player.video)||void 0===t?void 0:t.clientWidth)/Number(e)||1;r=Math.min(1.2,Math.max(.6,r)),this.player.dispatchEvent(new CustomEvent(n.SUBTITLE_CONFIG_CHANGE,{detail:{config:Object.assign(Object.assign({},this.config),{multiplier:r})}}));const s=r*(null!=i?i:18)+"px";s!==this.fontSize&&(this.fontSize=s,this.requestUpdate())},this.onConfigUpdated=t=>{this.logger.debug("Subtitle config updated",{config:t.detail.config,player:t.detail.player}),this.calculateFontSize()},this.onLoadedMetadata=()=>{var t,e;if(null===(t=this.player.hlsVideo)||void 0===t?void 0:t.video){const t=this.logger.groupDebug("Video metadata loaded");t.debug("Checking for active track",{hasActiveTrack:!!this.player.activeTrack,hasVideo:!!(null===(e=this.player.hlsVideo)||void 0===e?void 0:e.video)}),this.player.activeTrack&&(t.info("Setting up initial subtitle track",{trackKind:this.player.activeTrack.kind,trackLabel:this.player.activeTrack.label,trackLanguage:this.player.activeTrack.language}),this.setupCueChangeListener(this.player.activeTrack)),t.end()}},this.onTrackChange=t=>{var e,i,r,s;if(this.currentCue===t.detail.track)return;const n=this.logger.groupInfo("Subtitle track changed");n.info("Track details",{kind:null===(e=t.detail.track)||void 0===e?void 0:e.kind,label:null===(i=t.detail.track)||void 0===i?void 0:i.label,language:null===(r=t.detail.track)||void 0===r?void 0:r.language,mode:null===(s=t.detail.track)||void 0===s?void 0:s.mode}),this.cleanupTrackListeners(),t.detail.track?(n.debug("Setting up new track listener",{trackLabel:t.detail.track.label}),this.setupCueChangeListener(t.detail.track)):(n.debug("No track selected, clearing current cue"),this.currentCue=null),n.end()},this.cueChangeHandler=()=>{const t=this.player.activeTrack;if(t){const e=Array.from(t.activeCues||[])[0]||null;e!==this.currentCue&&(this.logger.debug("Subtitle cue changed",{endTime:null==e?void 0:e.endTime,startTime:null==e?void 0:e.startTime,text:null==e?void 0:e.text,trackLabel:t.label,trackLanguage:t.language}),this.currentCue=e)}else this.currentCue=null}}connectedCallback(){super.connectedCallback(),this.logger.info("Subtitle component initialized",{componentName:cs.componentName,config:this.config,fontSize:this.fontSize,show:this.show}),this.player.addEventListener(n.VIDEO_LOADEDMETADATA,this.onLoadedMetadata),this.player.addEventListener(n.SUBTITLE_TRACK_CHANGE,this.onTrackChange),this.player.addEventListener(n.PLAYER_RESIZE,this.calculateFontSize),this.player.addEventListener(n.PLAYER_CONFIG_UPDATED,this.onConfigUpdated)}disconnectedCallback(){var t;this.logger.debug("Subtitle component disconnected",{componentName:cs.componentName,currentCue:null===(t=this.currentCue)||void 0===t?void 0:t.text,show:this.show}),super.disconnectedCallback(),this.player.removeEventListener(n.VIDEO_LOADEDMETADATA,this.onLoadedMetadata),this.player.removeEventListener(n.SUBTITLE_TRACK_CHANGE,this.onTrackChange),this.player.removeEventListener(n.PLAYER_RESIZE,this.calculateFontSize),this.player.removeEventListener(n.PLAYER_CONFIG_UPDATED,this.onConfigUpdated),this.player.dispatchEvent(new CustomEvent(n.SUBTITLE_INACTIVE)),this.cleanupTrackListeners()}firstUpdated(){this.calculateFontSize()}render(){var t,e,i,r;if(!this.currentCue||!this.show||this.player.controllers.blockers.noneBlocker("played"))return null;const s=this.player.config.subtitles,n=nr({fontSize:this.fontSize,justifyContent:{center:"center",left:"flex-start",right:"flex-end"}[null!==(t=s.align)&&void 0!==t?t:"center"]||"center",textAlign:null!==(e=s.align)&&void 0!==e?e:"center"}),o=nr({backgroundColor:null!==(i=s.backgroundColor)&&void 0!==i?i:"rgba(0, 0, 0, 0.7)",color:null!==(r=s.color)&&void 0!==r?r:"#FFFFFF"});return Xe`
${this.currentCue.text}
`}cleanupTrackListeners(){this.currentCue&&(this.logger.debug("Cleaning up track listeners",{hadCurrentCue:!!this.currentCue}),this.currentCue.removeEventListener("cuechange",this.cueChangeHandler))}setupCueChangeListener(t){this.logger.debug("Setting up cue change listener",{trackLabel:t.label,trackLanguage:t.language,trackMode:t.mode}),t.addEventListener("cuechange",this.cueChangeHandler)}};hs.componentName="Subtitle",hs.styles=ls,ds([Vi({type:Object})],hs.prototype,"config",void 0),ds([Vi({reflect:!0,type:Boolean})],hs.prototype,"show",void 0),ds([Gi()],hs.prototype,"currentCue",void 0),hs=cs=ds([Ui("vturb-subtitles")],hs);const us=me``;let fs=class extends Wi{constructor(){super(...arguments),this.handleClick=t=>{this.player.interface.setup({subtitles:{show:!this.player.config.subtitles.show}})}}render(){const t=nr({color:this.player.config.style.foreground,fill:this.player.config.style.foreground});return Xe` `}};fs.styles=us,fs=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o}([Ui("vturb-subtitle-control")],fs);const ps=me`.video-time{color:var(--style-foreground);display:flex;align-items:center!important;justify-content:center!important;padding-left:.5em;padding-right:.5em}.m-w-360 .video-time .video-time-total,.m-w-480 .video-time .video-time-total,.m-w-550 .video-time .video-time-total{display:none}.video-time .video-time-total{display:none}`;var gs=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let ms=class extends Wi{constructor(){super(...arguments),this.onLoadedMetadata=t=>{var e,i;this.videoTimeTotal.innerHTML=` / ${this.formatTime(null!==(i=null===(e=this.player.video)||void 0===e?void 0:e.duration)&&void 0!==i?i:0)}`},this.onTimeUpdate=t=>{this.videoTimeCurrent.textContent=this.formatTime(t.detail.time)}}connectedCallback(){super.connectedCallback(),this.player.addEventListener(n.VIDEO_TIMEUPDATE_MS,this.onTimeUpdate),this.player.addEventListener(n.VIDEO_LOADEDMETADATA,this.onLoadedMetadata)}disconnectedCallback(){var t,e;super.disconnectedCallback(),null===(t=this.player)||void 0===t||t.removeEventListener(n.VIDEO_TIMEUPDATE_MS,this.onTimeUpdate),null===(e=this.player)||void 0===e||e.removeEventListener(n.VIDEO_LOADEDMETADATA,this.onLoadedMetadata)}formatTime(t){const e=Math.max(0,t);return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}render(){return Xe`
00:00 / --:--
`}firstUpdated(t){var e,i;this.onTimeUpdate({detail:{time:null!==(i=null===(e=this.player.video)||void 0===e?void 0:e.currentTime)&&void 0!==i?i:0}})}};ms.styles=ps,gs([ji(".video-time-current")],ms.prototype,"videoTimeCurrent",void 0),gs([ji(".video-time-total")],ms.prototype,"videoTimeTotal",void 0),ms=gs([Ui("vturb-video-time")],ms);const vs=me`#player .volume{position:relative}#player .volume__control{position:absolute;padding:1.125em .5em;background:var(--style-background-opacity);bottom:100%;cursor:pointer;visibility:hidden;transition:opacity .2s ease;width:100%;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;opacity:0;box-sizing:border-box;height:7em}#player .volume__control range-slider{width:1.5em;height:5em;--slider-height:0.125em;--thumb-diameter:0.625em;--slider-background:var(--style-foreground-50);--slider-value-color:var(--style-foreground);--thumb-color:var(--style-foreground)}#player .volume__button-icon{width:1.5em;height:100%;fill:#fff;display:none;align-items:center;justify-content:center}#player .volume.in-change .volume__button,#player .volume:not(.mobile):hover .volume__button{padding-right:.625em}#player .volume.in-change .volume__control,#player .volume:not(.mobile):hover .volume__control{visibility:visible;opacity:1;overflow:hidden}`;var ys=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let bs=class extends Wi{constructor(){super(...arguments),this.doc=document,this.hovering=!1,this.volumeChangeStarted=!1,this.handleVolumeChange=t=>{t.preventDefault(),t.stopPropagation(),this.volumeChangeStarted&&(this.player.controllers.bar.show(),this.player.controls.volume(this.Slider.value))},this.onVolumeChange=t=>{this.updateVolume(),this.requestUpdate()},this.startVolumeChange=t=>{this.volumeChangeStarted=!0,this.doc.addEventListener("mouseup",this.stopVolumeChange),this.doc.addEventListener("touchend",this.stopVolumeChange),this.player.controllers.bar.dispatchCloser()},this.stopVolumeChange=()=>{this.volumeChangeStarted=!1,this.doc.removeEventListener("mouseup",this.stopVolumeChange),this.doc.removeEventListener("touchend",this.stopVolumeChange)},this.toggleMute=t=>{this.player.muted||this.currentVolume<=.05?this.player.controls.unmute():this.player.controls.mute(),this.player.controllers.bar.show(),this.updateVolume()}}get currentVolume(){var t,e;return null!==(e=null===(t=this.player.video)||void 0===t?void 0:t.volume)&&void 0!==e?e:0}connectedCallback(){super.connectedCallback(),this.player.addEventListener(n.VIDEO_VOLUMECHANGE,this.onVolumeChange)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.player)||void 0===t||t.removeEventListener(n.VIDEO_VOLUMECHANGE,this.onVolumeChange)}firstUpdated(){this.updateVolume()}render(){return Xe`
${Fr(!O(),(()=>Xe`
{t.stopPropagation()}} @mousedown=${this.startVolumeChange} @touchstart=${this.startVolumeChange} >
`))}
`}updateVolume(){0===this.currentVolume||this.player.muted?(this.Volume3.style.display="none",this.Volume2.style.display="none",this.Volume1.style.display="none",this.VolumeMute.style.display="flex"):this.currentVolume<.25?(this.Volume3.style.display="none",this.Volume2.style.display="none",this.Volume1.style.display="flex",this.VolumeMute.style.display="none"):this.currentVolume<.75?(this.Volume3.style.display="none",this.Volume2.style.display="flex",this.Volume1.style.display="none",this.VolumeMute.style.display="none"):(this.Volume3.style.display="flex",this.Volume2.style.display="none",this.Volume1.style.display="none",this.VolumeMute.style.display="none")}};bs.styles=vs,ys([ji("range-slider")],bs.prototype,"Slider",void 0),ys([ji(".volume__button-icon--1")],bs.prototype,"Volume1",void 0),ys([ji(".volume__button-icon--2")],bs.prototype,"Volume2",void 0),ys([ji(".volume__button-icon--3")],bs.prototype,"Volume3",void 0),ys([ji(".volume__button")],bs.prototype,"VolumeButton",void 0),ys([Gi()],bs.prototype,"volumeChangeStarted",void 0),ys([ji(".volume__button-icon--mute")],bs.prototype,"VolumeMute",void 0),bs=ys([Ui("vturb-volume")],bs);const Es=me`.controls{position:absolute;width:100%;bottom:0;left:0;opacity:0;transition:opacity var(--base-transition),transform var(--base-transition);transform:translateY(var(--control-translate-y));z-index:var(--control-index);box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;gap:var(--control-gap-vertical)}.controls--progress-bar{justify-content:flex-start;background:var(--style-background-opacity)}.controls vturb-forward,.controls vturb-fullscreen,.controls vturb-progress-bar,.controls vturb-rewind,.controls vturb-smallplay,.controls vturb-speed-control,.controls vturb-subtitle-control,.controls vturb-video-time,.controls vturb-volume{height:100%;display:flex;align-items:center;justify-content:center}.controls vturb-forward:hover,.controls vturb-fullscreen:hover,.controls vturb-progress-bar:hover,.controls vturb-rewind:hover,.controls vturb-smallplay:hover,.controls vturb-speed-control:hover,.controls vturb-subtitle-control:hover,.controls vturb-video-time:hover,.controls vturb-volume:hover{opacity:1;transition:opacity calc(var(--base-transition-duration)/2.2) var(--base-transition-cubic)}.controls vturb-forward>:not(.no-size),.controls vturb-fullscreen>:not(.no-size),.controls vturb-progress-bar>:not(.no-size),.controls vturb-rewind>:not(.no-size),.controls vturb-smallplay>:not(.no-size),.controls vturb-speed-control>:not(.no-size),.controls vturb-subtitle-control>:not(.no-size),.controls vturb-video-time>:not(.no-size),.controls vturb-volume>:not(.no-size){height:calc(var(--control-padding)*2 + var(--control-button-size));display:flex;align-items:stretch;position:relative}.controls button{background:rgba(0,0,0,0);border:none;cursor:pointer;padding:var(--control-padding);padding-block:var(--control-padding);padding-inline:var(--control-padding);display:flex;justify-content:center;align-items:center;color:var(--style-foreground);fill:var(--style-foreground);opacity:.75;transition:opacity calc(var(--base-transition-duration)/2.2) var(--base-transition-cubic);font-size:1em}.controls button:hover{opacity:1;background:var(--style-hover-background)}.controls button,.controls button *{pointer-events:auto}.controls svg{width:var(--control-button-size);height:var(--control-button-size);background:rgba(0,0,0,0);color:var(--style-foreground);fill:var(--style-foreground)}.controls__first{display:flex;justify-content:space-between;flex-direction:row;align-items:flex-end;gap:var(--control-gap-horizontal)}.controls__first--left,.controls__first--right{display:flex;justify-content:flex-start;flex-direction:row;align-items:stretch;position:relative}.controls:not(.controls--progress-bar) .controls__first--left,.controls:not(.controls--progress-bar) .controls__first--right{background:var(--style-background-opacity);border-radius:var(--control-border-radius)}.m-w-360:not(.has-fakebar) .controls:not(.controls--progress-bar) .controls__first--left,.m-w-360:not(.has-fakebar) .controls:not(.controls--progress-bar) .controls__first--right,.m-w-480:not(.has-fakebar) .controls:not(.controls--progress-bar) .controls__first--left,.m-w-480:not(.has-fakebar) .controls:not(.controls--progress-bar) .controls__first--right,.m-w-550:not(.has-fakebar) .controls:not(.controls--progress-bar) .controls__first--left,.m-w-550:not(.has-fakebar) .controls:not(.controls--progress-bar) .controls__first--right{background:rgba(0,0,0,0);border-radius:0}.controls.controls--progress-bar .controls__first--left{flex:1}.controls__first--left vturb-progress-bar{flex:1;margin-left:var(--control-padding)}.controls__menu-button--active{background:var(--style-hover-background)!important}.m-w-360:not(.has-fakebar) .controls .controls__first,.m-w-480:not(.has-fakebar) .controls .controls__first,.m-w-550:not(.has-fakebar) .controls .controls__first{background:var(--style-background-opacity)}.has-fakebar .controls.bottom-controls-visible{box-sizing:border-box;background:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0));padding:1.4em .8em calc(var(--fakebar-height,0) + .4em)}.has-fakebar .controls.bottom-controls-visible__first--left,.has-fakebar .controls.bottom-controls-visible__first--right{background:rgba(0,0,0,0)!important;gap:.5em}.has-fakebar .controls.bottom-controls-visible__first--left button,.has-fakebar .controls.bottom-controls-visible__first--right button{opacity:1;border-radius:var(--control-border-radius)}.has-fakebar .controls.bottom-controls-visible__first--left button.active,.has-fakebar .controls.bottom-controls-visible__first--right button.active{background:var(--style-background)}.has-fakebar .controls.bottom-controls-visible__first--left button:hover,.has-fakebar .controls.bottom-controls-visible__first--right button:hover{background:var(--style-background)}.controls__inner{position:absolute;width:100%;top:50%;left:0;transform:translateY(-50%);align-items:center;justify-content:space-around;gap:var(--control-gap-horizontal);opacity:0;transition:opacity var(--base-transition),transform var(--base-transition);transform:translateY(-30%);pointer-events:none!important;display:flex}.controls__inner,.controls__inner *{pointer-events:none!important}.controls__inner--center,.controls__inner--left,.controls__inner--right{width:33%;display:flex;justify-content:center;align-items:center}.m-w-360 .controls__inner{font-size:10px}.m-w-480 .controls__inner{font-size:12px}.m-w-550 .controls__inner{font-size:14px}.m-w-640 .controls__inner{font-size:16px}.m-w-768 .controls__inner{font-size:18px}.m-w-1024 .controls__inner{font-size:20px}.m-w-1280 .controls__inner{font-size:22px}.m-w-1440 .controls__inner{font-size:24px}.m-w-1600 .controls__inner{font-size:26px}.m-w-1920 .controls__inner{font-size:28px}.controls__inner button{background:rgba(0,0,0,.5);border:none;border-radius:100%;cursor:pointer;padding:var(--control-mobile-button-padding);padding-block:var(--control-mobile-button-padding);padding-inline:var(--control-mobile-button-padding);display:inline-flex;justify-content:center;align-items:center;color:#fff;fill:#fff;opacity:.75;transition:opacity calc(var(--base-transition-duration)/2.2) var(--base-transition-cubic);font-size:1em}.is-mobile .controls__inner button:active{animation:mobile-click-feedback var(--base-transition-duration) var(--base-transition-cubic)}@keyframes mobile-click-feedback{0%{box-shadow:0 0 0 0 hsla(0,0%,100%,.8)}70%{box-shadow:0 0 0 .9375em hsla(0,0%,100%,0)}100%{box-shadow:0 0 0 0 hsla(0,0%,100%,0)}}#player:not(.is-mobile) .controls__inner button:hover{opacity:1;background:var(--style-dark-hover-background)}.controls__inner button,.controls__inner button *{pointer-events:auto}.controls__inner button svg{width:var(--control-mobile-button-icon-size);height:var(--control-mobile-button-icon-size);background:rgba(0,0,0,0);color:#fff;fill:#fff}.controls__inner .featured button{padding:var(--control-mobile-button-featured-padding);padding-block:var(--control-mobile-button-featured-padding);padding-inline:var(--control-mobile-button-featured-padding)}.controls__inner .featured button svg{width:var(--control-mobile-button-featured-icon-size);height:var(--control-mobile-button-featured-icon-size)}.show-controls .controls{opacity:1;transform:translateY(0)}.show-controls .controls__inner{opacity:1;transform:translateY(calc(-50% - (var(--control-padding) * 2 + 1.5rem)/ 2))}.show-controls .controls__inner,.show-controls .controls__inner *{pointer-events:all!important}`;var Ts=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Ss=class extends Wi{constructor(){super(...arguments),this.prevent=Or(((t,e)=>{this.player.dispatchEvent(new CustomEvent(n.CONTROL_BAR_CLOSER)),t.stopPropagation(),e||t.preventDefault()})),this.showMenu=!1,this.controlsActiveHandler=()=>this.sendEvents(!0),this.controlsInactiveHandler=()=>this.sendEvents(!1)}get allowProgressBar(){return this.player.config.style.progressBar}get showCaptions(){return this.player.config.subtitles.active&&this.player.config.style.captions&&this.player.config.subtitles.items.length>0}get allowMenuDisplay(){const t=this.player.player.classList;return t.contains("m-w-360")||t.contains("m-w-480")||t.contains("m-w-550")}get controlsOptions(){const t=this.player.config.style;return((t,e)=>{const i=t.filter((t=>t.visible)).reduce(((t,i,r,s)=>{const n=r===s.length-1,o=t.rightControls.length>0,a=!e||n&&!o?t.leftUsedSpace:t.leftUsedSpace+10;return i.preferRight||a+i.space>100?t.rightControls.push(i):(t.leftControls.push(i),t.leftUsedSpace+=i.space),t}),{leftControls:[],leftUsedSpace:0,rightControls:[]});return{leftControls:i.leftControls.sort(((t,e)=>t.order-e.order)),rightControls:i.rightControls.sort(((t,e)=>t.order-e.order)),leftUsedSpace:i.leftUsedSpace,controlsSize:i.leftControls.length+i.rightControls.length}})([{element:Fr(t.smallPlay,(()=>Xe``)),visible:t.smallPlay,space:10,order:1},{element:Fr(t.rewind&&!this.allowMenuDisplay,(()=>Xe``)),visible:t.rewind&&!this.allowMenuDisplay,space:10,order:2},{element:Fr(t.videoTime,(()=>Xe``)),visible:t.videoTime,space:10,order:3},{element:Fr(this.allowProgressBar,(()=>Xe``)),visible:this.allowProgressBar,space:this.allowMenuDisplay?70:60,order:5},{element:Fr(t.volume,(()=>Xe``)),visible:t.volume,space:10,order:4},{element:Fr(this.showCaptions,(()=>Xe``)),visible:this.showCaptions,space:10,preferRight:!0,order:6},{element:Fr(t.speed,(()=>Xe``)),visible:t.speed,space:10,preferRight:!0,order:7},{element:Fr(t.fullscreen,(()=>Xe``)),visible:t.fullscreen,space:10,preferRight:!0,order:8}],this.allowMenuDisplay)}get isMenuVisible(){const{rightControls:t,leftUsedSpace:e}=this.controlsOptions;return t.length>1&&e>=90}connectedCallback(){super.connectedCallback(),this.player.addEventListener(n.CONTROLS_ACTIVE,this.controlsActiveHandler),this.player.addEventListener(n.CONTROLS_INACTIVE,this.controlsInactiveHandler)}disconnectedCallback(){super.disconnectedCallback(),this.player.removeEventListener(n.CONTROLS_ACTIVE,this.controlsActiveHandler),this.player.removeEventListener(n.CONTROLS_INACTIVE,this.controlsInactiveHandler)}updated(){(!this.allowMenuDisplay&&this.showMenu||!this.isMenuVisible&&this.showMenu)&&(this.showMenu=!1)}render(){const t=this.player.config.style,{leftControls:e,rightControls:i,controlsSize:r}=this.controlsOptions;this.player.isControlsBottomVisible=r>0;const s=Zi({controls:!0,"bottom-controls-visible":r>0,"controls--progress-bar":this.allowProgressBar,pointer:!0});return Xe`
${Fr(t.rewind,(()=>Xe``),(()=>Xe` `))}
 
${Fr(t.forward,(()=>Xe``),(()=>Xe` `))}
${Fr(!this.showMenu,(()=>e.map((t=>t.element))))}
${Fr(!this.allowMenuDisplay||!this.isMenuVisible,(()=>i.map((t=>t.element))))} ${Fr(this.allowMenuDisplay&&this.isMenuVisible,(()=>this.renderMenu(i)))}
`}renderMenu(t){return Xe` ${Fr(this.showMenu,(()=>t.map((t=>t.element))))} `}sendEvents(t){const e=this.player.config.style,i={forward:e.forward,fullscreen:e.fullscreen,progressBar:e.progressBar,rewind:e.rewind,smallplay:e.smallPlay,speed:e.speed,videoTime:e.videoTime,volume:e.volume},r=Object.entries(i).reduce(((e,i)=>Object.assign(Object.assign({},e),{[i[0]]:i[1]&&t})),{});this.player.dispatchEvent(new CustomEvent(n.CONTROLS_ITEMS,{detail:{items:r}}))}createRenderRoot(){return this}};Ss.componentName="Controls",Ss.reRenderOn=[n.PLAYER_RESIZE],Ss.styles=[Es,zr.styles,Gr.styles,$r.styles,jr.styles,Ur.styles,ms.styles,bs.styles,as.styles,fs.styles],Ts([Gi()],Ss.prototype,"showMenu",void 0),Ss=Ts([Ui("vturb-controls")],Ss);class _s{constructor(t,e=(t,e)=>t){this.win=window,this.updater=e,this.logger=t,this.setEvents()}findClickableParent(t){try{for(;t;){if(["A","BUTTON","INPUT"].includes(t.tagName)){if("A"===t.tagName&&t.hasAttribute("href"))return t;if(("BUTTON"===t.tagName||"INPUT"===t.tagName)&&"submit"===t.type&&t.form)return t}t=t.parentElement}return null}catch(t){return this.logger.error("Error finding clickable parent",t),null}}handleFormElement(t){const e=t.form;e&&(e.action?e.action=this.injectIntoURL(e.action,t):this.logger.warn("Form element has no action",{element:t}))}handleLinkElement(t){const e=t.getAttribute("href");if(e)try{const i=window.location.href.split("#")[0];e.split("#")[0]===i||e.startsWith("#")||e.startsWith("javascript:")||(t.href=this.injectIntoURL(e,t))}catch(e){this.logger.warn(`Skipping link element due to error: ${e}, element: ${t}`)}}injectIntoURL(t,e){try{return this.updater(t,e)}catch(e){return this.logger.warn(`Error updating URL: ${t}`,{error:e}),t}}setEvents(){const t=t=>{try{const e=this.findClickableParent(t.target);e&&!this.shouldIgnoreElement(e)&&("A"===e.tagName?this.handleLinkElement(e):"BUTTON"!==e.tagName&&"INPUT"!==e.tagName||"submit"!==e.type||this.handleFormElement(e))}catch(t){this.logger.error("Error setting events",t)}};["mousedown","touchstart","mouseover"].forEach((e=>{this.win.addEventListener(e,t)}))}shouldIgnoreElement(t){return null!=U(t,".smartplayer-ignore-click-event")}}const As=(t=0)=>5*Math.floor(t/5),ws=["cmc_redir"];class Ls extends p{constructor(){super(...arguments),this.baseSearchParams=new URLSearchParams,this.currentHeadline=null,this.currentSmartAutoPlay=null,this.currentTurboSpeed=null,this.changeHeadline=t=>{this.currentHeadline=`${t.detail.number}`},this.changeSmartAutoPlay=t=>{this.currentSmartAutoPlay=`${t.detail.autoplay.number}`},this.changeTurboSpeed=t=>{this.currentTurboSpeed=t.detail.speed},this.dispatchMessageToParent=()=>{this.player.dispatchEvent(new CustomEvent(n.CONVERSION_TRACKING_UPDATE,{detail:{key:this.key}}))},this.saveTime=t=>{var e,i;this.player.store.set(this.lastTimeKey,null!==(i=null!=t?t:null===(e=this.player.video)||void 0===e?void 0:e.currentTime)&&void 0!==i?i:0)},this.redirectionParamUpdater=(t,e)=>{try{this.logger.debug("Redirect URL Param Updater",{key:e,base:t.toString()});let i=t.searchParams.get(e);if(!i)return;(i.includes("%2F")||i.includes("%3A"))&&(i=decodeURIComponent(i)),new URL(i),t.searchParams.set(e,encodeURIComponent(this.urlUpdater(i)))}catch(t){this.logger.error("Error updating URL",{error:t})}},this.urlUpdater=(t,e)=>{try{const e=new URL(t,window.location.href);return this.config.conversion.forEach((t=>{e.searchParams.set(t,this.key)})),ws.forEach((t=>this.redirectionParamUpdater(e,t))),this.logger.debug("URL Updater",{url:e.toString()}),e.toString()}catch(e){return this.logger.error("Error updating URL",{error:e}),t}}}get key(){var t,e;let i="",r="",s="";return this.currentTurboSpeed&&(i=`_t-${parseInt(""+10*this.currentTurboSpeed,10)}`),(null===(t=this.config.headlines)||void 0===t?void 0:t.active)&&this.currentHeadline&&(r=`_h-${this.currentHeadline}`),this.currentSmartAutoPlay&&(s=`_s-${this.currentSmartAutoPlay}`),`v3_${null===(e=this.player.analytics)||void 0===e?void 0:e.sessionId}_${this.config.id}_${this.lastTime}${i}${r}${s}`}get lastTime(){var t,e;const i=this.player.store.get(this.lastTimeKey,0);return i>0?i:this.player.controllers.blockers.noneBlocker("resume","smartAutoPlay")?As(null!==(e=null===(t=this.player.video)||void 0===t?void 0:t.currentTime)&&void 0!==e?e:0):0}get lastTimeKey(){var t;return`conversionTrackingTime_${null===(t=this.player.analytics)||void 0===t?void 0:t.sessionId}`}hostConnected(){super.hostConnected(),this.logger.debug("ConversionTrackingController: host connected"),this.player.addEventListener(n.PLAYER_READY,(()=>{var t;this.logger.debug("ConversionTrackingController: player ready"),(null===(t=this.config.conversion)||void 0===t?void 0:t.length)&&(this.logger.info("ConversionTrackingController: host connected, conversion tracking active"),this.setup(),this.player.dispatchEvent(new CustomEvent(n.CONVERSION_TRACKING_ENABLED)))}))}hostDisconnected(){this.logger.debug("ConversionTrackingController: host disconnected"),this.player.dispatchEvent(new CustomEvent(n.CONVERSION_TRACKING_DISABLED))}init(){this.logger.debug("ConversionTrackingController: init"),this.player.dispatchEvent(new CustomEvent(n.URL_INJECTION,{detail:{updater:this.urlUpdater}}))}setup(){this.logger.debug("ConversionTrackingController: setup",this.key),this.player.addEventListener(n.HEADLINE_CHANGED,this.changeHeadline),this.player.addEventListener(n.SMARTAUTOPLAY_SELECTED,this.changeSmartAutoPlay),this.player.addEventListener(n.TURBO_SPEED_CHANGED,this.changeTurboSpeed),this.player.addEventListener(n.VIDEO_TIMEUPDATE_MS,(()=>{var t,e;this.saveTime(As(null!==(e=null===(t=this.player.video)||void 0===t?void 0:t.currentTime)&&void 0!==e?e:0))})),this.player.addEventListener(n.VIDEO_ENDED,(()=>{var t;(null===(t=this.player.video)||void 0===t?void 0:t.duration)&&(this.saveTime(Math.floor(this.player.video.duration)),this.dispatchMessageToParent())})),this.urlUpdaterEngine=new _s(this.logger,((t,e)=>this.player.urlUpdater(t,e))),this.dispatchMessageToParent()}}Ls.controllerName="ConversionTrackingController",Ls.requirements=[({ready:t,video:e})=>!!t&&!!e];const ks=me`.fakebar{left:0;width:0%;bottom:0;height:var(--fakebar-height,10px);opacity:.8;z-index:var(--fakebar-index,100);position:absolute;transition:width .1s var(--base-transition-cubic,ease);background-color:var(--fakebar-background-color,#fff)}`;var Rs,Cs,Is=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Ps=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)};let xs=class extends Wi{constructor(){super(...arguments),this.alpha=2,this.progress=0,this.visibility=!1,this.timer=null,this.defaultConfig=()=>{var t,e;this.visibility=!1;const i=null!==(e=null===(t=this.player.video)||void 0===t?void 0:t.duration)&&void 0!==e?e:0,r=this.player.video.currentTime/i||0;this.setProgress(r)},this.getVideoDuration=()=>{var t,e;return null!==(e=null===(t=this.player.video)||void 0===t?void 0:t.duration)&&void 0!==e?e:0},this.onPause=()=>{this.logger.info("Fakebar onPause"),this.player.addEventListener(n.VIDEO_TIMEUPDATE_MS,this.onTimeUpdate),this.timer&&(clearInterval(this.timer),this.timer=null)},this.onPlay=()=>{this.logger.info("Fakebar onPlay"),this.player.removeEventListener(n.VIDEO_TIMEUPDATE_MS,this.onTimeUpdate),this.timer||(this.timer=setInterval(this.sync,40))},this.onTimeUpdate=()=>{this.logger.info("Fakebar onTimeUpdate"),this.sync()},this.setProgress=t=>{const e=Ps(this,Rs,"f").call(this,t);this.progress=e,this.player.dispatchEvent(new CustomEvent(n.FAKEBAR_PROGRESS,{detail:{progress:e}}))},this.sync=()=>{if(this.player.controllers.blockers.noneBlocker("played")||!this.player.video)return this.setProgress(0),void(this.visibility=!1);const t=this.player.video.duration||0,e=(this.player.video.currentTime||0)/t||0;if(e===1/0)return this.setProgress(0),void(this.visibility=!1);this.visibility=!0,this.setProgress(e),this.player.dispatchEvent(new CustomEvent(n.FAKEBAR_WIDTH,{detail:{width:e}}))},Rs.set(this,(t=>100*Math.pow(1-(t-=1)*t,1/this.alpha))),Cs.set(this,(()=>{const{alpha:t}=this.player.config.fakeBar;this.alpha=Math.min(3,Math.max(2,t))}))}connectedCallback(){var t;super.connectedCallback(),this.logger.info("connectedCallback"),Ps(this,Cs,"f").call(this),null===(t=this.player.player)||void 0===t||t.classList.add("with-fakebar"),this.player.controllers.blockers.noneBlocker("played")?this.player.addEventListener(n.VIDEO_LOADEDDATA,this.defaultConfig):this.timer=setInterval(this.sync,40),this.player.dispatchEvent(new CustomEvent(n.FAKEBAR_ACTIVE)),this.player.addEventListener(n.VIDEO_PLAY,this.onPlay),this.player.addEventListener(n.VIDEO_PAUSE,this.onPause)}disconnectedCallback(){this.logger.info("disconnectedCallback"),super.disconnectedCallback(),this.player.dispatchEvent(new CustomEvent(n.FAKEBAR_INACTIVE)),this.timer&&(clearInterval(this.timer),this.timer=null)}render(){return this.visibility?Xe`
`:null}};Rs=new WeakMap,Cs=new WeakMap,xs.componentName="Fakebar",xs.styles=[ks],Is([ji(".fakebar")],xs.prototype,"fakebar",void 0),Is([Gi()],xs.prototype,"progress",void 0),Is([Gi()],xs.prototype,"visibility",void 0),xs=Is([Ui("vturb-fakebar")],xs);var Ds=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};const Os="\n.headline {\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: fit-content;\n}\n\n.headline * {\n margin: 0;\n padding: 0;\n}\n\n.headline img {\n margin-bottom: var(--headline-margin-bottom, 30px);\n}\n";let Ms=class extends qi{constructor(){super(...arguments),this.onPlayerResize=()=>{var t;const e=null===(t=this.player.player)||void 0===t?void 0:t.clientWidth;e&&(this.style.fontSize=e<768?"14px":"18px")}}static shouldLoadHeadlines(t){var e,i;return(null===(e=t.headlines)||void 0===e?void 0:e.active)&&(null===(i=t.headlines)||void 0===i?void 0:i.items.length)>0}connectedCallback(){var t;super.connectedCallback(),this.player.isIframe&&(this.style.display="none"),this.headline=this.getCurrentHeadline(),!this.player.config.preview&&this.headline&&this.player.controllers.analytics.event("headlineview",{headline_number:this.headline.number,player_id:this.player.config.id,session_id:null===(t=this.player.analytics)||void 0===t?void 0:t.sessionId}),this.player.dispatchEvent(new CustomEvent(n.HEADLINE_CHANGED,{detail:{headline:this.headline,number:this.headline.number}})),this.player.addEventListener(n.PLAYER_RESIZE,this.onPlayerResize),this.player.addEventListener(n.PLAYER_READY,this.onPlayerResize,{once:!0})}disconnectedCallback(){this.player.removeEventListener(n.PLAYER_RESIZE,this.onPlayerResize)}importFontFamily(t){var e,i;const r=null===(e=t.typography)||void 0===e?void 0:e.family.toLowerCase().replace(/\W+/g,"-");((t,e,i)=>{if(t.getElementById(e))return;const r=t.createElement("link");r.id=e,r.setAttribute("href",i),r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),t.head.appendChild(r)})(document,`vturb-headline-font-${r}`,null===(i=t.typography)||void 0===i?void 0:i.embedLink)}render(){if(this.headline&&"none"!==this.headline.name)return this.player.isIframe&&this.renderIframe(),"html"===this.headline.type?this.renderHtml():this.renderImage()}renderHtml(){var t,e,i,r,s,n,o,a,l,c;this.importFontFamily(this.headline);const d=this.headline,h=`\n ${Os}\n\n h1 {\n margin: 0;\n }\n .headline-content {\n ${d.typography?`\n font-family: '${null!==(e=null===(t=d.typography)||void 0===t?void 0:t.family)&&void 0!==e?e:"inherit"}';\n font-size: ${(null!==(r=null===(i=d.typography)||void 0===i?void 0:i.size)&&void 0!==r?r:16)/18}em;\n letter-spacing: ${null!==(n=null===(s=d.typography)||void 0===s?void 0:s.letterSpacing)&&void 0!==n?n:0}px;\n line-height: ${null!==(a=null===(o=d.typography)||void 0===o?void 0:o.lineHeight)&&void 0!==a?a:100}%;\n `:""}\n ${d.layout?`\n width: ${null!==(c=null===(l=d.layout)||void 0===l?void 0:l.width)&&void 0!==c?c:100}%;\n margin: ${d.layout.margin.values.map((t=>`${t}px`)).join(" ")};\n `:""}\n }\n `,u=lr(d.html,this.logger);return Xe`
`}renderIframe(){return function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){var t,e;yield this.updateComplete;const i=null===(t=this.headlineStyle)||void 0===t?void 0:t.innerHTML,r=null===(e=this.headlineContent)||void 0===e?void 0:e.innerHTML;if(i&&r)return this.player.dispatchEvent(new CustomEvent(n.HEADLINE_RENDERED,{detail:{headline:this.headline,html:r,style:i}})),null}))}renderImage(){const t=this.headline,e=nr({backgroundColor:"transparent",maxWidth:"100%"});return Xe`
${t.name}
`}getCurrentHeadline(){const[t,e]=Cr(this.player.config.headlines.items,this.player.config.headlines.items[0],{identifierKey:"number",storageKey:`headline-${this.player.config.id}`,store:this.player.store});return this.logger.groupDebug(`Headline ${t.number} selected`).debug("details",e).end(),t}};Ms.componentName="Headline",Ms.styles=me` :host { display: block; font-family: inherit; text-align: left; width: 100%; font-size: 18px; color: rgba(0, 0, 0, 1); } `,Ds([Gi()],Ms.prototype,"headline",void 0),Ds([ji("div")],Ms.prototype,"headlineContent",void 0),Ds([ji("style")],Ms.prototype,"headlineStyle",void 0),Ms=Ds([Ui("vturb-headline")],Ms);var $s=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Fs=class extends yi{constructor(){super(...arguments),this.name="",this.projected=[],this.updatePortalContent=t=>{this.confirmDestination(t)&&(this.projected=t.detail.content||[],t.detail.onMount&&t.detail.onMount(this))}}confirmDestination(t){return this.name||console.warn("This destination has not been named."),t.detail.destination===this.name&&(t.stopPropagation(),!0)}connectedCallback(){super.connectedCallback(),document.addEventListener("portal-open",this.updatePortalContent,!0),document.addEventListener("portal-close",this.updatePortalContent,!0)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("portal-open",this.updatePortalContent,!0),document.removeEventListener("portal-close",this.updatePortalContent,!0)}render(){return Xe`${this.projected}`}createRenderRoot(){return this}};Fs.styles=[me` :host { } `],$s([Vi({type:String})],Fs.prototype,"name",void 0),$s([Vi({type:Array})],Fs.prototype,"projected",void 0),Fs=$s([Ui("portal-destination")],Fs);var Ns=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Us=class extends yi{constructor(){super(...arguments),this.destination="",this.reference=""}static get styles(){return[me` :host { display: none; } `]}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(Bs("portal-close",{destination:this.destination}))}projectSlot(t){t.target.assignedElements().length&&this.dispatchEvent(Bs("portal-open",{content:t.target.assignedElements(),destination:this.destination,onMount:this.onMount,reference:this.reference}))}render(){return Xe` `}};function Bs(t,e){return new CustomEvent(t,{composed:!0,detail:e})}Ns([Vi({type:String})],Us.prototype,"destination",void 0),Ns([Vi({type:Function})],Us.prototype,"onMount",void 0),Ns([Vi({type:String})],Us.prototype,"reference",void 0),Us=Ns([Ui("portal-entrance")],Us);const Vs=me`.blocked{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000;overflow:hidden;background-color:#202020;box-shadow:inset 0 0 160px 0 #000}.blocked__logo{position:absolute;width:100%;height:100%}.blocked__logo svg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);height:80%;width:80%;opacity:.035}.blocked__logo svg path{fill:#fff}.blocked__content{top:50%;left:50%;width:80%;position:absolute;max-width:32em;text-align:center;transform:translate(-50%,-50%)}.blocked__msg{color:#ccc;text-align:center;font-size:1.2em;text-shadow:0 2px 0 #000,0 3px 3px #000}.blocked__button{color:#fff;margin:0 auto;padding:.7em 1.5em;display:inline-block;font-size:1em;margin-top:1.2em;background:#f1582d;font-weight:600;border-radius:5px;text-decoration:none;transition:transform .2s}.blocked__button:hover{transform:scale(1.05)}@media(max-width:480px){.blocked__msg{font-size:1em}.blocked__button{font-size:.8em}}`;var Gs=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Hs=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))};class js extends Error{constructor(t,e){super(t),this.name="LicenseError",this.status=e}}let zs=class extends Wi{constructor(){super(...arguments),this.URL="https://api.vturb.com.br/vturb/check",this.check=()=>Hs(this,void 0,void 0,(function*(){var t;this.player.removeEventListener(n.PLAYER_READY,this.check);const e={domain:yield this.domain(),m3u8_path:null===(t=this.player.hlsVideo)||void 0===t?void 0:t.m3u8,player_id:this.player.config.id};this.logger.groupDebug("details to request").debug("domain",e.domain).debug("m3u8_path",e.m3u8_path).debug("player_id",e.player_id).end(),fetch(this.URL,{body:JSON.stringify(e),method:"POST"}).then((t=>t.status)).then((t=>{try{this.exceptionByStatus(t),this.player.dispatchEvent(new CustomEvent(n.LICENSE_ALLOWED))}catch(t){t instanceof Error&&"LicenseError"===t.name&&(this.logger.warn(`license error(${t.status}): ${t.message}`,t),this.error=t,this.player.dispatchEvent(new CustomEvent(n.LICENSE_DENIED,{detail:t})),this.player.changeLicense(!1))}})).catch((t=>{t&&this.logger.groupError(`License response (${t.status})`).error("error",t).end()}))}))}connectedCallback(){super.connectedCallback(),this.player.addEventListener(n.PLAYER_READY,this.check,{once:!0})}disconnectedCallback(){super.disconnectedCallback(),this.player.removeEventListener(n.PLAYER_READY,this.check)}domain(){return Hs(this,void 0,void 0,(function*(){const t=ae({search:location.search,logger:this.logger});return this.logger.debug("checking domain",{isIframe:this.player.isIframe,locationFromVl:null==t?void 0:t.hostname,location}),this.player.isIframe&&(null==t?void 0:t.hostname)?t.hostname:location.hostname}))}exceptionByStatus(t){switch(t){case 401:throw new js(kr("license.blocked.by_rule"),401);case 403:throw new js(kr("license.blocked.payment_open"),403);case 406:throw new js(kr("license.blocked.domain_not_allowed"),406);case 451:throw new js(kr("license.blocked.indefinite_block"),451)}}render(){if(this.error)return Xe` `}};zs.componentName="License",zs.styles=[Vs],Gs([Gi()],zs.prototype,"error",void 0),zs=Gs([Ui("vturb-license")],zs);const Ks=me`vturb-minihook{z-index:-1}#player.show-smartautoplay{pointer-events:none}#player .minihook{z-index:9;position:absolute;top:0;width:100%;height:100%;pointer-events:none}#player .minihook .item{opacity:1}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-out{from{opacity:1}to{opacity:0}}#player .minihook .item.show{animation:fade-in .8s ease-in forwards}#player .minihook .item.hide{animation:fade-out .8s ease-in forwards}`;var Ys=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let Ws=class extends Wi{constructor(){super(...arguments),this.activeItems=[],this.onTimeUpdate=t=>{const{time:e}=t.detail,i=this.getItems(e),r=i.filter((t=>!this.activeItems.includes(t))),s=this.activeItems.filter((t=>!i.includes(t)));let o=[...this.activeItems];if(r.length>0&&o.push(...r),s.length>0){const t=this.logger.groupDebug("hide items");s.forEach((e=>{const i=this.minihook.querySelector(`#minihook-${e.id}`);i&&!i.classList.contains("hide")&&(t.debug("hide item",e),i.classList.add("hide"))})),t.end(),o=o.filter((t=>!s.includes(t)))}hr(o,this.activeItems)||setTimeout((()=>{this.activeItems=o,this.dispatchEvent(new CustomEvent(n.MINIHOOK_ITEMS,{detail:{items:o}}))}),850)}}connectedCallback(){super.connectedCallback(),this.player.addEventListener(n.VIDEO_TIMEUPDATE_MS,this.onTimeUpdate)}disconnectedCallback(){super.disconnectedCallback(),this.player.removeEventListener(n.VIDEO_TIMEUPDATE_MS,this.onTimeUpdate)}getItems(t){return this.player.config.minihooks.items.filter((e=>t>=e.range.start&&t<=e.range.finish))}render(){return Xe`
${this.renderRichElement()}
`}renderRichElement(){return Xe` ${br(this.activeItems,(t=>t.id),((t,e)=>Xe``))} `}};function*qs(t,e){if(void 0!==t){let i=0;for(const r of t)yield e(r,i++)}}Ws.styles=[Ks],Ws.componentName="Minihook",Ys([Gi()],Ws.prototype,"activeItems",void 0),Ys([ji(".minihook")],Ws.prototype,"minihook",void 0),Ws=Ys([Ui("vturb-minihook")],Ws);const Xs=(t,e)=>{var i,r;const s=t._$AN;if(void 0===s)return!1;for(const t of s)null===(r=(i=t)._$AO)||void 0===r||r.call(i,e,!1),Xs(t,e);return!0},Qs=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},Zs=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),en(e)}};function Js(t){void 0!==this._$AN?(Qs(this),this._$AM=t,Zs(this)):this._$AM=t}function tn(t,e=!1,i=0){const r=this._$AH,s=this._$AN;if(void 0!==s&&0!==s.size)if(e)if(Array.isArray(r))for(let t=i;t{var e,i,r,s;2==t.type&&(null!==(e=(r=t)._$AP)&&void 0!==e||(r._$AP=tn),null!==(i=(s=t)._$AQ)&&void 0!==i||(s._$AQ=Js))};class rn extends Qi{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Zs(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,r;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(r=this.disconnected)||void 0===r||r.call(this)),e&&(Xs(this,t),Qs(this))}setValue(t){if((()=>void 0===this._$Ct.strings)())this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class sn{}const nn=new WeakMap,on=Xi(class extends rn{render(t){return Ze}update(t,[e]){var i;const r=e!==this.G;return r&&void 0!==this.G&&this.ot(void 0),(r||this.rt!==this.lt)&&(this.G=e,this.dt=null===(i=t.options)||void 0===i?void 0:i.host,this.ot(this.lt=t.element)),Ze}ot(t){var e;if("function"==typeof this.G){const i=null!==(e=this.dt)&&void 0!==e?e:globalThis;let r=nn.get(i);void 0===r&&(r=new WeakMap,nn.set(i,r)),void 0!==r.get(this.G)&&this.G.call(this.dt,void 0),r.set(this.G,t),void 0!==t&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var t,e,i;return"function"==typeof this.G?null===(e=nn.get(null!==(t=this.dt)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.G):null===(i=this.G)||void 0===i?void 0:i.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),an=["borderRadius","borderWidth","fontSize","height","width","left","top"],ln=class{constructor(t){var e;this.options=t,this.container=null!==(e=t.container)&&void 0!==e?e:t.player.video,this.video=this.options.player.video,this.els=this.getElementsToScale(t.elements)}getElementsToScale(t){return Array.prototype.map.call(t,(t=>{const e={domEel:t,original:{}};return an.forEach((i=>{e.original[i]=parseInt(t.style[i]||"0",10)})),e}))}ratio(){return Math.min(this.video.clientWidth/this.options.width,this.video.clientHeight/this.options.height)}repositionElement(t,e){const i=this.container.clientWidth/this.options.width,r=this.container.clientHeight/this.options.height;t.domEel.style.left=t.original.left*i+(t.original.width*i/2-t.original.width*e/2)+"px",t.domEel.style.top=t.original.top*r+(t.original.height*r/2-t.original.height*e/2)+"px"}scale(){this.scaleBy(this.ratio())}scaleBy(t){this.container.style.width=this.options.width*t+"px",this.container.style.height=this.options.height*t+"px",this.container.style.left=(this.video.clientWidth-this.container.clientWidth)/2+"px",this.container.style.top=(this.video.clientHeight-this.container.clientHeight)/2+"px",this.els.forEach((e=>{this.scaleElement(e,t)}))}scaleElement(t,e){const i=["top","left"];Object.entries(t.original).forEach((([r,s])=>{i.includes(r)||(t.domEel.style[r]=s*e+"px")})),this.repositionElement(t,e)}},cn=class{constructor(t,e){this.options=t,this.logger=e,this.logger.groupTrace("RichElement.MaxScaleFactorCalculator.constructor").debug("options",t).end(),this.maxFactor=this.calculateMaxFactor(),this.proportionalScale=this.calcElementsProportionalScale(),this.multiplier=(1-this.proportionalScale)/5}bestFactor(t,e){if(t<1){const i=(1-t)*this.multiplier+t;return e({maxFactor:this.maxFactor,multiplier:this.multiplier,result:i,target:t}),i{const i=this.lowerBorderDistance(e);return Math.min(t,i)}),1/0)}calcElementsProportionalScale(){const{bottom:t,left:e,right:i,top:r}=this.maxBorderDistanceOfAllElements(),s=i-e,n=t-r,o=Math.max(s/this.options.width,n/this.options.height);return this.logger.groupTrace("RichElement.MaxScaleFactorCalculator.calcElementsProportionalScale").debug("result",o).end(),o}calculateMaxFactor(){const t=this.bestElementToCalculate(),e=1/(2*t/this.options.width-1)*-1,i=1/(2*t/this.options.height-1)*-1;return this.logger.groupTrace("RichElement.MaxScaleFactorCalculator.calculateMaxFactor").debug("distance",t).debug("distanceWidth",e).debug("distanceHeight",i).debug("maxFactor",Math.max(e,i)).debug("proportionalScale",this.proportionalScale).end(),Math.max(e,i)}lowerBorderDistance(t){const{height:e,width:i}=this.options,r=this.mountReactFromRichElement(t);return this.logger.groupTrace("RichElement.MaxScaleFactorCalculator.lowerBorderDistance").debug("rect",r).end(),Math.min(r.left,r.top,i-r.right,e-r.bottom)}maxBorderDistanceOfAllElements(){const t=this.options.elements.map((t=>this.mountReactFromRichElement(t))),e=t.map((t=>t.left)),i=t.map((t=>t.right)),r=t.map((t=>t.top));return{bottom:t.map((t=>t.bottom)).reduce(((t,e)=>Math.max(t,e)),0),left:e.reduce(((t,e)=>Math.min(t,e)),1/0),right:i.reduce(((t,e)=>Math.max(t,e)),0),top:r.reduce(((t,e)=>Math.min(t,e)),1/0)}}},dn=class{constructor(t){var e,i;this.options=t,this.container=null!==(e=t.container)&&void 0!==e?e:null===(i=t.player)||void 0===i?void 0:i.video}compareConatinerScale(t){const e=1*this.container.getBoundingClientRect().width/this.options.width;return this.options.logger.groupTrace("NativeScaler.compareContainerScale").debug("containerRatio",e).debug("ratio",t).end(),Math.max(t,e)}ratio(){const t=this.container.getBoundingClientRect(),e=Math.min(1*t.width/this.options.width,1*t.height/this.options.height),i=Math.max(1*t.width/this.options.width,1*t.height/this.options.height);return this.options.logger.groupTrace("NativeScaler.ratio").debug("ratioMin",e).debug("ratioMax",i).debug("rect",t).debug("width",this.options.width).debug("height",this.options.height).end(),e}scale(){this.scaleBy(this.ratio())}scaleBy(t){const e=this.compareConatinerScale(t);Array.prototype.forEach.call(this.options.elements,(t=>{this.scaleElement(t,e)}))}scaleElement(t,e){t.style.scale=e.toString(),t.style.transformOrigin="top left",t.style.left=(this.container.clientWidth-t.clientWidth*e)/2+"px",t.style.top=(this.container.clientHeight-t.clientHeight*e)/2+"px"}};var hn=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let un=class extends yi{getStyle(){return nr(Object.assign(Object.assign({backgroundColor:this.props.properties.color,borderColor:this.props.properties.border.color,borderRadius:`${this.props.properties.radius}px`,borderStyle:this.props.properties.border.type,borderWidth:`${this.props.properties.border.size}px`,height:`${this.props.height}px`,left:`${this.props.x}px`,position:"absolute",rotate:`${this.props.rotation}deg`,top:`${this.props.y}px`,width:`${this.props.width}px`,zIndex:this.props.order},this.props.transformOrigin&&{transformOrigin:this.props.transformOrigin}),this.props.opacity>=0&&{opacity:this.props.opacity}))}render(){return Xe`
`}createRenderRoot(){return this}};hn([Vi()],un.prototype,"props",void 0),un=hn([Ui("rich-element-box")],un);var fn=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let pn=class extends yi{getStyle(){return nr(Object.assign(Object.assign({height:`${this.props.height}px`,left:`${this.props.x}px`,position:"absolute",rotate:`${this.props.rotation}deg`,top:`${this.props.y}px`,width:`${this.props.width}px`,zIndex:this.props.order},this.props.transformOrigin&&{transformOrigin:this.props.transformOrigin}),this.props.opacity>=0&&{opacity:this.props.opacity}))}render(){return Xe` ${this.props.properties.alt} `}createRenderRoot(){return this}};fn([Vi()],pn.prototype,"props",void 0),pn=fn([Ui("rich-element-image")],pn);var gn=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let mn=class extends yi{getStyle(){return nr(Object.assign(Object.assign(Object.assign(Object.assign({color:this.props.properties.color,display:"block",fontFamily:"Roboto, Helvetica, Arial, sans-serif",fontSize:`${this.props.properties.size}px`,height:`${this.props.height}px`,left:`${this.props.x}px`,position:"absolute",rotate:`${this.props.rotation}deg`,top:`${this.props.y}px`,width:`${this.props.width}px`,zIndex:this.props.order},this.props.transformOrigin&&{transformOrigin:this.props.transformOrigin}),this.props.properties.align&&{textAlign:this.props.properties.align}),this.props.properties.weight&&{fontWeight:this.props.properties.weight}),this.props.opacity>=0&&{opacity:this.props.opacity}))}render(){return Xe` ${this.props.properties.value} `}createRenderRoot(){return this}};gn([Vi()],mn.prototype,"props",void 0),mn=gn([Ui("rich-element-text")],mn);var vn,yn=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},bn=function(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))},En=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)};let Tn=class extends qi{constructor(){super(...arguments),this.canUseScale=function(){try{return CSS.supports("scale: 0.5")&&CSS.supports("transform-origin: top left")}catch(t){return!1}}(),this.containerRef=new sn,this.isMobile=O(),this.scaleInterval=0,this.scale=()=>bn(this,void 0,void 0,(function*(){var t,e;if(!this.scaler)return;const i=null===(t=this.factorCalculator)||void 0===t?void 0:t.bestFactor(this.scaler.ratio(),(t=>{this.logger.groupTrace("bestFactor").trace("details",t).end()}));this.logger.groupTrace("scaling").trace("ratio",{ratio:i,scalerRatio:this.scaler.ratio()}).end(),i&&(null===(e=this.scaler)||void 0===e||e.scaleBy(Math.min(Math.max(i,this.scaler.ratio()),this.factorCalculator.maxFactor)))})),vn.set(this,(()=>{this.containerRef.value&&this.useScaler(this.containerRef.value)}))}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(En(this,vn,"f")),this.resizeObserver.observe(this.player.player),document.addEventListener("DOMContentLoaded",En(this,vn,"f")),window.addEventListener("resize",En(this,vn,"f")),this.player.addEventListener(n.PLAYER_RESIZE,En(this,vn,"f")),En(this,vn,"f").call(this),this.scaleInterval&&(this.scaleIntervalId=window.setInterval(En(this,vn,"f"),this.scaleInterval))}disconnectedCallback(){var t,e;super.disconnectedCallback(),document.removeEventListener("DOMContentLoaded",En(this,vn,"f")),window.removeEventListener("resize",En(this,vn,"f")),null===(t=this.player)||void 0===t||t.removeEventListener(n.PLAYER_RESIZE,En(this,vn,"f")),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.scaleIntervalId&&(window.clearInterval(this.scaleIntervalId),this.scaleIntervalId=void 0),this.scaler=void 0,this.factorCalculator=void 0}render(){const t=nr({display:"block",height:`${this.player.config.video.height}px`,left:0,overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,width:`${this.player.config.video.width}px`,zIndex:"1000"});return Xe`
${qs(this.elements.sort(((t,e)=>t.order-e.order)),this.renderElement)}
`}updated(){this.scale()}createRenderRoot(){return this}renderElement(t){return"image"===t.type?Xe``:"text"===t.type?Xe``:"box"===t.type?Xe``:void 0}useScaler(t){return bn(this,void 0,void 0,(function*(){var e;this.logger.trace("useScaler");const i={height:this.player.config.video.height,player:this.player,width:this.player.config.video.width},r=Array.from(this.elementsHtml);this.canUseScale?(this.logger.trace("Using NativeScaler"),this.scaler=new dn(Object.assign(Object.assign({},i),{elements:[t],logger:this.logger}))):this.scaler||(this.logger.trace("Using MakeshiftScaler"),this.scaler=new ln(Object.assign(Object.assign({},i),{container:t,elements:r,logger:this.logger})));const s={elements:this.elements,height:this.player.config.video.height,width:this.player.config.video.width};this.factorCalculator=null!==(e=this.factorCalculator)&&void 0!==e?e:new cn(s,this.logger),this.scale()}))}};vn=new WeakMap,Tn.componentName="RichElement",Tn.styles=me``,yn([Vi({attribute:!1,type:Object})],Tn.prototype,"elements",void 0),yn([Hi({descriptor:t=>({get(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelectorAll("rich-element-image > *, rich-element-text > *, rich-element-box > *"))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})],Tn.prototype,"elementsHtml",void 0),yn([Vi({type:Number})],Tn.prototype,"scaleInterval",void 0),Tn=yn([Ui("rich-element")],Tn);const Sn=(t,e)=>{const i=(t||0)/(e||1)*100;return Math.max(0,Math.min(i,100))};var _n,An=function(t,e,i,r){var s,n=arguments.length,o=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};let wn=_n=class extends Wi{constructor(){super(...arguments),this.doc=document,this.win=window,this.dispatchedPixels=new Set,this.onCheckIfPixelsWasAlreadyDispatched=()=>{var t;const e=this.videoCurrentTime,i=Sn(e,this.videoDuration);null===(t=this.player.config.pixels)||void 0===t||t.items.forEach((t=>{this.shouldDispatchPixel(t,e,i)&&this.dispatchedPixels.add(this.formatDispatchedPixelId(t))}))},this.onTimeUpdate=(t,e)=>{const i=e.detail.time,r=Sn(i,this.videoDuration);if("facebook"===t.type){const e=`View${r-r%_n.continousPercentage}%`;this.shouldDispatchPixel(t,i,r,e)&&this.dispatchPixel(t,e)}this.shouldDispatchPixel(t,i,r)&&(this.dispatchPixel(t),this.player.removeEventListener(n.VIDEO_TIMEUPDATE,t.caller))}}get videoDuration(){var t;return(null===(t=this.player.video)||void 0===t?void 0:t.duration)||0}get videoCurrentTime(){var t;return(null===(t=this.player.video)||void 0===t?void 0:t.currentTime)||0}connectedCallback(){super.connectedCallback(),this.initFacebookPixel(),this.player.addEventListener(n.RESUME_CONTINUE,this.onCheckIfPixelsWasAlreadyDispatched)}disconnectedCallback(){var t;super.disconnectedCallback(),this.player.removeEventListener(n.RESUME_CONTINUE,this.onCheckIfPixelsWasAlreadyDispatched),null===(t=this.player.config.pixels)||void 0===t||t.items.forEach((t=>{t.caller&&this.player.removeEventListener(n.VIDEO_TIMEUPDATE,t.caller)}))}firstUpdated(){var t;null===(t=this.player.config.pixels)||void 0===t||t.items.forEach((t=>{this.setPixelCaller(t)}))}render(){return null}setPixelCaller(t){t.caller||(t.caller=e=>this.onTimeUpdate(t,e),this.player.addEventListener(n.VIDEO_TIMEUPDATE,t.caller))}updated(){var t;null===(t=this.player.config.pixels)||void 0===t||t.items.forEach((t=>{this.setPixelCaller(t)}))}formatDispatchedPixelId(t,e){return e?`${t.id}-${e}`:t.id}dispatchPixel(t,e){switch(this.logger.groupDebug(`dispatching pixel: ${t.id} ${null!=e?e:""}`).debug("pixel",t).end(),t.type){case"custom":{const e=this.doc.createRange().createContextualFragment(atob(t.customHtml));this.logger.debug("fragment",[e,atob(t.customHtml)]),this.doc.body.appendChild(e);break}case"facebook":this.win.fbq&&"function"==typeof this.win.fbq||this.initFacebookPixel(),this.win.fbq("trackSingleCustom",t.pixelId,null!=e?e:t.pixelValue);break;case"google":this.win.gtag&&"function"==typeof this.win.gtag||this.initGoogleTagManager(),this.win.gtag("event",t.pixelValue,{send_to:t.pixelId})}this.dispatchedPixels.add(this.formatDispatchedPixelId(t,e))}initFacebookPixel(){var t;const e=null===(t=this.player.config.pixels)||void 0===t?void 0:t.items.filter((t=>"facebook"===t.type)).map((t=>t.pixelId)).filter(((t,e,i)=>i.indexOf(t)===e));this.logger.groupDebug("initializing Facebook Pixel").debug("pixelIds",e).end(),(()=>{if(this.win.fbq)return;const t=this.win.fbq=function(...e){t.callMethod?t.callMethod(...e):t.queue.push(e)};this.win._fbq||(this.win._fbq=t),t.push=t,t.loaded=!0,t.version="2.0",t.queue=[];const e=this.doc.createElement("script");e.async=!0,e.src="https://connect.facebook.net/en_US/fbevents.js";const i=this.doc.getElementsByTagName("script")[0];i.parentNode.insertBefore(e,i)})(),e.forEach((t=>{this.win.fbq("init",t)})),this.win.fbq("track","PageView")}initGoogleTagManager(){var t,e;const i=null===(t=this.player.config.pixels)||void 0===t?void 0:t.items.some((t=>"google"===t.type));if(i){const t=this.win.gtag&&"function"==typeof this.win.gtag,r=this.win.dataLayer&&"function"==typeof this.win.dataLayer.push;this.logger.groupDebug("initializing Google Tag Manager").debug("hasGooglePixel",i).debug("haveGoogleTagManager",t).debug("haveDatalayer",r).end();const s=null===(e=this.player.config.pixels)||void 0===e?void 0:e.items.filter((t=>"google"===t.type)).map((t=>t.pixelId)).filter(((t,e,i)=>i.indexOf(t)===e));if(r||(this.logger.info("Add Data Layer to page"),this.win.dataLayer=this.win.dataLayer||[]),!t){this.logger.info("Add Google Tag Manager to page"),this.logger.info("https://developers.google.com/tag-manager/quickstart");const t=this.win;t.gtag=function(...e){t.dataLayer.push(e)},t.gtag("js",new Date)}s.forEach((t=>{this.win.dataLayer.find((e=>e&&e.config&&e.config.send_to===t))||(this.win.gtag("config",t),document.head.innerHTML+=`